Show slow log

Show the last 20 slow commands with execution time in microseconds

redis-cli SLOWLOG GET 20

tool
redis32 commands
tags
redisdebugmonitoring

More redis commands

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

    Show the total memory in MB used by keys that match a pattern

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

    Delete matching keys with SCAN instead of the blocking KEYS command

  • redis-cli SET mykey 'value' EX 3600

    Set a key that expires in 1 hour (EX is in seconds)

  • redis-cli INCRBY counter:hits 1

    Atomically add 1 to an integer counter

  • redis-cli PUBLISH events '{"type":"login","user":"alice"}'

    Publish a message to a Redis pub/sub channel

all 32 redis commands