GV$OB_PROCESSLIST

2024-05-29 07:17:41  Updated

Purpose

The GV$OB_PROCESSLIST view displays the session information about all OBServer nodes of a tenant.

Note

This view is introduced since OceanBase Database V4.0.0.

Columns

Column Type Nullable? Description
SVR_IP VARCHAR2(46) NO The IP address of the server.
SVR_PORT NUMBER(38) NO The port number of the server.
SQL_PORT NUMBER(38) NO The SQL port number.
ID NUMBER(38) NO The session ID.
USER CHAR(193) NO The username.
HOST VARCHAR2(128) NO The hostname of the client. For example, if you connect to the OBServer node through OceanBase Database Proxy (ODP), the value is the host address of ODP.
DB VARCHAR2(128) YES The name of the database accessed.
TENANT VARCHAR2(128) NO The name of the tenant accessed.
COMMAND VARCHAR2(4096) NO The type of the command being executed in the session.
TIME NUMBER(38) NO The execution time of the current command, in seconds. If a retry occurs, the value is cleared and recalculated.
TOTAL_TIME NUMBER(38) NO The total execution time of the current command, in seconds. If a retry occurs, the value will not be cleared.
STATE VARCHAR2(128) YES The current session status.
INFO VARCHAR2(262143) YES The command that is being executed.
PROXY_SESSID NUMBER(38) YES The ODP session ID is displayed if the client is an ODP.
MASTER_SESSID NUMBER(38) YES The ID of the master session, which is used to concatenate multiple sub-sessions of the same SQL statement.
USER_CLIENT_IP VARCHAR2(46) YES The IP address of the user client.
USER_HOST VARCHAR2(128) YES The hostname of the user client.
RETRY_CNT NUMBER(38) NO The number of retries of the current command.
RETRY_INFO NUMBER(38) NO The retry information about the current command. Generally, the value is the error code of the last retry.
SQL_ID VARCHAR2(32) NO The ID of the SQL statement.
TRANS_ID NUMBER(38) NO The transaction ID.
THREAD_ID NUMBER(38) NO The thread ID.
SSL_CIPHER VARCHAR2(4096) YES The encryption password.
TRACE_ID VARCHAR2(64) YES The trace ID.
TRANS_STATE varchar(32) YES The transaction status.
  • IDLE: The transaction is in the idle state, indicating that the transaction is not started.
  • ACTIVE: The transaction is explicitly initiated. A transaction can be started explicitly using statements such as START TRANSACTION and BEGIN.
  • IMPLICIT_ACTIVE: The transaction is implicitly initiated. In autocommit = on mode, a transaction is initiated after executing DML or data-modifying statements.
  • ROLLBACK_SAVEPOINT: The transaction is rolling back to a savepoint.
  • IN_TERMINATE: The transaction is being terminated, including termination due to internal reasons and user-initiated termination (for example, executing COMMIT, ROLLBACK statements).
  • ABORTED: The transaction is internally terminated or rolled back due to an exception.
  • ROLLED_BACK: The transaction is rolled back.
  • COMMIT_TIMEOUT: Transaction commit timeout.
  • COMMIT_UNKNOWN: The transaction commit status is unknown.
  • COMMITTED: The transaction is successfully committed.
ACTION VARCHAR2(4096) YES The name of the operation being executed that is set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure.
MODULE VARCHAR2(4096) YES The name of the module that is set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure.
CLIENT_INFO VARCHAR2(4096) YES The client information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure.
LEVEL NUMBER(38) NO The monitoring level of end-to-end diagnostics of the session. For example, the value 1 indicates level-1 diagnostics.

Note

This column is introduced since OceanBase Database V4.2.1.

SAMPLE_PERCENTAGE NUMBER(38) 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%.

Note

This column is introduced since OceanBase Database V4.2.1.

RECORD_POLICY VARCHAR2(32) NO The recording strategy for end-to-end diagnostics of the session. Three strategies are supported:
  • ALL: All sampling-enabled traces that are hit are recorded in the log file immediately after each span ends.
  • ONLY_SLOW_QUERY: Among sampling-enabled traces that are hit, only traces of slow queries are recorded in the log file, and other traces are discarded. For this strategy, trace logs are recorded after a request ends and is determined as a slow query. In the proxy, the root span (transaction-level span) is immediately recorded when a slow query is detected.
  • SAMPLE_AND_SLOW_QUERY: Among sampling-enabled traces that are hit, those meeting any of the following conditions are recorded in the log file:
    1. The hidden parameter _print_sample_ppm is used for sampling at a frequency of 0.01% and the sampling result is hit.
    2. The condition specified in the ONLY_SLOW_QUERY strategy is met.
    In this mode, the logging time varies based on the situation. Specifically, if Condition 1 is met, it is marked on the client that the trace log will be forcibly recorded and this information will be transferred to subsequent components on the link. If Condition 2 is met, the logging time is the same as that in the ONLY_SLOW_QUERY strategy.

Note

This column is introduced since OceanBase Database V4.2.1.

LB_VID NUMBER(38) YES The VPC ID of the load balancing service if you directly connect to the database in a public cloud. Otherwise, the value is NULL.

Note

This column is introduced since OceanBase Database V4.2.1.

LB_VIP VARCHAR2(46) YES 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.

Note

This column is introduced since OceanBase Database V4.2.1.

LB_VPORT NUMBER(38) YES 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.

Note

This column is introduced since OceanBase Database V4.2.1.

IN_BYTES NUMBER(38) NO The inbound traffic of the session, in bytes.

Note

This column is introduced since OceanBase Database V4.2.1.

OUT_BYTES NUMBER(38) NO The outbound traffic of the session, in bytes.

Note

This column is introduced since OceanBase Database V4.2.1.

USER_CLIENT_PORT NUMBER(38) NO The client address.

Note

This column is introduced since OceanBase Database V4.3.0.

Sample query

obclient [SYS]> SELECT * FROM SYS.V$OB_PROCESSLIST WHERE ROWNUM <= 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 | 3221487650 | TEST2 | xx.xx.xx.xx:36081    | TEST2 | oracle001 | Sleep   | 5725 |       5725 | SLEEP | NULL |         NULL |          NULL | xx.xx.xx.xx    | %         |         0 |          0 | NULL   |        0 |         0 | NULL       | NULL     | NULL        | NULL   | NULL   | NULL        |     1 |                10 | SAMPLE_AND_SLOW_QUERY |   NULL | NULL   |     NULL |      753 |      1475 |            36081 |
+----------------+----------+----------+------------+-------+----------------------+-------+-----------+---------+------+------------+-------+------+--------------+---------------+----------------+-----------+-----------+------------+--------+----------+-----------+------------+----------+-------------+--------+--------+-------------+-------+-------------------+-----------------------+--------+--------+----------+----------+-----------+------------------+
1 row in set (0.007 sec)

References

V$OB_PROCESSLIST

Contact Us