You can use the GV$SYSSTAT view to query 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 | Metric type | Metric name | Description |
|---|---|---|---|
| 70000 | 128 | refresh schema count | The number of successful schema refreshes. When OceanBase Database needs to refresh the schema, the count increments after each successful schema refresh operation. This is tracked in the ObServerSchemaService::refresh_schema method. The operation includes full refresh (refresh_full_schema) and incremental refresh (refresh_increment_schema) modes for keeping local metadata cache consistent with system tables. |
| 70001 | 128 | refresh schema time | The cumulative time consumed for successful schema refreshes, in microseconds. When OceanBase Database refreshes the schema, this metric tracks the total time of the entire refresh process. In the ObServerSchemaService::refresh_schema method, when OB_SUCC(ret) is true, the time from method start to end is accumulated. This includes all overhead for both full refresh and incremental refresh modes. |
| 70002 | 128 | inner sql connection execute count | The number of INNER SQL executions. The count increments by 1 for each INNER SQL execution. |
| 70003 | 128 | inner sql connection execute time | The total execution time of INNER SQL, in microseconds. |
| 70006 | 128 | log stream table operator get count | The number of successful reads of LS information from the __all_ls_meta_table table. When the ObLSTableOperator obtains log stream information from the __all_ls_meta_table table, the count increments by 1 for each successful retrieval of ls_info. This is tracked in the ObLSTableOperator::get method. The operator supports obtaining log stream information from memory, RPC, or persistent tables for location cache and metadata management. |
| 70007 | 128 | log stream table operator get time | The cumulative time consumed for successfully reading LS information from the __all_ls_meta_table table, in microseconds. When the ObLSTableOperator obtains log stream information from the __all_ls_meta_table table, this metric tracks the total time of the entire retrieval process. In the ObLSTableOperator::get method, the time from method start to end is accumulated. This includes all overhead for obtaining log stream information from memory, RPC, or persistent tables. |
| 160001 | 128 | oblogger log bytes | The cumulative total size of printed logs, in bytes. Refers to the output process of syslogs such as observer.log. |
| 160002 | 128 | election log bytes | The cumulative total size of printed election logs, in bytes. Refers to the cumulative print size of election.log. |
| 160004 | 128 | oblogger total log count | The cumulative number of printed logs. Refers to the output process of syslogs such as observer.log. |
| 160019 | 128 | async error log dropped count | The number of failed ERROR log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160020 | 128 | async warn log dropped count | The number of failed WARN log prints. Refers to the output process of syslogs such as observer.log. |
| 160021 | 128 | async info log dropped count | The number of failed INFO log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160022 | 128 | async trace log dropped count | The number of failed TRACE log prints. Refers to the output process of syslogs such as observer.log. |
| 160023 | 128 | async debug log dropped count | The number of failed DEBUG log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160024 | 128 | async log flush speed | The average number of log entries written per second. Refers to the output process of syslogs such as observer.log. |
| 160025 | 128 | async generic log write count | The number of successful default log prints. Refers to the output process of syslogs such as observer.log. |
| 160026 | 128 | async user request log write count | Deprecated. Retained in code only. Refers to the output process of syslogs such as observer.log. |
| 160027 | 128 | async data maintain log write count | The number of successful dump and merge log prints. Refers to the output process of syslogs such as observer.log. |
| 160028 | 128 | async root service log write count | The number of successful RS log prints. Refers to the output process of syslogs such as observer.log. |
| 160029 | 128 | async schema log write count | The number of failed Schema log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160030 | 128 | async force allow log write count | The number of successful forced log prints. Refers to the output process of syslogs such as observer.log. |
| 160031 | 128 | async generic log dropped count | The number of failed default log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160032 | 128 | async user request log dropped count | Deprecated. Retained in code only. Refers to the output process of syslogs such as observer.log. |
| 160033 | 128 | async data maintain log dropped count | The number of failed dump and merge log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160034 | 128 | async root service log dropped count | The number of failed RS log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160035 | 128 | async schema log dropped count | The number of failed Schema log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
| 160036 | 128 | async force allow log dropped count | The number of failed forced log prints (due to throttling or other reasons). Refers to the output process of syslogs such as observer.log. |
- For more information about metrics, see Overview of metrics.
- For more information about metric categories, see SYSSTAT metrics.