Check tenant resource usage

2024-11-11 07:37:14  Updated

You can check the tenant resource usage by using SQL statements.

The statement is as follows:

obclient> SELECT t1.tenant_name,concat(svr_ip,":",svr_port) as "unit_server",t3.max_cpu,t3.min_cpu  FROM OCEANBASE.DBA_OB_TENANTS t1,OCEANBASE.DBA_OB_UNITS t2,OCEANBASE.DBA_OB_UNIT_CONFIGS t3,OCEANBASE.DBA_OB_RESOURCE_POOLS t4
where t1.tenant_id = t4.tenant_id
AND t4.resource_pool_id=t2.resource_pool_id
AND t4.unit_config_id=t3.unit_config_id
ORDER BY t1.tenant_name;

+---------------+----------------+---------+---------+
| tenant_name   | unit_server    | max_cpu | min_cpu |
+---------------+----------------+---------+---------+
| sys           |  10.0.0.0:7702 |       5 |     2.5 |
| tenant_mysql  |  10.0.0.0:7702 |       2 |       2 |
| tenant_oracle |  10.0.0.0:7702 |       4 |       4 |
+---------------+--------------------+---------+---------+

The following table describes the fields in the output.

Field Description
tenant_name The tenant name.
unit_server The OBServer node to which the resource units of the tenant belong.
max_cpu The maximum number of CPU cores available for the resource units of the tenant.
min_cpu The minimum number of CPU cores available for the resource units of the tenant.

Contact Us