V$OB_THREAD

2026-02-05 05:53:37  Updated

Note

This view is introduced since OceanBase Database V4.2.0.

Purpose

The V$OB_THREAD view displays the status information about all threads in the observer process. In a user tenant, it shows the status information about all threads in the current tenant.

Columns

Column Type Nullable? Description
SVR_IP varchar(46) NO The IP address of the observer process.
SVR_PORT bigint(20) NO The port number of the observer process.
TENANT_ID bigint(20) NO The ID of the tenant to which the thread belongs. The value is 500 for a process-level thread.
TID bigint(20) NO The ID of the thread.
TNAME varchar(16) NO The name of the thread.
STATUS varchar(32) NO The status of the thread. Valid values:
  • Run: indicates that the thread is in the running state.
  • Wait: indicates that the thread is in the waiting state.
  • Sleep: indicates that the thread is in the sleep state.
  • Join: indicates that the thread is waiting for another thread to end.
LATCH_WAIT varchar(16) NO The address of the latch that the thread is waiting for.
LATCH_HOLD varchar(256) NO The address of the latch held by the thread. Multiple latches may be held by the thread.
TRACE_ID varchar(40) NO The ID of the trace that is being executed by the thread.
CGROUP_PATH varchar(256) NO The path of the cgroup to which the thread belongs. This field is obtained from the CPU line in the /proc/observer-pid/task/tid/cgroup file.

Sample query

In a user tenant, view the status of all threads in the observer process of the current OBServer node, and display the first two records.

obclient > SELECT * FROM oceanbase.V$OB_THREAD LIMIT 2;

The query result is as follows:

+----------------+----------+-----------+--------+-----------------+--------+------------+------------+-----------------------------------+-------------+
| SVR_IP         | SVR_PORT | TENANT_ID | TID    | TNAME           | STATUS | LATCH_WAIT | LATCH_HOLD | TRACE_ID                          | CGROUP_PATH |
+----------------+----------+-----------+--------+-----------------+--------+------------+------------+-----------------------------------+-------------+
| xx.xx.xx.xx    |     2882 |      1004 | 121695 | T1004_TTLTablet | Wait   |            |            | YB42AC1E87E6-00060C5DCDEFE9E5-0-0 |             |
| xx.xx.xx.xx    |     2882 |      1004 | 121689 | T1004_TTLManage | Wait   |            |            | YB42AC1E87E6-00060C5DCDAFE4D5-0-0 |             |
+----------------+----------+-----------+--------+-----------------+--------+------------+------------+-----------------------------------+-------------+
2 rows in set

Contact Us