标签:初始化 nec latency code cti out pre 初始 jmx
注意:如果未初始化数据目录,则无法启动ZooKeeper服务器。//查看zk的状态
[root@hadoop-205-107 opt]# echo "stat" |nc 192.168.205.107 2181
Zookeeper version: 3.4.5-cdh5.9.2--1, built on 04/04/2017 08:43 GMT
Clients:
/192.168.205.107:35132[1](queued=0,recved=424,sent=424)
/192.168.205.107:45317[0](queued=0,recved=1,sent=0)
/192.168.205.107:35125[1](queued=0,recved=879,sent=879)
/192.168.205.107:35227[1](queued=0,recved=6576,sent=6576)
/192.168.205.107:35133[1](queued=0,recved=449,sent=449)
/192.168.205.107:35075[1](queued=0,recved=508,sent=510)
/192.168.205.107:35100[1](queued=0,recved=432,sent=432)
/192.168.205.107:35083[1](queued=0,recved=2404,sent=2441)
Latency min/avg/max: 0/0/231
Received: 15265
Sent: 15579
Connections: 8
Outstanding: 0
Zxid: 0x7fa
Mode: standalone
Node count: 44
[root@hadoop-205-107 opt]# echo "stat" |nc 192.168.205.107 2181|grep Mode
Mode: standalone
[root@hadoop-205-107 opt]# /opt/cloudera/parcels/CDH-5.9.2-1.cdh5.9.2.p0.3/lib/zookeeper/bin/zkServer.sh status
JMX enabled by default
Using config: /opt/cloudera/parcels/CDH-5.9.2-1.cdh5.9.2.p0.3/lib/zookeeper/bin/../conf/zoo.cfg
Mode: standalone
[root@hadoop-205-107 opt]# telnet 192.168.205.107 2181
Trying 192.168.205.107...
Connected to 192.168.205.107.
Escape character is ‘^]‘.
stat //手动输入
Zookeeper version: 3.4.5-cdh5.9.2--1, built on 04/04/2017 08:43 GMT
Clients:
/192.168.205.107:35132[1](queued=0,recved=445,sent=445)
/192.168.205.107:35125[1](queued=0,recved=912,sent=912)
/192.168.205.107:35227[1](queued=0,recved=7233,sent=7233)
/192.168.205.107:35133[1](queued=0,recved=470,sent=470)
/192.168.205.107:45868[0](queued=0,recved=1,sent=0)
/192.168.205.107:35075[1](queued=0,recved=529,sent=531)
/192.168.205.107:35100[1](queued=0,recved=453,sent=453)
/192.168.205.107:35083[1](queued=0,recved=2447,sent=2484)
Latency min/avg/max: 0/0/231
Received: 16267
Sent: 16595
Connections: 8
Outstanding: 0
Zxid: 0x855
Mode: standalone
Node count: 44
Connection closed by foreign host.
在cdh中如何管理zookeeper并查看zk状态的命令总结
标签:初始化 nec latency code cti out pre 初始 jmx
原文地址:https://blog.51cto.com/12445535/2407761