# CLUSTER INFO

> Return the cluster state, slot coverage, epochs and cluster bus counters as seen by the receiving node.

URL: https://docs.hotkv.com/commands/cluster-info/

```
CLUSTER INFO
```

- Group: Cluster
- Complexity: O(N) where N is the number of known nodes
- HotKV Cloud: all plans
- On-Premise: no license needed

`CLUSTER INFO` returns a block of `field:value` lines, separated by CRLF,
that describe the cluster from the receiving node's point of view. Check
`cluster_state` first: while it says `fail`, the node replies `-CLUSTERDOWN`
to commands on keys (reads still run with `cluster-allow-reads-when-down
yes`).

## Fields

| Field | Meaning |
| --- | --- |
| `cluster_enabled` | `1` in cluster mode, `0` otherwise |
| `cluster_state` | `ok` while this node serves commands, `fail` while it refuses them (slots not covered while `cluster-require-full-coverage` is on, or this node is on the minority side of a partition) |
| `cluster_slots_assigned` | Slots that have an owner |
| `cluster_slots_ok` | Assigned slots whose owner is healthy |
| `cluster_slots_pfail` | Slots whose owner this node suspects is failing |
| `cluster_slots_fail` | Slots whose owner the cluster has marked as failed |
| `cluster_nodes_pfail`, `cluster_nodes_fail` | Nodes suspected failing, and marked failed |
| `cluster_voting_nodes_pfail`, `cluster_voting_nodes_fail` | The same, for primaries that serve slots (the nodes that vote) |
| `cluster_known_nodes` | Nodes this node knows, itself and nodes still in their handshake included |
| `cluster_size` | Primaries serving at least one slot |
| `cluster_current_epoch` | The greatest epoch this node knows |
| `cluster_my_epoch` | This node's configuration epoch (on a replica, its primary's) |
| `cluster_stats_messages_<type>_sent`, `..._received` | Cluster bus messages by type, listed only for types with a non-zero count |
| `cluster_stats_messages_sent`, `cluster_stats_messages_received` | All cluster bus messages |
| `cluster_stats_bytes_sent`, `cluster_stats_bytes_received` | Cluster bus bytes |
| `cluster_stats_pubsub_bytes_sent`, `cluster_stats_pubsub_bytes_received` | Bytes of pub/sub messages carried over the bus |
| `cluster_stats_module_bytes_sent`, `cluster_stats_module_bytes_received` | Always `0` (HotKV has no modules) |
| `total_cluster_links_buffer_limit_exceeded` | Bus links dropped because their send buffer passed `cluster-link-sendbuf-limit` |
| `cluster_slot_migration_active_tasks` | Atomic slot migrations in progress on this node, as source or target (see [CLUSTER GETSLOTMIGRATIONS](https://docs.hotkv.com/commands/cluster-getslotmigrations/index.md)) |
| `cluster_slot_migration_active_trim_running`, `cluster_slot_migration_active_trim_current_job_keys`, `cluster_slot_migration_active_trim_current_job_trimmed`, `cluster_slot_migration_stats_active_trim_started`, `cluster_slot_migration_stats_active_trim_completed`, `cluster_slot_migration_stats_active_trim_cancelled` | Redis 8's counters for the jobs that delete the keys a migration left behind. They stay `0` in normal operation. |

The message types are `ping`, `pong`, `meet`, `fail`, `publish`,
`auth-req`, `auth-ack`, `update`, `mfstart` and `publishshard`, as in Redis.

With cluster mode off, the reply is a fixed block with `cluster_enabled:0`,
`cluster_state:ok`, `cluster_known_nodes:1` and every count at 0.

## Return value

A bulk string in RESP2 and RESP3.

## Examples

```
127.0.0.1:6379> CLUSTER INFO
cluster_enabled:1
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_nodes_pfail:0
cluster_nodes_fail:0
cluster_voting_nodes_pfail:0
cluster_voting_nodes_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_ping_sent:4821
cluster_stats_messages_pong_sent:4790
cluster_stats_messages_meet_sent:2
cluster_stats_messages_sent:9613
cluster_stats_messages_ping_received:4788
cluster_stats_messages_pong_received:4823
cluster_stats_messages_meet_received:3
cluster_stats_messages_received:9614
cluster_stats_bytes_sent:21803644
cluster_stats_bytes_received:21805912
cluster_stats_pubsub_bytes_sent:0
cluster_stats_pubsub_bytes_received:0
cluster_stats_module_bytes_sent:0
cluster_stats_module_bytes_received:0
total_cluster_links_buffer_limit_exceeded:0
cluster_slot_migration_active_tasks:0
cluster_slot_migration_active_trim_running:0
cluster_slot_migration_active_trim_current_job_keys:0
cluster_slot_migration_active_trim_current_job_trimmed:0
cluster_slot_migration_stats_active_trim_started:0
cluster_slot_migration_stats_active_trim_completed:0
cluster_slot_migration_stats_active_trim_cancelled:0
```

## Compatibility

The fields of Redis 7, plus the node failure counts and byte counters of
Valkey 9 and the slot migration counters of Redis 8.

## See also

[CLUSTER NODES](https://docs.hotkv.com/commands/cluster-nodes/index.md), [CLUSTER SHARDS](https://docs.hotkv.com/commands/cluster-shards/index.md),
[CLUSTER LINKS](https://docs.hotkv.com/commands/cluster-links/index.md), [INFO](https://docs.hotkv.com/commands/info/index.md),
[Monitoring a cluster](https://docs.hotkv.com/clustering/monitoring/index.md)