View cluster parameters

2023-12-25 08:49:40  Updated

You can view cluster parameters from the sys tenant or a user tenant.

You can view cluster parameters in any of the following ways:

  • Use the SHOW statement to view cluster parameters.

    You can view all parameters of the cluster and their descriptions except for hidden parameters (named in the _xx_xx format).

  • Query the GV$OB_PARAMETERS view for cluster parameters.

    The GV$OB_PARAMETERS view displays all parameters of the cluster, including hidden parameters (named in the _xx_xx format), and their descriptions. This is different from executing the SHOW statement.

For more information about parameters, see Parameters and system variables.

Use the SHOW statement to view cluster parameters

You can use the SHOW statement to view the values of cluster parameters from the sys tenant or a user tenant. In the sys tenant, you can specify the TENANT keyword to view the parameters of the specified tenant.

  1. Log on to the sys tenant or a user tenant.

    Note that you must specify the corresponding fields in the following sample code based on your actual database configurations.

    obclient -h10.xx.xx.xx -P2883 -utest@mysql#obdemo -p***** -A
    

    For more information about how to connect to a database, see Connection methods (MySQL mode) or Connection methods (Oracle mode).

  2. Execute the following statement to view cluster parameters:

    obclient [xxx]> SHOW PARAMETERS [SHOW_PARAM_OPTS] [TENANT = tenant_name];
    

    Take note of the following points:

    • You can specify [LIKE 'pattern' | WHERE expr] in [SHOW_PARAM_OPTS]. The column attributes that can be specified in WHERE expr are the same as those returned by SHOW PARAMETERS.

    • Specify the TENANT keyword to view the parameters of the specified tenant.

    Here is an example:

    obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%';
    +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
    | zone  | svr_type | svr_ip         | svr_port | name         | data_type | value | info                                                                                                                   | section  | scope   | source  | edit_level        |
    +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
    | zone2 | observer | 172.xx.xx.xx   |     2882 | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
    | zone3 | observer | 172.xx.xx.xx   |     2882 | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
    | zone1 | observer | 172.xx.xx.xx   |     2882 | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
    +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
    3 rows in set
    
    obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%' TENANT = mysql001;
    +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
    | zone  | svr_type | svr_ip         | svr_port | name         | data_type | value | info                                                                                                                   | section  | scope   | source  | edit_level        |
    +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
    | zone2 | observer | 172.xx.xx.xx   |     2882 | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
    | zone3 | observer | 172.xx.xx.xx   |     2882 | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
    | zone1 | observer | 172.xx.xx.xx   |     2882 | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
    +-------+----------+----------------+----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
    3 rows in set
    
    Column name Description
    zone The zone where the parameter exists.
    svr_type The server type.
    svr_ip The IP address of the server.
    svr_port The port number of the server.
    name The name of the parameter.
    data_type The data type of the parameter. Valid values: STRING, CAPACITY, and so on.
    value The value of the parameter.

    Note

    You can modify the parameter value for a specified zone or server. Therefore, the value of the parameter may vary based on zones and servers.

    info The description of the parameter.
    section The category of the parameter. Valid values:
    • SSTABLE: an SSTable-related parameter.
    • OBSERVER: an OBServer-related parameter.
    • ROOT_SERVICE: a RootService-related parameter.
    • TENANT: a tenant-related parameter.
    • TRANS: a transaction-related parameter.
    • LOAD_BALANCE: a load balancing-related parameter.
    • DAILY_MERGE: a major compaction-related parameter.
    • CLOG: a clog-related parameter.
    • LOCATION_CACHE: a location cache-related parameter.
    • CACHE: a cache-related parameter.
    • RPC: an RPC-related parameter.
    • OBPROXY: an ODP-related parameter.
    scope The application scope of the parameter. Valid values:
    • TENANT: indicates that the parameter is a tenant-level parameter.
    • CLUSTER: indicates that the parameter is a cluster-level parameter.
    source The source of the current value. Valid values:
    • TENANT
    • CLUSTER
    • CMDLINE
    • OBADMIN
    • FILE
    • DEFAULT
    edit_level The modification behavior of the parameter. Valid values:
    • READONLY: indicates that you cannot modify the parameter.
    • STATIC_EFFECTIVE: indicates that you can modify the parameter but the modification takes effect only after the OBServer node is restarted.
    • DYNAMIC_EFFECTIVE: indicates that you can modify the parameter and the modification takes effect in real time.

Query the GV$OB_PARAMETERS view for cluster parameters

  1. Log on to the sys tenant or a user tenant.

    Note that you must specify the corresponding fields in the following sample code based on your actual database configurations.

    obclient -h10.xx.xx.xx -P2883 -utest@mysql#obdemo -p***** -A
    

    For more information about how to connect to a database, see Connection methods (MySQL mode) or Connection methods (Oracle mode).

  2. Run the following command to access the oceanbase database:

    obclient > USE oceanbase;
    

    Note

    You need to perform this step only in a MySQL tenant. Skip this step in an Oracle tenant.

  3. Execute the following statement to view cluster parameters.

    Here is an example:

    obclient [(none)]> SELECT * FROM GV$OB_PARAMETERS WHERE NAME LIKE '%syslog_level%';
    +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+-------------------+
    | SVR_IP         | SVR_PORT | ZONE  | SCOPE   | TENANT_ID | NAME         | DATA_TYPE | VALUE | INFO                                                                                                                   | SECTION  | EDIT_LEVEL        |
    +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+-------------------+
    | 172.xx.xx.xx   |     2882 | zone2 | CLUSTER |      NULL | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | DYNAMIC_EFFECTIVE |
    | 172.xx.xx.xx   |     2882 | zone3 | CLUSTER |      NULL | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | DYNAMIC_EFFECTIVE |
    | 172.xx.xx.xx   |     2882 | zone1 | CLUSTER |      NULL | syslog_level | NULL      | PERF  | specifies the current level of logging. There are DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR, six different log levels. | OBSERVER | DYNAMIC_EFFECTIVE |
    +----------------+----------+-------+---------+-----------+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------+----------+-------------------+
    3 rows in set
    

For more information about the GV$OB_PARAMETERS view, see GV$OB_PARAMETERS (MySQL mode)

References

For more information about cluster parameters, see the following topics:

For detailed information about each parameter, see Parameters and system variables.

Contact Us