Monitor real-time commands redis
Stream every command sent to Redis (exclude health pings)
redis-cli MONITOR | grep -v PING
more redis
all 32 commands →
Show slow query log
redis-cli SLOWLOG GET 20
Memory usage per key pattern
redis-cli --scan --pattern 'session:*' | xargs -n1 redis-cli MEMORY USAGE | awk '{sum+=$1} END{print sum/1024/1024" MB"}'
Delete keys by pattern
redis-cli --scan --pattern 'cache:*' | xargs -r redis-cli DEL
Set key with TTL
redis-cli SET mykey 'value' EX 3600
Increment counter
redis-cli INCRBY counter:hits 1