You can run this command to verify whether online cluster variable settings have changed compared with earlier variable settings. This command can help you troubleshoot issues caused by variable setting changes.
Before you run the command, make sure that you have configured the logon information of the target nodes in the config.yml configuration file of obdiag. For more information, see Configure obdiag.
Syntax
obdiag analyze variable diff [option]
The following table describes the options.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| --file | Yes | string | Empty | The archive file generated when the obdiag gather variable command was executed earlier is used. |
| --store_dir | No | string | The current path where the command is executed | The local path where the results are stored. |
| -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. |
Examples
Method 1: Use the command out-of-the-box without a configuration file
Note
For more information about the parameters used in the command in this section, see Configure obdiag.
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=***
# Specify the path of the file generated when the `obdiag gather variable` command was executed earlier to analyze variable setting changes
obdiag analyze variable diff --file=./gather_variables/obcluster_variables_20240808144053.csv
Method 2: Use the command with a configuration file
Before you run the command, make sure that you have configured the logon information of the target nodes in the config.yml configuration file of obdiag. For more information, see Configure obdiag.
obdiag analyze variable diff
# Specify the path of the file generated when the `obdiag gather variable` command was executed earlier to analyze variable setting changes
obdiag analyze variable diff --file=./gather_variables/obcluster_variables_20240808144053.csv