Overview
Displays the statistical event information of the current tenant across all OBServer nodes.
Where:
STATISTIC#: the number of the statistic. The number of the same statistic may vary across different OBServer node versions.STAT_ID: the ID of the statistic. The ID of the same statistic is guaranteed to be the same across different OBServer node versions.
Note
To use this view, you must enable monitoring by setting the enable_perf_event parameter to True.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | IP Address of the Server Where Information is Located |
| SVR_PORT | bigint(20) | NO | Port number of the server where the information is located |
| STATISTIC# | bigint(20) | NO | Index of the statistical event |
| NAME | varchar(64) | NO | Name of the statistical event |
| CLASS | bigint(20) | NO | Type of the statistical event |
| VALUE | bigint(20) | NO | Result value corresponding to the statistical event |
| VALUE_TYPE | varchar(16) | NO | Statistic value type:
|
| STAT_ID | bigint(20) | NO | Statistics Event ID |
Sample query
In the user tenant, view the statistical event information of the current tenant across all nodes, displaying the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$SYSSTAT LIMIT 10;
The query result is as follows:
+--------+----------------+----------+------------+-----------------------+-------+------------+------------+---------+
| CON_ID | SVR_IP | SVR_PORT | STATISTIC# | NAME | CLASS | VALUE | VALUE_TYPE | STAT_ID |
+--------+----------------+----------+------------+-----------------------+-------+------------+------------+---------+
| 1002 | 11.xxx.xxx.xxx | 28825 | 0 | rpc packet in | 1 | 11466228 | ADD_VALUE | 10000 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | rpc packet in bytes | 1 | 4307176881 | ADD_VALUE | 10001 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 2 | rpc packet out | 1 | 22931199 | ADD_VALUE | 10002 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 3 | rpc packet out bytes | 1 | 6647402391 | ADD_VALUE | 10003 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 4 | rpc deliver fail | 1 | 0 | ADD_VALUE | 10004 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 5 | rpc net delay | 1 | 777626920 | ADD_VALUE | 10005 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 6 | rpc net frame delay | 1 | 2112541 | ADD_VALUE | 10006 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 7 | mysql packet in | 1 | 329 | ADD_VALUE | 10007 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 8 | mysql packet in bytes | 1 | 18639 | ADD_VALUE | 10008 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 9 | mysql packet out | 1 | 6597 | ADD_VALUE | 10009 |
+--------+----------------+----------+------------+-----------------------+-------+------------+------------+---------+
10 rows in set
References
View session-level statistical event information:
View the definitions of all statistical events for a tenant: V$STATNAME
For more information about statistical events, see Overview of Metrics.