Add support for zk admin commands (aka four letter cmds)

Bug #865370 reported by Kapil Thangavelu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txzookeeper
In Progress
Wishlist
Kapil Thangavelu

Bug Description

Useful debugging and status information can be obtained using the four letter commands.

Changed in txzookeeper:
importance: Undecided → Wishlist
status: New → In Progress
assignee: nobody → Kapil Thangavelu (hazmat)
Revision history for this message
Hanno Schlichting (hannosch) wrote :

I use those in two ways, either simple command line:

$ echo stat | nc 127.0.0.1 2181

or via as very simple helper:

from socket import create_connection

def send_command(host=u'127.0.0.1', port=2181, command=b'ruok'):
    sock = create_connection((host, port))
    sock.sendall(command)
    result = sock.recv(8192)
    sock.close()
    return [l.strip() for l in result.split('\n') if l]

>>> send_command(command=b'stat')

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.