Use the nzstate command to display the current system state or to wait for a particular system state to occur.
nzstate [-h|-rev|-hc] subcmd [subcmd options]]
Input | Description |
---|---|
nzstate listStates | Displays the system states and a description. |
nzstate show options | Displays the current state. This is the default if you type the command without any arguments. |
nzstate waitFor options | Waits for the system to reach the specified state. You cannot wait for a state that ends in -ing. |
Command | Option | Description |
---|---|---|
nzstate listStates | Takes no options. | |
nzstate show | -u user | Specifies the database user name [NZ_USER]. |
-pw password | Specifies the user password [NZ_PASSWORD]. | |
-host name | Specifies host name or IP address [NZ_HOST]. | |
-timeout secs | Specifies the number of seconds to wait for the command to complete before it exits with a timeout error. The default is 300. | |
-terse | Prints only the current state symbol. | |
-verbose | Prints the expected state if it is different from the current state. | |
-reason | Displays more information about why the system is in the Down state. | |
nzstate waitFor | -type state_type | Waits for the specified state to occur. Use the listStates subcommand to display the state types. |
-u user | Specifies the database user name [NZ_USER]. | |
-pw password | Specifies the user password [NZ_PASSWORD]. | |
-host name | Specifies host name or IP address [NZ_HOST]. | |
-timeout secs | Specifies the number of seconds to wait for the command to complete before it exits with a timeout error. The default is 300. |
nzstate listStates
State Symbol Description
------------ ------------------------------------------------------------
initialized used by a system component when first starting
paused already running queries will complete but new ones are queued
pausedNow like paused, except running queries are aborted
offline no queries are queued, only maintenance is allowed
offlineNow like offline, except user jobs are stopped immediately
online system is running normally
stopped system software is not running
down system was not able to initialize successfully
nzstate show -u user -pw password -host nzhost -verbose
nzstate waitFor -u user -pw password -host nzhost -type offline
nzstate -reason
The system is DOWN because failing over SPUs results in invalid
topology