You can view the resource configurations of a tenant as needed, such as the number of resource units in the resource pool and the specifications of each resource unit.
View the resource configurations of a tenant by using an SQL statement
Log on to the
systenant as therootuser.Execute the following statement to go to the database named
oceanbase:obclient> USE oceanbase;Execute the following statement to view the specifications of resource units used by all tenants in a cluster.
obclient> SELECT * FROM gv$unit; +---------+----------------+----------------------------+------------------+-----------------------+-------+-----------+-------------+----------------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+ | unit_id | unit_config_id | unit_config_name | resource_pool_id | resource_pool_name | zone | tenant_id | tenant_name | svr_ip | svr_port | migrate_from_svr_ip | migrate_from_svr_port | max_cpu | min_cpu | max_memory | min_memory | max_iops | min_iops | max_disk_size | max_session_num | +---------+----------------+----------------------------+------------------+-----------------------+-------+-----------+-------------+----------------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+ | 1 | 1 | sys_unit_config | 1 | sys_pool | zone1 | 1 | sys | xxx.xx.xxx.xxx | 2882 | | 0 | 5 | 2.5 | 9663676416 | 8053063680 | 10000 | 5000 | 179593805824 | 9223372036854775807 | | 1001 | 1001 | config_MySQL_zone1_S1_zzu | 1001 | pool_MySQL_zone1_zzu | zone1 | 1001 | MySQL | xxx.xx.xxx.xxx | 2882 | | 0 | 1.5 | 1.5 | 6442450944 | 6442450944 | 1250 | 1250 | 536870912000 | 375 | | 1002 | 1002 | config_Oracle_zone1_S1_kfs | 1002 | pool_Oracle_zone1_kfs | zone1 | 1002 | Oracle | xxx.xx.xxx.xxx | 2882 | | 0 | 1.5 | 1.5 | 6442450944 | 6442450944 | 1250 | 1250 | 536870912000 | 375 | +---------+----------------+----------------------------+------------------+-----------------------+-------+-----------+-------------+----------------+----------+---------------------+-----------------------+---------+---------+------------+------------+----------+----------+---------------+---------------------+ 3 rows in setFor more information about fields in the
gv$unitview, see gv$unit.To view the number of resource units in all resource pools for a tenant, execute following statement.
For example:
obclient> SELECT resource_pool_id, name, unit_count, unit_config_id FROM __all_resource_pool WHERE tenant_id='1001'; +------------------+----------------------+------------+----------------+ | resource_pool_id | name | unit_count | unit_config_id | +------------------+----------------------+------------+----------------+ | 1001 | pool_MySQL_zone1_mkh | 1 | 1001 | +------------------+----------------------+------------+----------------+ 1 row in set (0.00 sec)The value of the
unit_countfield in the results indicates the number of resource units in the resource pool.
View the resource configurations of a tenant in the OCP console
Log on to the OceanBase Cloud Platform (OCP) console.
In the left-side navigation pane, click Tenants.
In the Tenants section, find the target tenant and click the tenant name.
In the Replica Details section on the Overview page, view the specifications of resource units and the number of resource units of each zone in the tenant.