简体   繁体   English

如何知道 redis 中主站的连接从站?

[英]How to know connected slaves to a master in redis?

In redis-cli in master system, what command is used to know the list of slaves connected to the master.在master系统的redis-cli中,用什么命令可以知道连接到master的slave列表。

I only got command to know the status of a server.我只有命令知道服务器的状态。

To know the status of current server, open redis-cli:要了解当前服务器的状态,请打开 redis-cli:

> role

1) "master" 1)“大师”

2) (integer) 196364 2)(整数)196364

3) 1) 3) 1)

 1) "192.168.1.90" 2) "6379" 3) "196364"

2) 2)

 1) "192.168.1.7" 2) "6379" 3) "196364"

The easiest way to list all replicas connected to a Redis master is by with the CLIENT LIST command, ie:列出连接到 Redis 主节点的所有副本的最简单方法是使用CLIENT LIST命令,即:

CLIENT LIST TYPE replica

Note: the TYPE subscommand was added in v5.注意: TYPE子命令是在 v5 中添加的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM