Challenge - 5 Problems
Redis INFO Command Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of INFO command for memory stats
What is the output of the following Redis command snippet when querying memory stats?
Assume Redis server is running normally with some keys stored.
INFO memoryAssume Redis server is running normally with some keys stored.
Redis
INFO memory
Attempts:
2 left
💡 Hint
INFO command sections are divided by categories like memory, server, clients, etc.
✗ Incorrect
The INFO memory command returns memory-related statistics as plain text lines with key:value pairs, including used_memory and fragmentation ratio. It does not return JSON or errors if Redis is running.
🧠 Conceptual
intermediate1:30remaining
Understanding INFO command sections
Which of the following is NOT a valid section you can query with the Redis INFO command?
Attempts:
2 left
💡 Hint
Check Redis documentation for INFO command sections.
✗ Incorrect
Redis INFO command supports sections like server, clients, memory, persistence, stats, replication, cpu, commandstats, cluster, and keyspace. 'network' is not a valid section.
❓ Troubleshoot
advanced2:00remaining
Diagnosing missing INFO command output
You run
INFO on your Redis server but get an empty response. What is the most likely cause?Redis
INFO
Attempts:
2 left
💡 Hint
Check your connection and server status.
✗ Incorrect
If INFO returns empty, it usually means no Redis server is responding on that port. Protected mode or authentication issues cause errors, not empty output. Having no data still returns INFO output.
✅ Best Practice
advanced1:30remaining
Using INFO command for monitoring in production
Which practice is best when using the Redis INFO command for monitoring in a production environment?
Attempts:
2 left
💡 Hint
Consider performance impact and usefulness of data.
✗ Incorrect
Running INFO too frequently can add load. Periodic checks balance data freshness and performance. Logs alone do not provide detailed metrics.
🔀 Workflow
expert2:30remaining
Interpreting INFO command output for memory troubleshooting
Given this snippet of Redis INFO memory output:
What does this indicate about Redis memory usage?
used_memory:10485760 used_memory_rss:20971520 mem_fragmentation_ratio:2.0
What does this indicate about Redis memory usage?
Redis
INFO memory
Attempts:
2 left
💡 Hint
Compare used_memory and used_memory_rss values and fragmentation ratio.
✗ Incorrect
used_memory_rss is the actual memory allocated by OS. A fragmentation ratio of 2.0 means Redis is using twice the memory it needs, indicating fragmentation or overhead.