Database Reference
In-Depth Information
Table 21-1. ZooKeeper commands: the four-letter words
Category
Command Description
Server
status
Prints imok if the server is running and not in an error state.
ruok
Prints the server configuration (from zoo.cfg ).
conf
Prints the server environment, including ZooKeeper version, Java version, and
other system properties.
envi
Prints server statistics, including latency statistics, the number of znodes, and the
server mode (standalone, leader, or follower).
srvr
Prints server statistics and connected clients.
stat
Resets server statistics.
srst
Shows whether the server is in read-only ( ro ) mode (due to a network partition)
or read/write mode ( rw ).
isro
Client con-
nections
Lists all the sessions and ephemeral znodes for the ensemble. You must connect
to the leader (see srvr ) for this command.
dump
Lists connection statistics for all the server's clients.
cons
Resets connection statistics.
crst
Watches
Lists summary information for the server's watches.
wchs
Lists all the server's watches by connection. Caution: may impact server per-
formance for a large number of watches.
wchc
Lists all the server's watches by znode path. Caution: may impact server per-
formance for a large number of watches.
wchp
Monitoring mntr
Lists server statistics in Java properties format, suitable as a source for monitor-
ing systems such as Ganglia and Nagios.
In addition to the mntr command, ZooKeeper exposes statistics via JMX. For more de-
tails, see the ZooKeeper documentation . There are also monitoring tools and recipes in the
src/contrib directory of the distribution.
From version 3.5.0 of ZooKeeper, there is an inbuilt web server for providing the same in-
formation as the four-letter words. Visit http://localhost:8080/commands for a list of com-
mands.
Search WWH ::




Custom Search