|
Parameter Name |
Description |
|
Conf |
Output the detailed configuration information of the server.New in 3.3.0
$> Echo conf | NC localhost 2181
Clientport = 2181
Datadir =/home/test/taokeeper/zk_data/version-2
Datalogdir =/test/admin/taokeeper/zk_log/version-2
Ticktime = 2000
Maxclientcnxns = 1000
Minsessiontimeout = 4000
Maxsessiontimeout = 40000
Serverid = 2
Initlimit = 10
Synclimit = 5
Electionalg = 3
Electionport = 3888
Quoracle umport = 2888
Peertype = 0 |
|
Cons |
Output detailed information about all client connections on the specified server, including the Client IP address and session ID. New in 3.3.0Similar information:
$> Echo cons | NC localhost 2181
/1.2.3.4: 43527 [1] (queued = 0, recved = 152802, sent = 152806, SID = 0x2389e662b98c424, lop = Ping,
Est = 1350385542196, To = 6000, lcxid = 0 × 114, lzxid = 0 xffffffffffffff, lresp = 1350690663308,
Llat = 0, minlat = 0, avglat = 0, maxlat = 483)
...... |
|
Crst |
Functional commands. Reset all connectionsStatisticsInformation.New in 3.3.0 |
|
Dump |
This command is run on the leader to output information about sessions and temporary nodes in the waiting queue. |
|
ENVI |
The environment variable used to output the server. Including the operating system environment and Java environment. |
|
Ruok |
Used to test whether the server is in the error-free status. If it is normal, "imok" is returned; otherwise, no response is returned.
Note: ruok is not a particularly useful command. It does not reflect whether a server is working normally. The "stat" command is more reliable. |
|
Stat |
Output the brief status of the server and the information of the connected client. |
|
Srvr |
Similar to stat,New in 3.3.0
$> Echo stat | NC localhost 2181
Zookeeper version: 3.3.5-1301095, built on 03/15/2012 GMT
Clients:
/10.2.3.4: 59179 [1] (queued = 0, recved = 44845, sent = 44845)
Latency min/AVG/MAX: 0/0/1036.
Received: 2274602238
Sent: 2277795620
Outstanding: 0
Zxid: 0xa1b3503dd
Mode: Leader
Node count: 37473
$> Echo srvr | NC localhost 2181
Zookeeper version: 3.3.5-1301095, built on 03/15/2012 GMT
Latency min/AVG/MAX: 0/0/980.
Received: 2592698547
Sent: 2597713974
Outstanding: 0
Zxid: 0xa1b356b5b
Mode: follower
Node count: 37473 |
|
SRST |
Resets server statistics. |
|
Wchs |
List the summary and quantity of all watcher information:New in 3.3.0
$> Echo wchs | NC localhost 2181
3890 connections watching 537 paths
Total watches: 6909 |
|
Wchc |
Lists All watcher information, arranged by watcher sessions as grouping units, and lists the paths subscribed to by the session:New in 3.3.0
$> Echo wchc | NC localhost 2181
0x2389e662b97917f
/Mytest/test/path1/node1
0x3389e65c83cd790
/Mytest/test/path1/node2
0x1389e65c7ef6313
/Mytest/test/path1/node3
/Mytest/test/path1/node1 |
|
Wchp |
Lists All watcher information, arranged by Watcher's path as grouping units, and lists which sessions subscribe to this path:New in 3.3.0
$> Echo wchp | NC localhost 2181
/Mytest/test/path1/node
0x1389e65c7eea4f5
0x1389e65c7ee2f68
/Mytest/test/path1/node2
0x2389e662b967c29
/Mytest/test/path1/node3
0x3389e65c83dd2e0
0x1389e65c7f0c37c
0x1389e65c7f0c364
Note that the output results of the wchc and wchp commands are for sessions, which is unsatisfactory for O & M personnel. You can try to integrate the information of the cons command execution and output, you can use the Client IP address to replace the session ID, the specific can see this implementation: http://rdc.taobao.com/team/jm/archives/1450 |
|
Mntr |
Output some ZK runtime information. Through parsing these returned results, the monitoring results can be achieved.New in 3.4.0
$ Echo mntr | NC localhost 2185
Zk_version 3.4.0
Zk_avg_latency 0
Zk_max_latency 0
Zk_min_latency 0
Zk_packets_received 70
Zk_packets_sent 69
Zk_outstanding_requests 0
Zk_server_state leader
Zk_znode_count 4
Zk_watch_count 0
Zk_ephemerals_count 0
Zk_approximate_data_size 27
Zk_followers 4-only exposed by the leader
Zk_synced_followers 4-only exposed by the leader
Zk_pending_syncs 0-only exposed by the leader
Zk_open_file_descriptor_count 23-only available on UNIX platforms
Zk_max_file_descriptor_count 1024-only available on UNIX platforms |