Overview
The V$OB_PROCESSLIST view displays session information for the current OBServer node.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| SQL_PORT | bigint(20) | NO | SQL Port Number |
| ID | bigint(20) unsigned | NO | Session ID
|
| USER | varchar(32) | NO | Username |
| HOST | varchar(128) | NO | Client IP:PORT |
| DB | varchar(128) | NO | Name of the accessed database |
| TENANT | varchar(128) | NO | Tenant Name |
| COMMAND | varchar(4096) | NO | Type of the command being executed |
| TIME | bigint(20) | NO | The current command execution time, in seconds. If the command is retried, it will be reset and recalculated. |
| TOTAL_TIME | bigint(20) | NO | Total execution time of the current command, in seconds. This value is not cleared if the command is retried. |
| STATE | varchar(128) | NO | Current Session Status |
| INFO | varchar(262143) | NO | Displays the currently executing command |
| PROXY_SESSID | bigint(20) unsigned | NO | If the client is OBProxy, this column displays the proxy session ID. |
| MASTER_SESSID | bigint(20) unsigned | NO | Primary session ID, used to concatenate multiple sub-sessions of the same SQL statement |
| USER_CLIENT_IP | varchar(46) | NO | User Client IP |
| USER_HOST | varchar(128) | NO | User Client Host Name |
| RETRY_CNT | bigint(20) | NO | Number of Retries for the Current Command |
| RETRY_INFO | bigint(20) | NO | Retry information for the current command, typically the error code from the last retry. |
| SQL_ID | varchar(32) | NO | SQL ID Information |
| TRANS_ID | bigint(20) unsigned | NO | Transaction ID |
| THREAD_ID | bigint(20) unsigned | NO | Thread ID |
| SSL_CIPHER | varchar(4096) | NO | Encrypted Password Name |
| TRACE_ID | varchar(64) | NO | Trace ID |
| TRANS_STATE | varchar(32) | NO | Transaction status. If no transaction exists in the session, this field is empty.
|
| ACTION | varchar(4096) | NO | The name of the current operation, set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure. |
| MODULE | varchar(4096) | NO | The name of the current operation, set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure. |
| CLIENT_INFO | varchar(4096) | NO | Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure |
| LEVEL | bigint(20) | NO | Indicates the end-to-end tracing monitoring level for the session. For example, 1 indicates diagnostic information at level 1. |
| SAMPLE_PERCENTAGE | bigint(20) | NO | Indicates the sampling frequency for end-to-end tracing of the session. For example, 50 means diagnostic information is sampled at a frequency of 50%. |
| RECORD_POLICY | varchar(32) | NO | Specifies the tracing record strategy for the entire session. The following three strategies are supported:
|
| LB_VID | bigint(20) | NO | If the database is directly connected through a load balancer in a public cloud environment, this column displays the VPC ID of the load balancing service. Otherwise, it displays NULL. |
| LB_VIP | varchar(46) | NO | If you are directly connecting to the database through a load balancer in a public cloud environment, this column displays the IP address of the client that connects to the load balancing service. Otherwise, it displays NULL. |
| LB_VPORT | bigint(20) | NO | For connections to databases through load balancing in a public cloud environment, this column displays the port used by the client to connect to the load balancing service. Otherwise, it displays NULL. |
| IN_BYTES | bigint(20) | NO | Indicates the inbound traffic of the session, in bytes. |
| OUT_BYTES | bigint(20) | NO | Indicates the outbound traffic of the session, in bytes. |
| USER_CLIENT_PORT | bigint(20) | NO | Client Address Information |
| PROXY_USER | varchar(128) | NO |
|
| SERVICE_NAME | varchar(64) | YES | The service name that created the session. Value: NULL Indicates that the session was not created by a service name. |
| TOTAL_CPU_TIME | bigint(21) | NO | The CPU time consumed by the current command, in seconds. |
| TOP_INFO | varchar(262143) | YES | Displays the top-level PL statement information where the SQL statement being executed resides. |
| MEMORY_USAGE | bigint(20) | NO | The memory size currently occupied by a single SQL statement, in bytes. |
Sample query
Query the session information of the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$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: 3221575191
USER: root
HOST: 100.xx.xxx.xxx:52264
DB: NULL
TENANT: mysql001
COMMAND: Query
TIME: 0.001143
TOTAL_TIME: 0.000303
STATE: ACTIVE
INFO: SELECT * FROM oceanbase.GV$OB_PROCESSLIST
PROXY_SESSID: NULL
MASTER_SESSID: NULL
USER_CLIENT_IP: 100.xx.xxx.xxx
USER_HOST: %
RETRY_CNT: 0
RETRY_INFO: 0
SQL_ID: 2E175335D36600B7A8EC72C5094888DD
TRANS_ID: 0
THREAD_ID: 2443
SSL_CIPHER: NULL
TRACE_ID: YB42AC1E87C3-000632CB9B9BB963-0-0
TRANS_STATE:
ACTION:
MODULE:
CLIENT_INFO:
LEVEL: 1
SAMPLE_PERCENTAGE: 10
RECORD_POLICY: SAMPLE_AND_SLOW_QUERY
LB_VID: NULL
LB_VIP: NULL
LB_VPORT: NULL
IN_BYTES: 448
OUT_BYTES: 0
USER_CLIENT_PORT: 52264
PROXY_USER:
SERVICE_NAME: NULL
TOTAL_CPU_TIME: 0
TOP_INFO: NULL
MEMORY_USAGE: NULL
1 row in set