Redis

INFO [section]

The INFO command returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans.

The optional parameter can be used to select a specific section of information:

It can also take the following values:

When no parameter is provided, the default option is assumed.

Return value

Bulk string reply: as a collection of text lines.

Lines can contain a section name (starting with a # character) or a property. All the properties are in the form of field:value terminated by \r\n.

redis>  INFO
# Server
redis_version:2.9.999
redis_git_sha1:3bf72d0d
redis_git_dirty:0
redis_build_id:69b45658ca5a9e2d
redis_mode:standalone
os:Linux 3.13.7-x86_64-linode38 x86_64
arch_bits:32
multiplexing_api:epoll
gcc_version:4.4.1
process_id:14029
run_id:63bccba63aa231ac84b459af7a6ae34cb89caecd
tcp_port:6379
uptime_in_seconds:8860711
uptime_in_days:102
hz:10
lru_clock:4606632
config_file:/etc/redis/6379.conf

# Clients
connected_clients:8
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:41546144
used_memory_human:39.62M
used_memory_rss:50798592
used_memory_peak:48307064
used_memory_peak_human:46.07M
used_memory_lua:22528
mem_fragmentation_ratio:1.22
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:153
rdb_bgsave_in_progress:0
rdb_last_save_time:1413892710
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:8034
total_commands_processed:36865442
instantaneous_ops_per_sec:4
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:35842
evicted_keys:0
keyspace_hits:9777895
keyspace_misses:2478441
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:17869
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:7607.80
used_cpu_user:7223.71
used_cpu_sys_children:329.04
used_cpu_user_children:3167.82

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=218535,expires=200024,avg_ttl=6669747976
redis> 

Notes

Please note depending on the version of Redis some of the fields have been added or removed. A robust client application should therefore parse the result of this command by skipping unknown properties, and gracefully handle missing fields.

Here is the description of fields for Redis >= 2.4.

Here is the meaning of all fields in the server section:

Here is the meaning of all fields in the clients section:

Here is the meaning of all fields in the memory section:

Ideally, the used_memory_rss value should be only slightly higher than used_memory. When rss >> used, a large difference means there is memory fragmentation (internal or external), which can be evaluated by checking mem_fragmentation_ratio. When used >> rss, it means part of Redis memory has been swapped off by the operating system: expect some significant latencies.

Because Redis does not have control over how its allocations are mapped to memory pages, high used_memory_rss is often the result of a spike in memory usage.

When Redis frees memory, the memory is given back to the allocator, and the allocator may or may not give the memory back to the system. There may be a discrepancy between the used_memory value and memory consumption as reported by the operating system. It may be due to the fact memory has been used and released by Redis, but not given back to the system. The used_memory_peak value is generally useful to check this point.

Here is the meaning of all fields in the persistence section:

changes_since_last_save refers to the number of operations that produced some kind of changes in the dataset since the last time either SAVE or BGSAVE was called.

If AOF is activated, these additional fields will be added:

If a load operation is on-going, these additional fields will be added:

Here is the meaning of all fields in the stats section:

Here is the meaning of all fields in the replication section:

If the instance is a slave, these additional fields are provided:

If a SYNC operation is on-going, these additional fields are provided:

If the link between master and slave is down, an additional field is provided:

The following field is always provided:

For each slave, the following line is added:

Here is the meaning of all fields in the cpu section:

The commandstats section provides statistics based on the command type, including the number of calls, the total CPU time consumed by these commands, and the average CPU consumed per command execution.

For each command type, the following line is added:

The cluster section currently only contains a unique field:

The keyspace section provides statistics on the main dictionary of each database. The statistics are the number of keys, and the number of keys with an expiration.

For each database, the following line is added:

Comments powered by Disqus