CLUSTER INFO
语法
CLUSTER INFO
- 可用时间
- 3.0.0
- 时间复杂度
- O(1)
- ACL 类别
-
@slow
,
CLUSTER INFO
提供 INFO
风格的信息,关于 Redis 集群的重要参数。以下字段始终存在于响应中
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:2
cluster_stats_messages_sent:1483972
cluster_stats_messages_received:1483968
total_cluster_links_buffer_limit_exceeded:0
cluster_state
: 状态为ok
表示节点能够接收查询。fail
表示至少存在一个哈希槽未绑定(没有关联节点),处于错误状态(为其服务的节点被标记为 FAIL 标志),或者大多数主节点无法被该节点访问。cluster_slots_assigned
: 与某些节点相关联的槽数(不包括未绑定的槽)。为了使节点正常工作,此数字应为 16384,这意味着每个哈希槽应映射到一个节点。cluster_slots_ok
: 映射到非FAIL
或PFAIL
状态节点的哈希槽数。cluster_slots_pfail
: 映射到PFAIL
状态节点的哈希槽数。请注意,只要PFAIL
状态未被故障检测算法提升到FAIL
,这些哈希槽仍然可以正常工作。PFAIL
仅表示我们目前无法与节点通信,但这可能只是一个瞬时错误。cluster_slots_fail
: 映射到FAIL
状态节点的哈希槽数。如果此数字不为零,则节点将无法服务查询,除非在配置中将cluster-require-full-coverage
设置为no
。cluster_known_nodes
: 集群中已知节点的总数,包括可能不是集群正式成员的HANDSHAKE
状态节点。cluster_size
: 集群中至少为一个哈希槽提供服务的 主节点数量。cluster_current_epoch
: 本地Current Epoch
变量。这用于在故障转移期间创建唯一的递增版本号。cluster_my_epoch
: 我们正在通信的节点的Config Epoch
。这是分配给该节点的当前配置版本。cluster_stats_messages_sent
: 通过集群节点到节点二进制总线发送的消息数量。cluster_stats_messages_received
: 通过集群节点到节点二进制总线接收的消息数量。total_cluster_links_buffer_limit_exceeded
: 由于超过了cluster-link-sendbuf-limit
配置而释放的集群链接的累积计数。
如果值不为 0,则以下与消息相关的字段可能会包含在响应中:每种消息类型都包含有关发送和接收的消息数量的统计信息。以下是这些字段的解释
cluster_stats_messages_ping_sent
和cluster_stats_messages_ping_received
: 集群总线 PING(不要与客户端命令PING
混淆)。cluster_stats_messages_pong_sent
和cluster_stats_messages_pong_received
: PONG(对 PING 的响应)。cluster_stats_messages_meet_sent
和cluster_stats_messages_meet_received
: 向新节点发送的握手消息,可以通过 gossip 或CLUSTER MEET
发送。cluster_stats_messages_fail_sent
和cluster_stats_messages_fail_received
: 将节点 xxx 标记为故障节点。cluster_stats_messages_publish_sent
和cluster_stats_messages_publish_received
: 发布/订阅发布传播,参见 发布/订阅。cluster_stats_messages_auth-req_sent
和cluster_stats_messages_auth-req_received
: 副本启动的领导者选举以替换其主节点。cluster_stats_messages_auth-ack_sent
和cluster_stats_messages_auth-ack_received
: 指示领导者选举期间投票的消息。cluster_stats_messages_update_sent
和cluster_stats_messages_update_received
: 另一个节点的槽配置。cluster_stats_messages_mfstart_sent
和cluster_stats_messages_mfstart_received
: 暂停客户端以进行手动故障转移。cluster_stats_messages_module_sent
和cluster_stats_messages_module_received
: 模块集群 API 消息。cluster_stats_messages_publishshard_sent
和cluster_stats_messages_publishshard_received
:发布/订阅发布分片传播,参见 分片发布/订阅。
有关当前纪元和配置纪元变量的更多信息,请参阅 Redis 集群规范文档。
RESP2 回复
块字符串回复:命名字段和值的映射,以<field>:<value>
行的形式,由两个字节 CRLF
分隔。