Linux command
chdig 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Connect
chdig
Connect
chdig -u 'user:password@clickhouse-host.com/?secure=true'
Connect
chdig --config [/path/to/config.yaml] --connection [prod]
Monitor
chdig -u '[host]' --cluster [my_cluster]
Show
chdig slowqueries
Show
chdig serverlogs
View
chdig merges
说明
chdig provides an interactive terminal dashboard for ClickHouse, similar to how top or htop work for Linux system processes. It consolidates ClickHouse's extensive system introspection tables into a navigable TUI with flamegraph visualization directly in the terminal (CPU, real-time, memory), EXPLAIN integration for analyzing query plans and pipelines, cluster mode for aggregating queries across all shards, and historical mode for examining rotated system log tables.
参数
- -u, --url _URL_
- Connection URL. Also reads CHDIG_URL environment variable.
- --host _HOST_
- Override host (clickhouse-client compatible).
- --port _PORT_
- Override port.
- --user _USER_
- Override user. Also reads CLICKHOUSE_USER.
- --password _PASS_
- Override password. Also reads CLICKHOUSE_PASSWORD.
- --secure
- Use TLS/SSL.
- --config _FILE_
- ClickHouse-like config file (YAML).
- -C, --connection _NAME_
- Named connection profile from config file.
- -c, --cluster _NAME_
- Cluster name; enables distributed queries across shards.
- --history
- Aggregate historical system log data using merge().
- -d, --delay-interval _MS_
- Refresh interval in milliseconds (default: 30000).
- -g, --group-by
- Group distributed queries (default in cluster mode).
- -b, --start _TIME_
- Begin of time interval (default: 1 hour ago).
- -e, --end _TIME_
- End of time interval.
- --completion _SHELL_
- Generate shell completion script.
FAQ
What is the chdig command used for?
chdig provides an interactive terminal dashboard for ClickHouse, similar to how top or htop work for Linux system processes. It consolidates ClickHouse's extensive system introspection tables into a navigable TUI with flamegraph visualization directly in the terminal (CPU, real-time, memory), EXPLAIN integration for analyzing query plans and pipelines, cluster mode for aggregating queries across all shards, and historical mode for examining rotated system log tables.
How do I run a basic chdig example?
Run `chdig` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -u, --url _URL_ do in chdig?
Connection URL. Also reads CHDIG_URL environment variable.