系统。trace_log
包含采样查询探查器收集的堆栈跟踪。
ClickHouse创建此表时 trace_log 服务器配置部分被设置。 也是 query_profiler_real_time_period_ns 和 query_profiler_cpu_time_period_ns 应设置设置。
要分析日志,请使用 addressToLine, addressToSymbol 和 demangle 内省功能。
列:
-
event_date(日期) — Date of sampling moment. -
event_time(日期时间) — Timestamp of the sampling moment. -
timestamp_ns(UInt64) — Timestamp of the sampling moment in nanoseconds. -
revision(UInt32) — ClickHouse server build revision.通过以下方式连接到服务器
clickhouse-client,你看到的字符串类似于Connected to ClickHouse server version 19.18.1.. 该字段包含revision,但不是version的服务器。 -
timer_type(枚举8) — Timer type:Real表示挂钟时间。CPU表示CPU时间。
-
thread_number(UInt32) — Thread identifier. -
query_id(字符串) — Query identifier that can be used to get details about a query that was running from the query_log 系统表. -
trace(数组(UInt64)) — Stack trace at the moment of sampling. Each element is a virtual memory address inside ClickHouse server process.
示例