How do i use the info command to provide redis server statistics?



  • Also see How do i connect to the redis server? https://www.lightnetics.com/post/10446

    The INFO command returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans.
    See https://redis.io/commands/info for full information.

    INFO or info displays all sections, if you need just a specific section, run "info <section name>" e.g: info cluster will just display the cluster information.

    127.0.0.1:6379> INFO
    # Server
    redis_version:4.0.10
    redis_git_sha1:00000000
    redis_git_dirty:0
    redis_build_id:794f7b0c6a676cd
    redis_mode:standalone
    os:Linux 4.13.0-45-generic x86_64
    arch_bits:64
    multiplexing_api:epoll
    atomicvar_api:atomic-builtin
    gcc_version:5.4.0
    process_id:13814
    run_id:a8c23a4f04f756a2dcd883e24e6843ed634eb28a
    tcp_port:6379
    uptime_in_seconds:878
    uptime_in_days:0
    hz:10
    lru_clock:5183527
    executable:/home/training/redis/bin/redis-server
    config_file:/home/training/redis/conf/redis.conf
    
    # Clients
    connected_clients:3
    client_longest_output_list:0
    client_biggest_input_buf:0
    blocked_clients:0
    
    # Memory
    used_memory:891432
    used_memory_human:870.54K
    used_memory_rss:3866624
    used_memory_rss_human:3.69M
    used_memory_peak:911288
    used_memory_peak_human:889.93K
    used_memory_peak_perc:97.82%
    used_memory_overhead:870106
    used_memory_startup:786608
    used_memory_dataset:21326
    used_memory_dataset_perc:20.34%
    total_system_memory:8359059456
    total_system_memory_human:7.78G
    used_memory_lua:37888
    used_memory_lua_human:37.00K
    maxmemory:0
    maxmemory_human:0B
    maxmemory_policy:noeviction
    mem_fragmentation_ratio:4.34
    mem_allocator:jemalloc-4.0.3
    active_defrag_running:0
    lazyfree_pending_objects:0
    
    # Persistence
    loading:0
    rdb_changes_since_last_save:4
    rdb_bgsave_in_progress:0
    rdb_last_save_time:1531909305
    rdb_last_bgsave_status:ok
    rdb_last_bgsave_time_sec:-1
    rdb_current_bgsave_time_sec:-1
    rdb_last_cow_size:0
    aof_enabled:0
    aof_rewrite_in_progress:0
    aof_rewrite_scheduled:0
    aof_last_rewrite_time_sec:-1
    aof_current_rewrite_time_sec:-1
    aof_last_bgrewrite_status:ok
    aof_last_write_status:ok
    aof_last_cow_size:0
    
    # Stats
    total_connections_received:3
    total_commands_processed:11
    instantaneous_ops_per_sec:0
    total_net_input_bytes:317
    total_net_output_bytes:15762
    instantaneous_input_kbps:0.00
    instantaneous_output_kbps:0.00
    rejected_connections:0
    sync_full:0
    sync_partial_ok:0
    sync_partial_err:0
    expired_keys:0
    expired_stale_perc:0.00
    expired_time_cap_reached_count:0
    evicted_keys:0
    keyspace_hits:4
    keyspace_misses:0
    pubsub_channels:0
    pubsub_patterns:0
    latest_fork_usec:0
    migrate_cached_sockets:0
    slave_expires_tracked_keys:0
    active_defrag_hits:0
    active_defrag_misses:0
    active_defrag_key_hits:0
    active_defrag_key_misses:0
    
    # Replication
    role:master
    connected_slaves:0
    master_replid:d514e2988b11fe9a82df4e406779649953637bc7
    master_replid2:0000000000000000000000000000000000000000
    master_repl_offset:0
    second_repl_offset:-1
    repl_backlog_active:0
    repl_backlog_size:1048576
    repl_backlog_first_byte_offset:0
    repl_backlog_histlen:0
    
    # CPU
    used_cpu_sys:0.87
    used_cpu_user:0.42
    used_cpu_sys_children:0.00
    used_cpu_user_children:0.00
    
    # Cluster
    cluster_enabled:0
    
    # Keyspace
    db0:keys=3,expires=0,avg_ttl=0
    127.0.0.1:6379> 
    

Log in to reply
 

© Lightnetics 2024