基于湖库一体架构,统一管理结构化、半结构化与非结构化等多模态数据,一个系统承载事务处理、实时分析与 AI 工作负载。
检查租户资源使用状态
更新时间:2023-10-11 14:25:49
您可以在系统租户下通过 SQL 命令的方式来检查租户资源使用状态。
语句如下:
obclient> SELECT t1.tenant_name,concat(svr_ip,":",svr_port) as "unit_server",t3.max_cpu,t3.min_cpu,round(t3.max_memory/1024/1024/1024,1) as "max_memory(G)" ,round(t3.min_memory/1024/1024/1024,1) as "min_memory(G)" FROM __all_tenant t1,__all_unit t2,__all_unit_config t3,__all_resource_pool 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 | max_memory(G) | min_memory(G) |
+---------------+----------------+---------+---------+---------------+---------------+
| sys | 10.0.0.0:7702 | 5 | 2.5 | 7.5 | 6.3 |
| tenant_mysql | 10.0.0.0:7702 | 2 | 2 | 5.0 | 5.0 |
| tenant_oracle | 10.0.0.0:7702 | 4 | 4 | 10.0 | 10.0 |
+---------------+--------------------+---------+---------+---------------+---------------+
字段说明如下。
| 字段 | 说明 |
|---|---|
| tenant_name | 租户名 |
| unit_server | 租户 unit 所在的 OBServer |
| max_cpu | 租户 unit 允许使用的最大 CPU 核数 |
| min_cpu | 租户 unit 至少可使用的 CPU 核数 |
| max_memory | 租户 unit 允许使用的最大内存 |
| min_memory | 租户 unit 至少可使用的内存 |
相关文档
如果您正在使用 OceanBase 云平台(OceanBase Cloud Platform,OCP)管理 OceanBase 集群,那么您也可以通过 OCP 检查租户资源,详细信息请参见 租户资源管理。