Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using ClickHouse/ ClickHouse O&M Management/ Collecting Dumping Logs of the ClickHouse System Tables
Updated on 2024-10-09 GMT+08:00

Collecting Dumping Logs of the ClickHouse System Tables

This topic is available for MRS 3.3.0-LTS and later versions only.

Scenario

If an exception occurs, you need to restart ClickHouse to restore services. Before restart, you need to dump the status information of each ClickHouse system table for efficient ClickHouse fault locating.

System table logs can be dumped in real time or in one-click mode, as shown in the following table.

Log Dumping Type

System Tables

Real-time dumping

  • system.asynchronous_metrics
  • system.clusters
  • system.distribution_queue
  • system.events
  • system.grants
  • system.mutations
  • system.processes
  • system.metrics
  • system.part_moves_between_shards
  • system.replicas
  • system.replicated_fetches
  • system.replication_queue

One-click dumping

  • system.distributed_ddl_queue
  • system.errors
  • system.parts
  • system.parts_columns
  • system.query_log
  • system.query_thread_log
  • system.trace_log

Collecting Real-Time Dumping Logs

  1. Log in to FusionInsight Manager, choose O&M > Log > Download, and select ClickHouseSystemTableDump for Service.

  2. Select the hosts where you want to collect dumping logs and click OK.

  3. Click the time editing button in the upper right corner and set Start Time and End Time for log collection.

    For details about how long it takes to collect logs, contact technical support engineers.

  4. Click Download. The real-time system table dumping logs are saved to the local PC.

Collecting One-Click Dumping Logs

  1. Log in to any ClickHouseServer node as the root user and go to the sbin directory.

    cd ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_*_ClickHouseServer/install/clickhouse/sbin

  2. Run the following command to obtain dumping logs:

    ./clickhouse_systemtable_dump.sh 1 "Start time" "End time"

    Example: ./clickhouse_systemtable_dump.sh 1 "2023-08-04 12:00:00" "2023-08-04 16:37:20"

  3. Go to the /var/log/Bigdata/clickhouse/systemTableDump/oneclickTable directory and view the compressed one-click dumping logs.