Information about events in a cluster

2025-03-21 08:45:14  Updated

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

Syntax

obdiag display scene run --scene=observer.event [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 No string Empty Additional parameters required for the obdiag display command, in the format of ---env tenant_name=test.

Note

In the --env option, tenant_name specifies the name of the business tenant whose events are to be displayed.

Examples

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

obdiag display scene run --scene=observer.event --env tenant_name=test \
    --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.event --env tenant_name=test

Results

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

# The --env option is passed to specify the connection string of the target tenant for the query.
$ obdiag display scene run --scene=observer.event --env tenant_name=test
display_scenes_run start ...
execute tasks: observer.event
+-----------+-------------+-------------+----------------+
| tenant_id | event_group | total_waits |  time_waited   |
+-----------+-------------+-------------+----------------+
|    1004   |      IO     |     1317    |     0.3403     |
|    1004   |    LATCH    |      9      |     0.0210     |
|    1004   |    OTHER    | 13133760614 | 192831577.5354 |
|    1004   |   SYNC_RPC  |      10     |     0.4839     |
+-----------+-------------+-------------+----------------+
Trace ID: a7d52e6c-8a21-11ef-9c0c-00163e01c7ce

Contact Us