Note
This view is introduced since OceanBase Database V1.4.
Purpose
The GV$SYSSTAT view displays the system-level statistical events on all OBServer nodes of the current tenant.
where:
STATISTIC#indicates the number of a statistical item. The number of a statistical item may vary based on the OceanBase Database version.STAT_IDindicates the ID of a statistical item. The ID of a statistical item remains constant in different OceanBase Database versions.
Note
If you want to use this view, you must set the enable_perf_event parameter to True to enable monitoring.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | NUMBER | NO | The ID of the tenant. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the OBServer node where the information is located. |
| SVR_PORT | NUMBER(38) | NO | The port number of the OBServer node where the information is located. |
| STATISTIC# | NUMBER | NO | The subscript of the statistical event. |
| NAME | VARCHAR2(64) | NO | The name of the statistical event. |
| CLASS | NUMBER | NO | The class to which the statistical event belongs. |
| VALUE | NUMBER | NO | The value of the statistical item. |
| STAT_ID | NUMBER | NO | The ID of the statistical event. |
Sample query
In a user tenant, view the statistical event information of the current tenant on all nodes, and display the first 10 records.
obclient [SYS]> SELECT * FROM SYS.GV$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
View the statistical event information at the session level:
View the definitions of all statistical events in a tenant: V$STATNAME
For more information about statistical events, see Common statistical events.