Detailed explanation of Redis info

Through the info information, you can see some details of redis, and subsequent redis monitoring is also based on this info information.
By giving the optional parameter section, you can make the command return only a certain part of the information: The

Server section records the information of the Redis server, which includes the following fields:
redis_version : 2.8.19 # Redis server version
redis_git_sha1: 00000000 #Git SHA1
redis_git_dirty: 0 #Git dirty flag
os: Linux 3.2.0-23-generic x86_64 #Host operating system of the Redis server
arch_bits: 64 #Server system architecture (32-bit or 64-bit)
multiplexing_api: epoll #Event processing mechanism used by
Redis gcc_version:4.6 .3 #GCC version used when compiling Redis
process_id:7573 #Process PID of Redis service
run_id:f1c233c4194cba88616c5bfff2d97fc3074865c1 #Random identifier of the Redis server (for Sentinel and cluster)
tcp_port:6379 #The TCP port that the Redis service listens on
uptime_in_seconds:7976 #The number of seconds elapsed
since the Redis server was started uptime_in_days:0 #Since the Redis server started , the number of days elapsed. There is less than 1 day here, so it is displayed as 0
hz:10 # Redis calls internal functions to perform many background tasks at a frequency of 10 times per second  
lru_clock:1133773 # The clock that increments in minutes, Used for LRU management
config_file:/data/redis_6379/redis.conf #The Clients section of the path where the redis.conf configuration file is located

records the information of connected clients, which includes the following fields:
connected_clients:2 #Number of connected clients (excluding Clients connected from the server)
client_longest_output_list:0 #The longest output list in the current client connection
client_biggest_input_buf:0 #The largest input buffer among the currently connected clients
blocked_clients:0 #Number of clients waiting for blocking commands (BLOP, BRPOP, BRPOPLPUSH) The

Memory section records the server's memory information, which contains the following fields:
used_memory:894216 #The memory allocated to Redis by the Redis allocator. For example, when Redis adds storage data, the required memory can be directly taken from the memory allocated to it by the allocator, that is, taken directly from used_memory. The memory allocated to Redis by the Redis allocator is taken from the memory allocated to Redis by the operating system (in bytes)
used_memory_human:873.26K #Display the memory consumed by Redis in human-readable format
used_memory_rss:2691072 #OS allocation Memory for Redis. That is, the memory size occupied by Redis. This value is the same as the result of the RES column output by the top command. The result of the RES column indicates the physical memory actually used by the Redis process (in bytes)
used_memory_peak:914160 #Redis peak memory consumption (in bytes)
used_memory_peak_human:892.73K #Redis peak memory consumption in human-readable format
used_memory_lua:35840 #The size of the memory used by the Lua engine (in bytes)
mem_fragmentation_ratio:3.01 #The ratio between used_memory_rss and used_memory
mem_allocator:jemalloc-3.6.0 #Specified at compile time, the memory allocator used by Redis. 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 difference between the two values ​​is large, it means that there is memory fragmentation (internal or external). The ratio of memory fragmentation can be seen from the value of mem_fragmentation_ratio;
when used>rss, it means that part of the memory of Redis is swapped out to the swap space by the operating system. In this case, the operation may cause significant delay.

