API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary
    ACOS 6.3.0
  • Arcfra Cloud Operating System>
  • CLI command>
  • Managing clusters>
  • Viewing cluster services

Managing ZooKeeper services

Checking ZooKeeper service health

Procedure

Run the following command on any node in the cluster to check whether the ZooKeeper service is running normally:

zbs-tool zk list

Output example

If the following information is displayed, the ZooKeeper service is running normally. If an error message is returned, the ZooKeeper service is in an abnormal state.

10.0.20.50:2181	  follower	0x100000aa8
10.0.20.51:2181	  follower	0x100000aa8
10.0.20.52:2181	    leader	0x100000aa8

Output note

The node IP addresses, node roles, and ZooKeeper transaction IDs of nodes running ZooKeeper services are displayed.

Checking the status of nodes running ZooKeeper services

Procedure

Run the following command on any node in the cluster:

zbs-tool zk status

Output example

10.0.20.50:2181: imok
10.0.20.51:2181: imok
10.0.20.52:2181: imok

Output note

imok indicates that the ZooKeeper service on the node is running normally.

Viewing ZooKeeper service running information

Procedure

Run the following command on any node in the cluster:

zbs-tool zk stat

Output example

10.0.20.50:2181:
       'Zookeeper version: 3.5.9-3661b1e3c6c87ec14990b65968fe4a3bed5f7235, built on 07/31/2022 15:45 GMT',
        'Clients:',
        ' /10.0.20.52:37730[1](queued=0,recved=4655,sent=4909)',
        ' /10.0.20.51:60136[1](queued=0,recved=3533,sent=3533)',
        ' /10.0.20.50:47502[1](queued=0,recved=3527,sent=3527)',
        ' /10.0.20.51:54430[1](queued=0,recved=4553,sent=4803)',
        ' /10.0.20.51:56094[1](queued=0,recved=454,sent=454)',
        ' /10.0.20.52:37710[1](queued=0,recved=2768,sent=2769)',
        ' /10.0.20.52:38122[1](queued=0,recved=3676,sent=3676)',
        ' /10.0.20.50:42962[1](queued=0,recved=454,sent=454)',
        ' /10.0.20.52:44324[0](queued=0,recved=1,sent=0)',
        ' /10.0.20.51:54812[1](queued=0,recved=3676,sent=3676)',
        ' /10.0.20.50:41556[1](queued=0,recved=3676,sent=3676)',
        ' /10.0.20.52:38332[1](queued=0,recved=3672,sent=3672)',
        ' /10.0.20.52:43420[1](queued=0,recved=3533,sent=3533)',
        ' /10.0.20.52:37740[1](queued=0,recved=2773,sent=2774)',
        ' /10.0.20.51:56086[1](queued=0,recved=454,sent=454)',
        ' /10.0.20.51:56096[1](queued=0,recved=454,sent=454)',
        ' /10.0.20.50:42960[1](queued=0,recved=454,sent=454)',
        '',
        'Latency min/avg/max: 0/0/11',
        'Received: 51215',
        'Sent: 51728',
        'Connections: 17',
        'Outstanding: 0',
        'Zxid: 0x100000b0f',
        'Mode: follower',
        'Node count: 1315'
...

Output note

ParameterDescription
Latency min/avg/maxThe minimum, average, and maximum response latency, in ms.
ReceivedThe number of packets received.
SentThe number of packets sent.
OutstandingThe number of outstanding requests.
ZxidThe transaction ID.
ModeThe current ZooKeeper node role, such as leader or follower.
Node countThe number of nodes.

Viewing ZooKeeper runtime environment

Procedure

Run the following command on any node in the cluster:

zbs-tool zk env

Output example

10.0.0.20:2181:
'Environment:',
'zookeeper.version=3.4.10-e52e475caf7498b144747d385f506fd1e4633805, built on 05/26/2017 06:34 GMT',
'host.name=<NA>',
'java.version=1.8.0_131',
'java.vendor=Oracle Corporation',
'java.home=/usr/java/jdk1.8.0_131/jre',
'java.class.path=/usr/sbin/../build/classes:/usr/sbin/../build/lib/*.jar:/usr/sbin/../share/zookeeper/zookeeper-3.4.10.jar:/usr/sbin/../share/zookeeper/slf4j-log4j12-1.6.1.jar:/usr/sbin/../share/zookeeper/slf4j-api-1.6.1.jar:/usr/sbin/../share/zookeeper/netty-3.10.5.Final.jar:/usr/sbin/../share/zookeeper/log4j-1.2.16.jar:/usr/sbin/../share/zookeeper/jline-0.9.94.jar:/usr/sbin/../src/java/lib/*.jar:/etc/zookeeper:',
'java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib',
'java.io.tmpdir=/tmp',
'java.compiler=<NA>',
'os.name=Linux',
'os.arch=amd64',
'os.version=3.10.0-327.36.3.el7.arcfra.2.x86_64',
'user.name=zookeeper',
'user.home=/usr/share/zookeeper',
'user.dir=/'
...

Viewing ZooKeeper detailed information

Procedure

Run the following command on any node in the cluster:

zbs-tool zk detail

Output example

10.0.0.20:2181:
'Zookeeper version: 3.4.10-e52e475caf7498b144747d385f506fd1e4633805, built on 05/26/2017 06:34 GMT',
'Latency min/avg/max: 0/0/416',
'Received: 11412218',
'Sent: 11472904',
'Connections: 5',
'Outstanding: 0',
'Zxid: 0x100283f5b',
'Mode: follower',
'Node count: 66652'
...

Output note

ParameterDescription
Latency min/avg/maxThe minimum, average, and maximum response latency, in ms.
ReceivedThe number of packets received.
SentThe number of packets sent.
OutstandingThe number of outstanding requests.
ZxidThe transaction ID.
ModeThe current ZooKeeper node role, such as leader or follower.
Node countThe number of nodes.