ZK四字命令 二
mntr
mntr命令用于输出比stat命令更为详尽的服务器统计信息,包括请求处理的延迟情况、服务器内存数据库大小和集群的数据同步情况。
$ echo mntr | nc localhost 2181
zk_version 3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 04:05 GMT
zk_avg_latency 0
zk_max_latency 0
zk_min_latency 0
zk_packets_received 14
zk_packets_sent 13
zk_num_alive_connections 1
zk_outstanding_requests 0
zk_server_state follower
zk_znode_count 4
zk_watch_count 0
zk_ephemerals_count 0
zk_approximate_data_size 27
zk_open_file_descriptor_count 30
zk_max_file_descriptor_count 65536
zk_fsync_threshold_exceed_count 0
wchs
wchs命令用于输出当前服务器上管理的Watcher的概要信息。
$ echo wchs | nc localhost 2181
0 connect