obproxy_stat.log records logs for SQL execution statistics. By default, a statistic log is generated once every minute. The generation interval is specified by the monitor_stat_dump_interval parameter. In this log, you can view information about SQL execution by OceanBase Database Proxy (ODP) within one minute.
Log format
The general format of logs in obproxy_stat.log is as follows:
Log printing time,Logical tenant name,Logical database name,Physical database information (cluster:tenant:database),Database type (OB/RDS),SQL type (CRUD),Execution result (success/failed),Error code (empty for success),Total number of requests,[30 ms, 100 ms) requests,[100 ms, 500 ms) requests,[500 ms, +∞) requests,Total execution time (μs),ODP processing time,OBServer node execution time
where
The
total execution timeincludes the internal SQL execution time.The
ODP processing timerefers to the time ODP spent on processing the request.
Examples
You can check this log file to determine whether ODP has request traffic. Here is an example:
2022-07-11 10:26:59.499204,undefined,,obcluster:sys:test,OB_MYSQL,SELECT,success,,1,1,0,0,41480us,332us,40369us
# Log analysis
1,2022-07-11 10:26:59.499204 # The log printing time.
2,undefined # The logical tenant name.
3, # The name of the logical database.
4,obcluster:sys:test # The information about the physical database, in the format of cluster name:tenant name:database name.
5,OB_MYSQL # The database type.
6,SELECT # The SQL type.
7,success # The execution result, which is success or failed.
8, # The error code, which is empty when the execution result is success.
9,1 # The total number of requests.
10,1 # The number of requests whose execution time falls in the range of [30 ms, 100 ms).
11,0 # The number of requests whose execution time falls in the range of [100 ms, 500 ms).
12,0 # The number of requests whose execution time falls in the range of [500 ms, +∞).
13,41480us # The total execution time, including the internal SQL execution time.
14,332us # The ODP processing time.
15,40369us # The OBServer node execution time.