The Redis Info command is detailed

Source: Internet
Author: User
Tags redis cluster redis server

Returns a variety of information and statistics about Redis servers in an easy-to-interpret (parse) and easy-to-read format.

Given an optional parameter section, you can have the command return only a portion of the information:

  • Server : General Redis Server information that contains the following domains:

    • redis_version : Redis Server version
    • redis_git_sha1 : Git SHA1
    • redis_git_dirty : Git dirty flag
    • OS : Host operating system for Redis server
    • arch_bits : Architecture (32 or 64 bit)
    • Multiplexing_api : The event handling mechanism used by Redis
    • gcc_version : The GCC version used when compiling Redis
    • process_id : PID of the server process
    • run_id : Random identifiers for Redis servers (for Sentinel and cluster)
    • tcp_port : TCP/IP Listening port
    • uptime_in_seconds : Number of seconds since the Redis server was started
    • uptime_in_days : The number of days elapsed since the Redis server was started
    • lru_clock : Self-increasing clock in minutes for LRU management
  • clients : Connected client information, including the following domains:

    • connected_clients : Number of connected clients (not including clients connected through a secondary server)
    • client_longest_output_list : The longest list of outputs currently connected to the client
    • client_longest_input_buf : The maximum input cache for the currently connected client
    • blocked_clients : Number of clients waiting for the blocking command (Blpop, Brpop, Brpoplpush)
  • Memory: Ram information that contains the following fields:

    • used_memory : Total amount of memory allocated by the Redis allocator, in bytes (byte)
    • Used_memory_human : Returns the total amount of memory allocated by Redis in human-readable format
    • Used_memory_rss : Returns the total amount of memory allocated by Redis (commonly known as the resident set size) from the operating system's perspective. This value is consistent with the output of commands such as top and PS .
    • used_memory_peak : Peak memory consumption (in bytes) for Redis
    • Used_memory_peak_human : Returns the peak memory consumption of Redis in a human-readable format
    • Used_memory_lua : The amount of memory (in bytes) used by the LUA engine
    • Mem_fragmentation_ratio : ratio between used_memory_rss and used_memory
    • mem_allocator : Specified at compile time, the memory allocator used by Redis. It can be libc, Jemalloc, or Tcmalloc.
    Under ideal circumstances, Used_memory_rssshould only be compared to the value of used_memoryA little bit taller. When RSS > used , and the values of the two differ significantly, indicating the presence (internal or external) memory fragmentation. The ratio of memory fragmentation can be achieved by Mem_fragmentation_ratioof the value. When used > rss , it indicates that part of Redis's memory has been swapped out into swap space by the operating system, in which case the operation can have a noticeable delay.

    Because Redis does not has control over how it allocations is mapped to memory pages, high used_memory_rss i s often the result of a spike in memory usage.

    When Redis frees memory, the allocator may or may not, return memory to the operating system. If Redis frees up memory and does not return the memory to the operating system, then used_memorymay not be consistent with the Redis memory footprint displayed by the operating system. View Used_memory_peakValue to verify that the condition occurs.
  • Persistence : Information about RDB and AOF

  • Stats : General statistical information

  • replication : master/Slave replication information

  • CPU : CPU COMPUTE statistics

  • commandstats : Redis Command statistics

  • cluster : Redis cluster information

  • keyspace : Database-related statistics

In addition to the values given above, the parameters can be two of the following:

    • All: return all information
    • Default: Returns the information that is selected

When the INFO command is called directly without parameters, default is used as the parameter.

Different versions of Redis may have added or truncated some of the returned domains.

Therefore, when analyzing the output of the INFO command, a robust client program should be able to skip domains that you do not know and handle the missing domains properly.

Available versions:
>= 1.0.0
Complexity of Time:
O (1)
return value:
See test code below for details.
redis> info# serverredis_version:2.5.9redis_git_sha1:473f3090redis_git_dirty:0os:linux 3.3.7-1-ARCH I686arch_ BITS:32MULTIPLEXING_API:EPOLLGCC_VERSION:4.7.0PROCESS_ID:8104RUN_ID: bc9e20c6f0aac67d0d396ab950940ae4d1479ad1tcp_port:6379uptime_in_seconds:7uptime_in_days:0lru_clock:1680564# clientsconnected_clients:1client_longest_output_list:0client_biggest_input_buf:0blocked_clients:0# Memoryused_ Memory:439304used_memory_human:429.01kused_memory_rss:13897728used_memory_peak:401776used_memory_peak_human : 392.36kused_memory_lua:20480mem_fragmentation_ratio:31.64mem_allocator:jemalloc-3.0.0# Persistenceloading:0rdb _changes_since_last_save:0rdb_bgsave_in_progress:0rdb_last_save_time:1338011402rdb_last_bgsave_status:okrdb_ Last_bgsave_time_sec:-1rdb_current_bgsave_time_sec:-1aof_enabled:0aof_rewrite_in_progress:0aof_rewrite_ scheduled:0aof_last_rewrite_time_sec:-1aof_current_rewrite_time_sec:-1# Statstotal_connections_received:1total_ Commands_processed:0instantaneous_ops_per_sec:0rejected_connectIons:0expired_keys:0evicted_keys:0keyspace_hits:0keyspace_misses:0pubsub_channels:0pubsub_patterns:0latest_ fork_usec:0# replicationrole:masterconnected_slaves:0# Cpuused_cpu_sys:0.03used_cpu_user:0.01used_cpu_sys_ children:0.00used_cpu_user_children:0.00

Detailed redis Info command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.