Note
This view is available starting with V4.0.0.
Purpose
The V$OB_PROCESSLIST view displays session information on the current OBServer node.
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) | NO | 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 being executed. |
| TIME | bigint(20) | NO | The time when the command is executed, in seconds. If the command is retried, this field is reset to 0. |
| TOTAL_TIME | bigint(20) | NO | The total time when the command is executed, in seconds. If the command is retried, this field is not reset. |
| STATE | varchar(128) | NO | The state of the session. |
| INFO | varchar(262143) | NO | The command being executed. |
| PROXY_SESSID | bigint(20) unsigned | NO | If the client is obproxy, this field indicates the proxy session ID. |
| MASTER_SESSID | bigint(20) unsigned | NO | The session ID of the main session. This field is used to link multiple sub-sessions of the same SQL. |
| USER_CLIENT_IP | varchar(46) | NO | The IP address of the client. |
| USER_HOST | varchar(128) | NO | 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. This field usually indicates 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) | NO | The name of the encryption cipher. |
| TRACE_ID | varchar(64) | NO | The trace ID. |
| TRANS_STATE | varchar(32) | NO | The transaction state. If no transaction exists for the session, this column is empty.
|
| ACTION | varchar(4096) | NO | The name of the current execution operation, which is set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure. |
| MODULE | varchar(4096) | NO | The name of the current execution operation, which is set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure. |
| CLIENT_INFO | varchar(4096) | NO | The information set by calling the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure. |
| LEVEL | bigint(20) | NO | The end-to-end tracing 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 tracing 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 tracing record policy of the session. The following three policies are supported:
NoteThis column is available starting with V4.2.1. |
| LB_VID | bigint(20) | NO | 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, it displays NULL.
NoteThis column is available starting with V4.2.1. |
| LB_VIP | varchar(46) | NO | If the database is directly connected to the load balancer in a public cloud environment, this column displays the IP address of the client that connects to the load balancer. Otherwise, it displays NULL.
NoteThis column is available starting with V4.2.1. |
| LB_VPORT | bigint(20) | NO | If the database is directly connected to the load balancer in a public cloud environment, this column displays the port of the client that connects to the load balancer. Otherwise, it displays NULL.
NoteThis column is available starting with V4.2.1. |
| IN_BYTES | bigint(20) | NO | The inflow traffic of the session, in bytes.
NoteThis column is available starting with V4.2.1. |
| OUT_BYTES | bigint(20) | NO | The outflow 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) | NO |
Note
|
| SERVICE_NAME | varchar(64) | YES | The name of the service that created the session. If the value is NULL, the session was not created by a service.
Note
|
| TOTAL_CPU_TIME | bigint(21) | NO | The total CPU time consumed by the current command, in seconds.
Note
|
| TOP_INFO | varchar(262143) | YES | The information of the top PL statement where the executing SQL statement resides.
Note
|
| TOP_TIME | double | NO | The top_time column in the PL scenario indicates the total execution time of the PL statement.
NoteFor V4.4.x, this column was introduced in V4.4.1. |
| TOP_TRACE_ID | varchar(64) | NO | The traceid of the top statement.
NoteFor V4.4.x, this column was introduced in V4.4.1. |
| MEMORY_USAGE | bigint(20) | NO | The size of memory occupied by the current SQL statement, in bytes.
NoteFor V4.4.x, this column was introduced in V4.4.0. However, it is not effective at present, and the column value is |
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:
SVR_IP: 6.12.xxx.xxx
SVR_PORT: 2882
SQL_PORT: 2881
ID: 3221555454
USER: root
HOST: 100.xx.xxx.xxx:10351
DB: oceanbase
TENANT: sys
COMMAND: Query
TIME: 0.00911
TOTAL_TIME: 0.009057
STATE: ACTIVE
INFO: SELECT * FROM oceanbase.V$OB_PROCESSLIST LIMIT 1
PROXY_SESSID: NULL
MASTER_SESSID: NULL
USER_CLIENT_IP: 100.xx.xxx.xxx
USER_HOST: %
RETRY_CNT: 0
RETRY_INFO: 0
SQL_ID: F55ED441CB4950C23260C7AAFB750B2F
TRANS_ID: 0
THREAD_ID: 3304100
SSL_CIPHER: NULL
TRACE_ID: YB42060CEB9F-000643607B0D5088-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: 444
OUT_BYTES: 0
USER_CLIENT_PORT: 10351
PROXY_USER:
SERVICE_NAME: NULL
TOTAL_CPU_TIME: 0
TOP_INFO: NULL
MEMORY_USAGE: 3342336
TOP_TIME: 0
TOP_TRACE_ID: YB42060CEB9F-000643607B0D5088-0-0
1 row in set (0.048 sec)