obdiag analyze variable diff can analyze with one click whether the OceanBase online cluster variables have changed compared to before, which is very helpful in troubleshooting problems caused by variable changes.
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.
Instructions for use
obdiag analyze variable diff [option]
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| --file | Yes | string | Default is empty | Passed is the archive file of a previous execution of obdiag gather variable |
| --store_dir | No | string | Defaults to the current path where the command is executed | The local path where the results are stored. |
| -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 analyze variable diff \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
# Point to a saved obdiag gather variable archive to diff variables
obdiag analyze variable diff --file=./gather_variables/obcluster_variables_20240808144053.csv
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 ~/.obdiag/config.yml. For related detailed configuration introduction, see obdiag configuration.
obdiag analyze variable diff
# Point to a saved obdiag gather variable archive to diff variables
obdiag analyze variable diff --file=./gather_variables/obcluster_variables_20240808144053.csv