The Persistence section records information about RDB persistence and AOF persistence. It contains the following fields:
loading:0 #A flag value that records whether the server is loading the persistent file
rdb_changes_since_last_save:0 #The distance from the last successful persistent file creation After that, how many key values ​​were changed
rdb_bgsave_in_progress:0 #A flag value to record whether the server is creating an RDB file
rdb_last_save_time:1427189587 #UNIX timestamp of the last successful RDB file creation
rdb_last_bgsave_status:ok #A flag value to record the last creation The result of the RDB file is success or failure
rdb_last_bgsave_time_sec:0 #Record the number of seconds it took to create the last RDB file
rdb_current_bgsave_time_sec:-1 #If the server is creating an RDB file, then this value records how long the current RDB creation operation has taken (in seconds)
aof_enabled:0 #A flag value that records whether AOF is open
aof_rewrite_in_progress :0 #A flag value that records whether the server is creating an AOF file
aof_rewrite_scheduled:0 #A flag value that records whether the scheduled AOF rewrite operation needs to be performed after the RDB file is created
aof_last_rewrite_time_sec:-1 #Records the last AOF Time -consuming of rewriting operation
aof_current_rewrite_time_sec:-1 #If the server is performing AOF rewriting operation, then this value records the time that the current rewriting operation has spent (in seconds)
aof_last_bgrewrite_status:ok #A flag value that records the last The result of rewriting the AOF file is success or failure.

If the AOF persistence function is enabled, the following fields will be added to the Persistence section:
aof_current_size:14301 #The current size of the AOF file aof_base_size:14301 #When the
server starts or the last time After performing AOF rewriting, the size of the AOF file
aof_pending_rewrite:0 #A flag value that records whether there is an AOF rewriting operation to execute after waiting for the RDB file to be created
aof_buffer_length:0 #The size of the AOF buffer
aof_rewrite_buffer_length:0 #AOF rewrite buffer size
aof_pending_bio_fsync:0 #In the background I/0 queue, the number of fsyncs waiting to be executed
aof_delayed_fsync:0 #The number of delayed fsyncs The

Stats section records general statistical information, which includes the following Domain:
total_connections_received:8 #Number of connection requests that the server has accepted
total_commands_processed:10673 #Number of commands the server has executed instant_ops_per_sec:0 #Number of commands executed by the
server per second
rejected_connections:0 #Connections rejected due to the maximum number of clients Number of requests
expired_keys:0 #Number of database keys that are automatically deleted due to expiration
evicted_keys:0 #Number of keys that have been evicted because of the maximum memory capacity limit
keyspace_hits:1 #The number of times the database key is found successfully
keyspace_misses:0 #Find the database Number of key failures
pubsub_channels:0 #Number of currently subscribed channels
pubsub_patterns:0 #Number of currently subscribed patterns
latest_fork_usec:159 #The time spent in the last fork() operation (milliseconds) The

Replication part records the information of the master-slave replication
role:master #The role played in the master-slave replication. If there is no master-slave replication, single point, it also plays the role of master
connected_slaves:1 #There is a slave connected to
slave0:ip=14.17.119.220,port=6379,state=online,offset=718446,lag=0 #slave

If the current server is a slave server, then this part will also add the following fields:
master_host: the IP address of the
master server master_port: the port number that the master server listens to
master_link_status: the current status of the replication connection, up means The connection is normal, down means the connection is disconnected
master_last_io_seconds_ago: how many seconds have passed since the last communication with the master server
master_sync_in_progress: a flag value that records whether the master server is synchronizing with this slave server

If synchronization operation is in progress, then this part The following fields are also added:
master_sync_left_bytes: how many bytes of data are missing until the sync is complete
master_sync_last_io_seconds_ago: how many seconds have passed since the last communication with the master

If the connection between the master and slave servers is disconnected, the following fields will also be added to this part:
master_link_down_since_seconds: The number of seconds the master and slave servers are disconnected. The

cpu part records the calculation statistics of the CPU, and it contains the following fields:
used_cpu_sys:75.46 #System CPU consumed by
Redis server used_cpu_user:90.12 #User CPU consumed by Redis server
used_cpu_sys_children:0.00 #System CPU consumed by Redis background process used_cpu_user_children:0.00 #User CPU
consumed by Redis background process The

Keyspace section records database-related statistics Information such as the number of keys in the database, the number of expired keys that have been deleted from the database. For each database, this section will add a line of information in the following format:
db0:keys=25,expires=0,avg_ttl=0 #Database 0 has 25 keys, and the number of expired keys that have been deleted is 0

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326590930&siteId=291194637