|
|
Posted on 8/25/2017 4:22:30 PM
|
|
|
|

The Redis Info command returns a variety of information and statistical values about the Redis server in an easy-to-understand and readable format.
Official documentation link: https://redis.io/commands/info
Given an optional parameter section, you can make the command return only a certain part of the information:
server: General Redis server information, including the following domains: redis_version : Redis server version redis_git_sha1 : Git SHA1 redis_git_dirty : Git dirty flag os: The host operating system of the Redis server arch_bits : Architecture (32 or 64-bit) multiplexing_api: The event handling mechanism used by Redis gcc_version: The version of GCC used when compiling Redis process_id : The PID of the server process run_id : Random identifier for Redis server (for Sentinel and cluster) tcp_port: TCP/IP listening port uptime_in_seconds : The number of seconds elapsed since the Redis server started uptime_in_days : The number of days that have elapsed since the Redis server started lru_clock : Self-incrementing clock in minutes for LRU management clients : Connected client information with the following domains: connected_clients : Number of connected clients (excluding clients connected through the slave server) client_longest_output_list : The longest list of outputs among the currently connected clients client_longest_input_buf : The maximum input cache among the currently connected clients blocked_clients : Number of clients waiting for blocking commands (BLPOP, BRPOP, BRPOPLPUSH). memory : memory information containing the following domains: used_memory : The total amount of memory allocated by the Redis allocator, measured in bytes used_memory_human : Returns the total amount of memory allocated by Redis in a human-readable format used_memory_rss: From an operating system perspective, returns the total amount of memory allocated by Redis (commonly known as the resident set size). This value is consistent with the output of commands such as top, ps, etc. used_memory_peak : Peak memory consumption of Redis in bytes used_memory_peak_human : Return Redis memory consumption spikes in a human-readable format used_memory_lua : The amount of memory used by the Lua engine (in bytes) mem_fragmentation_ratio : The ratio between used_memory_rss and used_memory mem_allocator : The memory allocator used by Redis specified at compile time. It can be libc, jemalloc or tcmalloc. Ideally, the value of used_memory_rss should be only slightly higher than used_memory. When RSS > used and the values differ significantly, it indicates the presence of memory fragmentation (internal or external). The ratio of memory fragmentation can be seen by the value of mem_fragmentation_ratio. When > RSS is used, it means that part of Redis memory has been swapped out by the operating system into swap space, in which case there may be a significant delay in the operation. When Redis frees memory, the allocator may, or may not, return the memory to the operating system. If Redis frees up memory but does not return memory to the operating system, the value of used_memory may not match the Redis memory footprint displayed by the operating system. Looking at the value of used_memory_peak can verify that this is happening. persistence: Information about RDB and AOF stats: General statistics replication: The master/slave replicates the information CPU: CPU compute statistics commandstats: Redis command statistics cluster: Redis cluster information keyspace: Database-related statistics
info without adding any parameters, return all the information, we can follow the parameters we need later, without returning all the information, as follows:
|
Previous:Mysql errors, record themNext:The knowledge structure of front-end engineers, students who want to learn the front-end can take a look
|