Redis CLI Cheatsheet
Top commands.
Overview
Redis operations live in the CLI. The cheatsheet captures the patterns operators actually use during investigation; CLI fluency reduces MTTR more than any dashboard.
- Top commands.
INFO,MONITOR,SLOWLOG,CLIENT LIST; the working set for any incident. - INFO sections. Memory, replication, clients, persistence; the four panes that surface most issues.
- SLOWLOG GET. Slowest commands recorded; the first investigation move when latency spikes.
- --scan. Non-blocking key iteration; replaces the dangerous
KEYScommand in production.
The approach
The practical approach is INFO-first, SLOWLOG for performance, SCAN not KEYS. The team's discipline produces fast investigation under pressure.
- INFO memory.
redis-cli INFO memory; memory pressure check; investigation starts here. - SLOWLOG.
redis-cli SLOWLOG GET 10; top 10 slow commands; immediate performance signal. - CLIENT LIST.
redis-cli CLIENT LIST; active connections; debug stuck or runaway clients. - --scan.
redis-cli --scan --pattern 'user:*'; non-blocking pattern scan; never useKEYSon a busy box.
Why this compounds
redis-cli fluency compounds. Each investigation grows the team's caching expertise; the discipline matures over years, not months.
- Faster debugging. Fluent CLI produces fast root cause; MTTR drops as muscle memory builds.
- Cache hygiene. SLOWLOG catches expensive operations before they become incidents.
- Stability. SCAN replaces dangerous KEYS; one less foot-gun in the production toolkit.
- Compounding knowledge. Each command teaches Redis patterns; the team's caching expertise grows with use.