Search code examples
distributedapache-zookeeper

given a zookeeper server ip:port, how to get the zookeeper structure?


given a zookeeper server ip:port, how to get the zookeeper structure? for example I was told a zookeper service server is 192.1.2.17:2181

I can use ZKcli.sh to login and do some basic stuff. I can use it without problem. But I want to know how many nodes in this zookeeper setup? Who are those nodes?? what are their status? How do I achieve this?

Thanks


Solution

  • You might find some of these commands useful:

    http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#The+Four+Letter+Words

    You can run them against the server ip:port you were given, e.g.:

    echo MNTR | nc 192.1.2.17 2181
    

    If you have access to that host, you could just check the configuration that is usually under something like <zoo install>/conf/zoo.cfg.