Redis Stream信息查看

  • Redis Stream信息查看
  • xinfo


Redis Stream信息查看

xinfo

xinfo用于查看Stream、Group、Consumer信息。命令格式为:

xinfo [consumers key groupName] [groups key] [stream key] [help]
# 查看comsumer信息
127.0.0.1:6379[1]> xinfo consumers test g1
1) 1) "name"
   2) "cgj"
   3) "pending"
   4) (integer) 2
   5) "idle"
   6) (integer) 774090
2) 1) "name"
   2) "myt"
   3) "pending"
   4) (integer) 1
   5) "idle"
   6) (integer) 1181400

# 查看group信息
127.0.0.1:6379[1]> XINFO groups test
1) 1) "name"
   2) "cgj"
   3) "consumers"
   4) (integer) 0
   5) "pending"
   6) (integer) 0
   7) "last-delivered-id"
   8) "1578124740094-0"
2) 1) "name"
   2) "g1"
   3) "consumers"
   4) (integer) 2
   5) "pending"
   6) (integer) 3
   7) "last-delivered-id"
   8) "1578134897648-0"
3) 1) "name"
   2) "gq"
   3) "consumers"
   4) (integer) 0
   5) "pending"
   6) (integer) 0
   7) "last-delivered-id"
   8) "1578124740094-0"

# 查看stream信息
127.0.0.1:6379[1]> XINFO stream test
 1) "length"
 2) (integer) 10
 3) "radix-tree-keys"
 4) (integer) 1
 5) "radix-tree-nodes"
 6) (integer) 2
 7) "groups"
 8) (integer) 3
 9) "last-generated-id"
10) "1578134897648-0"
11) "first-entry"
12) 1) "1578117062045-0"
    2) 1) "firstName"
       2) "Guanjie"
       3) "lastName"
       4) "Cao"
13) "last-entry"
14) 1) "1578134897648-0"
    2) 1) "msg"
       2) "China"