Memory usage of key
Show bytes consumed by a specific key
redis-cli -h redis MEMORY USAGE <key>
- tool
- redis32 commands
More redis commands
-
redis-cli -h redis FLUSHDB ASYNCDelete all keys in current DB asynchronously
-
redis-cli -h redis BGSAVETrigger background RDB snapshot save
-
redis-cli -h redis INFO replicationShow master/replica role, replication offset, connected replicas
-
redis-cli -h redis --scan --pattern 'session:*' | head -20Non-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