Periodically, you may want to confirm the state of a specific admin process or database, or a specific Storage Manager (SM) process or Transaction Engine (TE) process.
The following commands provide information on the number of processes and their status:
nuocmd check database --db-name <database name>
Subcommand | Description |
---|---|
--check-liveness n
|
Checks that all processes have responded within the specified number (n ) of seconds. |
--check-running
|
Checks whether the database is in the RUNNING state. |
--num-processes n
|
Checks the number of processes. |
nuocmd check servers
Subcommand | Description |
---|---|
--check-active
|
Checks that all servers are ACTIVE . |
--check-connected
|
Checks that all servers are CONNECTED to the server performing the check. |
--check-leader
|
Checks the number of processes. |
--num-servers n |
Check the number of admin processes. |
nuocmd check process --start-id <start_id)
Subcommand | Description |
---|---|
check-liveness n
|
Checks that all servers are ACTIVE . |
--check-connected
|
Checks that all servers are CONNECTED to the server performing the check. |
--check-leader
|
Checks the number of processes. |
--num-servers n |
Check the number of admin processes. |
Note: The commands documented here are issued using NuoDB Command (nuocmd
). For more information on NuoDB Command and other command line tools, see Command Line Tools.
Note: The commands documented here return 1
if the boolean expression evaluates to true
, and return 0 if the boolean expression evaluates to false
.
Note: For each subcommand, you may add a --timeout
or a --wait-forever
option. If neither is provided, the check is run once and the command returns. Use --timeout TIMEOUT
to specify how long (in seconds) to wait for the database check to pass. Use --wait-forever
to specify no limit to how long to wait for the database check to pass.
--check-running
subcommand without timing out
To check whether a database named test
is running, and wait until it is running, specify the following:
nuocmd check database --db-name test --check-running --wait-forever
--check-running
subcommand
with the timeout
option
To check, for a period of 10 seconds before timing out, whether a database named test
is running, specify the following:
nuocmd check database --db-name test --check-running --timeout 10
--num-processes
subcommand
with the timeout
option
To check for a period of 10 seconds before timing out, whether a database named test
has four processes ( say two TE processes and two SM processes), specify the following:
nuocmd check database --db-name test --num-processes 4 --timeout 10
--check-running
subcommand without timing out
To check whether a database process with a specific start ID is running, and wait until it is running, specify the following:
nuocmd check process --start-id 1 --check-running --wait-forever
--check-exited
subcommand without timing out
A shutdown process
command was issued on start ID 1
. To check whether the database process with start ID 1
has exited, and wait until it has, specify the following:
nuocmd check process --start-id 1 --check-exited --wait-forever