dump cldbstate
Prints the state of the container location database (CLDB).
Syntax
- CLI
-
maprcli dump cldbstate [ -cluster cluster_name ] [ -hostip host name or ip ]
- REST
Request Type POST Request URL http[s]://<host:port>/rest/dump/cldbstate
Parameters
Parameter |
Description |
---|---|
cluster
|
The cluster on which to run the command. If this parameter is omitted, the command is run on the same cluster where it is issued. In multi-cluster contexts, you can use this parameter to specify a different cluster on which to run the command. |
hostip |
The node from which to retrieve the state of CLDB. If this parameter is omitted, the command returns the CLDB state from all nodes in the cluster. |
Output
The maprcli dump cldbstate
command lists the state of the CLDB
database.
$ maprcli dump cldbstate
mode ip state stateDuration desc
SLAVE_READ_ONLY x.x.x.x CLDB_IS_SLAVE_READ_ONLY 03:54:25 cldb running as slave
SLAVE_READ_ONLY x.x.x.x CLDB_IS_SLAVE_READ_ONLY 03:54:16 cldb running as slave
MASTER_READ_WRITE x.x.x.x CLDB_IS_MASTER_READ_WRITE 04:07:58 kvstore tables loading complete,
cldb running as master
Field | Description |
---|---|
mode |
The CLDB mode. A CLDB instance can either run as a Primary or a
Secondary instance. The only two states that a CLDB instance should
settle in are:
If a CLDB instance spends a significant amount of time in a state other than these two, then it is highly likely that there is an issue that requires administrative intervention. |
ip |
The IP address of the node from which the CLDB state is retrieved. |
state |
Indicates whether the CLDB instance is run as a Secondary with READ_ONLY privilege, or as a Primary with READ_WRITE privilege. |
stateDuration |
The amount of time in HH:MM:SS format that the CLDB instance has spent in this state. |
desc |
The description of the state (either Primary or Secondary). |
Example
dump cldbstate command without any parameter
# maprcli dump cldbstate
mode s3Info ip state stateDuration desc
SLAVE_READ_ONLY ... 10.163.160.124 CLDB_IS_SLAVE_READ_ONLY 04:49:16 cldb running as slave
# curl -k -X POST 'https://m2-hu6kn1.mip.storage.hpecorp.net:8443/rest/dump/cldbstate' --user <username>:<password>
{"timestamp":1664180077722,"timeofday":"2022-09-26 01:14:37.722 GMT-0700 AM","status":"OK","total":1,"data":[{"ip":"10.163.162.122","state":"CLDB_IS_SLAVE_READ_ONLY","stateDuration":"04:51:52","mode":"SLAVE_READ_ONLY","desc":"cldb running as slave","s3Info":{"s3State":"S3_SERVER_SLAVE","s3StateDuration":"04:49:22","s3desc":"s3server running as slave"}}]}
dump cldbstate command with hostip parameter
# maprcli dump cldbstate -hostip 10.163.160.124
mode s3Info ip state stateDuration desc
SLAVE_READ_ONLY ... 10.163.160.124 CLDB_IS_SLAVE_READ_ONLY 04:49:16 cldb running as slave
# curl -k -X POST 'https://m2-hu6kn1.mip.storage.hpecorp.net:8443/rest/dump/cldbstate?hostip=10.163.162.122' --user <username>:<password>
{"timestamp":1664180077722,"timeofday":"2022-09-26 01:14:37.722 GMT-0700 AM","status":"OK","total":1,"data":[{"ip":"10.163.162.122","state":"CLDB_IS_SLAVE_READ_ONLY","stateDuration":"04:51:52","mode":"SLAVE_READ_ONLY","desc":"cldb running as slave","s3Info":{"s3State":"S3_SERVER_SLAVE","s3StateDuration":"04:49:22","s3desc":"s3server running as slave"}}]}
dump cldbstate command with cluster parameter
# maprcli dump cldbstate -cluster Cloudpool181
mode s3Info ip state stateDuration desc
MASTER_READ_WRITE ... 10.163.162.121 CLDB_IS_MASTER_READ_WRITE 04:49:16 kvstore tables loading complete, cldb running as master
SLAVE_READ_ONLY ... 10.163.162.122 CLDB_IS_SLAVE_READ_ONLY 04:48:55 cldb running as slave
SLAVE_READ_ONLY ... 10.163.162.123 CLDB_IS_SLAVE_READ_ONLY 04:48:54 cldb running as slave
# curl -k -X POST 'https://m2-hu6kn1.mip.storage.hpecorp.net:8443/rest/dump/cldbstate?cluster=Cloudpool181' --user <username>:<password>
{"timestamp":1664180133720,"timeofday":"2022-09-26 01:15:33.720 GMT-0700 AM","status":"OK","total":3,"data":[{"ip":"10.163.162.121","state":"CLDB_IS_MASTER_READ_WRITE","stateDuration":"04:53:10","mode":"MASTER_READ_WRITE","desc":"kvstore tables loading complete, cldb running as master","s3Info":{"s3State":"S3_SERVER_MASTER","s3StateDuration":"04:48:10","s3desc":"s3server running as master"}},{"ip":"10.163.162.122","state":"CLDB_IS_SLAVE_READ_ONLY","stateDuration":"04:52:48","mode":"SLAVE_READ_ONLY","desc":"cldb running as slave","s3Info":{"s3State":"S3_SERVER_SLAVE","s3StateDuration":"04:50:18","s3desc":"s3server running as slave"}},{"ip":"10.163.162.123","state":"CLDB_IS_SLAVE_READ_ONLY","stateDuration":"04:52:47","mode":"SLAVE_READ_ONLY","desc":"cldb running as slave","s3Info":{"s3State":"S3_SERVER_SLAVE","s3StateDuration":"04:50:18","s3desc":"s3server running as slave"}}]}
dump cldbstate command to obtain JSON output
- CLI
# maprcli dump cldbstate -json { "timestamp":1664180444030, "timeofday":"2022-09-26 01:20:44.030 GMT-0700 AM", "status":"OK", "total":3, "data":[ { "ip":"10.163.162.121", "state":"CLDB_IS_MASTER_READ_WRITE", "stateDuration":"04:58:20", "mode":"MASTER_READ_WRITE", "desc":"kvstore tables loading complete, cldb running as master", "s3Info":{ "s3State":"S3_SERVER_MASTER", "s3StateDuration":"04:53:20", "s3desc":"s3server running as master" } }, { "ip":"10.163.162.122", "state":"CLDB_IS_SLAVE_READ_ONLY", "stateDuration":"04:57:59", "mode":"SLAVE_READ_ONLY", "desc":"cldb running as slave", "s3Info":{ "s3State":"S3_SERVER_SLAVE", "s3StateDuration":"04:55:28", "s3desc":"s3server running as slave" } }, { "ip":"10.163.162.123", "state":"CLDB_IS_SLAVE_READ_ONLY", "stateDuration":"04:57:58", "mode":"SLAVE_READ_ONLY", "desc":"cldb running as slave", "s3Info":{ "s3State":"S3_SERVER_SLAVE", "s3StateDuration":"04:55:28", "s3desc":"s3server running as slave" } } ] }