Database Reference
In-Depth Information
$ echo stat | nc 127.0.0.1 2181
Zookeeper version: 3.3.3-1203054, built on 11/17/2011
05:47 GMT
Clients:
/127.0.0.1:58503[1](queued=0,recved=731,sent=731)
/127.0.0.1:58583[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/2/285
Received: 762
Sent: 761
Outstanding: 0
Zxid: 0x2f9
Mode: standalone
Node count: 752
As shown in the preceding code, the stat command returns information
about the ZooKeeper server's response latency, the number of commands
received, and the number of responses sent. It also reports the mode of
the server, in this case a standalone server used along with Kafka for
development purposes. Sending the srst command resets the latency and
command statistics. In this example, the srst command was sent after the
previous stat command while a queue example was running. This resets
the count statistics, but the queue had been adding more elements to the
queue, increasing the node count:
$ echo srst | nc 127.0.0.1 2181
Server stats reset.
$ echo stat | nc 127.0.0.1 2181
Zookeeper version: 3.3.3-1203054, built on 11/17/2011
05:47 GMT
Clients:
/127.0.0.1:58725[0](queued=0,recved=1,sent=0)
/127.0.0.1:58503[1](queued=0,recved=1933,sent=1933)
Latency min/avg/max: 2/2/3
Received: 15
Sent: 15
Outstanding: 0
Zxid: 0x7ab
Search WWH ::




Custom Search