Note
This view is introduced since OceanBase Database 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 of the server. |
| SQL_PORT | bigint(20) | NO | The port for SQL statements. |
| ID | bigint(20) unsigned | NO | The session ID. |
| USER | varchar(32) | NO | The username. |
| HOST | varchar(128) | NO | The host name of the client. (For example, the host name of the obproxy server when you connect to the database through obproxy.) |
| DB | varchar(128) | NO | The name of the database being accessed. |
| TENANT | varchar(128) | NO | The name of the tenant being accessed. |
| COMMAND | varchar(4096) | NO | The type of the current command. |
| TIME | bigint(20) | NO | The execution time of the current command in seconds. If the command is retried, the value is reset to 0. |
| TOTAL_TIME | bigint(20) | NO | The total execution time of the current command in seconds. If the command is retried, the value is not reset. |
| STATE | varchar(128) | NO | The current session status. |
| INFO | varchar(262143) | NO | The current command being executed. |
| PROXY_SESSID | bigint(20) unsigned | NO | The proxy session ID if the client is obproxy. |
| MASTER_SESSID | bigint(20) unsigned | NO | The ID of the master session, which is used to chain multiple sub-sessions of the same SQL statement. |
| USER_CLIENT_IP | varchar(46) | NO | The IP address of the user client. |
| USER_HOST | varchar(128) | NO | The host name of the user client. |
| RETRY_CNT | bigint(20) | NO | The number of retries for the current command. |
| RETRY_INFO | bigint(20) | NO | The retry information of 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) | NO | The name of the encryption cipher. |
| TRACE_ID | varchar(64) | NO | The trace ID. |
| TRANS_STATE | varchar(32) | NO | The transaction status.
|
| 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 | The information set by calling the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure. |
| LEVEL | bigint(20) | NO | The full-link tracing monitoring level of the session. For example, 1 indicates level 1 diagnostic information.
NoteThis field was introduced in V4.2.1. |
| SAMPLE_PERCENTAGE | bigint(20) | NO | The full-link tracing sampling frequency of the session. For example, 50 indicates that diagnostic information is sampled at a 50% frequency.
NoteThis field was introduced in V4.2.1. |
| RECORD_POLICY | varchar(32) | NO | The full-link tracing recording strategy of the session. The following three strategies are supported:
NoteThis field was introduced in V4.2.1. |
| LB_VID | bigint(20) | NO | The VPC ID of the load balancer if you directly connect to the database through the load balancer in a public cloud environment. Otherwise, this field is NULL.
NoteThis field was introduced in V4.2.1. |
| LB_VIP | varchar(46) | NO | The IP address of the client when you directly connect to the load balancer in a public cloud environment. Otherwise, this field is NULL.
NoteThis field was introduced in V4.2.1. |
| LB_VPORT | bigint(20) | NO | The port of the client when you directly connect to the load balancer in a public cloud environment. Otherwise, this field is NULL.
NoteThis field was introduced in V4.2.1. |
| IN_BYTES | bigint(20) | NO | The incoming traffic of the session in bytes.
NoteThis field was introduced in V4.2.1. |
| OUT_BYTES | bigint(20) | NO | The outgoing traffic of the session in bytes.
NoteThis field was introduced in V4.2.1. |
| USER_CLIENT_PORT | bigint(20) | NO | The client address.
Note
|
| PROXY_USER | varchar(128) | NO |
Note
|
| SERVICE_NAME | varchar(64) | YES | The name of the service that created the session. If the session is not created by a service name, the value is NULL.
Note
|
| TOTAL_CPU_TIME | bigint(21) | NO | The CPU usage time of the current command in seconds.
Note
|
| TOP_INFO | varchar(262143) | YES | The information of the top-level PL statement where the executing SQL statement is located.
Note
|
| MEMORY_USAGE | bigint(20) | NO | The memory occupied by a single SQL statement, in bytes.
NoteFor V4.3.5, this field was introduced in V4.3.5 BP2. |
Sample queries
Query the session information of this 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