Skip to main content

top for Apache ZooKeeper

Project description

h1. ZooKeeper top

*Author: "Patrick Hunt":* (follow me on "twitter":

h2. Summary

"This project": provides a unix "top" like utility for ZooKeeper. It is compatible with Python2.6, Python2.7 and Python3.

h3. Example


./ --servers "localhost:2181,localhost:2182,localhost:2183"

or - omitting the port numbers, defaulting to 2181 -

./ --servers "server1,server2,server3"

or, for a ZK-style configuration file:

./ --config zk.conf

shows a screen like:

Ensemble -- nodecount:10 zxid:0x1300000001 sessions:4

localhost 2181 F 0 93 92 2 2 7 13
localhost 2182 F 0 37 36 1 0 0 0
localhost 2183 L 0 36 35 1 0 0 0

CLIENT PORT I QUEUE RECVD SENT 34705 1 0 56 56 35943 1 0 1 0 33999 1 0 1 0 37988 1 0 1 0

h3. What's Apache ZooKeeper?

>From the "official site": "ZooKeeper is a high-performance coordination service for distributed applications."

It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interface so you don't have to write them from scratch. You can use it off-the-shelf to implement consensus, group management, leader election, and presence protocols.


0) Top line is overall cluster status
1-n) Lines 1-n are for the n servers
n+1 and below are for client connections

h3. Usage

Usage: [options]

-h, --help show this help message and exit
--servers=SERVERS comma separated list of host:port (default
-n, --names resolve session name from ip (default False)
--fix_330 workaround for a bug in ZK 3.3.0
log level verbosity (DEBUG, INFO, WARN(ING), ERROR, CRITICAL/FATAL))
-l LOGFILE, --logfile=LOGFILE
directory in which to place log file, or empty for
zookeeper configuration file to lookup servers from

--fix_330 works around a bug in ZooKeeper 3.3.0, it is only necessary if running the server against that version of ZooKeeper.

The screen refreshes every 3 seconds.
* 'h' help
* 'q' quits
* 'r' resets the server stats
* spacebar updates immediately

h2. PyPi

zktop is now installable from PyPi

pip install zktop

h2. License

This project is licensed under the Apache License Version 2.0

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zktop-1.0.0.tar.gz (7.9 kB view hashes)

Uploaded source

Built Distribution

zktop-1.0.0-py2.py3-none-any.whl (9.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page