Redis Info Explanation¶
Overview¶
since
: 1.0.0Latest Redis version
: 8.2.xredis info
: https://redis.io/docs/latest/commands/info/summary
: Returns information and statistics about the server.-
syntax_fmt
: -
Time complexity
: O(1) ACL categories
: @slow, @dangerousarguments
: Starting with Redis version 7.0.0: Added support for taking multiple section arguments.
Section Intro¶
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:
server
: General information about the Redis server.clients
: Client connections section.memory
: Memory consumption related information.persistence
: RDB and AOF related information.threads
: I/O threads information, since8.0.x
.stats
: General statistics.replication
: Master/replica replication information.cpu
: CPU consumption statistics.commandstats
: Redis command statistics.latencystats
: Redis command latency percentile distribution statistics.sentinel
: Redis Sentinel section (only applicable to Sentinel instances).cluster
: Redis Cluster section.modules
: Modules section.keyspace
: Database related statistics.errorstats
: Redis error statistics.
It can also take the following values:
all
: Return all sections (excluding module generated ones)default
: Return only the default set of sectionseverything
: Includesall
andmodules
When no parameter is provided, the default
option is assumed.
Sections¶
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.
server¶
Here is the meaning of all fields in the server section:
server info¶
redis_version
: Version of the Redis server.redis_git_sha1
: Git SHA1.redis_git_dirty
: Git dirty flag.redis_build_id
: The build id.redis_mode
: The server's mode ("standalone", "sentinel" or "cluster").os
: Operating system hosting the Redis server.arch_bits
: Architecture (32 or 64 bits).multiplexing_api
: Event loop mechanism used by Redis.atomicvar_api
: Atomicvar API used by Redis.gcc_version
: Version of the GCC compiler used to compile the Redis server.process_id
: PID of the server process.process_supervised
: Supervised system ("upstart", "systemd", "unknown" or "no").run_id
: Random value identifying the Redis server (to be used by Sentinel and Cluster).tcp_port
: TCP/IP listen port.server_time_usec
: Epoch-based system time with microsecond precision.uptime_in_seconds
: Number of seconds since Redis server start.uptime_in_days
: Same value expressed in days.hz
: The server's current frequency setting.configured_hz
: The server's configured frequency setting.lru_clock
: Clock incrementing every minute, for LRU management.executable
: The path to the server's executable.config_file
: The path to the config file.io_threads_active
: Flag indicating if I/O threads are active.listener0
: since:7.4.x, name=tcp,bind=,bind=-::,port=6379shutdown_in_milliseconds
: The maximum time remaining for replicas to catch up the replication before completing the shutdown sequence. This field is only present during shutdown.
server example¶
# Server
redis_version:6.2.14
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:5d073c2412d25f13
redis_mode:standalone
os:Linux 4.18.0-193.6.3.el8_2.x86_64 x86_64
arch_bits:64
monotonic_clock:POSIX clock_gettime
multiplexing_api:epoll
atomicvar_api:c11-builtin
gcc_version:8.5.0
process_id:1656949
process_supervised:no
run_id:9e60675409920e591bbae224929ccd63885352b0
tcp_port:6379
server_time_usec:1756658838720399
uptime_in_seconds:8757315
uptime_in_days:101
hz:10
configured_hz:10
lru_clock:11828374
executable:/home/app/redis/./bin/redis-server
config_file:/home/app/redis/redis.conf
io_threads_active:0
# @since: 7.4.x
listener0:name=tcp,bind=*,bind=-::*,port=6379
clients¶
Here is the meaning of all fields in the clients section:
clients info¶
connected_clients
: Number of client connections (excluding connections from replicas).cluster_connections
: An approximation of the number of sockets used by the cluster's bus.maxclients
: The value of themaxclients
configuration directive. This is the upper limit for the sum ofconnected_clients
,connected_slaves
andcluster_connections
.client_recent_max_input_buffer
: Biggest input buffer among current client connections.client_recent_max_output_buffer
: Biggest output buffer among current client connections.blocked_clients
: Number of clients pending on a blocking call.tracking_clients
: Number of clients being tracked.clients_in_timeout_table
: Number of clients in the clients timeout table.pubsub_clients
: Number of clients in pubsub mode. Added in Redis 7.4.watching_clients
: Number of clients in watching mode. Added in Redis 7.4.total_watched_keys
: Number of watched keys. Added in Redis 7.4.total_blocking_keys
: Number of blocking keys. Added in Redis 7.2.total_blocking_keys_on_nokey
: Number of blocking keys that one or more clients that would like to be unblocked when the key is deleted. Added in Redis 7.2.
clients example¶
# Clients
connected_clients:1
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:20480
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0
# @since 7.x
pubsub_clients:0
watching_clients:0
total_watched_keys:0
total_blocking_keys:0
total_blocking_keys_on_nokey:0
memory¶
Here is the meaning of all fields in the memory section:
memory info¶
used_memory
: Total number of bytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc).used_memory_human
: Human readable representation of previous value.used_memory_rss
: Number of bytes that Redis allocated as seen by the operating system (a.k.a resident set size). This is the number reported by tools such astop(1)
andps(1)
.used_memory_rss_human
: Human readable representation of previous value.used_memory_peak
: Peak memory consumed by Redis (in bytes).used_memory_peak_human
: Human readable representation of previous value.used_memory_peak_perc
: The percentage ofused_memory
out ofused_memory_peak
.used_memory_overhead
: The sum in bytes of all overheads that the server allocated for managing its internal data structures.used_memory_startup
: Initial amount of memory consumed by Redis at startup in bytes.used_memory_dataset
: The size in bytes of the dataset (used_memory_overhead
subtracted fromused_memory
).used_memory_dataset_perc
: The percentage ofused_memory_dataset
out of the net memory usage (used_memory
minusused_memory_startup
).total_system_memory
: The total amount of memory that the Redis host has.total_system_memory_human
: Human readable representation of previous value.used_memory_lua
: Number of bytes used by the Lua engine for EVAL scripts. Deprecated in Redis 7.0, renamed toused_memory_vm_eval
.used_memory_vm_eval
: Number of bytes used by the script VM engines for EVAL framework (not part of used_memory). Added in Redis 7.0.used_memory_lua_human
: Human readable representation of previous value. Deprecated in Redis 7.0.used_memory_scripts_eval
: Number of bytes overhead by the EVAL scripts (part of used_memory). Added in Redis 7.0.number_of_cached_scripts
: The number of EVAL scripts cached by the server. Added in Redis 7.0.number_of_functions
: The number of functions. Added in Redis 7.0.number_of_libraries
: The number of libraries. Added in Redis 7.0.used_memory_vm_functions
: Number of bytes used by the script VM engines for Functions framework (not part of used_memory). Added in Redis 7.0.used_memory_vm_total
:used_memory_vm_eval
+used_memory_vm_functions
(not part of used_memory). Added in Redis 7.0.used_memory_vm_total_human
: Human readable representation of previous value.used_memory_functions
: Number of bytes overhead by Function scripts (part of used_memory). Added in Redis 7.0.used_memory_scripts
:used_memory_scripts_eval
+used_memory_functions
(part of used_memory). Added in Redis 7.0.used_memory_scripts_human
: Human readable representation of previous value.maxmemory
: The value of themaxmemory
configuration directive.maxmemory_human
: Human readable representation of previous value.maxmemory_policy
: The value of themaxmemory-policy
configuration directive.-
mem_fragmentation_ratio
: Ratio betweenused_memory_rss
andused_memory
.Note that this doesn't only includes fragmentation, but also other process overheads (see the
allocator_*
metrics), and also overheads like code, shared libraries, stack, etc. -
mem_fragmentation_bytes
: Delta betweenused_memory_rss
andused_memory
.Note that when the total fragmentation bytes is low (few megabytes), a high ratio (e.g. 1.5 and above) is not an indication of an issue.
-
allocator_frag_ratio:
: Ratio betweenallocator_active
andallocator_allocated
. This is the true (external) fragmentation metric (notmem_fragmentation_ratio
). allocator_frag_bytes
Delta betweenallocator_active
andallocator_allocated
. See note aboutmem_fragmentation_bytes
.allocator_rss_ratio
: Ratio betweenallocator_resident
andallocator_active
. This usually indicates pages that the allocator can and probably will soon release back to the OS.allocator_rss_bytes
: Delta betweenallocator_resident
andallocator_active
.rss_overhead_ratio
: Ratio betweenused_memory_rss
(the process RSS) andallocator_resident
. This includes RSS overheads that are not allocator or heap related.rss_overhead_bytes
: Delta betweenused_memory_rss
(the process RSS) andallocator_resident
.allocator_allocated
: Total bytes allocated form the allocator, including internal-fragmentation. Normally the same asused_memory
.allocator_active
: Total bytes in the allocator active pages, this includes external-fragmentation.allocator_resident
: Total bytes resident (RSS) in the allocator, this includes pages that can be released to the OS (by [MEMORY PURGE
], or just waiting).allocator_muzzy
: Total bytes of 'muzzy' memory (RSS) in the allocator. Muzzy memory is memory that has been freed, but not yet fully returned to the operating system. It can be reused immediately when needed or reclaimed by the OS when system pressure increases.mem_not_counted_for_evict
: Used memory that's not counted for key eviction. This is basically transient replica and AOF buffers.mem_clients_slaves
: Memory used by replica clients - Starting Redis 7.0, replica buffers share memory with the replication backlog, so this field can show 0 when replicas don't trigger an increase of memory usage.mem_clients_normal
: Memory used by normal clients.mem_cluster_links
: Memory used by links to peers on the cluster bus when cluster mode is enabled.mem_aof_buffer
: Transient memory used for AOF and AOF rewrite buffers.mem_replication_backlog
: Memory used by replication backlog.mem_total_replication_buffers
: Total memory consumed for replication buffers - Added in Redis 7.0.mem_allocator
: Memory allocator, chosen at compile time.mem_overhead_db_hashtable_rehashing
: Temporary memory overhead of database dictionaries currently being rehashed - Added in 7.4.active_defrag_running
: Whenactivedefrag
is enabled, this indicates whether defragmentation is currently active, and the CPU percentage it intends to utilize.lazyfree_pending_objects
: The number of objects waiting to be freed (as a result of calling [UNLINK
] and [FLUSHALL
] with the ASYNC option).lazyfreed_objects
: The number of objects that have been lazy freed.
memory additional notes¶
Ideally, the used_memory_rss
value should be only slightly higher than used_memory
.
- When rss >> used, a large difference may mean there is (external) memory fragmentation, which can be evaluated by checking
allocator_frag_ratio
,allocator_frag_bytes
. - 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.
Additional introspective information about the server's memory can be obtained by referring to the [MEMORY STATS
] command and the [MEMORY DOCTOR
].
memory example¶
# redis 7.4.2
# Memory
used_memory:1011968
used_memory_human:988.25K
used_memory_rss:3575808
used_memory_rss_human:3.41M
used_memory_peak:1011968
used_memory_peak_human:988.25K
used_memory_peak_perc:100.23%
used_memory_overhead:984256
used_memory_startup:946296
used_memory_dataset:27712
used_memory_dataset_perc:42.20%
allocator_allocated:1514560
allocator_active:1863680
allocator_resident:4702208
allocator_muzzy:0
total_system_memory:3873468416
total_system_memory_human:3.61G
used_memory_lua:31744
used_memory_vm_eval:31744
used_memory_lua_human:31.00K
used_memory_scripts_eval:0
number_of_cached_scripts:0
number_of_functions:0
number_of_libraries:0
used_memory_vm_functions:32768
used_memory_vm_total:64512
used_memory_vm_total_human:63.00K
used_memory_functions:192
used_memory_scripts:192
used_memory_scripts_human:192B
maxmemory:1073741824
maxmemory_human:1.00G
maxmemory_policy:allkeys-lru
allocator_frag_ratio:1.26
allocator_frag_bytes:273088
allocator_rss_ratio:2.52
allocator_rss_bytes:2838528
rss_overhead_ratio:0.76
rss_overhead_bytes:-1126400
mem_fragmentation_ratio:3.54
mem_fragmentation_bytes:2566256
mem_not_counted_for_evict:8
mem_replication_backlog:0
mem_total_replication_buffers:0
mem_clients_slaves:0
mem_clients_normal:37760
mem_cluster_links:0
mem_aof_buffer:8
mem_allocator:jemalloc-5.3.0
mem_overhead_db_hashtable_rehashing:0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0
persistence¶
Here is the meaning of all fields in the persistence section:
persistence info¶
loading
: Flag indicating if the load of a dump file is on-going.async_loading
: Currently loading replication data-set asynchronously while serving old data. This meansrepl-diskless-load
is enabled and set toswapdb
. Added in Redis 7.0.current_cow_peak
: The peak size in bytes of copy-on-write memory while a child fork is running.current_cow_size
: The size in bytes of copy-on-write memory while a child fork is running.current_cow_size_age
: The age, in seconds, of thecurrent_cow_size
value.current_fork_perc
: The percentage of progress of the current fork process. For AOF and RDB forks it is the percentage ofcurrent_save_keys_processed
out ofcurrent_save_keys_total
.current_save_keys_processed
: Number of keys processed by the current save operation.current_save_keys_total
: Number of keys at the beginning of the current save operation.rdb_changes_since_last_save
: Number of changes since the last dump.rdb_bgsave_in_progress
: Flag indicating a RDB save is on-going.rdb_last_save_time
: Epoch-based timestamp of last successful RDB save.rdb_last_bgsave_status
: Status of the last RDB save operation.rdb_last_bgsave_time_sec
: Duration of the last RDB save operation in seconds.rdb_current_bgsave_time_sec
: Duration of the on-going RDB save operation if any.rdb_last_cow_size
: The size in bytes of copy-on-write memory during the last RDB save operation.rdb_last_load_keys_expired
: Number of volatile keys deleted during the last RDB loading. Added in Redis 7.0.rdb_last_load_keys_loaded
: Number of keys loaded during the last RDB loading. Added in Redis 7.0.aof_enabled
: Flag indicating AOF logging is activated.aof_rewrite_in_progress
: Flag indicating a AOF rewrite operation is on-going.aof_rewrite_scheduled
: Flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete.aof_last_rewrite_time_sec
: Duration of the last AOF rewrite operation in seconds.aof_current_rewrite_time_sec
: Duration of the on-going AOF rewrite operation if any.aof_last_bgrewrite_status
: Status of the last AOF rewrite operation.aof_last_write_status
: Status of the last write operation to the AOF.aof_last_cow_size
: The size in bytes of copy-on-write memory during the last AOF rewrite operation.module_fork_in_progress
: Flag indicating a module fork is on-going.module_fork_last_cow_size
: The size in bytes of copy-on-write memory during the last module fork operation.aof_rewrites
: Number of AOF rewrites performed since startup.rdb_saves
: Number of RDB snapshots performed since startup.
persistence additional notes¶
rdb_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:
aof_current_size
: AOF current file size.aof_base_size
: AOF file size on latest startup or rewrite.aof_pending_rewrite
: Flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete.aof_buffer_length
: Size of the AOF buffer.aof_rewrite_buffer_length
: Size of the AOF rewrite buffer. Note this field was removed in Redis 7.0.aof_pending_bio_fsync
: Number of fsync pending jobs in background I/O queue.aof_delayed_fsync
: Delayed fsync counter.
If a load operation is on-going, these additional fields will be added:
loading_start_time
: Epoch-based timestamp of the start of the load operation.loading_total_bytes
: Total file size.loading_rdb_used_mem
: The memory usage of the server that had generated the RDB file at the time of the file's creation.loading_loaded_bytes
: Number of bytes already loaded.loading_loaded_perc
: Same value expressed as a percentage.loading_eta_seconds
: ETA in seconds for the load to be complete.
persistence example¶
# redis 7.4.2
# Persistence
loading:0
async_loading:0
current_cow_peak:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1742663640
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_saves:0
rdb_last_cow_size:0
rdb_last_load_keys_expired:0
rdb_last_load_keys_loaded:0
aof_enabled:1
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_rewrites:0
aof_rewrites_consecutive_failures:0
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0
aof_current_size:0
aof_base_size:0
aof_pending_rewrite:0
aof_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0
threads¶
@Since: 8.0.x
The threads section provides statistics on I/O threads.
The statistics are the number of assigned clients, the number of read events processed, and the number of write events processed. Added in Redis 8.0.
For each I/O thread, the following line is added:
io_thread_XXX
:clients=XXX,reads=XXX,writes=XXX
stats¶
Here is the meaning of all fields in the stats section:
stats info¶
total_connections_received
: Total number of connections accepted by the server.total_commands_processed
: Total number of commands processed by the server.instantaneous_ops_per_sec
: Number of commands processed per second.total_net_input_bytes
: The total number of bytes read from the network.total_net_output_bytes
: The total number of bytes written to the network.total_net_repl_input_bytes
: The total number of bytes read from the network for replication purposes.total_net_repl_output_bytes
: The total number of bytes written to the network for replication purposes.instantaneous_input_kbps
: The network's read rate per second in KB/sec.instantaneous_output_kbps
: The network's write rate per second in KB/sec.instantaneous_input_repl_kbps
: The network's read rate per second in KB/sec for replication purposes.instantaneous_output_repl_kbps
: The network's write rate per second in KB/sec for replication purposes.rejected_connections
: Number of connections rejected because ofmaxclients
limit.sync_full
: The number of full resyncs with replicas.sync_partial_ok
: The number of accepted partial resync requests.sync_partial_err
: The number of denied partial resync requests.expired_subkeys
: The number of hash field expiration events.expired_keys
: Total number of key expiration events.expired_stale_perc
: The percentage of keys probably expired.expired_time_cap_reached_count
: The count of times that active expiry cycles have stopped early.expire_cycle_cpu_milliseconds
: The cumulative amount of time spent on active expiry cycles.evicted_keys
: Number of evicted keys due tomaxmemory
limit.evicted_clients
: Number of evicted clients due tomaxmemory-clients
limit. Added in Redis 7.0.evicted_scripts
: Number of evicted EVAL scripts due to LRU policy, see [EVAL
] for more details. Added in Redis 7.4.total_eviction_exceeded_time
: Total timeused_memory
was greater thanmaxmemory
since server startup, in milliseconds.current_eviction_exceeded_time
: The time passed sinceused_memory
last rose abovemaxmemory
, in milliseconds.keyspace_hits
: Number of successful lookup of keys in the main dictionary.keyspace_misses
: Number of failed lookup of keys in the main dictionary.pubsub_channels
: Global number of pub/sub channels with client subscriptions.pubsub_patterns
: Global number of pub/sub pattern with client subscriptions.pubsubshard_channels
: Global number of pub/sub shard channels with client subscriptions. Added in Redis 7.0.3.latest_fork_usec
: Duration of the latest fork operation in microseconds.total_forks
: Total number of fork operations since the server start.migrate_cached_sockets
: The number of sockets open for [MIGRATE
] purposes.slave_expires_tracked_keys
: The number of keys tracked for expiry purposes (applicable only to writable replicas).active_defrag_hits
: Number of value reallocations performed by active the defragmentation process.active_defrag_misses
: Number of aborted value reallocations started by the active defragmentation process.active_defrag_key_hits
: Number of keys that were actively defragmented.active_defrag_key_misses
: Number of keys that were skipped by the active defragmentation process.total_active_defrag_time
: Total time memory fragmentation was over the limit, in milliseconds.current_active_defrag_time
: The time passed since memory fragmentation last was over the limit, in milliseconds.tracking_total_keys
: Number of keys being tracked by the server.tracking_total_items
: Number of items, that is the sum of clients number for each key, that are being tracked.tracking_total_prefixes
: Number of tracked prefixes in server's prefix table (only applicable for broadcast mode).unexpected_error_replies
: Number of unexpected error replies, that are types of errors from an AOF load or replication.total_error_replies
: Total number of issued error replies, that is the sum of rejected commands (errors prior command execution) and failed commands (errors within the command execution).dump_payload_sanitizations
: Total number of dump payload deep integrity validations (seesanitize-dump-payload
config).total_reads_processed
: Total number of read events processed.total_writes_processed
: Total number of write events processed.io_threaded_reads_processed
: Number of read events processed by I/O threads.io_threaded_writes_processed
: Number of write events processed by I/O threads.client_query_buffer_limit_disconnections
: Total number of disconnections due to client reaching query buffer limit.client_output_buffer_limit_disconnections
: Total number of disconnections due to client reaching output buffer limit.reply_buffer_shrinks
: Total number of output buffer shrinks.reply_buffer_expands
: Total number of output buffer expands.eventloop_cycles
: Total number of eventloop cycles.eventloop_duration_sum
: Total time spent in the eventloop in microseconds (including I/O and command processing).eventloop_duration_cmd_sum
: Total time spent on executing commands in microseconds.instantaneous_eventloop_cycles_per_sec
: Number of eventloop cycles per second.instantaneous_eventloop_duration_usec
: Average time spent in a single eventloop cycle in microseconds.acl_access_denied_auth
: Number of authentication failures.acl_access_denied_cmd
: Number of commands rejected because of access denied to the command.acl_access_denied_key
: Number of commands rejected because of access denied to a key.acl_access_denied_channel
: Number of commands rejected because of access denied to a channel.
stats example¶
# 7.4.2
# Stats
total_connections_received:12
total_commands_processed:1
instantaneous_ops_per_sec:0
total_net_input_bytes:120
total_net_output_bytes:379
total_net_repl_input_bytes:0
total_net_repl_output_bytes:0
instantaneous_input_kbps:0.01
instantaneous_output_kbps:0.00
instantaneous_input_repl_kbps:0.00
instantaneous_output_repl_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_subkeys:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:243605
evicted_keys:0
evicted_clients:0
evicted_scripts:0
total_eviction_exceeded_time:0
current_eviction_exceeded_time:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
pubsubshard_channels:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
total_active_defrag_time:0
current_active_defrag_time:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:11
dump_payload_sanitizations:0
total_reads_processed:24
total_writes_processed:12
io_threaded_reads_processed:0
io_threaded_writes_processed:0
client_query_buffer_limit_disconnections:0
client_output_buffer_limit_disconnections:0
reply_buffer_shrinks:0
reply_buffer_expands:0
eventloop_cycles:139457671
eventloop_duration_sum:29160864237
eventloop_duration_cmd_sum:28
instantaneous_eventloop_cycles_per_sec:9
instantaneous_eventloop_duration_usec:206
acl_access_denied_auth:0
acl_access_denied_cmd:0
acl_access_denied_key:0
acl_access_denied_channel:0
replication¶
Here is the meaning of all fields in the replication section:
replication info¶
-
role
: Value is "master" if the instance is replica of no one, or "slave" if the instance is a replica of some master instance.Note that a replica can be master of another replica (chained replication).
-
master_failover_state
: The state of an ongoing failover, if any. master_replid
: The replication ID of the Redis server.master_replid2
: The secondary replication ID, used for PSYNC after a failover.master_repl_offset
: The server's current replication offset.second_repl_offset
: The offset up to which replication IDs are accepted.repl_backlog_active
: Flag indicating replication backlog is active.repl_backlog_size
: Total size in bytes of the replication backlog buffer.repl_backlog_first_byte_offset
: The master offset of the replication backlog buffer.repl_backlog_histlen
: Size in bytes of the data in the replication backlog buffer.
If the instance is a replica, these additional fields are provided:
master_host
: Host or IP address of the master.master_port
: Master listening TCP port.master_link_status
: Status of the link (up/down).master_last_io_seconds_ago
: Number of seconds since the last interaction with master.master_sync_in_progress
: Indicate the master is syncing to the replica.slave_read_repl_offset
: The read replication offset of the replica instance.slave_repl_offset
: The replication offset of the replica instance.slave_priority
: The priority of the instance as a candidate for failover.slave_read_only
: Flag indicating if the replica is read-only.replica_announced
: Flag indicating if the replica is announced by Sentinel.
If a SYNC operation is on-going, these additional fields are provided:
master_sync_total_bytes
: Total number of bytes that need to be transferred. this may be 0 when the size is unknown (for example, when therepl-diskless-sync
configuration directive is used).master_sync_read_bytes
: Number of bytes already transferred.master_sync_left_bytes
: Number of bytes left before syncing is complete (may be negative whenmaster_sync_total_bytes
is 0).master_sync_perc
: The percentagemaster_sync_read_bytes
frommaster_sync_total_bytes
, or an approximation that usesloading_rdb_used_mem
whenmaster_sync_total_bytes
is 0.master_sync_last_io_seconds_ago
: Number of seconds since last transfer I/O during a SYNC operation.
If the link between master and replica is down, an additional field is provided:
master_link_down_since_seconds
: Number of seconds since the link is down.
The following field is always provided:
connected_slaves
: Number of connected replicas.
If the server is configured with the min-slaves-to-write
(or starting with Redis 5 with the min-replicas-to-write
) directive, an additional field is provided:
min_slaves_good_slaves
: Number of replicas currently considered good.
For each replica, the following line is added:
slaveXXX
: id, IP address, port, state, offset, lag
replication example¶
# 7.4.2
# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:f005a96c65f06fcefc77b4854aaf43090a002765
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
cpu¶
Here is the meaning of all fields in the cpu section:
cpu info¶
used_cpu_sys
: System CPU consumed by the Redis server, which is the sum of system CPU consumed by all threads of the server process (main thread and background threads).used_cpu_user
: User CPU consumed by the Redis server, which is the sum of user CPU consumed by all threads of the server process (main thread and background threads).used_cpu_sys_children
: System CPU consumed by the background processes.used_cpu_user_children
: User CPU consumed by the background processes.used_cpu_sys_main_thread
: System CPU consumed by the Redis server main thread.used_cpu_user_main_thread
: User CPU consumed by the Redis server main thread.
cpu example¶
# CPU
used_cpu_sys:4752.915327
used_cpu_user:26024.813495
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
used_cpu_sys_main_thread:4752.915159
used_cpu_user_main_thread:26024.811598
commandstats¶
The commandstats section provides statistics based on the command type, including the number of calls that reached command execution (not rejected), the total CPU time consumed by these commands, the average CPU consumed per command execution, the number of rejected calls (errors prior command execution), and the number of failed calls (errors within the command execution).
For each command type, the following line is added:
cmdstat_XXX
:calls=XXX,usec=XXX,usec_per_call=XXX,rejected_calls=XXX,failed_calls=XXX
latencystats¶
The latencystats section provides latency percentile distribution statistics based on the command type.
By default, the exported latency percentiles are the p50, p99, and p999.
If you need to change the exported percentiles, use CONFIG SET latency-tracking-info-percentiles "50.0 99.0 99.9"
.
This section requires the extended latency monitoring feature to be enabled (by default it's enabled).
If you need to enable it, use CONFIG SET latency-tracking yes
.
For each command type, the following line is added:
latency_percentiles_usec_XXX: p<percentile 1>=<percentile 1 value>,p<percentile 2>=<percentile 2 value>,...
errorstats¶
The errorstats section enables keeping track of the different errors that occurred within Redis, based upon the reply error prefix ( The first word after the "-", up to the first space. Example: ERR
).
For each error type, the following line is added:
errorstat_XXX
:count=XXX
If the server detects that this section was flooded with an excessive number of errors, it will be disabled, show a single ERRORSTATS_DISABLED
error, and print the errors to the server log.
This can be reset by CONFIG RESETSTAT
.
sentinel¶
The sentinel section is only available in Redis Sentinel instances. It consists of the following fields:
sentinel info¶
sentinel_masters
: Number of Redis masters monitored by this Sentinel instance.sentinel_tilt
: A value of 1 means this sentinel is in TILT mode.sentinel_tilt_since_seconds
: Duration in seconds of current TILT, or -1 if not TILTed. Added in Redis 7.0.0.sentinel_total_tilt
: The number of times this sentinel has been in TILT mode since running.sentinel_running_scripts
: The number of scripts this Sentinel is currently executing.sentinel_scripts_queue_length
: The length of the queue of user scripts that are pending execution.sentinel_simulate_failure_flags
: Flags for theSENTINEL SIMULATE-FAILURE
command.
cluster¶
The cluster section currently only contains a unique field:
cluster_enabled
: Indicate Redis cluster is enabled
modules¶
The modules section contains additional information about loaded modules if the modules provide it. The field part of property lines in this section are always prefixed with the module's name.
Redis Query Engine fields
search_gc_bytes_collected
: The total amount of memory freed by the garbage collectors from indexes in the shard's memory in bytes.search_bytes_collected
: The total amount of memory freed by the garbage collectors from indexes in the shard's memory in bytes. Deprecated in 8.0 (renamedsearch_gc_bytes_collected
), but still available in older versions.search_gc_marked_deleted_vectors
: The number of vectors marked as deleted in the vector indexes that have not yet been cleaned.search_marked_deleted_vectors
: The number of vectors marked as deleted in the vector indexes that have not yet been cleaned. Deprecated in 8.0 (renamedsearch_gc_marked_delete_vectors
), but still available in older versions.search_gc_total_cycles
: The total number of garbage collection cycles executed.search_total_cycles
: The total number of garbage collection cycles executed. Deprecated in 8.0 (renamedsearch_gc_total_cycles
), but still available in older versions.search_gc_total_docs_not_collected_by_gc
: The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector.search_total_docs_not_collected_by_gc
: The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector. Deprecated in 8.0 (renamedsearch_gc_total_docs_not_collected
), but still available in older versions.search_gc_total_ms_run
: The total duration of all garbage collection cycles in the shard, measured in milliseconds.-
search_total_ms_run
: The total duration of all garbage collection cycles in the shard, measured in milliseconds. Deprecated in 8.0 (renamedsearch_gc_total_ms_run
), but still available in older versions. -
search_cursors_internal_idle
: The total number of coordinator cursors that are currently holding pending results in the shard. search_cursors_user_idle
: The total number of cursors that were explicitly requested by users, that are currently holding pending results in the shard.search_global_idle
: The total number of user and internal cursors currently holding pending results in the shard. Deprecated in 8.0 (split intosearch_cursors_internal_idle
andsearch_cursors_user_idle
) but still available in older versions.search_cursors_internal_active
: The total number of coordinator cursors in the shard, either holding pending results or actively executingFT.CURSOR READ
.search_cursors_user_active
: The total number of user cursors in the shard, either holding pending results or actively executingFT.CURSOR READ
.search_global_total
: The total number of user and internal cursors in the shard, either holding pending results or actively executingFT.CURSOR READ
. Deprecated in 8.0 (split intosearch_cursors_internal_active
andsearch_cursors_user_active
), but still available in older versions.search_number_of_indexes
: 分片中的索引总数。search_number_of_active_indexes
: 正在运行后台索引和/或后台查询处理操作的索引总数。后台索引指的是向量摄入过程或正在进行的后台索引器。search_number_of_active_indexes_running_queries
: 当前正在运行后台查询过程的索引总数。search_number_of_active_indexes_indexing
: 当前正在进行后台索引过程的索引总数。后台索引指的是向量摄入过程或正在进行的后台索引器。此指标受为写入操作分配的 WORKER 线程数量和索引数量的限制。search_total_active_write_threads
: 分片中当前正在运行的后台写入(索引)进程总数。后台索引指的是向量摄入过程或正在进行的后台索引器。此指标受为写入操作分配的线程数量的限制。search_fields_text_Text
: 分片中所有索引的TEXT
字段总数。search_fields_text_Sortable
: 分片中所有索引的SORTABLE TEXT
字段总数。仅当其值大于 0 时才出现。search_fields_text_NoIndex
: 分片中所有索引的NOINDEX TEXT
字段总数,这些字段仅用于排序但未被索引。仅当其值大于 0 时才出现。search_fields_numeric_Numeric
: 分片中所有索引的NUMERIC
字段总数。search_fields_numeric_Sortable
: 分片中所有索引的SORTABLE NUMERIC
字段总数。仅当其值大于 0 时才出现。search_fields_numeric_NoIndex
: 分片中所有索引的NOINDEX NUMERIC
字段总数;即仅用于排序但未被索引。仅当其值大于 0 时才出现。search_fields_tag_Tag
: 分片中所有索引的TAG
字段总数。search_fields_tag_Sortable
: 分片中所有索引的SORTABLE TAG
字段总数。仅当其值大于 0 时才出现。search_fields_tag_NoIndex
: 分片中所有索引的NOINDEX TAG
字段总数;即仅用于排序但未被索引。仅当其值大于 0 时才出现。search_fields_tag_CaseSensitive
: 分片中所有索引的CASESENSITIVE TAG
字段总数。仅当其值大于 0 时才出现。search_fields_geo_Geo
: 分片中所有索引的GEO
字段总数。search_fields_geo_Sortable
: 分片中所有索引的SORTABLE GEO
字段总数。仅当其值大于 0 时才出现。search_fields_geo_NoIndex
: 分片中所有索引的NOINDEX GEO
字段总数;即仅用于排序但未被索引。仅当其值大于 0 时才出现。search_fields_vector_Vector
: 分片中所有索引的VECTOR
字段总数。search_fields_vector_Flat
: 分片中所有索引的FLAT VECTOR
字段总数。search_fields_vector_HNSW
: 分片中所有索引的HNSW VECTOR
字段总数。search_fields_geoshape_Geoshape
: 分片中所有索引的GEOSHAPE
字段总数。search_fields_geoshape_Sortable
: 分片中所有索引的SORTABLE GEOSHAPE
字段总数。仅当其值大于 0 时才出现。search_fields_geoshape_NoIndex
: 分片中所有索引的NOINDEX GEOSHAPE
字段总数;即仅用于排序但未被索引。仅当其值大于 0 时才出现。search_fields_<field>_IndexErrors
:尝试索引包含<field>
字段的文档导致的索引失败总数。search_used_memory_indexes
: 分片中所有索引分配的总内存(以字节为单位)。search_used_memory_indexes_human
: 分片中所有索引分配的总内存(以 MB 为单位)。search_smallest_memory_index
: 分片中内存使用最少的索引的内存使用量(以字节为单位)。search_smallest_memory_index_human
: 分片中内存使用最少的索引的内存使用量(以 MB 为单位)。search_largest_memory_index
: 分片中内存使用最多的索引的内存使用量(以字节为单位)。search_largest_memory_index_human
:分片中内存使用最多的索引的内存使用量(以 MB 为单位)。search_total_indexing_time
: 在索引操作上花费的总时间,不包括HNSW
图中向量的后台索引。search_used_memory_vector_index
: 分片中所有向量索引的总内存使用量。search_bytes_collected
: 垃圾回收器从分片内存中的索引释放的总内存量(以字节为单位)。search_total_cycles
: 执行的垃圾回收周期总数。search_total_ms_run
: 分片中所有垃圾回收周期的总持续时间(以毫秒为单位)。search_total_docs_not_collected_by_gc
: 标记为已删除但其内存尚未被垃圾回收器释放的文档数量。search_marked_deleted_vectors
: 在向量索引中标记为已删除但尚未清理的向量数量。search_total_queries_processed
: 成功执行的查询总数(使用游标时,不计算从现有游标读取)在分片中。search_total_query_commands
: 成功执行的查询命令总数(包括FT.SEARCH
、FT.AGGREGATE
和FT.CURSOR READ
)。search_total_query_execution_time_ms
: 所有查询命令(包括FT.SEARCH
、FT.AGGREGATE
和FT.CURSOR READ
)的累计执行时间(以毫秒为单位)。search_total_active_queries
: 当前在分片中执行的后台查询总数,不包括FT.CURSOR READ
。search_errors_indexing_failures
: 分片中所有索引记录的索引失败总数。search_errors_for_index_with_max_failures
: 失败次数最多的索引中的索引失败数量。
keyspace¶
keyspace
部分提供每个数据库主字典的统计信息。
统计信息包括键的数量和具有过期时间的键的数量。
对于每个数据库,将添加以下行:
dbXXX
:keys=XXX,expires=XXX,avg_ttl=XXX,subexpiry=XXX
keysizes¶
keysizes
部分提供有关数据集中每种数据类型(字符串、列表、集合、哈希和有序集合)键大小分布的详细统计信息。分布使用以 2 为底的对数直方图进行跟踪。
以下是 Redis 双数据库实例的样本输出:
# Keysizes
db0_distrib_strings_sizes:2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1,128K=1,256K=1,512K=1,1M=1
db0_distrib_lists_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1
db0_distrib_sets_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1
db0_distrib_zsets_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1
db0_distrib_hashes_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1
db1_distrib_strings_sizes:2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1,128K=1,256K=1,512K=1,1M=1
db1_distrib_lists_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1
db1_distrib_sets_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1
db1_distrib_zsets_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1,64K=1
db1_distrib_hashes_items:1=1,2=1,4=1,8=1,16=1,32=1,64=1,128=1,256=1,512=1,1K=1,2K=1,4K=1,8K=1,16K=1,32K=1
debug¶
debug
部分包含实验性指标,这些指标在未来的版本中可能会被修改或移除。
当调用 INFO
或 INFO ALL
时,该部分内容不会被包含,仅在使用 INFO DEBUG
时才会返回。
eventloop_duration_aof_sum
: 事件循环中用于刷新 AOF 的总耗时微秒(microseconds)。eventloop_duration_cron_sum
: cron 任务的总耗时(微秒),包括 serverCron 和 beforeSleep,但不包括 I/O 和 AOF 刷盘。eventloop_duration_max
: 单次事件循环周期中的最大耗时(微秒)。eventloop_cmd_per_cycle_max
: 单次事件循环周期中处理命令的最大数量。allocator_allocated_lua
: 分配器为 Lua 专门分配的总字节数,包含内部碎片。allocator_active_lua
: 分配器中为 Lua 专门分配的活跃页面总字节数,包含外部碎片。allocator_resident_lua
: 分配器中为 Lua 专门占用的驻留内存(RSS)总字节数。这包括可以释放给操作系统的内存页(通过MEMORY PURGE
或等待释放)。allocator_frag_bytes_lua
:allocator_active_lua
与allocator_allocated_lua
之间的差值(即碎片字节数)。
附加说明¶
关于本文档中使用“slave”一词的说明:从 Redis 5 开始,除非出于向后兼容性的考虑,Redis 项目已不再使用“slave”(从属)一词。遗憾的是,在此命令中,“slave”是协议的一部分,因此只有当该 API 自然废弃时,我们才能彻底移除这些用法。
模块生成的部分:从 Redis 6 开始,模块可以将自身的信息注入到 INFO
命令中。这些信息默认情况下会被排除,即使提供了 all
参数(此时会列出已加载的模块,但不包含它们生成的信息字段)。要获取这些信息,必须使用 modules
参数或 everything
参数。