zookeeper——监控命令详解

Posted 保暖大裤衩LeoLee

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zookeeper——监控命令详解相关的知识,希望对你有一定的参考价值。

前言

zookeeper的监控命令需要通过telnet或者nc工具向zookeeper服务进行提交

如使用telnet工具:

telnet 127.0.0.1 2181

之后telnet工具连接zookeeper成功可以使用四字监控命令进行操作。在连接建立之后输入对应的命令后回车

在使用监控命令之前,需要修改zookeeper的配置文件,开启四字监控命令,否则会报错如下:

nc命令使用方法自行搜索,使用什么工具与本文关系不大。

开启监控命令

修改zoo.cfg文件,在配置文件中加入如下配置:

4lw.commands.whitelist=*

详情操作CSDN的一篇文章:zookeeper命名报错conf is not executed because it is not in the whitelist的解决办法

四字命令

conf

获取zookeeper服务相关配置信息。

#客户端端口号
clientPort=2181
secureClientPort=-1
#数据快照文件保存目录(默认情况下,没10w次事务操作保存一次快照)
dataDir=C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\leoleedevelopmentzookeeperdata\\version-2
dataDirSize=335544400
#事务日志目录(该配置如果没有在zoo.cfg单独配置的,会和dataDir在同一目录下)
dataLogDir=C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\leoleedevelopmentzookeeperlog\\version-2
dataLogSize=6145
#服务器与服务器之前或者客户端与服务器之间维持连接的心跳时长
tickTime=2000
#最大连接数
maxClientCnxns=60
#最小session超时时间=tickTime*2
minSessionTimeout=4000
#最大session超时时间=tickTime*20
maxSessionTimeout=40000
clientPortListenBacklog=-1

#以下为与集群相关的配置
#服务器序号
serverId=0
#集群中的follow节点和leader节点在初始连接时能容忍的最大心跳数(也就是初始连接时在多少次心跳后放弃)
initLimit=10
#集群中的follow节点和leader节点在请求和应答时能容忍的最大心跳数
syncLimit=5
#失去leader节点后重新选举leader的算法类型,默认为3,0-基于UDP的LeaderELection 1-基于UDP的FastLeaderElection 2-基于TCP的FastLeaderElection
electionAlg=3
#当前节点在集群进行leader选举时使用的端口号
electionPort=3387
#当前节点在集群进行数据互通使用的端口号
quorumPort=2287
#当前节点是否是观察者节点observer,0-不是 1-是
peerType=0

cons

返回所有连接到这台服务器的客户端/会话信息

/127.0.0.1:54340[1](queued=0,recved=1,sent=1,sid=0x10000b785090000,lop=SESS,est=1622032985181,to=30000,lcxid=0x0,lzxid=0x2b,lresp=12136376,llat=20,minlat=0,avglat=20,maxlat=20)
/127.0.0.1:54348[0](queued=0,recved=1,sent=0)

参数释义:

ip客户端ip地址
port客户端发送数据的端口号
queued当前会话等待被处理的请求数,请求缓存在队列中
recved当前会话对服务器操作后,服务器收到的数据包个数
sent当前会话操作,导致服务器发送的包个数
sid会话id
lop当前会话在最后一次操作的类型:GETD-读取数据、DELE-删除数据、CREA-创建数据
est客户端创建连接时的时间戳
to当前会话的超时时间
lcxid当前会话的操作id,每当客户端操作一次zookeeper,这给id就会自增1(十六进制数)
lzxid当前最大事务id
lresp最后一次操作的响应时间(时间戳)
minlat最小延迟
avglat平均延迟
maxlat最大延迟
llat最后延迟

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

crst

重置当前这台服务器所有连接/会话的统计信息,即重置了 cons 命令查询的信息

dump

列出会话的临时节点信息

SessionTracker dump:
Session Sets (3)/(1):
0 expire at Wed May 26 21:21:28 CST 2021:
0 expire at Wed May 26 21:21:38 CST 2021:
1 expire at Wed May 26 21:21:44 CST 2021:
        0x10000b785090000
ephemeral nodes dump:
Sessions with Ephemerals (1):
0x10000b785090000:
        /temp
Connections dump:
Connections Sets (3)/(2):
0 expire at Wed May 26 21:21:28 CST 2021:
1 expire at Wed May 26 21:21:38 CST 2021:
        ip: /127.0.0.1:56079 sessionId: 0x0
