---
title: 编组
description: 检查租户资源使用状态 您可以在系统租户下通过 SQL 命令的方式来检查租户资源使用状态。 语句如下： obclient&gt; SELECT t1.tenant_name,concat(svr_ip,&quot;:&quot;,svr_port) as &quot;unit_server&quot;,t3.max_cpu,t3.min_cpu,round(t3.…
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 3.2.3 企业版 LTS

# 检查租户资源使用状态

更新时间：2023-10-11 14:25:49

您可以在系统租户下通过 SQL 命令的方式来检查租户资源使用状态。

语句如下：

```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 检查租户资源，详细信息请参见 [租户资源管理](https://www.oceanbase.com/docs/enterprise-oceanbase-ocp-cn-1000000000022314)。

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
