redis 集群命令

发布时间 2023-06-12 14:33:39作者: sky_cheng
172.28.17.243:6935> cluster info
cluster_state:ok
cluster_slots_assigend:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:5
cluster_my_epoch:4
cluster_stats_messages_ping_sent:430780
cluster_stats_messages_pong_sent:430697
cluster_stats_messages_sent:861477
cluster_stats_messages_ping_received:430697
cluster_stats_messages_pong_received:430775
cluster_stats_messages_received:861477

cluster_state:ok  #集群状态,ok:在线;fail:槽未分配或则无法联系到多数master节点

cluster_slots_assigend:16384   #已分配到集群节点的哈希槽数量(不是没有被绑定的数量)
cluster_slots_ok:16384            #正确分配的槽位,哈希槽状态不是FAIL 和 PFAIL 的数量.
cluster_slots_pfail:0                #哈希槽状态是否处于疑似下线状态。
cluster_slots_fail:0                 #哈希槽状态是否处于下线状态,集群节点将无法提供查询服务,除非cluster-require-full-coverage被设置为no  
cluster_known_nodes:6         #集群中节点数量(包括主从),包括处于握手状态还没有成为集群正式成员的节点.
cluster_size:3                        #几个节点被指派了槽。至少包含一个哈希槽且能够提供服务的master节点数量.
cluster_current_epoch:5      #集群当前的纪元。这个值在节点故障转移过程时有用,它总是递增和唯一的。
cluster_my_epoch:4             #节点当前所处的配置纪元,这个是关联在本节点的版本值.
cluster_stats_messages_ping_sent:430780  #发送的ping消息数量
cluster_stats_messages_pong_sent:430697 #发送的pong消息数量
cluster_stats_messages_sent:861477         #发送消息的数量.    
cluster_stats_messages_ping_received:430697  #接收的ping消息数量
cluster_stats_messages_pong_received:430775  #接收的pong消息数量
cluster_stats_messages_received:861477   #接受消息的数量