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 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.5.13
redis_git_sha1:2812b945
redis_git_dirty:0
os:Linux 2.6.32.16-linode28 i686
arch_bits:32
multiplexing_api:epoll
gcc_version:4.4.1
process_id:8107
run_id:2e0192d968d1d4a36a927413d3b4ae4aa46e7ccd
tcp_port:6379
uptime_in_seconds:10952492
uptime_in_days:126
lru_clock:599409

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

# Memory
used_memory:1386912
used_memory_human:1.32M
used_memory_rss:2199552
used_memory_peak:1737576
used_memory_peak_human:1.66M
used_memory_lua:20480
mem_fragmentation_ratio:1.59
mem_allocator:jemalloc-3.0.0

# Persistence
loading:0
rdb_changes_since_last_save:548
rdb_bgsave_in_progress:0
rdb_last_save_time:1369142608
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

# Stats
total_connections_received:4879
total_commands_processed:28175995
instantaneous_ops_per_sec:5
rejected_connections:0
expired_keys:27713
evicted_keys:0
keyspace_hits:6821542
keyspace_misses:1681933
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:1169

# Replication
role:master
connected_slaves:0

# CPU
used_cpu_sys:3179.34
used_cpu_user:1435.08
used_cpu_sys_children:176.62
used_cpu_user_children:426.24

# Keyspace
db0:keys=10610,expires=0
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