readable. This makes the words easy to experiment with and use.
Provides (limited) information about the status of the server. If the server is run‐
ning, it will respond with imok. It turns out that “OK” is a relative concept, though.
For example, the server might be running but unable to communicate with the other
servers in the ensemble, yet still report that it is “OK.” For a more detailed and
reliable health check, use the stat word.
Provides information about the status of the server and the connections that are
currently active. The status includes some basic statistics and whether the server is
currently active, if it is a leader or follower, and the last zxid the server has seen.
Some of the statistics are cumulative and can be reset using the srst word.
Provides the same information as stat, except the connection information, which
it omits.
Provides session information, listing the currently active sessions and when they
will expire. This word can be used only on a server that is acting as the leader.
Lists the basic server configuration parameters that the server was started with.
Lists various Java environment parameters.
Offers more detailed statistics than stat about the server. Each line of output has
the format key
apply only to leaders.)
Lists a brief summary of the watches tracked by the server.
Lists detailed information on the watches tracked by the server, grouped by session.
Lists detailed information on the watches tracked by the server, grouped by the
znode path being watched.
cons lists detailed statistics for each connection on a server and crst resets all the
connection counters to zero.(((“cons”))
命令格式:
echo 四字命令 | nc zkIP zkPort
例子:
echo conf | nc 127.0.0.1 2181