---
title: "租户线程使用率 - 云平台 OCP V4.2.1 | OceanBase 文档中心"
description: 租户线程使用率 本节为您介绍 OceanBase 租户的监控指标 租户线程使用率 。您可指定统计范围，查询租户在单个 Zone 或 OBServer 节点的 租户线程使用率 数据。 指标介绍 活跃线程数 / 租户的最大线程数。 指标参数说明 指标项 指标名称 单位 租户线程使用率 ob_tenant_thread_p…
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
切换语言

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

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*lJTmRZ61jSUAAAAAAAAAAAAADiGDAQ/original) 云平台 OCPV 4.2.1

# 租户线程使用率

更新时间：2026-09-03 16:35:53

[编辑](https://github.com/oceanbase/ocp-doc/edit/V4.2.1/zh-CN/1900.reference-guide/300.monitoring-indicator-reference/400.oceanbase-database-tenant/950.thread-usage.md)  

本节为您介绍 OceanBase 租户的监控指标 **租户线程使用率** 。您可指定统计范围，查询租户在单个 Zone 或 OBServer 节点的 **租户线程使用率** 数据。

## 指标介绍

活跃线程数 / 租户的最大线程数。

## 指标参数说明

| **指标项** | **指标名称** | **单位** |
| --- | --- | --- |
| 租户线程使用率 | ob_tenant_thread_percent | % |

## 计算表达式

100 * sum(ob_sysstat{stat_id="140006",@LABELS}) by (@GBLABELS) / sum(ob_sysstat{stat_id="140005",@LABELS}) by (@GBLABELS)

## 采集 SQL

- OceanBase V4.0 以下版本：

  ```sql
  select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 140002, 140003, 140005, 140006, 40030, 80040, 80041, 130000, 130001, 130002, 130004, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80057, 120000, 120001, 120009, 120008) and (con_id > 1000 or con_id = 1) and class < 1000

  ```
 - OceanBase V4.0 及以上版本：

  ```sql
  select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 140002, 140003, 140005, 140006, 40030, 80040, 80041, 130000, 130001, 130002, 130004, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 50000, 50001, 60087, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80057, 120000, 120001, 120009, 120008) and (con_id > 1000 or con_id = 1) and class < 1000

  ```

 上一篇 下一篇 ![有帮助](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) 咨询热线
