mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
45 lines
5.1 KiB
Markdown
45 lines
5.1 KiB
Markdown
---
|
|
machine_translated: true
|
|
machine_translated_rev: 5decc73b5dc60054f19087d3690c4eb99446a6c3
|
|
---
|
|
|
|
# 系统。指标 {#system_tables-metrics}
|
|
|
|
包含可以立即计算或具有当前值的指标。 例如,同时处理的查询的数量或当前副本的延迟。 此表始终是最新的。
|
|
|
|
列:
|
|
|
|
- `metric` ([字符串](../../sql-reference/data-types/string.md)) — Metric name.
|
|
- `value` ([Int64](../../sql-reference/data-types/int-uint.md)) — Metric value.
|
|
- `description` ([字符串](../../sql-reference/data-types/string.md)) — Metric description.
|
|
|
|
支持的指标列表,您可以在 [src/Common/CurrentMetrics.cpp](https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/CurrentMetrics.cpp) ClickHouse的源文件。
|
|
|
|
**示例**
|
|
|
|
``` sql
|
|
SELECT * FROM system.metrics LIMIT 10
|
|
```
|
|
|
|
``` text
|
|
┌─metric─────────────────────┬─value─┬─description──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
│ Query │ 1 │ Number of executing queries │
|
|
│ Merge │ 0 │ Number of executing background merges │
|
|
│ PartMutation │ 0 │ Number of mutations (ALTER DELETE/UPDATE) │
|
|
│ ReplicatedFetch │ 0 │ Number of data parts being fetched from replicas │
|
|
│ ReplicatedSend │ 0 │ Number of data parts being sent to replicas │
|
|
│ ReplicatedChecks │ 0 │ Number of data parts checking for consistency │
|
|
│ BackgroundPoolTask │ 0 │ Number of active tasks in BackgroundProcessingPool (merges, mutations, fetches, or replication queue bookkeeping) │
|
|
│ BackgroundSchedulePoolTask │ 0 │ Number of active tasks in BackgroundSchedulePool. This pool is used for periodic ReplicatedMergeTree tasks, like cleaning old data parts, altering data parts, replica re-initialization, etc. │
|
|
│ DiskSpaceReservedForMerge │ 0 │ Disk space reserved for currently running background merges. It is slightly more than the total size of currently merging parts. │
|
|
│ DistributedSend │ 0 │ Number of connections to remote servers sending data that was INSERTed into Distributed tables. Both synchronous and asynchronous mode. │
|
|
└────────────────────────────┴───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
**另请参阅**
|
|
|
|
- [系统。asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md#system_tables-asynchronous_metrics) — Contains periodically calculated metrics.
|
|
- [系统。活动](../../operations/system-tables/events.md#system_tables-events) — Contains a number of events that occurred.
|
|
- [系统。metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — Contains a history of metrics values from tables `system.metrics` и `system.events`.
|
|
- [监测](../../operations/monitoring.md) — Base concepts of ClickHouse monitoring.
|