Note
This view is introduced since OceanBase Database V1.4.
Purpose
This view displays system-level statistics for the current tenant on the current OBServer node.
The following table describes the fields:
*STATISTIC#: the index of the statistics item. The index of the same statistics item may vary across different OBServer nodes of different versions.
STAT_ID: the ID of the statistics item. The ID of the same statistics item is the same across different OBServer nodes of different versions.
Note
To query statistics from this view, enable monitoring by setting the enable_perf_event parameter to True.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | NUMBER | NO | The tenant ID. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the server. |
| STATISTIC# | NUMBER | NO | The index of the statistics item. |
| NAME | VARCHAR2(64) | NO | The name of the statistics item. |
| CLASS | NUMBER | NO | The type of the statistics item. |
| VALUE | NUMBER | NO | The result value of the statistics item. |
| STAT_ID | NUMBER | NO | The ID of the statistics item. |
Sample query
To view the statistics information of the current tenant on the current node in the user tenant, display the first 10 records.
obclient [SYS]> SELECT * FROM SYS.V$SYSSTAT WHERE ROWNUM <= 10;
The query result is as follows:
+--------+----------------+----------+------------+-----------------------+-------+------------+---------+
| CON_ID | SVR_IP | SVR_PORT | STATISTIC# | NAME | CLASS | VALUE | STAT_ID |
+--------+----------------+----------+------------+-----------------------+-------+------------+---------+
| 1004 | 11.xxx.xxx.xxx | 28825 | 0 | rpc packet in | 1 | 11544765 | 10000 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 1 | rpc packet in bytes | 1 | 4330653649 | 10001 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 2 | rpc packet out | 1 | 23087847 | 10002 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 3 | rpc packet out bytes | 1 | 6688319626 | 10003 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 4 | rpc deliver fail | 1 | 0 | 10004 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 5 | rpc net delay | 1 | 737646453 | 10005 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 6 | rpc net frame delay | 1 | 2067679 | 10006 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 7 | mysql packet in | 1 | 315 | 10007 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 8 | mysql packet in bytes | 1 | 26499 | 10008 |
| 1004 | 11.xxx.xxx.xxx | 28825 | 9 | mysql packet out | 1 | 37214 | 10009 |
+--------+----------------+----------+------------+-----------------------+-------+------------+---------+
10 rows in set
References
To view the statistics information at the session level:
To view the definitions of all statistics events of a tenant: V$STATNAME
For more information about statistics events, see Common statistics events.