Redis Sentinel 查看状态
Jihongchang(讨论 | 贡献)2023年2月19日 (日) 09:59的版本
F:\下载目录\Redis-x64-5.0.14.1>.\redis-cli.exe -p 5000
127.0.0.1:5000> sentinel master mymaster
1) "name"
2) "mymaster"
3) "ip"
4) "127.0.0.1"
5) "port"
6) "6379"
7) "runid"
8) "8e5d6f9e1ae1b5d3667bd30be16cc87ba69a20aa"
9) "flags"
10) "master"
11) "link-pending-commands"
12) "0"
13) "link-refcount"
14) "1"
15) "last-ping-sent"
16) "0"
17) "last-ok-ping-reply"
18) "37"
19) "last-ping-reply"
20) "37"
21) "down-after-milliseconds"
22) "5000"
23) "info-refresh"
24) "2407"
25) "role-reported"
26) "master"
27) "role-reported-time"
28) "845845"
29) "config-epoch"
30) "0"
31) "num-slaves"
32) "1"
33) "num-other-sentinels"
34) "2"
35) "quorum"
36) "2"
37) "failover-timeout"
38) "60000"
39) "parallel-syncs"
40) "1"
127.0.0.1:5000>
-p 后面跟的端口是在 sentinel 启动配置文件中的端口
num-other-sentinels 是除当前之外的其他 sentinel 节点数