This article is applicable to the scenario of independent deployment of obdiag. It can display the clog/log disk usage of each node and each tenant of the OceanBase database with one click.
Description
This scenario only supports OceanBase database V4.0.0.0 and above.
Instructions for use
obdiag display scene run --scene=observer.clog_volume_statistics [options]
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| -c | No | string | ~/.obdiag/config.yml |
Configuration file path. |
| --inner_config | No | string | Default is empty | obdiag's own configuration. |
| --config | No | string | Default is empty | Configuration of the cluster to be diagnosed by obdiag, fixed style: --config key1=value1 --config key2=value2.
ExplanationParameters that support configuration through this option can be found in obdiag configuration. |
| --config_password | No | string | Default is empty | obdiag When using an encrypted configuration file, you need to pass in the corresponding password through this option.
ExplanationFor details, please see Configuration file encryption. |
Usage example
Method 1: Use without configuration file (out of the box)
obdiag display scene run --scene=observer.clog_volume_statistics \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
Method 2: Use with configuration file
You need to ensure that the login information of the node to be collected has been configured in the obdiag configuration file config.yml. For related detailed configuration introduction, see obdiag configuration.
obdiag display scene run --scene=observer.clog_volume_statistics
Display content
This scenario will show the following two types of clog log disk usage.
Server level log disk (clog) usage
Displays the log disk capacity and usage of each node. The data comes from the GV$OB_SERVERS view, which contains the following information:
SVR_IP: Server IPSVR_PORT: server portZONE: Zone nameLOG_DISK_CAPACITY_GB: total log disk capacity (GB)LOG_DISK_ASSIGNED_GB: allocated log disk capacity (GB)LOG_DISK_IN_USE_GB: used log disk capacity (GB)USE_PCT: usage (percentage)
Tenant level log disk (clog) usage
Displays the log disk usage of each tenant on each node. The data comes from the GV$OB_UNITS view, including the following information:
TENANT_NAME: tenant nameSVR_IP: Server IPSVR_PORT: server portLOG_DISK_SIZE_GB: allocated log disk size (GB)LOG_DISK_IN_USE_GB: used log disk size (GB)USE_PCT: usage (percentage)
Description
This scene shows snapshot data at the current moment. If you need to count changes in log disk usage within a specified time range, you can execute this scenario once at the beginning and end of the period, and then compare the results of the two executions.
