Memory usage of key

Show bytes consumed by a specific key

redis-cli -h redis MEMORY USAGE <key>

tool
redis32 commands
tags
redisdebug

More redis commands

  • redis-cli -h redis FLUSHDB ASYNC

    Delete all keys in current DB asynchronously

  • redis-cli -h redis BGSAVE

    Trigger background RDB snapshot save

  • redis-cli -h redis INFO replication

    Show master/replica role, replication offset, connected replicas

  • 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

all 32 redis commands