Information about tenants in a cluster

2025-11-28 06:05:02  Updated

This topic describes how to use OceanBase Diagnostic Tool (obdiag) that is independently deployed to display the information about tenants in a cluster in a terminal.

Syntax

obdiag display scene run --scene=observer.tenant_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.

Note

For information about the parameters supported by this option, see Configure obdiag.

--env Yes string Empty Additional parameters required for the obdiag display command, in the format of --env tenant_name=xxxx.

Examples

Method 1: Use the command out-of-the-box without a configuration file

obdiag display scene run --scene=observer.tenant_info --env tenant_name=xxx \
    --config db_host=xx.xx.xx.xx \
    --config db_port=xxxx \
    --config tenant_sys.user=root@sys \
    --config tenant_sys.password=***

Method 2: Use the command with a configuration file

Before you use this command, 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.tenant_info --env tenant_name=xxx

Results

After the command is executed, the execution result is displayed in the current terminal.

obdiag display scene run --scene=observer.tenant_info --env tenant_name=sys
display_scenes_run start ...
execute tasks: observer.tenant_info
+-------------+-------------+--------------+---------------+-------------+
| tenant_name | tenant_type | primary_zone |    locality   | tenant_role |
+-------------+-------------+--------------+---------------+-------------+
|     sys     |     SYS     |    RANDOM    | FULL{1}@zone1 |   PRIMARY   |
+-------------+-------------+--------------+---------------+-------------+
+-------------+-------+----------------+--------------+-----+-------------+---------------+-----------+---------------+----------+
| tenant_name |  zone |    observer    | replica_type | cpu | memory_size | log_disk_size | data_size | required_size | unit_num |
+-------------+-------+----------------+--------------+-----+-------------+---------------+-----------+---------------+----------+
|     sys     | zone1 | xx.xx.xx.xx    |     FULL     | 3.0 |      1G     |       2G      |   0.03G   |     0.32G     |    1     |
+-------------+-------+----------------+--------------+-----+-------------+---------------+-----------+---------------+----------+
Trace ID: 725dc5e4-89d3-11ef-9ccf-00163e01c7ce

Contact Us