Check replication info

Show master/replica role, replication offset, connected replicas

redis-cli -h redis INFO replication

tool
redis32 commands
tags
redismonitoring

More redis commands

  • redis-cli -h redis --scan --pattern 'session:*' | head -20

    Non-blocking key scan by pattern (prefer over KEYS in production)

  • redis-cli -h redis TTL <key>

    Remaining TTL in seconds; -1 = no expiry, -2 = not found

  • redis-cli MONITOR | grep -v PING

    Stream every command sent to Redis (exclude health pings)

  • redis-cli SLOWLOG GET 20

    Last 20 slow commands with execution time in microseconds

  • redis-cli --scan --pattern 'session:*' | xargs -n1 redis-cli MEMORY USAGE | awk '{sum+=$1} END{print sum/1024/1024" MB"}'

    Total memory consumed by keys matching a pattern

all 32 redis commands