This topic describes how to use OceanBase Diagnostic Tool (obdiag) that is independently deployed to collect and display the basic information about a cluster in a terminal.
Syntax
obdiag display scene run --scene=observer.cluster_info [options]
The following table describes the options.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| -c | No | string | ~/.obdiag/config.yml |
The path of the configuration file. |
| --inner_config | No | string | Empty | The configurations of obdiag. |
| --config | No | string | Empty | The configurations of the cluster diagnosed by obdiag, in the format of --config key1=value1 --config key2=value2.
NoteFor information about the parameters supported by this option, see Configure obdiag. |
Examples
Method 1: Use obdiag out-of-the-box without a configuration file
obdiag display scene run --scene=observer.cluster_info \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
Method 2: Use obdiag with a configuration file
Before you use obdiag, make sure that you have configured the login information of the target nodes in the config.yml configuration file of obdiag. For more information, see Configure obdiag.
obdiag display scene run --scene=observer.cluster_info
Results
After the command is executed, the execution result is displayed in the current terminal. Here is an example:
$ obdiag display scene run --scene=observer.cluster_info
...
+-----------------------+--------------------------+
| stat_name | value |
+-----------------------+--------------------------+
| cluster_name | obcluster |
| cluster_id | 1 |
| version | 4.2.2.0 |
| observers | 1 |
| zones | 1 |
| tenants | 3 |
| rs_list | xx.xx.xx.xx:2882:2881 |
| config_url | |
| memory_limit | 24.00G |
| data_disk_allocated | 56.00G |
| cpu_total | 16 |
| cpu_assigned | 12 |
| cpu_assinged_per | 75% |
| memory_total | 20.00G |
| memory_assigned | 19.00G |
| memory_assigned_per | 95.00% |
| log_disk_total | 84.00G |
| log_disk_assigned | 8.00G |
| log_disk_assigned_per | 10.00% |
| log_disk_in_use | 6.50G |
| log_disk_in_use_per | 81.00% |
| data_disk_total | 56.00G |
| data_disk_in_use | 23.69G |
| data_disk_in_use_per | 42.00% |
+-----------------------+--------------------------+
Trace ID: f1b0206e-8878-11ef-a52e-00163e01c7ce