Overview
Displays the status information of all threads in the observer process on each OBServer node. In the sys tenant, it displays the relevant threads of all tenants.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | IP Address of the Observer Process |
| SVR_PORT | bigint(20) | NO | Port number of the observer process |
| TENANT_ID | bigint(20) | NO | Tenant to which the thread belongs. For process-level threads, this is 500. |
| TID | bigint(20) | NO | Thread ID |
| TNAME | varchar(16) | NO | Thread name |
| STATUS | varchar(32) | NO | Thread status:
|
| LATCH_WAIT | varchar(16) | NO | Address Waiting for Latch |
| LATCH_HOLD | varchar(256) | NO | Addresses holding the latch (may contain multiple) |
| TRACE_ID | varchar(40) | NO | The ID of the trace being executed on the thread. |
| CGROUP_PATH | varchar(256) | NO | The path of the cgroup to which the thread belongs. This field is obtained from the /proc/observer-pid/task/tid/cgroup CPU Lines in the Path |
Sample query
In the sys tenant, view the status information of all threads in the observer process on each OBServer node, displaying the first two records.
obclient > SELECT * FROM oceanbase.GV$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