本文最后更新于 258 天前,其中的信息可能已经过时,如有错误请发送邮件到wuxianglongblog@163.com
zookeeper集群常用的监控命令概述
一.监控命令介绍
1.zookeeper常用四字命令简介
zookeeper支持某些特定的四字命令与其的交互。它们大多是查询命令,用来获取zookeeper服务的当前状态及相关信息。用户在客户端可以通过telnet或者nc向zookeeper提交相应的命令。
zookeeper常用四字命令如下所示:
conf:
输出相关服务配置的详细信息。比如端口,zookeeper数据及日志配置路径,最大连接数,session超时时间,serverId等。
ruok:
测试服务是否处于正确运行状态,如果回复的不是"imok",那就说明该节点挂掉啦!注意观察输出结果哟!
envi:
输出关于服务器的环境变量。
cons:
列出所有连接到这台服务器的客户端连接/会话的详细信息。包括"接收/发送"的包数量,session id,操作延迟,最后的操作执行等信息。
dump:
列出未经处理的会话和临时节点。打印集群的所有会话信息,包括ID,以及临时节点等信息。用在Leader节点上才有效果。
stat:
输出服务器的详细信息,接收/发送包数量,连接数,模式(leader/follower),节点总数,延迟。所有客户端的列表。
查看统计信息,一般用来查看哪个节点被选择作为follower或者leader。
srvr:
和stat输出信息一样,只不过少了客户端连接信息。
mntr:
输出比stat更为详细的服务器统计信息。列出集群的健康状态。
wchs:
列出服务器watches的简洁信息,如连接总数,watching节点总数和watches总数。
wchc:
通过session分组,列出watch的所有节点,它的输出是一个与watch相关的会话的节点列表。
wchp:
通过路径列出服务器watch的详细信息。它输出一个与session相关的路径。
reqs:
查看未经处理的请求。
crst:
重置当前这台服务器所有连接/会话的统计信息。
srst:
重置server状态。
2.部署命令行工具
[root@elk102.oldboyedu.com ~]# yum -y install nc telnet
3.基于telnet查看zookeeper集群的状态信息
[root@elk102.oldboyedu.com ~]# echo conf | nc elk101.oldboyedu.com 2181
clientPort=2181
secureClientPort=-1
dataDir=/yinzhengjie/data/zookeeper/version-2
dataDirSize=805320668
dataLogDir=/yinzhengjie/data/zookeeper/version-2
dataLogSize=805320668
tickTime=2000
maxClientCnxns=60
minSessionTimeout=4000
maxSessionTimeout=40000
clientPortListenBacklog=-1
serverId=101
initLimit=5
syncLimit=2
electionAlg=3
electionPort=3888
quorumPort=2888
peerType=1
membership:
server.101=elk101.oldboyedu.com:2888:3888:observer
server.102=elk102.oldboyedu.com:2888:3888:participant
server.103=elk103.oldboyedu.com:2888:3888:participant
version=0
[root@elk102.oldboyedu.com ~]#
4.基于nc查看zookeeper集群的状态信息
[root@elk102.oldboyedu.com ~]# echo conf | nc elk101.oldboyedu.com 2181
clientPort=2181
secureClientPort=-1
dataDir=/yinzhengjie/data/zookeeper/version-2
dataDirSize=805320668
dataLogDir=/yinzhengjie/data/zookeeper/version-2
dataLogSize=805320668
tickTime=2000
maxClientCnxns=60
minSessionTimeout=4000
maxSessionTimeout=40000
clientPortListenBacklog=-1
serverId=101
initLimit=5
syncLimit=2
electionAlg=3
electionPort=3888
quorumPort=2888
peerType=1
membership:
server.101=elk101.oldboyedu.com:2888:3888:observer
server.102=elk102.oldboyedu.com:2888:3888:participant
server.103=elk103.oldboyedu.com:2888:3888:participant
version=0[root@elk102.oldboyedu.com ~]#
5.可能会遇到的报错: "conf is not executed because it is not in the whitelist."解决方案
如果出现"conf is not executed because it is not in the whitelist."的报错信息,说明咱们的zookeeper集群并没有开启四字命令。
我们需要修改"zoo.cfg"配置文件,并添加"4lw.commands.whitelist=*"这行配置信息即可:
[root@elk101.oldboyedu.com ~]# vim /yinzhengjie/softwares/zookeeper/conf/zoo.cfg
[root@elk101.oldboyedu.com ~]#
[root@elk101.oldboyedu.com ~]# egrep -v "^#|^$" /yinzhengjie/softwares/zookeeper/conf/zoo.cfg
tickTime=2000
initLimit=5
syncLimit=2
dataDir=/yinzhengjie/data/zookeeper
clientPort=2181
clientPortAddress=172.200.1.101
peerType=observer
4lw.commands.whitelist=*
server.101=elk101.oldboyedu.com:2888:3888:observer
server.102=elk102.oldboyedu.com:2888:3888
server.103=elk103.oldboyedu.com:2888:3888
[root@elk101.oldboyedu.com ~]#
[root@elk101.oldboyedu.com ~]# manager-zk.sh restart # 修改以后记得重启服务使之生效!
二.四字监控命令实战案例
1.conf命令(输出相关服务配置的详细信息。)
(1)查看"conf"命令的输出:
[root@elk102.oldboyedu.com ~]# echo conf | nc elk101.oldboyedu.com 2181 | more
clientPort=2181
secureClientPort=-1
dataDir=/yinzhengjie/data/zookeeper/version-2
dataDirSize=805320668
dataLogDir=/yinzhengjie/data/zookeeper/version-2
dataLogSize=805320668
tickTime=2000
maxClientCnxns=60
minSessionTimeout=4000
maxSessionTimeout=40000
clientPortListenBacklog=-1
serverId=101
initLimit=5
syncLimit=2
electionAlg=3
electionPort=3888
quorumPort=2888
peerType=1
membership:
server.101=elk101.oldboyedu.com:2888:3888:observer
server.102=elk102.oldboyedu.com:2888:3888:participant
server.103=elk103.oldboyedu.com:2888:3888:participant
version=0
[root@elk102.oldboyedu.com ~]#
(2)有关"conf"命令的输出说明如下:
clientPort:
对客户端暴露的端口号
secureClientPort:
安全客户端的端口号,若不设置,则默认为-1。
dataDir:
数据快照文件目录,默认情况下10w次事务操作生成一次快照。
dataDirSize:
事务日志文件目录,生产环境中放在独立的磁盘上。
dataLogDir:
事务日志文件目录,生产环境中放在独立的磁盘上。
dataLogSize:
事务日志文件目录,生产环境中放在独立的磁盘上。
tickTime:
客户端与服务器之间维持心跳的时间间隔(以毫秒为单位)。
maxClientCnxns:
最大连接数。
minSessionTimeout:
最小session超时,它默认等于"tickTime * 2"。
maxSessionTimeout=40000
最大session超时,它默认等于"tickTime * 20"。
clientPortListenBacklog:
TCP服务端用于临时存放已完成三次握手的请求的队列的最大长度。
serverId=101
zookeeper服务器对应的server ID编号。
initLimit:
"tickTime * initLimit"决定了ACK的超时时间
syncLimit:
"tickTime * syncLimit"决定了服务端心跳超时时间
electionAlg:
选举算法1和2已被废弃,目前使用的是3。
electionPort:
选举端口,用于Leader选举过程中投票通信。
quorumPort:
用于follow节点和leader节点之间的数据同步和其它通信端口。
peerType:
选项"observer/participant",决定节点角色。
membership:(集群中的成员)
server.101=elk101.oldboyedu.com:2888:3888:observer
server.102=elk102.oldboyedu.com:2888:3888:participant
server.103=elk103.oldboyedu.com:2888:3888:participant
version:
从名称上来看,该参数应该是zookeeper的版本信息,但其值却是"0",这一点让我暂时也摸不着头脑。
2.ruok命令(测试服务是否处于正常运行状态,如果回复的不是"imok",那就说明该节点挂掉啦!注意观察输出结果哟!)
[root@elk102.oldboyedu.com ~]# echo ruok | nc elk101.oldboyedu.com 2181 | more
imok
[root@elk102.oldboyedu.com ~]#
3.envi命令(输出关于服务器的环境变量。)
[root@elk102.oldboyedu.com ~]# echo envi | nc elk101.oldboyedu.com 2181
Environment:
zookeeper.version=3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
host.name=elk101.oldboyedu.com
java.version=1.8.0_201
java.vendor=Oracle Corporation
java.home=/yinzhengjie/softwares/jdk1.8.0_201/jre
java.class.path=/yinzhengjie/softwares/zookeeper/bin/../zookeeper-server/target/classes:/yinzhengjie/softwares/zookeeper/bin/../build/classes:/yinzhengjie/softwares/zookeep
er/bin/../zookeeper-server/target/lib/*.jar:/yinzhengjie/softwares/zookeeper/bin/../build/lib/*.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/zookeeper-prometheus-metrics-3.7.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/zookeeper-jute-3.7.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/zookeeper-3.7.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/snappy-java-1.1.7.7.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/slf4j-log4j12-1.7.30.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/slf4j-api-1.7.30.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/simpleclient_servlet-0.9.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/simpleclient_hotspot-0.9.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/simpleclient_common-0.9.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/simpleclient-0.9.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-transport-native-unix-common-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-transport-native-epoll-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-transport-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-resolver-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-handler-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-common-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-codec-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/netty-buffer-4.1.59.Final.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/metrics-core-4.1.12.1.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/log4j-1.2.17.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jline-2.14.6.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-util-ajax-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-util-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-servlet-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-server-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-security-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-io-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jetty-http-9.4.38.v20210224.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/javax.servlet-api-3.1.0.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jackson-databind-2.10.5.1.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jackson-core-2.10.5.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/jackson-annotations-2.10.5.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/commons-cli-1.4.jar:/yinzhengjie/softwares/zookeeper/bin/../lib/audience-annotations-0.12.0.jar:/yinzhengjie/softwares/zookeeper/bin/../zookeeper-*.jar:/yinzhengjie/softwares/zookeeper/bin/../zookeeper-server/src/main/resources/lib/*.jar:/yinzhengjie/softwares/zookeeper/bin/../conf:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.io.tmpdir=/tmp
java.compiler=<NA>
os.name=Linux
os.arch=amd64
os.version=3.10.0-1160.el7.x86_64
user.name=root
user.home=/root
user.dir=/root
os.memory.free=215MB
os.memory.max=245MB
os.memory.total=245MB
[root@elk102.oldboyedu.com ~]#
相关属性说明如下:
zookeeper.version:
zookeeper的版本。
host.name:
host信息。
java.version:
java的版本
java.vendor:
java的供应商。
java.home:
java的运行环境所在目录。
java.class.path:
指定classpath的路径。
java.io.tmpdir:
默认临时文件路径。
java.compiler:
JIT编译器的名称。
os.name:
操作系统的类型。
os.arch:
操作系统的架构。
os.version:
操作系统的内核版本。
user.name:
用户名。
user.home:
用户名的家目录。
user.dir:
zookeeper的脚本存放目录。
os.memory.free:
空闲内存。
os.memory.max:
最大内存。
os.memory.total:
总内存。
4.cons命令(列出所有连接到这台服务器的客户端连接/会话的详细信息。)
[root@elk102.oldboyedu.com ~]# echo cons | nc elk101.oldboyedu.com 2181 | more
/172.200.1.102:40008[0](queued=0,recved=1,sent=0)
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo cons | nc elk102.oldboyedu.com 2181 | more
/172.200.1.102:56562[0](queued=0,recved=1,sent=0)
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo cons | nc elk103.oldboyedu.com 2181 | more
/172.200.1.102:55890[0](queued=0,recved=1,sent=0)
[root@elk102.oldboyedu.com ~]#
返回属性说明:
ip:
IP地址.
port:
zookeeper的端口号。
queueed:
等待被处理的请求数,请求缓存队列中。
received:
收到的包数。
sent:
发送的包数。
sid:
会话ID。
lop:
最后的操作,如:"GETD"表示读取数据,"DELE"表示删除数据,"CREA"表示创建数据,"PING"表示发送心跳信息。
est:
创建连接时的时间戳。
to:
当前会话的超时时间。
lcxid:
当前会话的操作id。
lzxid:
最大事务id。
lresp:
最后响应时间戳。
llat:
最后/最新延时。
minlat:
最小延时。
maxlat:
最大延时。
avglat:
平均延时。
5.dump命令(列出未经处理的会话和临时节点。)
(1)开启一个终端构建临时节点
[root@elk103.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
Connecting to 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 10] create -e /mr "MapReduce"
Created /mr
[zk: 172.200.1.101:2181(CONNECTED) 11]
[zk: 172.200.1.101:2181(CONNECTED) 11] create -e /go "Golang"
Created /go
[zk: 172.200.1.101:2181(CONNECTED) 12]
(2)再开启一个终端创建临时节点
[root@elk101.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
Connecting to 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 3] create -e /shell "SHELL"
Created /shell
[zk: 172.200.1.101:2181(CONNECTED) 4]
(3)使用dump命令查看未经处理的会话和临时节点信息
[root@elk102.oldboyedu.com ~]# echo dump | nc elk103.oldboyedu.com 2181
SessionTracker dump:
Global Sessions(2):
0x6500058d87660000 30000ms
0x6500058d87660001 30000ms
ephemeral nodes dump:
Sessions with Ephemerals (2):
0x6500058d87660001:
/shell
0x6500058d87660000:
/mr
/go
Connections dump:
Connections Sets (1)/(1):
1 expire at Wed Apr 28 18:51:03 CST 2021:
ip: /172.200.1.102:55928 sessionId: 0x0
[root@elk102.oldboyedu.com ~]#
6.stat命令(输出服务器的详细信息与srvr相似。但是多了每个链接的会话信息)
[root@elk102.oldboyedu.com ~]# echo stat | nc elk101.oldboyedu.com 2181
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Clients:
/172.200.1.103:44082[1](queued=0,recved=266,sent=266)
/172.200.1.101:50650[1](queued=0,recved=154,sent=154)
/172.200.1.102:40056[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0.369/18
Received: 435
Sent: 436
Connections: 3
Outstanding: 0
Zxid: 0x60000000a
Mode: observer
Node count: 23
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo stat | nc elk102.oldboyedu.com 2181
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Clients:
/172.200.1.102:56610[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0.0/0
Received: 4
Sent: 3
Connections: 1
Outstanding: 0
Zxid: 0x60000000a
Mode: leader
Node count: 23
Proposal sizes last/min/max: 93/48/97
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo stat | nc elk103.oldboyedu.com 2181
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Clients:
/172.200.1.102:55938[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0.0/0
Received: 19
Sent: 18
Connections: 1
Outstanding: 0
Zxid: 0x60000000a
Mode: follower
Node count: 23
[root@elk102.oldboyedu.com ~]#
相关参数说明如下:
Zookeeper version:
zookeeper的版本号
Clients(客户端信息):
/172.200.1.102:55916[0](queued=0,recved=1,sent=0)
Latency min/avg/max:
延时信息。
Received:
接收到包的信息数量。
Sent:
已发送的包信息数量。
Connections:
连接数。
Outstanding:
堆积数。
Zxid:
最大事务ID。
Mode:
服务器角色。
Node count:
节点数。
7.srvr命令(和stat输出信息一样,只不过少了客户端连接信息。)
[root@elk102.oldboyedu.com ~]# echo srvr | nc elk101.oldboyedu.com 2181
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Latency min/avg/max: 0/0.3659/18
Received: 456
Sent: 457
Connections: 3
Outstanding: 0
Zxid: 0x60000000a
Mode: observer
Node count: 23
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo srvr | nc elk102.oldboyedu.com 2181
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Latency min/avg/max: 0/0.0/0
Received: 5
Sent: 4
Connections: 1
Outstanding: 0
Zxid: 0x60000000a
Mode: leader
Node count: 23
Proposal sizes last/min/max: 93/48/97
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo srvr | nc elk103.oldboyedu.com 2181
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Latency min/avg/max: 0/0.0/0
Received: 20
Sent: 19
Connections: 1
Outstanding: 0
Zxid: 0x60000000a
Mode: follower
Node count: 23
[root@elk102.oldboyedu.com ~]#
8.srst命令(重置server状态)
[root@elk102.oldboyedu.com ~]# echo stat | nc elk101.oldboyedu.com 2181 # 注意观察"Received"和"Sent"字段的值
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Clients:
/172.200.1.103:44082[1](queued=0,recved=284,sent=284)
/172.200.1.101:50650[1](queued=0,recved=172,sent=172)
/172.200.1.102:40070[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0.3553/18
Received: 473
Sent: 474
Connections: 3
Outstanding: 0
Zxid: 0x60000000a
Mode: observer
Node count: 23
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo srst | nc elk101.oldboyedu.com 2181 #重置server的状态
Server stats reset.
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]# echo stat | nc elk101.oldboyedu.com 2181 # 注意观察"Received"和"Sent"字段的值已经被重置啦!
Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
Clients:
/172.200.1.103:44082[1](queued=0,recved=288,sent=288)
/172.200.1.102:40074[0](queued=0,recved=1,sent=0)
/172.200.1.101:50650[1](queued=0,recved=176,sent=176)
Latency min/avg/max: 0/0.0/0
Received: 3
Sent: 3
Connections: 3
Outstanding: 0
Zxid: 0x60000000a
Mode: observer
Node count: 23
[root@elk102.oldboyedu.com ~]#
9.mntr命令(输出比stat更为详细的服务器统计信息。列出集群的健康状态。)
[root@elk102.oldboyedu.com ~]# echo mntr | nc elk101.oldboyedu.com 2181
zk_version 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 2021-03-17 09:46 UTC
zk_server_state observer
zk_peer_state observing - broadcast
zk_observer_master_id 102
zk_ephemerals_count 0
zk_num_alive_connections 3
zk_avg_latency 0.128
zk_outstanding_requests 0
zk_znode_count 14
zk_global_sessions 2
zk_non_mtls_remote_conn_count 0
zk_last_client_response_size 16
zk_packets_sent 18557
zk_packets_received 18556
zk_max_client_response_size 221
zk_connection_drop_probability 0.0
zk_watch_count 3
zk_auth_failed_count 0
zk_min_latency 0
zk_max_file_descriptor_count 4096
zk_approximate_data_size 354
zk_open_file_descriptor_count 70
zk_local_sessions 0
zk_uptime 103014378
zk_max_latency 9
zk_outstanding_tls_handshake 0
zk_min_client_response_size 16
zk_non_mtls_local_conn_count 0
zk_quorum_size 2
zk_proposal_count 0
zk_watch_bytes 34
zk_outstanding_changes_removed 0
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 3
zk_learner_proposal_received_count 0
zk_digest_mismatches_count 0
zk_dead_watchers_cleared 0
zk_response_packet_cache_hits 1
zk_bytes_received_count 223218
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 3
zk_ensemble_auth_success 0
zk_prep_processor_request_queued 0
zk_learner_commit_received_count 21
zk_stale_replies 0
zk_connection_request_count 3
zk_response_bytes 3866
zk_ensemble_auth_fail 0
zk_diff_count 0
zk_response_packet_get_children_cache_misses 5
zk_connection_revalidate_count 0
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 0
zk_response_packet_get_children_cache_hits 5
zk_sync_processor_request_queued 21
zk_outstanding_changes_queued 0
zk_request_commit_queued 21
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.0
zk_min_proposal_process_time 0
zk_max_proposal_process_time 0
zk_cnt_proposal_process_time 0
zk_sum_proposal_process_time 0
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.8571
zk_min_session_queues_drained 0
zk_max_session_queues_drained 1
zk_cnt_session_queues_drained 21
zk_sum_session_queues_drained 18
zk_avg_write_commit_proc_req_queued 0.0019
zk_min_write_commit_proc_req_queued 0
zk_max_write_commit_proc_req_queued 1
zk_cnt_write_commit_proc_req_queued 18563
zk_sum_write_commit_proc_req_queued 36
zk_avg_connection_token_deficit 0.0
zk_min_connection_token_deficit 0
zk_max_connection_token_deficit 0
zk_cnt_connection_token_deficit 3
zk_sum_connection_token_deficit 0
zk_avg_read_commit_proc_req_queued 0.998
zk_min_read_commit_proc_req_queued 0
zk_max_read_commit_proc_req_queued 2
zk_cnt_read_commit_proc_req_queued 18563
zk_sum_read_commit_proc_req_queued 18525
zk_avg_node_deleted_watch_count 1.0
zk_min_node_deleted_watch_count 1
zk_max_node_deleted_watch_count 1
zk_cnt_node_deleted_watch_count 1
zk_sum_node_deleted_watch_count 1
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 21
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 0
zk_sum_prep_processor_queue_size 0
zk_avg_fsynctime 0.2857
zk_min_fsynctime 0
zk_max_fsynctime 5
zk_cnt_fsynctime 21
zk_sum_fsynctime 6
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 21
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 18543
zk_sum_learner_request_processor_queue_size 0
zk_avg_snapshottime 0.0
zk_min_snapshottime 0
zk_max_snapshottime 0
zk_cnt_snapshottime 0
zk_sum_snapshottime 0
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 18
zk_sum_reads_after_write_in_session_queue 0
zk_avg_requests_in_session_queue 1.0
zk_min_requests_in_session_queue 1
zk_max_requests_in_session_queue 1
zk_cnt_requests_in_session_queue 36
zk_sum_requests_in_session_queue 36
zk_avg_write_commit_proc_issued 1.0
zk_min_write_commit_proc_issued 1
zk_max_write_commit_proc_issued 1
zk_cnt_write_commit_proc_issued 21
zk_sum_write_commit_proc_issued 21
zk_avg_prep_process_time 0.0
zk_min_prep_process_time 0
zk_max_prep_process_time 0
zk_cnt_prep_process_time 0
zk_sum_prep_process_time 0
zk_avg_pending_session_queue_size 1.0
zk_min_pending_session_queue_size 1
zk_max_pending_session_queue_size 1
zk_cnt_pending_session_queue_size 18
zk_sum_pending_session_queue_size 18
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 21
zk_sum_time_waiting_empty_pool_in_commit_processor_read_ms 0
zk_avg_commit_process_time 0.0119
zk_min_commit_process_time 0
zk_max_commit_process_time 6
zk_cnt_commit_process_time 18563
zk_sum_commit_process_time 220
zk_avg_dbinittime 0.0
zk_min_dbinittime 0
zk_max_dbinittime 0
zk_cnt_dbinittime 0
zk_sum_dbinittime 0
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.0011
zk_min_commit_commit_proc_req_queued 0
zk_max_commit_commit_proc_req_queued 1
zk_cnt_commit_commit_proc_req_queued 18563
zk_sum_commit_commit_proc_req_queued 21
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 21
zk_sum_sync_processor_batch_size 21
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.8571
zk_min_write_batch_time_in_commit_processor 0
zk_max_write_batch_time_in_commit_processor 6
zk_cnt_write_batch_time_in_commit_processor 21
zk_sum_write_batch_time_in_commit_processor 18
zk_avg_read_commit_proc_issued 0.998
zk_min_read_commit_proc_issued 0
zk_max_read_commit_proc_issued 2
zk_cnt_read_commit_proc_issued 18563
zk_sum_read_commit_proc_issued 18525
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.0952
zk_min_sync_process_time 0
zk_max_sync_process_time 1
zk_cnt_sync_process_time 21
zk_sum_sync_process_time 2
zk_avg_startup_snap_load_time 0.0
zk_min_startup_snap_load_time 0
zk_max_startup_snap_load_time 0
zk_cnt_startup_snap_load_time 0
zk_sum_startup_snap_load_time 0
zk_avg_prep_processor_queue_time_ms 0.0
zk_min_prep_processor_queue_time_ms 0
zk_max_prep_processor_queue_time_ms 0
zk_cnt_prep_processor_queue_time_ms 0
zk_sum_prep_processor_queue_time_ms 0
zk_p50_prep_processor_queue_time_ms 0
zk_p95_prep_processor_queue_time_ms 0
zk_p99_prep_processor_queue_time_ms 0
zk_p999_prep_processor_queue_time_ms 0
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 0.0
zk_min_close_session_prep_time 0
zk_max_close_session_prep_time 0
zk_cnt_close_session_prep_time 0
zk_sum_close_session_prep_time 0
zk_p50_close_session_prep_time 0
zk_p95_close_session_prep_time 0
zk_p99_close_session_prep_time 0
zk_p999_close_session_prep_time 0
zk_avg_read_commitproc_time_ms 0.0558
zk_min_read_commitproc_time_ms 0
zk_max_read_commitproc_time_ms 1
zk_cnt_read_commitproc_time_ms 18525
zk_sum_read_commitproc_time_ms 1034
zk_p50_read_commitproc_time_ms 0
zk_p95_read_commitproc_time_ms 1
zk_p99_read_commitproc_time_ms 1
zk_p999_read_commitproc_time_ms 1
zk_avg_updatelatency 4.5
zk_min_updatelatency 2
zk_max_updatelatency 9
zk_cnt_updatelatency 18
zk_sum_updatelatency 81
zk_p50_updatelatency 4
zk_p95_updatelatency 9
zk_p99_updatelatency 9
zk_p999_updatelatency 9
zk_avg_local_write_committed_time_ms 0.2222
zk_min_local_write_committed_time_ms 0
zk_max_local_write_committed_time_ms 3
zk_cnt_local_write_committed_time_ms 18
zk_sum_local_write_committed_time_ms 4
zk_p50_local_write_committed_time_ms 0
zk_p95_local_write_committed_time_ms 3
zk_p99_local_write_committed_time_ms 3
zk_p999_local_write_committed_time_ms 3
zk_avg_request_throttle_queue_time_ms 0.0394
zk_min_request_throttle_queue_time_ms 0
zk_max_request_throttle_queue_time_ms 1
zk_cnt_request_throttle_queue_time_ms 18543
zk_sum_request_throttle_queue_time_ms 731
zk_p50_request_throttle_queue_time_ms 0
zk_p95_request_throttle_queue_time_ms 0
zk_p99_request_throttle_queue_time_ms 1
zk_p999_request_throttle_queue_time_ms 1
zk_avg_readlatency 0.1238
zk_min_readlatency 0
zk_max_readlatency 3
zk_cnt_readlatency 18525
zk_sum_readlatency 2293
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_time_ms 0
zk_avg_read_final_proc_time_ms 0.0177
zk_min_read_final_proc_time_ms 0
zk_max_read_final_proc_time_ms 4
zk_cnt_read_final_proc_time_ms 18525
zk_sum_read_final_proc_time_ms 327
zk_p50_read_final_proc_time_ms 0
zk_p95_read_final_proc_time_ms 0
zk_p99_read_final_proc_time_ms 1
zk_p999_read_final_proc_time_ms 1
zk_avg_commit_propagation_latency 0.0
zk_min_commit_propagation_latency 0
zk_max_commit_propagation_latency 0
zk_cnt_commit_propagation_latency 7
zk_sum_commit_propagation_latency 0
zk_p50_commit_propagation_latency 0
zk_p95_commit_propagation_latency 0
zk_p99_commit_propagation_latency 0
zk_p999_commit_propagation_latency 0
zk_avg_dead_watchers_cleaner_latency 0.0
zk_min_dead_watchers_cleaner_latency 0
zk_max_dead_watchers_cleaner_latency 0
zk_cnt_dead_watchers_cleaner_latency 0
zk_sum_dead_watchers_cleaner_latency 0
zk_p50_dead_watchers_cleaner_latency 0
zk_p95_dead_watchers_cleaner_latency 0
zk_p99_dead_watchers_cleaner_latency 0
zk_p999_dead_watchers_cleaner_latency 0
zk_avg_write_final_proc_time_ms 0.8095
zk_min_write_final_proc_time_ms 0
zk_max_write_final_proc_time_ms 6
zk_cnt_write_final_proc_time_ms 21
zk_sum_write_final_proc_time_ms 17
zk_p50_write_final_proc_time_ms 0
zk_p95_write_final_proc_time_ms 6
zk_p99_write_final_proc_time_ms 6
zk_p999_write_final_proc_time_ms 6
zk_avg_proposal_ack_creation_latency 0.0
zk_min_proposal_ack_creation_latency 0
zk_max_proposal_ack_creation_latency 0
zk_cnt_proposal_ack_creation_latency 0
zk_sum_proposal_ack_creation_latency 0
zk_p50_proposal_ack_creation_latency 0
zk_p95_proposal_ack_creation_latency 0
zk_p99_proposal_ack_creation_latency 0
zk_p999_proposal_ack_creation_latency 0
zk_avg_proposal_latency 0.0
zk_min_proposal_latency 0
zk_max_proposal_latency 0
zk_cnt_proposal_latency 0
zk_sum_proposal_latency 0
zk_p50_proposal_latency 0
zk_p95_proposal_latency 0
zk_p99_proposal_latency 0
zk_p999_proposal_latency 0
zk_avg_om_proposal_process_time_ms 0.0
zk_min_om_proposal_process_time_ms 0
zk_max_om_proposal_process_time_ms 0
zk_cnt_om_proposal_process_time_ms 0
zk_sum_om_proposal_process_time_ms 0
zk_p50_om_proposal_process_time_ms 0
zk_p95_om_proposal_process_time_ms 0
zk_p99_om_proposal_process_time_ms 0
zk_p999_om_proposal_process_time_ms 0
zk_avg_sync_processor_queue_and_flush_time_ms 0.0
zk_min_sync_processor_queue_and_flush_time_ms 0
zk_max_sync_processor_queue_and_flush_time_ms 0
zk_cnt_sync_processor_queue_and_flush_time_ms 0
zk_sum_sync_processor_queue_and_flush_time_ms 0
zk_p50_sync_processor_queue_and_flush_time_ms 0
zk_p95_sync_processor_queue_and_flush_time_ms 0
zk_p99_sync_processor_queue_and_flush_time_ms 0
zk_p999_sync_processor_queue_and_flush_time_ms 0
zk_avg_propagation_latency 1.2
zk_min_propagation_latency 0
zk_max_propagation_latency 5
zk_cnt_propagation_latency 10
zk_sum_propagation_latency 12
zk_p50_propagation_latency 1
zk_p95_propagation_latency 5
zk_p99_propagation_latency 5
zk_p999_propagation_latency 5
zk_avg_server_write_committed_time_ms 0.0
zk_min_server_write_committed_time_ms 0
zk_max_server_write_committed_time_ms 0
zk_cnt_server_write_committed_time_ms 3
zk_sum_server_write_committed_time_ms 0
zk_p50_server_write_committed_time_ms 0
zk_p95_server_write_committed_time_ms 0
zk_p99_server_write_committed_time_ms 0
zk_p999_server_write_committed_time_ms 0
zk_avg_sync_processor_queue_time_ms 0.0952
zk_min_sync_processor_queue_time_ms 0
zk_max_sync_processor_queue_time_ms 1
zk_cnt_sync_processor_queue_time_ms 21
zk_sum_sync_processor_queue_time_ms 2
zk_p50_sync_processor_queue_time_ms 0
zk_p95_sync_processor_queue_time_ms 1
zk_p99_sync_processor_queue_time_ms 1
zk_p999_sync_processor_queue_time_ms 1
zk_avg_sync_processor_queue_flush_time_ms 0.5714
zk_min_sync_processor_queue_flush_time_ms 0
zk_max_sync_processor_queue_flush_time_ms 6
zk_cnt_sync_processor_queue_flush_time_ms 21
zk_sum_sync_processor_queue_flush_time_ms 12
zk_p50_sync_processor_queue_flush_time_ms 0
zk_p95_sync_processor_queue_flush_time_ms 5
zk_p99_sync_processor_queue_flush_time_ms 6
zk_p999_sync_processor_queue_flush_time_ms 6
zk_avg_write_commitproc_time_ms 3.5
zk_min_write_commitproc_time_ms 2
zk_max_write_commitproc_time_ms 8
zk_cnt_write_commitproc_time_ms 18
zk_sum_write_commitproc_time_ms 63
zk_p50_write_commitproc_time_ms 3
zk_p95_write_commitproc_time_ms 8
zk_p99_write_commitproc_time_ms 8
zk_p999_write_commitproc_time_ms 8
zk_avg_zookeeper_read_per_namespace 0.0
zk_min_zookeeper_read_per_namespace 0
zk_max_zookeeper_read_per_namespace 0
zk_cnt_zookeeper_read_per_namespace 0
zk_sum_zookeeper_read_per_namespace 0
zk_avg_kafka_read_per_namespace 76.5
zk_min_kafka_read_per_namespace 74
zk_max_kafka_read_per_namespace 79
zk_cnt_kafka_read_per_namespace 2
zk_sum_kafka_read_per_namespace 153
zk_avg_redis_read_per_namespace 79.0
zk_min_redis_read_per_namespace 79
zk_max_redis_read_per_namespace 79
zk_cnt_redis_read_per_namespace 2
zk_sum_redis_read_per_namespace 158
zk_avg_python_write_per_namespace 7.0
zk_min_python_write_per_namespace 7
zk_max_python_write_per_namespace 7
zk_cnt_python_write_per_namespace 1
zk_sum_python_write_per_namespace 7
zk_avg_zookeeper_write_per_namespace 0.0
zk_min_zookeeper_write_per_namespace 0
zk_max_zookeeper_write_per_namespace 0
zk_cnt_zookeeper_write_per_namespace 0
zk_sum_zookeeper_write_per_namespace 0
zk_avg_mr_write_per_namespace 3.0
zk_min_mr_write_per_namespace 3
zk_max_mr_write_per_namespace 3
zk_cnt_mr_write_per_namespace 1
zk_sum_mr_write_per_namespace 3
zk_avg_go_write_per_namespace 3.0
zk_min_go_write_per_namespace 3
zk_max_go_write_per_namespace 3
zk_cnt_go_write_per_namespace 1
zk_sum_go_write_per_namespace 3
zk_avg_kudu_write_per_namespace 5.0
zk_min_kudu_write_per_namespace 5
zk_max_kudu_write_per_namespace 5
zk_cnt_kudu_write_per_namespace 1
zk_sum_kudu_write_per_namespace 5
zk_avg_redis_write_per_namespace 11.0
zk_min_redis_write_per_namespace 11
zk_max_redis_write_per_namespace 11
zk_cnt_redis_write_per_namespace 1
zk_sum_redis_write_per_namespace 11
zk_avg_oldboy_write_per_namespace 7.0
zk_min_oldboy_write_per_namespace 7
zk_max_oldboy_write_per_namespace 7
zk_cnt_oldboy_write_per_namespace 1
zk_sum_oldboy_write_per_namespace 7
zk_avg_java_write_per_namespace 5.0
zk_min_java_write_per_namespace 5
zk_max_java_write_per_namespace 5
zk_cnt_java_write_per_namespace 1
zk_sum_java_write_per_namespace 5
zk_avg_spark_write_per_namespace 6.0
zk_min_spark_write_per_namespace 6
zk_max_spark_write_per_namespace 6
zk_cnt_spark_write_per_namespace 1
zk_sum_spark_write_per_namespace 6
zk_avg_shell_write_per_namespace 6.0
zk_min_shell_write_per_namespace 6
zk_max_shell_write_per_namespace 6
zk_cnt_shell_write_per_namespace 1
zk_sum_shell_write_per_namespace 6
zk_avg_kafka_write_per_namespace 7.25
zk_min_kafka_write_per_namespace 6
zk_max_kafka_write_per_namespace 11
zk_cnt_kafka_write_per_namespace 4
zk_sum_kafka_write_per_namespace 29
zk_avg_hdfs_write_per_namespace 0.0
zk_min_hdfs_write_per_namespace 0
zk_max_hdfs_write_per_namespace 0
zk_cnt_hdfs_write_per_namespace 0
zk_sum_hdfs_write_per_namespace 0
zk_avg_w1_write_per_namespace 3.0
zk_min_w1_write_per_namespace 3
zk_max_w1_write_per_namespace 3
zk_cnt_w1_write_per_namespace 2
zk_sum_w1_write_per_namespace 6
zk_avg_k8s0000000001_write_per_namespace 14.0
zk_min_k8s0000000001_write_per_namespace 14
zk_max_k8s0000000001_write_per_namespace 14
zk_cnt_k8s0000000001_write_per_namespace 1
zk_sum_k8s0000000001_write_per_namespace 14
zk_avg_yarn_write_per_namespace 5.0
zk_min_yarn_write_per_namespace 5
zk_max_yarn_write_per_namespace 5
zk_cnt_yarn_write_per_namespace 1
zk_sum_yarn_write_per_namespace 5
[root@elk102.oldboyedu.com ~]#
[root@elk102.oldboyedu.com ~]#
常见的参数说明如下:
zk_version:
zookeeper服务器的版本信息
zk_server_state:
zookeeper的状态信息。
zk_peer_state:
zookeeper的传播方式。
zk_observer_master_id:
zookeeper集群的leader节点。
zk_ephemerals_count:
zookeeper的临时znode个数。
zk_num_alive_connections:
zookeeper服务器的连接数。
zk_avg_latency:
zookeeper服务器的平均延迟
zk_outstanding_requests:
zookeeper未完成的请求。
zk_znode_count:
zookeeper的znode数量。
zk_global_sessions:
zookeeper的会话信息。
zk_packets_sent:
发包数。
zk_packets_received:
收包数。
zk_watch_count:
watch数量。
zk_min_latency:
最小延迟。
zk_max_file_descriptor_count:
最大文件描述符数量。
zk_approximate_data_size:
数据大小。
zk_open_file_descriptor_count:
打开的文件描述符数量。
...
10.wchs命令(列出服务器watches的简洁信息)
(1)终端1执行以下命令:
[root@elk103.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 0] create /redis "REDIS"
Created /redis
[zk: 172.200.1.101:2181(CONNECTED) 1]
[zk: 172.200.1.101:2181(CONNECTED) 1] get -w /redis
REDIS
[zk: 172.200.1.101:2181(CONNECTED) 2]
(2)终端2执行以下命令:
[root@elk101.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 25]
[zk: 172.200.1.101:2181(CONNECTED) 25] create /kafka "KAFKA"
Created /kafka
[zk: 172.200.1.101:2181(CONNECTED) 26]
[zk: 172.200.1.101:2181(CONNECTED) 26] get -w /kafka
KAFKA
[zk: 172.200.1.101:2181(CONNECTED) 27]
[zk: 172.200.1.101:2181(CONNECTED) 27] get -w /redis
REDIS
[zk: 172.200.1.101:2181(CONNECTED) 28]
(3)列出服务器watches的简介信息
[root@elk102.oldboyedu.com ~]# echo wchs | nc elk101.oldboyedu.com 2181
2 connections watching 2 paths
Total watches:3
[root@elk102.oldboyedu.com ~]#
温馨提示:
connections:
连接数。
watching 2 paths:
watch的znode路径数量为2。
Total watches:
总共的watcher数量。
11.wchc命令(通过session分组,列出watch的所有节点,它的输出是一个与watch相关的会话的节点列表。)
(1)终端1执行以下命令:
[root@elk103.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 0] create /redis "REDIS"
Created /redis
[zk: 172.200.1.101:2181(CONNECTED) 1]
[zk: 172.200.1.101:2181(CONNECTED) 1] get -w /redis
REDIS
[zk: 172.200.1.101:2181(CONNECTED) 2]
(2)终端2执行以下命令:
[root@elk101.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 25]
[zk: 172.200.1.101:2181(CONNECTED) 25] create /kafka "KAFKA"
Created /kafka
[zk: 172.200.1.101:2181(CONNECTED) 26]
[zk: 172.200.1.101:2181(CONNECTED) 26] get -w /kafka
KAFKA
[zk: 172.200.1.101:2181(CONNECTED) 27]
[zk: 172.200.1.101:2181(CONNECTED) 27] get -w /redis
REDIS
[zk: 172.200.1.101:2181(CONNECTED) 28]
(3)通过session分组,列出watch的所有节点,它的输出是一个与watch相关的会话的节点列表。
[root@elk102.oldboyedu.com ~]# echo wchc | nc elk101.oldboyedu.com 2181
0x6500058d87660002
/kafka
/redis
0x6500058d87660004
/redis
[root@elk102.oldboyedu.com ~]#
12.wchp命令(通过路径列出服务器watch的详细信息。它输出一个与session相关的路径。)
(1)终端1执行以下命令:
[root@elk103.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 0] create /redis "REDIS"
Created /redis
[zk: 172.200.1.101:2181(CONNECTED) 1]
[zk: 172.200.1.101:2181(CONNECTED) 1] get -w /redis
REDIS
[zk: 172.200.1.101:2181(CONNECTED) 2]
(2)终端2执行以下命令:
[root@elk101.oldboyedu.com ~]# zkCli.sh -server 172.200.1.101:2181
...
[zk: 172.200.1.101:2181(CONNECTED) 25]
[zk: 172.200.1.101:2181(CONNECTED) 25] create /kafka "KAFKA"
Created /kafka
[zk: 172.200.1.101:2181(CONNECTED) 26]
[zk: 172.200.1.101:2181(CONNECTED) 26] get -w /kafka
KAFKA
[zk: 172.200.1.101:2181(CONNECTED) 27]
[zk: 172.200.1.101:2181(CONNECTED) 27] get -w /redis
REDIS
[zk: 172.200.1.101:2181(CONNECTED) 28]
(3)通过路径列出服务器watch的详细信息。它输出一个与session相关的路径。
[root@elk102.oldboyedu.com ~]# echo wchp | nc elk101.oldboyedu.com 2181
/kafka
0x6500058d87660002
/redis
0x6500058d87660002
0x6500058d87660004
[root@elk102.oldboyedu.com ~]#
13.reqs命令(查看未经处理的请求)
[root@elk102.oldboyedu.com ~]# echo reqs | nc elk101.oldboyedu.com 2181 # 如果服务器没有未处理的请求,则会有相应的数据返回,若没有数据返回则说明正常。
[root@elk102.oldboyedu.com ~]#
14.crst命令(重置当前这台服务器所有连接/会话的统计信息)
[root@elk102.oldboyedu.com ~]# echo crst | nc elk103.oldboyedu.com 2181
Connection stats reset.
[root@elk102.oldboyedu.com ~]#