1 expire at Wed May 26 21:21:48 CST 2021:
        ip: /127.0.0.1:54340 sessionId: 0x10000b785090000

envi

输出zookeeper所在服务器的环境配置信息

Environment:
zookeeper.version=3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
host.name=DESKTOP-6OFAJD9
java.version=1.8.0_111
java.vendor=Oracle Corporation
java.home=C:\\leolee\\development\\java8\\jdk\\jre
java.class.path=C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\build\\classes;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\build\\lib\\*;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\*;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\audience-annotations-0.12.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\commons-cli-1.4.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jackson-annotations-2.10.5.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jackson-core-2.10.5.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jackson-databind-2.10.5.1.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\javax.servlet-api-3.1.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-http-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-io-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-security-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-server-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-servlet-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-util-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jetty-util-ajax-9.4.38.v20210224.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\jline-2.14.6.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\log4j-1.2.17.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\metrics-core-4.1.12.1.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-buffer-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-codec-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-common-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-handler-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-resolver-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-transport-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-transport-native-epoll-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\netty-transport-native-unix-common-4.1.59.Final.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\simpleclient-0.9.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\simpleclient_common-0.9.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\simpleclient_hotspot-0.9.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\simpleclient_servlet-0.9.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\slf4j-api-1.7.30.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\slf4j-log4j12-1.7.30.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\snappy-java-1.1.7.7.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\zookeeper-3.7.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\zookeeper-jute-3.7.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\lib\\zookeeper-prometheus-metrics-3.7.0.jar;C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin\\..\\conf
java.library.path=C:\\leolee\\development\\java8\\jdk\\bin;C:\\WINDOWS\\Sun\\Java\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\Program Files (x86)\\Common Files\\NetSarang;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\leolee\\development\\java8\\jdk\\bin;C:\\leolee\\development\\java8\\jdk\\jre\\bin;C:\\leolee\\development\\git\\Git\\cmd;C:\\leolee\\development\\Erlang\\erl10.0.1\\bin;C:\\leolee\\applications\\Bluetooth Command Line Tools\\Bluetooth Command Line Tools\\bin;C:\\leolee\\development\\JMeter\\apache-jmeter-5.1.1\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\leolee\\development\\Go\\go1.13.5.windows-amd64\\bin;C:\\leolee\\development\\Go\\goPath\\bin;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\leolee\\development\\tomcat\\apache-tomcat-8.5.11\\apache-tomcat-8.5.11\\bin;C:\\leolee\\development\\Tortoise\\SVN\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\leolee\\development\\nodeJS\\;C:\\leolee\\development\\gradle\\gradle-6.6\\bin;C:\\leolee\\development\\GoogleProtocolBuffer\\protoc-3.13.0-win64\\bin;C:\\leolee\\development\\ApacheThrift\\0.13.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\leolee\\development\\maven\\apache-maven-3.2.5\\bin;C:\\Program Files\\mysql\\MySQL Shell 8.0\\bin\\;C:\\Users\\LeoLee\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\LeoLee\\AppData\\Local\\atom\\bin;C:\\Users\\LeoLee\\AppData\\Local\\Microsoft\\WindowsApps;C:\\leolee\\development\\consul\\consul_1.6.2_windows_amd64\\;C:\\Users\\LeoLee\\go\\bin;C:\\Users\\LeoLee\\AppData\\Roaming\\npm;.
java.io.tmpdir=C:\\Users\\LeoLee\\AppData\\Local\\Temp\\
java.compiler=<NA>
os.name=Windows 10
os.arch=amd64
os.version=10.0
user.name=LeoLee
user.home=C:\\Users\\LeoLee
user.dir=C:\\leolee\\development\\zookeeper\\apache-zookeeper-3.7.0-bin\\bin
os.memory.free=211MB
os.memory.max=3609MB
os.memory.total=243MB

ruok

测试zookeeper服务是否处于正常的运行状态

imok

stat

输出服务器的详细信息,与srvr类似,但是多出了每个连接的会话信息

#zookeeper版本
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
#登录到当前节点的客户端会话信息
Clients:
 /127.0.0.1:54340[1](queued=0,recved=265,sent=265)
 /127.0.0.1:56401[0](queued=0,recved=1,sent=0)

