lightdb_service.py — start/stop/restart a LightDB service
lightdb_service.py [ --help | -h ] [
--filename | -F
install_info
] [
--command | -c
start,stop,restart,status
] [ --cn_only | -C ] [ --dn_only | -D ] [ --primary_only | -P ] [ --standby_only | -S ] [
--node | -n
node_info
] --dry-run [ --force | -f ] [ --verbose | -v ] [ --quiet | -q ] [
--parallel | -B
parallel_processes
] [
--log_dir | -l
directory
]
lightdb_service.py is a utility for start/stop a LightDB service. It can full start or stop all component in a LightDB service installed by installer. It also has a simple status detection feature and can use some special mode to start or stop service.
The LightDB service must be installed by installer to use this application.
lightdb_service.py accepts the following command-line arguments:
-h--helpshow this help message and exit.
[-F] install_info[--filename ]install_infoSpecifies a path to a json file containing installation information(default use uninstall/uninstallFile.json).
[-c] start,stop,restart,status[--command ]start,stop,restart,statusstart/stop/restart/status lightdb service.
-C--cn_onlyOnly start/stop/restart coordinator node.
-D--dn_onlyOnly start/stop/restart data node.
-P--primary_onlyOnly start/stop/restart primary node for primary restart.
-S--standby_onlyOnly start/stop/restart standby node for standby restart.
-D--quietDo not display progress messages.
-n node_info--node node_infoOnly start/stop/restart specified node, node_info formart: ip:port.
--dry-runShow what would happen for action, but don't execute it.
-f--forceforce stop, even if some nodes are in incorrect state, skip incorrect nodes.
-B parallel_processes--parallel parallel_processesNumber of segment hosts to run in parallel. Default is 1.
-v--verboseDebug print
-q--quietsuppress status messages for stdout logging
-l directory--log_dir directoryLogfile directory, default is /tmp/ltAdminLogs.
In case of difficulty, see log file for detail error messge.
To start all test:
$lightdb_service.py -c start
To stop all:
$lightdb_service.py -c stop
To restart all:
$lightdb_service.py -c restart
To check status:
$lightdb_service.py -c status
To start/stop/restart primary only(The active and standby states remain unchanged):
$lightdb_service.py -c start/stop/restart --primary_only
To start/stop/restart standby only(The active and standby states remain unchanged):
$lightdb_service.py -c start/stop/restart --standby_only
To start/stop/restart cn node only:
$lightdb_service.py -c start/stop/restart --cn_only
To start/stop/restart dn node only:
$lightdb_service.py -c start/stop/restart --dn_only
To start/stop/restart primary in dn node only:
$lightdb_service.py -c start/stop/restart --dn_only --primary_only
To start/stop/restart specify node only(The active and standby states remain unchanged):
$lightdb_service.py -c start/stop/restart -n 10.20.148.122:54333
To force stop:
$lightdb_service.py -c stop -f
To dry run start command:
$lightdb_service.py -c start --dry-run