You can use the GV$SYSSTAT view to conveniently view syslog-related metrics.
obclient> select CON_ID,CLASS,STAT_ID,NAME,VALUE,VALUE_TYPE from GV$SYSSTAT where class=128 and con_id=1;
The return result is as follows:
+--------+-------+---------+---------------------------------------+--------------+------------+
| CON_ID | CLASS | STAT_ID | NAME | VALUE | VALUE_TYPE |
+--------+-------+---------+---------------------------------------+--------------+------------+
| 1 | 128 | 70000 | refresh schema count | 4086 | ADD_VALUE |
| 1 | 128 | 70001 | refresh schema time | 148083972 | ADD_VALUE |
| 1 | 128 | 70002 | inner sql connection execute count | 98568060 | ADD_VALUE |
| 1 | 128 | 70003 | inner sql connection execute time | 44107647583 | ADD_VALUE |
| 1 | 128 | 70006 | log stream table operator get count | 1941287 | ADD_VALUE |
| 1 | 128 | 70007 | log stream table operator get time | 4087778121 | ADD_VALUE |
| 1 | 128 | 160001 | oblogger log bytes | 174642400467 | SET_VALUE |
| 1 | 128 | 160002 | election log bytes | 3388207300 | SET_VALUE |
| 1 | 128 | 160004 | oblogger total log count | 393651933 | SET_VALUE |
| 1 | 128 | 160019 | async error log dropped count | 0 | SET_VALUE |
| 1 | 128 | 160020 | async warn log dropped count | 122237794 | SET_VALUE |
| 1 | 128 | 160021 | async info log dropped count | 2725037358 | SET_VALUE |
| 1 | 128 | 160022 | async trace log dropped count | 0 | SET_VALUE |
| 1 | 128 | 160023 | async debug log dropped count | 0 | SET_VALUE |
| 1 | 128 | 160024 | async log flush speed | 2310 | SET_VALUE |
| 1 | 128 | 160025 | async generic log write count | 1803755519 | SET_VALUE |
| 1 | 128 | 160026 | async user request log write count | 0 | SET_VALUE |
| 1 | 128 | 160027 | async data maintain log write count | 16052859 | SET_VALUE |
| 1 | 128 | 160028 | async root service log write count | 0 | SET_VALUE |
| 1 | 128 | 160029 | async schema log write count | 4033080 | SET_VALUE |
| 1 | 128 | 160030 | async force allow log write count | 130753368 | SET_VALUE |
| 1 | 128 | 160031 | async generic log dropped count | 2838989412 | SET_VALUE |
| 1 | 128 | 160032 | async user request log dropped count | 0 | SET_VALUE |
| 1 | 128 | 160033 | async data maintain log dropped count | 8285735 | SET_VALUE |
| 1 | 128 | 160034 | async root service log dropped count | 0 | SET_VALUE |
| 1 | 128 | 160035 | async schema log dropped count | 5 | SET_VALUE |
| 1 | 128 | 160036 | async force allow log dropped count | 0 | SET_VALUE |
+--------+-------+---------+---------------------------------------+--------------+------------+
Parameter description:
Metric ID |
Category |
Metric name |
Description |
|---|---|---|---|
| 70000 | 128 | refresh schema count | The number of successful schema refreshes. When OceanBase Database needs to refresh schemas, this value increases by 1 each time a schema refresh operation is completed. It is counted in the ObServerSchemaService::refresh_schema method. The operation includes full refresh refresh_full_schema and incremental refresh refresh_increment_schema, which keep the local metadata caches consistent with system tables. |
| 70001 | 128 | refresh schema time | The cumulative time consumed by successful schema refreshes, in microseconds. When OceanBase Database refreshes schemas, the total time consumed by the entire refresh process is counted. In the ObServerSchemaService::refresh_schema method, when OB_SUCC(ret) is True, the time difference from the beginning to the end of the method is accumulated. It includes all overheads of full refresh refresh_full_schema and incremental refresh refresh_increment_schema. |
| 70002 | 128 | inner sql connection execute count | The number of INNER SQL executions. The count increases by 1 each time an INNER SQL statement is executed. |
| 70003 | 128 | inner sql connection execute time | The total time consumed by INNER SQL executions, in microseconds. It accumulates the execution time of INNER SQL statements. |
| 70006 | 128 | log stream table operator get count | The number of times log stream information is successfully read and loaded from the __all_ls_meta_table table. When log stream information is obtained from the __all_ls_meta_table table through ObLSTableOperator, this value increases by 1 each time ls_info is successfully obtained. It is counted in the ObLSTableOperator::get method. The operator supports obtaining log stream information from memory, RPC, or persistent tables for location caching and metadata management. |
| 70007 | 128 | log stream table operator get time | The cumulative time consumed by successfully reading and loading log stream information from the __all_ls_meta_table table, in microseconds. When log stream information is obtained from the __all_ls_meta_table table through ObLSTableOperator, the total time consumed by the entire retrieval process is counted. In the ObLSTableOperator::get method, the time difference from the beginning to the end of the method is accumulated. It includes all overheads of obtaining log stream information from memory, RPC, or persistent tables. |
| 160001 | 128 | oblogger log bytes | The cumulative total size of printed logs, in bytes. It refers to the output printing process of system logs such as observer.log. |
| 160002 | 128 | election log bytes | The cumulative total size of printed election logs, in bytes. It refers to the cumulative printing size of the election.log file. |
| 160004 | 128 | oblogger total log count | The cumulative number of times logs are printed. It refers to the output printing process of system logs such as observer.log. |
| 160019 | 128 | async error log dropped count | The number of times ERROR logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160020 | 128 | async warn log dropped count | The number of times WARN logs fail to be printed. It refers to the output printing process of system logs such as observer.log. |
| 160021 | 128 | async info log dropped count | The number of times INFO logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160022 | 128 | async trace log dropped count | The number of times TRACE logs fail to be printed. It refers to the output printing process of system logs such as observer.log. |
| 160023 | 128 | async debug log dropped count | The number of times DEBUG logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160024 | 128 | async log flush speed | The average number of logs written per second. It refers to the output printing process of system logs such as observer.log. |
| 160025 | 128 | async generic log write count | The number of times generic logs are successfully printed. It refers to the output printing process of system logs such as observer.log. |
| 160026 | 128 | async user request log write count | Deprecated. It is retained only in the code. It refers to the output printing process of system logs such as observer.log. |
| 160027 | 128 | async data maintain log write count | The number of times logs for dump and merge operations are successfully printed. It refers to the output printing process of system logs such as observer.log. |
| 160028 | 128 | async root service log write count | The number of times Root Service logs are successfully printed. It refers to the output printing process of system logs such as observer.log. |
| 160029 | 128 | async schema log write count | The number of times Schema logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160030 | 128 | async force allow log write count | The number of times force-allowed logs are successfully printed. It refers to the output printing process of system logs such as observer.log. |
| 160031 | 128 | async generic log dropped count | The number of times generic logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160032 | 128 | async user request log dropped count | Deprecated. It is retained only in the code. It refers to the output printing process of system logs such as observer.log. |
| 160033 | 128 | async data maintain log dropped count | The number of times logs for dump and merge operations fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160034 | 128 | async root service log dropped count | The number of times Root Service logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160035 | 128 | async schema log dropped count | The number of times Schema logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
| 160036 | 128 | async force allow log dropped count | The number of times force-allowed logs fail to be printed (due to rate limiting or other reasons). It refers to the output printing process of system logs such as observer.log. |
- For more information about metrics, see Overview of metrics.
- For more information about metric categories, see SYSSTAT metrics.