#当前节点的延迟
Latency min/avg/max: 0/0.4226/20
Received: 273
Sent: 272
Connections: 2
#堆积的未处理的请求数
Outstanding: 0
#最大事务id
Zxid: 0x2c                                                                                       
#服务器角色:standalone-单机 follower-跟随者 leader-主节点
Mode: standalone
#当前节点存储的数据节点数                                                                                                         Node count: 13

srst

重置服务器状态信息,即重置 stat 或者 srvr 查询的信息,但是对于 Connections、Outstanding、Mode、Node count等与实际数据相关的信息是无法重置的

wchs

查询当前服务节点watcher相关的信息

0 connections watching 0 paths
Total watches:0

多少个连结会话针对于多少个数据节点,创建了多少个watcher

wchc

通过session分组,列出watch的所有结点,输出的是一个与watch相关的会话的节点列表。

默认情况下zookeeper不支持该命令,直接使用将会报错:

wchc is not executed because it is not in the whitelist

wchp

根据路径分组,列出所有watch的session id信息。

与wchc一样,默认不支持,需要手动开启:

mntr

与stat命令输出的信息相似,输出服务器的状态信息。

zk_version  3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
zk_server_state standalone
zk_ephemerals_count     0
zk_num_alive_connections        1
zk_avg_latency  0.3863
zk_outstanding_requests 0
zk_znode_count  12
zk_global_sessions      0
zk_non_mtls_remote_conn_count   0
zk_last_client_response_size    16
zk_packets_sent 376
zk_packets_received     377
zk_max_client_response_size     25
zk_connection_drop_probability  0.0
zk_watch_count  0
zk_auth_failed_count    0
zk_min_latency  0
zk_max_file_descriptor_count    -1
zk_approximate_data_size        143
zk_open_file_descriptor_count   -1
zk_local_sessions       0
zk_uptime       5252416
zk_max_latency  20
zk_outstanding_tls_handshake    0
zk_min_client_response_size     16
zk_non_mtls_local_conn_count    0
zk_proposal_count       0
zk_watch_bytes  0
zk_outstanding_changes_removed  4
zk_throttled_ops        0
zk_stale_requests_dropped       0
zk_large_requests_rejected      0
zk_insecure_admin_count 0
zk_connection_rejected  0
zk_cnxn_closed_without_zk_server_running        0
zk_sessionless_connections_expired      0
zk_looking_count        0
zk_dead_watchers_queued 0
zk_stale_requests       0
zk_connection_drop_count        0
zk_learner_proposal_received_count      0
zk_digest_mismatches_count      0
zk_dead_watchers_cleared        0
zk_response_packet_cache_hits   0
zk_bytes_received_count 4560
zk_add_dead_watcher_stall_time  0
zk_request_throttle_wait_count  0
zk_requests_not_forwarded_to_commit_processor   0
zk_response_packet_cache_misses 0
zk_ensemble_auth_success        0
zk_prep_processor_request_queued        366
zk_learner_commit_received_count        0
zk_stale_replies        0
zk_connection_request_count     2
zk_response_bytes       25
zk_ensemble_auth_fail   0
zk_diff_count   0
zk_response_packet_get_children_cache_misses    0
zk_connection_revalidate_count  1
zk_quit_leading_due_to_disloyal_voter   0
zk_snap_count   0
zk_unrecoverable_error_count    0
zk_unsuccessful_handshake       0
zk_commit_count 0
zk_stale_sessions_expired       1
zk_response_packet_get_children_cache_hits      0
zk_sync_processor_request_queued        366
zk_outstanding_changes_queued   4
zk_request_commit_queued        0
zk_ensemble_auth_skip   0
zk_skip_learner_request_to_next_processor_count 0
zk_tls_handshake_exceeded       0
zk_revalidate_count     0
zk_avg_socket_closing_time      0.0
zk_min_socket_closing_time      0
zk_max_socket_closing_time      0
zk_cnt_socket_closing_time      0
zk_sum_socket_closing_time      0
zk_avg_proposal_process_time    0.0219
zk_min_proposal_process_time    0
zk_max_proposal_process_time    1
zk_cnt_proposal_process_time    366
zk_sum_proposal_process_time    8
zk_avg_leader_unavailable_time  0.0
zk_min_leader_unavailable_time  0
zk_max_leader_unavailable_time  0
zk_cnt_leader_unavailable_time  0
zk_sum_leader_unavailable_time  0
zk_avg_node_created_watch_count 0.0
zk_min_node_created_watch_count 0
zk_max_node_created_watch_count 0
zk_cnt_node_created_watch_count 0
zk_sum_node_created_watch_count 0
zk_avg_session_queues_drained   0.0
zk_min_session_queues_drained   0
zk_max_session_queues_drained   0
zk_cnt_session_queues_drained   0
zk_sum_session_queues_drained   0
zk_avg_write_commit_proc_req_queued     0.0
zk_min_write_commit_proc_req_queued     0
zk_max_write_commit_proc_req_queued     0
zk_cnt_write_commit_proc_req_queued     0
zk_sum_write_commit_proc_req_queued     0
zk_avg_connection_token_deficit 0.0
zk_min_connection_token_deficit 0
zk_max_connection_token_deficit 0
zk_cnt_connection_token_deficit 2
zk_sum_connection_token_deficit 0
zk_avg_read_commit_proc_req_queued      0.0
zk_min_read_commit_proc_req_queued      0
zk_max_read_commit_proc_req_queued      0
zk_cnt_read_commit_proc_req_queued      0
zk_sum_read_commit_proc_req_queued      0
zk_avg_node_deleted_watch_count 0.0
zk_min_node_deleted_watch_count 0
zk_max_node_deleted_watch_count 0
zk_cnt_node_deleted_watch_count 0
zk_sum_node_deleted_watch_count 0
zk_avg_startup_txns_load_time   0.0
zk_min_startup_txns_load_time   0
zk_max_startup_txns_load_time   0
zk_cnt_startup_txns_load_time   0
zk_sum_startup_txns_load_time   0
zk_avg_sync_processor_queue_size        0.0
zk_min_sync_processor_queue_size        0
zk_max_sync_processor_queue_size        0
zk_cnt_sync_processor_queue_size        367
zk_sum_sync_processor_queue_size        0
zk_avg_follower_sync_time       0.0
zk_min_follower_sync_time       0
zk_max_follower_sync_time       0
zk_cnt_follower_sync_time       0
zk_sum_follower_sync_time       0
zk_avg_prep_processor_queue_size        0.0
zk_min_prep_processor_queue_size        0
zk_max_prep_processor_queue_size        0
zk_cnt_prep_processor_queue_size        367
zk_sum_prep_processor_queue_size        0
zk_avg_fsynctime        302.0
zk_min_fsynctime        1
zk_max_fsynctime        893
zk_cnt_fsynctime        3
zk_sum_fsynctime        906
zk_avg_inflight_snap_count      0.0
zk_min_inflight_snap_count      0
zk_max_inflight_snap_count      0
zk_cnt_inflight_snap_count      0
zk_sum_inflight_snap_count      0
zk_avg_reads_issued_from_session_queue  0.0
zk_min_reads_issued_from_session_queue  0
zk_max_reads_issued_from_session_queue  0
zk_cnt_reads_issued_from_session_queue  0
zk_sum_reads_issued_from_session_queue  0
zk_avg_learner_request_processor_queue_size     0.0
zk_min_learner_request_processor_queue_size     0
zk_max_learner_request_processor_queue_size     0
zk_cnt_learner_request_processor_queue_size     0
zk_sum_learner_request_processor_queue_size     0
zk_avg_snapshottime     5.0
zk_min_snapshottime     5
zk_max_snapshottime     5
zk_cnt_snapshottime     1
zk_sum_snapshottime     5
zk_avg_unavailable_time 0.0
zk_min_unavailable_time 0
zk_max_unavailable_time 0
zk_cnt_unavailable_time 0
zk_sum_unavailable_time 0
zk_avg_startup_txns_loaded      0.0
zk_min_startup_txns_loaded      0
zk_max_startup_txns_loaded      0
zk_cnt_startup_txns_loaded      0
zk_sum_startup_txns_loaded      0
zk_avg_reads_after_write_in_session_queue       0.0
zk_min_reads_after_write_in_session_queue       0
zk_max_reads_after_write_in_session_queue       0
zk_cnt_reads_after_write_in_session_queue       0
zk_sum_reads_after_write_in_session_queue       0
zk_avg_requests_in_session_queue        0.0
zk_min_requests_in_session_queue        0
zk_max_requests_in_session_queue        0
zk_cnt_requests_in_session_queue        0
zk_sum_requests_in_session_queue        0
zk_avg_write_commit_proc_issued 0.0
zk_min_write_commit_proc_issued 0
zk_max_write_commit_proc_issued 0
zk_cnt_write_commit_proc_issued 0
zk_sum_write_commit_proc_issued 0
zk_avg_prep_process_time        0.0301
zk_min_prep_process_time        0
zk_max_prep_process_time        5
zk_cnt_prep_process_time        366
zk_sum_prep_process_time        11
zk_avg_pending_session_queue_size       0.0
zk_min_pending_session_queue_size       0
zk_max_pending_session_queue_size       0
zk_cnt_pending_session_queue_size       0
zk_sum_pending_session_queue_size       0
zk_avg_time_waiting_empty_pool_in_commit_processor_read_ms      0.0
zk_min_time_waiting_empty_pool_in_commit_processor_read_ms      0
zk_max_time_waiting_empty_pool_in_commit_processor_read_ms      0
zk_cnt_time_waiting_empty_pool_in_commit_processor_read_ms      0
zk_sum_time_waiting_empty_pool_in_commit_processor_read_ms      0
zk_avg_commit_process_time      0.0
zk_min_commit_process_time      0
zk_max_commit_process_time      0
zk_cnt_commit_process_time      0
zk_sum_commit_process_time      0
zk_avg_dbinittime       56.0
zk_min_dbinittime       56
zk_max_dbinittime       56
zk_cnt_dbinittime       1
zk_sum_dbinittime       56
zk_avg_inflight_diff_count      0.0
zk_min_inflight_diff_count      0
zk_max_inflight_diff_count      0
zk_cnt_inflight_diff_count      0
zk_sum_inflight_diff_count      0
zk_avg_netty_queued_buffer_capacity     0.0
zk_min_netty_queued_buffer_capacity     0
zk_max_netty_queued_buffer_capacity     0
zk_cnt_netty_queued_buffer_capacity     0
zk_sum_netty_queued_buffer_capacity     0
zk_avg_election_time    0.0
zk_min_election_time    0
zk_max_election_time    0
zk_cnt_election_time    0
zk_sum_election_time    0
zk_avg_commit_commit_proc_req_queued    0.0
zk_min_commit_commit_proc_req_queued    0
zk_max_commit_commit_proc_req_queued    0
zk_cnt_commit_commit_proc_req_queued    0
zk_sum_commit_commit_proc_req_queued    0
zk_avg_sync_processor_batch_size        1.0
zk_min_sync_processor_batch_size        1
zk_max_sync_processor_batch_size        1
zk_cnt_sync_processor_batch_size        3
zk_sum_sync_processor_batch_size        3
zk_avg_node_children_watch_count        0.0
zk_min_node_children_watch_count        0
zk_max_node_children_watch_count        0
zk_cnt_node_children_watch_count        0
zk_sum_node_children_watch_count        0
zk_avg_write_batch_time_in_commit_processor     0.0
zk_min_write_batch_time_in_commit_processor     0
zk_max_write_batch_time_in_commit_processor     0
zk_cnt_write_batch_time_in_commit_processor     0
zk_sum_write_batch_time_in_commit_processor     0
zk_avg_read_commit_proc_issued  0.0
zk_min_read_commit_proc_issued  0
zk_max_read_commit_proc_issued  0
zk_cnt_read_commit_proc_issued  0
zk_sum_read_commit_proc_issued  0
zk_avg_concurrent_request_processing_in_commit_processor        0.0
zk_min_concurrent_request_processing_in_commit_processor        0
zk_max_concurrent_request_processing_in_commit_processor        0
zk_cnt_concurrent_request_processing_in_commit_processor        0
zk_sum_concurrent_request_processing_in_commit_processor        0
zk_avg_node_changed_watch_count 0.0
zk_min_node_changed_watch_count 0
zk_max_node_changed_watch_count 0
zk_cnt_node_changed_watch_count 0
zk_sum_node_changed_watch_count 0
zk_avg_sync_process_time        0.6667
zk_min_sync_process_time        0
zk_max_sync_process_time        1
zk_cnt_sync_process_time        3
zk_sum_sync_process_time        2
zk_avg_startup_snap_load_time   45.0
zk_min_startup_snap_load_time   45
zk_max_startup_snap_load_time   45
zk_cnt_startup_snap_load_time   1
zk_sum_startup_snap_load_time   45
zk_avg_prep_processor_queue_time_ms     0.0437
zk_min_prep_processor_queue_time_ms     0
zk_max_prep_processor_queue_time_ms     1
zk_cnt_prep_processor_queue_time_ms     366
zk_sum_prep_processor_queue_time_ms     16
zk_p50_prep_processor_queue_time_ms     0
zk_p95_prep_processor_queue_time_ms     0
zk_p99_prep_processor_queue_time_ms     1
zk_p999_prep_processor_queue_time_ms    1
zk_avg_jvm_pause_time_ms        0.0
zk_min_jvm_pause_time_ms        0
zk_max_jvm_pause_time_ms        0
zk_cnt_jvm_pause_time_ms        0
zk_sum_jvm_pause_time_ms        0
zk_p50_jvm_pause_time_ms        0
zk_p95_jvm_pause_time_ms        0
zk_p99_jvm_pause_time_ms        0
zk_p999_jvm_pause_time_ms       0
zk_avg_close_session_prep_time  1.0
zk_min_close_session_prep_time  1
zk_max_close_session_prep_time  1
zk_cnt_close_session_prep_time  1
zk_sum_close_session_prep_time  1
zk_p50_close_session_prep_time  1
zk_p95_close_session_prep_time  1
zk_p99_close_session_prep_time  1
zk_p999_close_session_prep_time 1
zk_avg_read_commitproc_time_ms  0.0
zk_min_read_commitproc_time_ms  0
zk_max_read_commitproc_time_ms  0
zk_cnt_read_commitproc_time_ms  0
zk_sum_read_commitproc_time_ms  0
zk_p50_read_commitproc_time_ms  0
zk_p95_read_commitproc_time_ms  0
zk_p99_read_commitproc_time_ms  0
zk_p999_read_commitproc_time_ms 0
zk_avg_updatelatency    18.0
zk_min_updatelatency    16
zk_max_updatelatency    20
zk_cnt_updatelatency    2
zk_sum_updatelatency    36
zk_p50_updatelatency    18
zk_p95_updatelatency    20
zk_p99_updatelatency    20
zk_p999_updatelatency   20
zk_avg_local_write_committed_time_ms    0.0
zk_min_local_write_committed_time_ms    0
zk_max_local_write_committed_time_ms    0
zk_cnt_local_write_committed_time_ms    0
zk_sum_local_write_committed_time_ms    0
zk_p50_local_write_committed_time_ms    0
zk_p95_local_write_committed_time_ms    0
zk_p99_local_write_committed_time_ms    0
zk_p999_local_write_committed_time_ms   0
zk_avg_request_throttle_queue_time_ms   0.0601
zk_min_request_throttle_queue_time_ms   0
zk_max_request_throttle_queue_time_ms   1
zk_cnt_request_throttle_queue_time_ms   366
zk_sum_request_throttle_queue_time_ms   22
zk_p50_request_throttle_queue_time_ms   0
zk_p95_request_throttle_queue_time_ms   1
zk_p99_request_throttle_queue_time_ms   1
zk_p999_request_throttle_queue_time_ms  1
zk_avg_readlatency      0.2893
zk_min_readlatency      0
zk_max_readlatency      1
zk_cnt_readlatency      363
zk_sum_readlatency      105
zk_p50_readlatency      0
zk_p95_readlatency      1
zk_p99_readlatency      1
zk_p999_readlatency     1
zk_avg_quorum_ack_latency       0.0
zk_min_quorum_ack_latency       0
zk_max_quorum_ack_latency       0
zk_cnt_quorum_ack_latency       0
zk_sum_quorum_ack_latency       0
zk_p50_quorum_ack_latency       0
zk_p95_quorum_ack_latency       0
zk_p99_quorum_ack_latency       0
zk_p999_quorum_ack_latency      0
zk_avg_om_commit_process_time_ms        0.0
zk_min_om_commit_process_time_ms        0
zk_max_om_commit_process_time_ms        0
zk_cnt_om_commit_process_time_ms        0
zk_sum_om_commit_process_time_ms        0
zk_p50_om_commit_process_time_ms        0
zk_p95_om_commit_process_time_ms        0
zk_p99_om_commit_process_time_ms        0
zk_p999_om_commit_process_ti

 

以上是关于zookeeper——监控命令详解的主要内容,如果未能解决你的问题,请参考以下文章

zookeeper客户端命令详解

K8s NetworkPolicyLimitRange和ResourceQuota详解K8s运行ZooKeeper,Mysql,Jenkins集群K8s集群及应用监控Prometheus

zabbix 监控zookeeper篇

zookeeper

ZooKeeper监控数据采集方案——Telegraf Plugin

Zookeeper详解-Cli