Use the pdbcli status command to view the runtime status of a cluster.
To view the current status of the cluster nodes, run the following command. The command returns information about the cluster nodes, including their master and standby roles, endpoints, status, start time, and synchronization status:
pdbcli statusThe following output is returned:
Using config file: ./config.yaml
Cluster Status:
{
"phase": "RunningPhase",
"master": {
"endpoint": "10.XX.XX.1:1521",
"phase": "RUNNING",
"start_at": "2020-09-23 21:48:23"
},
"standby": [
{
"endpoint": "10.XX.XX.2:1521",
"phase": "RUNNING",
"start_at": "2020-09-23 21:48:31",
"sync_status": "SYNC"
},
{
"endpoint": "10.XX.XX.3:1521",
"phase": "RUNNING",
"start_at": "2020-09-23 21:48:31",
"sync_status": "SYNC"
}
]
}You can also add the --full parameter to obtain complete cluster status information. This information includes the ID, endpoint, port, engine status, and pod status of each node.
pdbcli status --fullTo get help information about the command, run the pdbcli help status or pdbcli status --help command:
Using config file: ./config.yaml
Show PolarDB Cluster status.
For example:
pdbcli status
Usage:
pdbcli status [flags]
Flags:
--full Show complete status information.
-h, --help help for status
Global Flags:
--config string Specify the configuration file. (default "./config.yaml")
--debug Enable additional output for debugging.该文章对您有帮助吗?