This section covers the most important Redis commands that we have not previously explained. These commands are very helpful in a variety of situations, including obtaining a list of clients connected to the server, monitoring the health of a Redis server, expiring keys, and migrating keys to a remote server. All the examples in this section use redis-cli.
The INFO command returns all Redis server statistics, including information about the Redis version, operating system, connected clients, memory usage, persistence, replication, and keyspace. By default, the INFO command shows all available sections: memory, persistence, CPU, command, cluster, clients, and replication. You can also restrict the output by specifying the section name as a parameter:
127.0.0.1:6379> INFO memory
# Memory
used_memory:354923856
used_memory_human:338.48M
used_memory_rss:468979712
used_memory_peak:423014496
used_memory_peak_human:403.42M
used_memory_lua:33792
mem_fragmentation_ratio...