Monitor real-time commands

Stream every command sent to Redis (exclude health pings)

redis-cli MONITOR | grep -v PING

tool
redis32 commands
tags
redisdebugmonitoring

More redis commands

  • 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

  • redis-cli --scan --pattern 'cache:*' | xargs -r redis-cli DEL

    Safely scan-delete matching keys without KEYS command

  • redis-cli SET mykey 'value' EX 3600

    Set key with 1-hour expiry (EX = seconds)

  • redis-cli INCRBY counter:hits 1

    Atomically increment an integer counter

all 32 redis commands