Purpose
The V$OB_PROCESSLIST view displays the session information about the current OBServer node.
Note
This view is introduced since OceanBase Database V4.0.0.
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 SQL port number. |
| ID | bigint(20) unsigned | NO | The session ID. |
| USER | varchar(32) | NO | The username. |
| HOST | varchar(128) | NO | The hostname of the client. For example, if you connect to the OBServer node by using an OceanBase Database Proxy (ODP), the value is the host address of the ODP. |
| DB | varchar(128) | NO | The name of the database accessed. |
| TENANT | varchar(128) | NO | The name of the tenant accessed. |
| COMMAND | varchar(4096) | NO | The type of the command being executed in the session. |
| TIME | bigint(20) | NO | The execution time of the current command, in seconds. If a retry occurs, the value is cleared and recalculated. |
| TOTAL_TIME | bigint(20) | NO | The total execution time of the current command, in seconds. If a retry occurs, the value will not be cleared. |
| STATE | varchar(128) | NO | The current session status. |
| INFO | varchar(262143) | NO | The command that is being executed. |
| PROXY_SESSID | bigint(20) unsigned | NO | The ODP session ID is displayed if the client is an ODP. |
| MASTER_SESSID | bigint(20) unsigned | NO | The ID of the master session, which is used to concatenate 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 hostname of the user client. |
| RETRY_CNT | bigint(20) | NO | The number of retries of the current command. |
| RETRY_INFO | bigint(20) | NO | The retry information about the current command. Generally, the value is the error code of the last retry. |
| SQL_ID | varchar(32) | NO | The ID of the SQL statement. |
| TRANS_ID | bigint(20) unsigned | NO | The transaction ID. |
| THREAD_ID | bigint(20) unsigned | NO | The thread ID. |
| SSL_CIPHER | varchar(4096) | NO | The encryption password. |
| TRACE_ID | varchar(64) | NO | The trace ID. |
| TRANS_STATE | varchar(32) | YES | The transaction status.
|
| ACTION | varchar(4096) | NO | The name of the operation being executed that is set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure. |
| MODULE | varchar(4096) | NO | The name of the module that is set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure. |
| CLIENT_INFO | varchar(4096) | NO | The client information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure. |
| LEVEL | bigint(20) | NO | The monitoring level of end-to-end diagnostics of the session. For example, the value 1 indicates level-1 diagnostics.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| SAMPLE_PERCENTAGE | bigint(20) | NO | The sampling frequency for end-to-end diagnostics of the session. For example, the value 50 indicates that diagnostics are sampled at the frequency of 50%.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| RECORD_POLICY | varchar(32) | NO | The recording strategy for end-to-end diagnostics of the session. Three strategies are supported:
NoteThis column is introduced since OceanBase Database V4.2.1. |
| LB_VID | bigint(20) | NO | The VPC ID of the load balancing service if you directly connect to the database in a public cloud. Otherwise, the value is NULL.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| LB_VIP | varchar(46) | NO | The IP address used by the client to connect to the load balancing service if you directly connect to the database in a public cloud. Otherwise, the value is NULL.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| LB_VPORT | bigint(20) | NO | The port used by the client to connect to the load balancing service if you directly connect to the database in a public cloud. Otherwise, the value is NULL.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| IN_BYTES | bigint(20) | NO | The inbound traffic of the session, in bytes.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| OUT_BYTES | bigint(20) | NO | The outbound traffic of the session, in bytes.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| USER_CLIENT_PORT | bigint(20) | NO | The client address.
NoteThis column is introduced since OceanBase Database V4.3.0. |
Sample query
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_PROCESSLIST limit 1;
The query result is as follows:
+----------------+----------+----------+------------+------+----------------------+------+----------+---------+------+------------+-------+------+--------------+---------------+----------------+-----------+-----------+------------+--------+----------+-----------+------------+----------+-------------+--------+--------+-------------+-------+-------------------+-----------------------+--------+--------+----------+----------+-----------+------------------+
| SVR_IP | SVR_PORT | SQL_PORT | ID | USER | HOST | DB | TENANT | COMMAND | TIME | TOTAL_TIME | STATE | INFO | PROXY_SESSID | MASTER_SESSID | USER_CLIENT_IP | USER_HOST | RETRY_CNT | RETRY_INFO | SQL_ID | TRANS_ID | THREAD_ID | SSL_CIPHER | TRACE_ID | TRANS_STATE | ACTION | MODULE | CLIENT_INFO | LEVEL | SAMPLE_PERCENTAGE | RECORD_POLICY | LB_VID | LB_VIP | LB_VPORT | IN_BYTES | OUT_BYTES | USER_CLIENT_PORT |
+----------------+----------+----------+------------+------+----------------------+------+----------+---------+------+------------+-------+------+--------------+---------------+----------------+-----------+-----------+------------+--------+----------+-----------+------------+----------+-------------+--------+--------+-------------+-------+-------------------+-----------------------+--------+--------+----------+----------+-----------+------------------+
| xx.xx.xx.xx | 2882 | 2881 | 3221487622 | root | xx.xx.xx.xx:61671 | test | mysql001 | Sleep | 575 | 575 | SLEEP | NULL | NULL | NULL | xx.xx.xx.xx | % | 0 | 0 | | 0 | 0 | NULL | NULL | | | | | 1 | 10 | SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 1151 | 2680 | 61671 |
+----------------+----------+----------+------------+------+----------------------+------+----------+---------+------+------------+-------+------+--------------+---------------+----------------+-----------+-----------+------------+--------+----------+-----------+------------+----------+-------------+--------+--------+-------------+-------+-------------------+-----------------------+--------+--------+----------+----------+-----------+------------------+
1 row in set (0.001 sec)