Note
This view is available starting with V4.0.0.
Purpose
The GV$OB_PROCESSLIST view displays session information for all OBServer nodes where the tenant is located.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| SQL_PORT | bigint(20) | NO | The port number of SQL. |
| ID | bigint(20) unsigned | NO | The session ID.
|
| USER | varchar(32) | NO | The username. |
| HOST | varchar(128) | NO | The IP address and port number of the client. |
| DB | varchar(128) | YES | The name of the database to be accessed. |
| TENANT | varchar(128) | NO | The name of the tenant to be accessed. |
| COMMAND | varchar(4096) | NO | The type of the command currently being executed. |
| TIME | bigint(20) | NO | The time when the current command is executed, in seconds. If the command is retried, this value is reset to 0. |
| TOTAL_TIME | bigint(20) | NO | The total time when the current command is executed, in seconds. If the command is retried, this value is not reset. |
| STATE | varchar(128) | YES | The state of the current session. |
| INFO | varchar(262143) | YES | The command currently being executed. |
| PROXY_SESSID | bigint(20) unsigned | YES | If the client is an obproxy, this field indicates the proxy session ID. |
| MASTER_SESSID | bigint(20) unsigned | YES | The master session ID, which is used to link multiple sub-sessions of the same SQL statement. |
| USER_CLIENT_IP | varchar(46) | YES | The IP address of the client. |
| USER_HOST | varchar(128) | YES | The hostname of the client. |
| RETRY_CNT | bigint(20) | NO | The number of retries for the current command. |
| RETRY_INFO | bigint(20) | NO | The retry information for the current command, which is generally the error code of the last retry. |
| SQL_ID | varchar(32) | NO | The SQL ID. |
| TRANS_ID | bigint(20) unsigned | NO | The transaction ID. |
| THREAD_ID | bigint(20) unsigned | NO | The thread ID. |
| SSL_CIPHER | varchar(4096) | YES | The name of the encryption cipher. |
| TRACE_ID | varchar(64) | YES | The trace ID. |
| TRANS_STATE | varchar(32) | YES | The transaction state. If no transaction is associated with the session, this column displays an empty value.
|
| ACTION | varchar(4096) | YES | The name of the current operation, which is set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure. |
| MODULE | varchar(4096) | YES | The name of the current operation, which is set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure. |
| CLIENT_INFO | varchar(4096) | YES | The information set by calling the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure. |
| LEVEL | bigint(20) | NO | The end-to-end trace monitoring level of the session. For example, 1 indicates the diagnostic information of level 1.
NoteThis column is available starting with V4.2.1. |
| SAMPLE_PERCENTAGE | bigint(20) | NO | The end-to-end trace sampling frequency of the session. For example, 50 indicates that diagnostic information is sampled at a frequency of 50%.
NoteThis column is available starting with V4.2.1. |
| RECORD_POLICY | varchar(32) | NO | The end-to-end trace recording policy of the session. The following three policies are supported:
NoteThis column is available starting with V4.2.1. |
| LB_VID | bigint(20) | YES | If the database is directly connected to the load balancer in a public cloud environment, this column displays the VPC ID of the load balancer. Otherwise, this column displays NULL.
NoteThis column is available starting with V4.2.1. |
| LB_VIP | varchar(46) | YES | If the database is directly connected to the load balancer in a public cloud environment, this column displays the IP address of the load balancer. Otherwise, this column displays NULL.
NoteThis column is available starting with V4.2.1. |
| LB_VPORT | bigint(20) | YES | If the database is directly connected to the load balancer in a public cloud environment, this column displays the port of the load balancer. Otherwise, this column displays NULL.
NoteThis column is available starting with V4.2.1. |
| IN_BYTES | bigint(20) | NO | The incoming traffic of the session, in bytes.
NoteThis column is available starting with V4.2.1. |
| OUT_BYTES | bigint(20) | NO | The outgoing traffic of the session, in bytes.
NoteThis column is available starting with V4.2.1. |
| USER_CLIENT_PORT | bigint(20) | NO | The client address information.
Note
|
| PROXY_USER | varchar(128) | YES |
Note
|
| SERVICE_NAME | varchar(64) | YES | The service name of the session that created the session. If the value is NULL, the session is not created by a service.
Note
|
| TOTAL_CPU_TIME | bigint(21) | NO | The CPU time used by the current command, in seconds.
Note
|
| TOP_INFO | varchar(262143) | YES | The top PL statement information of the executing SQL.
Note
|
| MEMORY_USAGE | bigint(20) | YES | The memory size occupied by the current SQL statement, in bytes.
NoteFor V4.4.x, this column is available starting with V4.4.0, but it is not effective yet. The value of this column is |
Sample query
Query the session information of all OBServer nodes where the tenant is located.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_PROCESSLIST LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
SQL_PORT: 2881
ID: 3221735835
USER: root
HOST: 100.xx.xxx.xxx:28135
DB: demo
TENANT: mysql001
COMMAND: Query
TIME: 120.800875
TOTAL_TIME: 0.000136
STATE: ACTIVE
INFO: INSERT INTO orders (
user_id,
product_name,
order_amount,
order_date,
order_status
) VALUES (
FLOOR(RAND() * 10000),
CONCAT('Product ', FLOOR(RAND() * 1000)),
ROUND(RAND() * 1000, 2),
DATE_SUB(NOW(), INTERVAL FLOOR(RAND() * 1500) DAY),
ELT(FLOOR(RAND() * 3 + 1), 'pending', 'completed', 'cancelled')
)
PROXY_SESSID: NULL
MASTER_SESSID: NULL
USER_CLIENT_IP: 100.xx.xxx.xxx
USER_HOST: %
RETRY_CNT: 0
RETRY_INFO: 0
SQL_ID: A2572E6AF77AEF27E893F08559A9FA67
TRANS_ID: 1463901
THREAD_ID: 2443
SSL_CIPHER: NULL
TRACE_ID: YB4***************************************-0-0
TRANS_STATE: IN_TERMINATE
ACTION:
MODULE:
CLIENT_INFO:
LEVEL: 1
SAMPLE_PERCENTAGE: 50
RECORD_POLICY: ALL
LB_VID: NULL
LB_VIP: NULL
LB_VPORT: NULL
IN_BYTES: 447
OUT_BYTES: 0
USER_CLIENT_PORT: 28135
PROXY_USER:
SERVICE_NAME: NULL
TOTAL_CPU_TIME: 121
TOP_INFO: CALL generate_test_orders()
MEMORY_USAGE: NULL
1 row in set
