Overview
Provides information about running threads.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| ID | bigint(20) unsigned | NO | Connection Identifier
|
| USER | varchar(32) | NO | Username |
| HOST | varchar(128) | NO | Client Host Name |
| DB | varchar(128) | YES | Database Name |
| COMMAND | varchar(4096) | NO | Types of Commands Executed by Threads |
| TIME | bigint(20) | NO | Duration of the thread in the current state, in seconds. |
| STATE | varchar(128) | YES | Indicates the task identifier that the thread is currently working on. |
| INFO | varchar(262143) | YES | Statement Being Executed by the Current Thread |
Sample query
Query all running thread information for the current user tenant.
obclient [oceanbase]> SELECT * FROM information_schema.PROCESSLIST;
The query result is as follows:
+------------+------+----------------------+-----------+---------+------+--------+----------------------------------------------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+------------+------+----------------------+-----------+---------+------+--------+----------------------------------------------+
| 3221741020 | root | 100.xx.xxx.xxx:13803 | NULL | Sleep | 864 | SLEEP | NULL |
| 3221633480 | SYS | 100.xx.xxx.xxx:59160 | SYS | Sleep | 1150 | SLEEP | NULL |
| 3221660128 | root | 100.xx.xxx.xxx:44492 | oceanbase | Sleep | 55 | SLEEP | NULL |
| 3221688871 | root | 100.xx.xxx.xxx:49218 | infotest | Query | 0 | ACTIVE | SELECT * FROM information_schema.PROCESSLIST |
+------------+------+----------------------+-----------+---------+------+--------+----------------------------------------------+
4 rows in set
References
View session information on all OBServer nodes where a tenant resides: GV$OB_PROCESSLIST