Wait for a system state
You use the nzstate command to wait for a specific
operational state to occur before you proceed with other commands
or actions. You can use the nzstate command to
list the system states that you can wait for, as follows:
[nz@nzhost ~]$ 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- To wait for the online state or else timeout after 10 seconds,
enter:
nzstate waitfor -u admin -pw password -host nzhost -type online -timeout 10 - To test scripts or do maintenance, enter:
nzsystem pause -force nzstate waitfor -u admin -pw password -host nzhost -type paused -timeout 300Do some maintenance, and then resume the system:
Run a query.nzsystem resume nzstate waitfor -u admin -pw password -host nzhost -type online -timeout 120