[go: up one dir, main page]

跳到主要内容
跳到主要内容

system.crash_log

在 ClickHouse Cloud 中查询

此系统表中的数据在 ClickHouse Cloud 中的每个节点上本地保存。因此,要获得所有数据的完整视图,需要使用 clusterAllReplicas 函数。有关进一步的详细信息,请参见 这里

包含有关致命错误的堆栈跟踪信息。此表在数据库中默认不存在,仅在发生致命错误时创建。

列:

  • hostname (LowCardinality(String)) — 执行查询的服务器的主机名。
  • event_date (DateTime) — 事件日期。
  • event_time (DateTime) — 事件时间。
  • timestamp_ns (UInt64) — 以纳秒为单位的事件时间戳。
  • signal (Int32) — 信号编号。
  • thread_id (UInt64) — 线程 ID。
  • query_id (String) — 查询 ID。
  • trace (Array(UInt64)) — 崩溃时的堆栈跟踪。每个元素都是 ClickHouse 服务器进程内的虚拟内存地址。
  • trace_full (Array(String)) — 崩溃时的堆栈跟踪。每个元素包含 ClickHouse 服务器进程内调用的方法。
  • version (String) — ClickHouse 服务器版本。
  • revision (UInt32) — ClickHouse 服务器修订号。
  • build_id (String) — 编译器生成的 BuildID。

示例

查询:

SELECT * FROM system.crash_log ORDER BY event_time DESC LIMIT 1;

结果(不完全):

Row 1:
──────
hostname:     clickhouse.eu-central1.internal
event_date:   2020-10-14
event_time:   2020-10-14 15:47:40
timestamp_ns: 1602679660271312710
signal:       11
thread_id:    23624
query_id:     428aab7c-8f5c-44e9-9607-d16b44467e69
trace:        [188531193,...]
trace_full:   ['3. DB::(anonymous namespace)::FunctionFormatReadableTimeDelta::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > const&, unsigned long, unsigned long) const @ 0xb3cc1f9 in /home/username/work/ClickHouse/build/programs/clickhouse',...]
version:      ClickHouse 20.11.1.1
revision:     54442
build_id:

另见