Comment 2 for bug 1369042

Revision history for this message
Matt Brown (mattbrown-2) wrote :

Would be good to have the stats on your zookeeper. Is it possible to use one of the "four letter" zookeeper commands, see below, so we can see how many connections (sessions) your zookeeer has? You should only see 1 connection each for DcsMaster/DcsServer and MXOSRVR. The example below is for a config with a servers file of "localhost 4".

dcs-0.9.0>echo stat | nc <ip address of server> 2182
Zookeeper version: 3.4.5-1392090, built on 09/30/2012 17:52 GMT
Clients:
 /0:0:0:0:0:0:0:1:36057[1](queued=0,recved=167,sent=167) //This is MXOSRVR
 /0:0:0:0:0:0:0:1:36075[1](queued=0,recved=167,sent=167) //This is MXOSRVR
 /127.0.0.1:44862[1](queued=0,recved=50,sent=50) //This is DcsServer
 /<ip address of server>:35503[0](queued=0,recved=1,sent=0) // Unknown
 /0:0:0:0:0:0:0:1:36067[1](queued=0,recved=167,sent=167) //This is MXOSRVR
 /127.0.0.1:44856[1](queued=0,recved=54,sent=62) //This is DcsMaster
 /0:0:0:0:0:0:0:1:36077[1](queued=0,recved=165,sent=165) //This is MXOSRVR

Latency min/avg/max: 0/0/1
Received: 8
Sent: 8
Connections: 7
Outstanding: 0
Zxid: 0x38
Mode: standalone
Node count: 16

BTW, Here's some other very useful zookeeper commands

ZooKeeper Commands: The Four Letter Words
ZooKeeper responds to a small set of commands. Each command is composed of four letters. You issue the commands to ZooKeeper via telnet or nc, at the client port.

dump
Lists the outstanding sessions and ephemeral nodes. This only works on the leader.

envi
Print details about serving environment

kill
Shuts down the server. This must be issued from the machine the ZooKeeper server is running on.

reqs
List outstanding requests

ruok
Tests if server is running in a non-error state. The server will respond with imok if it is running. Otherwise it will not respond at all.

srst
Reset statistics returned by stat command.

stat
Lists statistics about performance and connected clients.

Here's an example of the ruok command:

$ echo ruok | nc 127.0.0.1 5111
imok