Skip to main content

INFO sections

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

The optional section parameters can be used to select one or more sections with INFO [section [section ...]]. Section names are case-insensitive. With no section parameter, or with the all parameter, all sections are returned.

ParameterDesc
allAll sections
serverGeneral information about the Kvrocks server
clientsClient connection information
memoryMemory consumption information
persistenceBackup and loading information
statsGeneral statistics
replicationPrimary/replica replication information
cpuCPU consumption statistics
commandstatsPer-command execution and latency statistics
clusterCluster mode information
keyspaceDatabase and disk usage statistics
rocksdbRocksDB statistics

Return value

With RESP2, the return value of INFO is a bulk string. With RESP3, it is a txt verbatim string. In either case, the content is a collection of text lines.

Each line contains either a section name (starting with #) or a property in the form field:value. Sections are separated by an empty line.

An abridged sample return value is shown below. Values depend on the build, configuration, workload, and host. Repeated per-column-family RocksDB fields and conditional fields are omitted here and described in the sections below.

# Server
version:2.16.0
kvrocks_version:2.16.0
redis_version:7.0.0
git_sha1:28440b5
kvrocks_git_sha1:28440b5
redis_mode:standalone
kvrocks_mode:standalone
os:Linux 6.8.0 x86_64
gcc_version:13.3.0
rocksdb_version:11.1.1
arch_bits:64
process_id:12345
tcp_port:6666
server_time_usec:1783785600000000
uptime_in_seconds:42
uptime_in_days:0
executable:/usr/local/bin/kvrocks
config_file:/etc/kvrocks/kvrocks.conf

# Clients
maxclients:10000
connected_clients:1
monitor_clients:0
blocked_clients:0

# Memory
used_memory_rss:19558400
used_memory_rss_human:18.65M
used_memory_lua:35840
used_memory_lua_human:35.00K
used_memory_startup:20357120
mem_allocator:libc

# Persistence
loading:0
bgsave_in_progress:0
last_bgsave_time:1783785580
last_bgsave_status:ok
last_bgsave_time_sec:0

# Stats
total_connections_received:1
total_commands_processed:2
instantaneous_ops_per_sec:0
total_net_input_bytes:23
total_net_output_bytes:8231
instantaneous_input_kbps:0
instantaneous_output_kbps:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0

# Replication
role:master
connected_slaves:0
master_repl_offset:0

# CPU
used_cpu_sys:0
used_cpu_user:0
worker_cpu_time:[0.000000,0.000000,0.000000,0.000000]

# CommandStats
cmdstat_command:calls=1,usec=904,usec_per_call=904
cmdstat_info:calls=1,usec=0,usec_per_call=0

# Cluster
cluster_enabled:0

# Keyspace
last_dbsize_scan_timestamp:0
db0:keys=0,expires=0,avg_ttl=0,expired=0
sequence:0
used_db_size:0
max_db_size:0
used_percent:0%
disk_capacity:499963174912
used_disk_size:266419978240
used_disk_percent:53%

# RocksDB
block_cache_usage:0
block_cache_pinned_usage[default]:0
estimate_keys[default]:0
index_and_filter_cache_usage[default]:0
level0_file_limit_slowdown[default]:
level0_file_limit_stop[default]:
pending_compaction_bytes_slowdown[default]:
pending_compaction_bytes_stop[default]:
level0_file_limit_stop_with_ongoing_compaction[default]:
level0_file_limit_slowdown_with_ongoing_compaction[default]:
memtable_count_limit_slowdown[default]:
memtable_count_limit_stop[default]:
num_files_at_level[default]:[0,0,0,0,0,0,0]
estimate_pending_compaction_bytes[default]:0
block_cache_data_hit:0
block_cache_data_miss:0
block_cache_filter_hit:0
block_cache_filter_miss:0
block_cache_hit:0
block_cache_index_hit:0
block_cache_index_miss:0
block_cache_miss:0
all_mem_tables:3520
cur_mem_tables:3520
snapshots:0
num_immutable_tables:0
num_running_flushes:0
memtable_flush_pending:0
compaction_pending:0
num_running_compactions:0
num_live_versions:5
num_super_version:5
num_background_errors:0
flush_count:0
compaction_count:0
put_per_sec:0
get_per_sec:0
seek_per_sec:0
next_per_sec:0
prev_per_sec:0
is_bgsaving:no
is_compacting:no

Server section

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

PropertyDesc
versionDeprecated alias of kvrocks_version
kvrocks_versionVersion of the Kvrocks server
redis_versionRedis compatibility version reported by Kvrocks
git_sha1Deprecated alias of kvrocks_git_sha1
kvrocks_git_sha1Git commit SHA used to build the server
redis_modeRedis-compatible mode name: standalone or cluster
kvrocks_modeKvrocks mode: standalone or cluster
osOperating system hosting the Kvrocks server
gcc_versionGCC version used to compile Kvrocks; present only in GCC builds
clang_versionClang version used to compile Kvrocks; present only in Clang builds
rocksdb_versionVersion of RocksDB used by Kvrocks
arch_bitsArchitecture (32 or 64 bits)
process_idPID of the server process
tcp_portTCP/IP listening port
server_time_usecCurrent Unix timestamp on the server, in microseconds
uptime_in_secondsNumber of seconds since the Kvrocks server started
uptime_in_daysUptime expressed in whole days
executableAbsolute path of the server executable; present only on Linux
config_filePath of the configuration file used by the server

Clients section

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

PropertyDesc
maxclientsThe value of the maxclients configuration directive
connected_clientsNumber of client connections (excluding connections from replicas)
monitor_clientsNumber of monitor client connections
blocked_clientsNumber of blocked client connections

Memory section

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

PropertyDesc
used_memory_rssResident set size (RSS) of the Kvrocks process in bytes, as reported by the operating system
used_memory_rss_humanHuman-readable representation of used_memory_rss
used_memory_luaNumber of bytes used by the Lua engines across worker threads
used_memory_lua_humanHuman-readable representation of used_memory_lua
used_memory_startupResident set size of Kvrocks at startup in bytes
mem_allocatorName of the memory allocator used by the server

Stats section

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

PropertyDesc
total_connections_receivedTotal number of connections accepted by the server
total_commands_processedTotal number of commands processed by the server
instantaneous_ops_per_secNumber of commands processed per second
total_net_input_bytesThe total number of bytes read from the network
total_net_output_bytesThe total number of bytes written to the network
instantaneous_input_kbpsThe network's read rate per second in KB/sec
instantaneous_output_kbpsThe network's write rate per second in KB/sec
sync_fullThe number of full resyncs with replicas
sync_partial_okThe number of accepted partial resync requests
sync_partial_errThe number of denied partial resync requests
keyspace_hitsNumber of successful key lookups
keyspace_missesNumber of failed key lookups
pubsub_channelsGlobal number of pub/sub channels with client subscriptions
pubsub_patternsGlobal number of pub/sub patterns with client subscriptions

CommandStats section

The commandstats section provides per-command statistics: the number of calls that reached command execution, total execution time in microseconds, and average execution time per call in microseconds.

For each command type, the following line is added:

cmdstat_XXX:calls=XXX,usec=XXX,usec_per_call=XXX

If histogram-bucket-boundaries is configured, a latency histogram is also added for each command that has been called:

cmdstathist_XXX:BOUNDARY=COUNT,...,inf=COUNT,sum=USEC,count=CALLS

Each boundary and inf value is the count for that latency bucket. sum is the total latency in microseconds, and count is the number of calls.

Persistence section

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

PropertyDesc
loadingWhether the server is loading data from a backup
bgsave_in_progressWhether a background save is in progress
last_bgsave_timeUnix timestamp when the most recent background save began; server start time if no save has run
last_bgsave_statusStatus of the most recent background save: ok or err
last_bgsave_time_secDuration of the most recent background save in seconds; -1 if no save has run

Replication section

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

While the server is loading a backup, the section heading is returned without replication fields.

PropertyDesc
rolemaster if the instance does not replicate another server, or slave if it does. A replica can still serve its own replicas in a chained replication topology.
connected_slavesNumber of replicas connected to this server
slaveNState of connected replica N in the form ip=IP,port=PORT,offset=OFFSET,lag=LAG; one field is returned per active replica, starting at slave0
master_repl_offsetCurrent RocksDB sequence number used as the server's replication offset

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

PropertyDesc
master_hostHost or IP address of the master
master_portMaster listening TCP port
master_link_statusStatus of the link (up/down)
master_sync_unrecoverable_errorWhether replication encountered an unrecoverable error (yes/no)
master_last_io_seconds_agoNumber of seconds since the last interaction with master
master_sync_in_progressWhether a full synchronization from the primary is in progress (0/1)
slave_repl_offsetThe replication offset of the replica instance
slave_priorityThe priority of the instance as a candidate for failover

CPU section

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

PropertyDesc
used_cpu_sysSystem CPU time consumed by all threads of the Kvrocks process, in seconds
used_cpu_userUser CPU time consumed by all threads of the Kvrocks process, in seconds
worker_cpu_timeCPU time consumed by each worker thread, in seconds, represented as an array in worker order

Cluster section

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

PropertyDesc
cluster_enabledWhether Kvrocks cluster mode is enabled (0/1)

Keyspace section

The keyspace section provides key-count statistics for db0 in the current connection's namespace, as well as RocksDB and filesystem size information. Key counts are cached rather than maintained in memory for every write. Run DBSIZE scan to start an asynchronous scan that refreshes them.

last_dbsize_scan_timestamp:1635671594
db0:keys=0,expires=0,avg_ttl=0,expired=0

last_dbsize_scan_timestamp is updated when that scan completes. A value of 0 means that no scan has completed.

PropertyDesc
last_dbsize_scan_timestampUnix timestamp in seconds when the most recent DBSIZE scan completed
db0Cached key statistics in the form keys=...,expires=...,avg_ttl=...,expired=...
sequenceLatest RocksDB sequence number
used_db_sizeApproximate bytes used by the current namespace; for the default namespace, total managed SST size; excludes the WAL
max_db_sizeMaximum database size in bytes; 0 means unlimited
used_percentPercentage of the configured maximum database size used; 0% when max_db_size is unlimited
disk_capacityCapacity in bytes of the filesystem containing the database directory; omitted if the query fails
used_disk_sizeBytes used on that filesystem by all files, not only Kvrocks; omitted if the query fails
used_disk_percentPercentage of that filesystem's capacity in use; omitted if the query fails

RocksDB section

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

The RocksDB section provides statistics for individual column families and for the database as a whole. Most values come from RocksDB properties and statistics.

While the server is loading a backup, the Keyspace and RocksDB section headings are returned without fields.

Kvrocks 2.16.0 has eight column families:

Column FamilyDesc
defaultStores subkeys of aggregate data types such as hashes, sets, lists, sorted sets, and geospatial data
metadataStores metadata for data types and string values
zset_scoreStores sorted-set score-to-member mappings to support efficient score-range operations
pubsubStores Pub/Sub messages that are propagated to replicas
propagateStores non-Pub/Sub commands that are propagated to replicas
streamStores stream data
searchStores Kvrocks Search index metadata and data
indexStores secondary indexes, such as the time-series label reverse index

In the properties below, xxx is a column-family name. These properties are returned once for each of the eight column families:

PropertyDesc
estimate_keys[xxx]Estimated number of keys; may include tombstones and expired keys
index_and_filter_cache_usage[xxx]Estimated bytes used by table readers, including index and filter blocks
level0_file_limit_slowdown[xxx]Write slowdowns caused by the level-0 file-count limit
level0_file_limit_stop[xxx]Write stops caused by the level-0 file-count limit
pending_compaction_bytes_slowdown[xxx]Write slowdowns caused by the pending-compaction-bytes limit
pending_compaction_bytes_stop[xxx]Write stops caused by the pending-compaction-bytes limit
level0_file_limit_slowdown_with_ongoing_compaction[xxx]Level-0 file-count slowdowns while a compaction was already in progress
level0_file_limit_stop_with_ongoing_compaction[xxx]Level-0 file-count stops while a compaction was already in progress
memtable_count_limit_slowdown[xxx]Write slowdowns caused by the memtable-count limit
memtable_count_limit_stop[xxx]Write stops caused by the memtable-count limit
num_files_at_level[xxx]Number of SST files at levels 0 through 6, represented as a seven-element array
estimate_pending_compaction_bytes[xxx]Estimated number of bytes awaiting compaction

The shared block-cache fields are:

PropertyDesc
block_cache_usageTotal bytes used by the shared block cache
block_cache_pinned_usage[default]Bytes pinned in the shared block cache; obtained through the default column family
block_cache_hitTotal block-cache hits
block_cache_missTotal block-cache misses
block_cache_index_hitBlock-cache hits for index blocks
block_cache_index_missBlock-cache misses for index blocks
block_cache_filter_hitBlock-cache hits for filter blocks
block_cache_filter_missBlock-cache misses for filter blocks
block_cache_data_hitBlock-cache hits for data blocks
block_cache_data_missBlock-cache misses for data blocks

The hit and miss counters are present when RocksDB statistics are enabled. The remaining database-wide fields are:

PropertyDesc
all_mem_tablesApproximate size of active, unflushed immutable, and pinned immutable memtables in bytes.
cur_mem_tablesApproximate size of active and unflushed immutable memtable in bytes.
snapshotsNumber of RocksDB snapshots
num_immutable_tablesNumber of immutable memtables
num_running_flushesNumber of currently running flushes.
memtable_flush_pendingThis metric returns 1 if a memtable flush is pending; otherwise it returns 0.
compaction_pendingThis metric returns 1 if at least one compaction is pending; otherwise, the metric reports 0.
num_running_compactionsNumber of currently running compactions.
num_live_versionsNumber of live versions. More live versions often mean more SST files are held from being deleted, by iterators or unfinished compactions.
num_super_versionCurrent RocksDB super-version number
num_background_errorsAccumulated number of background errors
flush_countNumber of completed flushes
compaction_countNumber of completed compactions
put_per_secNumber of RocksDB Put and Write calls per second
get_per_secCombined number of RocksDB Get and MultiGet calls per second
seek_per_secNumber of RocksDB iterator Seek calls per second
next_per_secNumber of RocksDB iterator Next calls per second
prev_per_secNumber of RocksDB iterator Prev calls per second
is_bgsavingWhether a background save is running (yes/no)
is_compactingWhether a compaction is running (yes/no)