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 name of the client host. If the client is connected through an ODP, the value is the IP address of the ODP. |
| 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 current command is executed, in seconds. If the command is retried, the value is reset to 0 and recalculated. |
| TOTAL_TIME | bigint(20) | NO | The total time taken for the command to be executed, in seconds.
NoteIn versions earlier than V4.2.5, the value of this field is the total execution time of the current command, which is not reset when the command is retried. |
| STATE | varchar(128) | NO | The current session state. |
| INFO | varchar(262143) | NO | The command being executed. |
| PROXY_SESSID | bigint(20) unsigned | NO | If the client is an ODP, this column displays the proxy session ID. |
| MASTER_SESSID | bigint(20) unsigned | NO | The ID of the main session, which is used to link multiple sub-sessions of the same SQL statement. |
| USER_CLIENT_IP | varchar(46) | NO | The IP address of the client. |
| USER_HOST | varchar(128) | NO | The name 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 usually 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. Valid values are IDLE, ACTIVE, IMPLICIT_ACTIVE, ROLLBACK_SAVEPOINT, IN_TERMINATE, ABORTED, ROLLED_BACK, COMMIT_TIMEOUT, COMMIT_UNKNOWN, and COMMITTED. For more information about the transaction states, see the following list.
|
| ACTION | varchar(4096) | NO | The name of the current operation, which is set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure. |
| MODULE | varchar(4096) | NO | The name of the current operation being executed, set by using the DBMS_APPLICATION_INFO.SET_MODULE procedure. |
| CLIENT_INFO | varchar(4096) | NO | The information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure |
| CLIENT_INFO | varchar(4096) | YES | |
| LEVEL | bigint(20) | NO | Indicates the full-link tracing monitoring level of the session. For example, 1 indicates the diagnostic information at level 1.
NoteThis column is available starting from V4.2.1. |
| SAMPLE_PERCENTAGE | bigint(20) | NO | Specifies the sampling frequency of the entire session tracing. For example, 50 means that diagnostic information is collected with a 50% probability.
NoteThis column is available starting with V4.2.1. |
| RECORD_POLICY | varchar(32) | NO | This view displays the trace recording policy for the session. The policy must be one of the following three values:
NoteThis column is available starting with V4.2.1. |
| LB_VID | bigint(20) | NO | The value is the VPC ID of the Load Balance service if you connect to the database directly in public cloud. Otherwise, the value is NULL
NoteThis column is available starting with V4.2.1. |
| LB_VIP | varchar(46) | NO | If this is a public cloud environment and the database is directly connected via a load balancer, this column shows the client's IP address for connecting to the load balancing service. Otherwise, it shows NULL.
NoteThis column is available starting with V4.2.1. |
| LB_VPORT | bigint(20) | NO | If the public cloud environment directly connects to the database by using a load balancing service, the value in this column is the client port connected to the load balancing service. Otherwise, the value in this column is NULL.
NoteThis column is available starting with V4.2.1. |
| IN_BYTES | bigint(20) | NO | The size of the bytes flowing in, 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's address information
NoteThis column is available starting with V4.2.3. |
| PROXY_USER | varchar(128) | NO |
NoteThis column is available starting from V4.2.3. |
| SERVICE_NAME | varchar(64) | NO | The name of the service that created the session. If this value is NULL, the session was not created by a service.
NoteThis column was added in V4.2.4. |
| TOTAL_CPU_TIME | bigint(21) | NO | The CPU time consumed by the current command, in seconds.
Note
|
| TOP_INFO | varchar(262143) | NO | The top-level PL statement information of the executing SQL statement.
Note
|
| MEMORY_USAGE | bigint(20) | NO | The memory size consumed by a single SQL statement, in bytes.
NoteThis column was introduced in V4.2.5 BP2. |
Sample query
Query session information on 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: xx.xx.xx.xx
SVR_PORT: 2882
SQL_PORT: 2881
ID: 3221711494
USER: root
HOST: xx.xx.xx.xx:25892
DB: oceanbase
TENANT: mysql001
COMMAND: Query
TIME: 0.00557
TOTAL_TIME: 0.005621
STATE: ACTIVE
INFO: SELECT * FROM oceanbase.V$OB_PROCESSLIST LIMIT 1
PROXY_SESSID: NULL
MASTER_SESSID: NULL
USER_CLIENT_IP: xx.xx.xx.xx
USER_HOST: %
RETRY_CNT: 0
RETRY_INFO: 0
SQL_ID: F55ED441CB4950C23260C7AAFB750B2F
TRANS_ID: 0
THREAD_ID: 31936
SSL_CIPHER: NULL
TRACE_ID: YB42AC1E87E1-000XXXXXXXX-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: 25892
PROXY_USER:
SERVICE_NAME: NULL
TOTAL_CPU_TIME: 0
TOP_INFO: NULL
MEMORY_USAGE: 3219456
1 row in set