Zookeeper operation and maintenance of four words commonly used commands

Zookeeper operation and maintenance of four words commonly used commands

echo stat | nc 127.0.0.1 2181 to see which node is selected as a follower or a leader 
using echo ruok | nc 127.0.0.1 2181 tested whether to activate the Server, if the reply imok said that it has started. 
echo dump | nc 127.0.0.1 2181, session and provisional list node untreated. 
echo kill | nc 127.0.0.1 2181, turn off the Server 
echo conf | Details nc 127.0.0.1 2181, the output configuration of related services. 
echo cons | nc 127.0.0.1 2181, lists the full details of the connection / session all connections to the server of the client. 
echo envi | nc 127.0.0.1 2181, output detailed information on the service environment (different from the conf command). 
echo reqs | nc 127.0.0.1 2181, a request to list untreated. 
echo wchs | nc 127.0.0.1 2181, lists the details of the server's watch. 
echo wchc | nc 127.0.0.1 2181, details of the server watch list by session, its output is related to the watch list of the session. 
echo wchp | nc 127.0.0.1 2181, details of the server watch lists through the path. It outputs a path associated with the session.

 


 

 

Connect to ZooKeeper service -server localhost ./zkCli.sh: 2181 

LS (see the current node data), 
LS2 (see the current node data and can see the number of updates and other data), 
the Create (create a node), 
GET (get a node , containing data and update data such as the number of times), 
the SET (modified node) 
the delete (delete a node)

 

Guess you like

Origin www.cnblogs.com/stono/p/11495309.html