cdh에서 zookeeper를 어떻게 관리하고 zk상태를 보는 명령 요약
2392 단어 cdh 관리 zookeepercdh 시리즈
//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.
참조 링크:https://www.cloudera.com/documentation/enterprise/5-13-x/topics/cm_mc_zookeeper_service.html#xd_583c10bfdbd326ba--6eed2fb8-14349d04bee--7f1a