Detailed description of Redis info parameters and redisinfo Parameters

Source: Internet
Author: User
Tags redis cluster redis server

Detailed description of Redis info parameters and redisinfo Parameters

The Redis Info command returns various information and statistical values about the Redis server in a format that is easy to understand and read.

By specifying the optional parameter section, you can allow the command to return only a certain part of 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: host operating system of the Redis Server
    • Arch_bits: Architecture (32 or 64-bit)
    • Multiplexing_api: The event processing mechanism used by Redis
    • Gcc_version: GCC version used to compile Redis
    • Process_id: PID of the server process
    • Run_id: Random identifier of the Redis server (used for Sentinel and cluster)
    • Tcp_port: TCP/IP listening port
    • Uptime_in_seconds: the number of seconds that have elapsed since the Redis server was started.
    • Uptime_in_days: Number of days since the Redis server was started
    • Lru_clock: auto-increment clock in minutes for LRU Management
  • Clients: information about the connected client, including the following fields:

    • Connected_clients: number of connected clients (excluding clients connected through subordinate servers)
    • Client_longest_output_list: The longest output list of the currently connected clients.
    • Client_longest_input_buf: maximum input cache in the currently connected Client
    • Blocked_clients: number of clients waiting for blocking commands (BLPOP, BRPOP, BRPOPLPUSH)
  • Memory: memory information, including the following fields:

    • Used_memory: total memory allocated by the Redis distributor, in bytes
    • Used_memory_human: returns the total memory allocated by Redis in human readable format.
    • Used_memory_rss: returns the total memory allocated by Redis from the operating system perspective (commonly known as resident set size and small size ). This value is consistent with the output of top, ps, and other commands.
    • Used_memory_peak: Redis memory consumption peak (in bytes)
    • Used_memory_peak_human: returns the Redis memory consumption peak value in human readable format.
    • Used_memory_lua: memory size used by Lua engine (in bytes)
    • Mem_fragmentation_ratio: Ratio between used_memory_rss and used_memory
    • Mem_allocator: Memory distributor used by Redis specified during compilation. It can be libc, jemalloc, or tcmalloc.

    Ideally, the value of used_memory_rss should be slightly higher than that of used_memory.

    When rss> used and the values of the two are different, memory fragments exist (internal or external.

    The memory fragment rate can be seen from the value of mem_fragmentation_ratio.

    When used> rss, it indicates that some memory of Redis is switched out to swap space by the operating system. In this case, the operation may produce a significant delay.

    When Redis releases the memory, it may or may not return the memory to the operating system.

    If Redis releases the memory but does not return the memory to the operating system, the used_memory value may be different from the Redis memory usage displayed by the operating system.

    Check the value of used_memory_peak to verify whether this situation has occurred.

  • Persistence: Information about RDB and AOF

  • Stats: General Statistics

  • Replication: Master/Slave replication Information

  • Cpu: CPU computing statistics

  • Commandstats: Redis command statistics

  • Cluster: Redis cluster information

  • Keyspace: database-related statistics

Syntax

The basic syntax of the redis Info command is as follows:

redis 127.0.0.1:6379> INFO [section] 
Available version

> = 1.0.0

Return Value

String, a set of text rows.

Instance
Redis 127.0.0.1: 6379> INFO # Serverredis_version: 2.5.9redis _ git_sha1: critical: 0os: Linux 3.3.7-1-ARCH restart: critical: epollgcc_version: 4.7.0process _ id: 81_run_id: critical: memory: 1680564 # Memory: 0blocked_clients: 0 # Memoryused_memory: Memory: 429.01Kused _ memory_rss: Memory: 392.36Kused _ memory_lua: Memory: 31.64mem _ allocator: jemalloc-3.0.0 # Persistenceloading: Memory:-memory:-1aof_enabled: Memory:-memory:-1 # Memory: 1total_commands_processed: Memory: 0rejected_connections: usage: 0keyspace_misses: Usage: 0 # Replicationrole: Usage: 0 # usage: 0.03used _ cpu_user: 0.01used _ cpu_sys_children: 0.00used _ cpu_user_children: 0.00 # Keyspace
Db0: keys = 25, expires = 0, avg_ttl = 0 # Database No. 0 has 25 keys and the number of expired keys deleted is 0.
 

 

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.