【redis】Redis学习:redis info参数简介

工作过程当中,我们可以进入redis控制台,通过info命令来获取我们想看的一些信息,下面就对info的参数做一些说明。

# Server
redis_version:6.0.6                                              # Redis 服务器版本
redis_git_sha1:00000000                                          # Git SHA1
redis_git_dirty:0                                                # Git dirty flag
redis_build_id:19d4277f1e8a2fed
redis_mode:standalone
os:Linux 3.10.0-1127.el7.x86_64 x86_64                         # Redis 服务器的宿主操作系统
arch_bits:64                                                   # 架构(3264 位)
multiplexing_api:epoll                                         # Redis 所使用的事件处理机制
atomicvar_api:atomic-builtin
gcc_version:8.3.0                                              # 编译 Redis 时所使用的 GCC 版本
process_id:1                                                   #  服务器进程的 PID
run_id:1a1c7ec3cebb57d46e3ac57c0138f12da2e598b3                # Redis 服务器的随机标识符(用于 Sentinel 和集群)
tcp_port:6379                                                  # TCP/IP 监听端口
uptime_in_seconds:74911                                        # 自 Redis 服务器启动以来,经过的秒数
uptime_in_days:0                                               # 自 Redis 服务器启动以来,经过的天数
hz:10
configured_hz:10
lru_clock:767501                                               #以分钟为单位进行自增的时钟,用于 LRU 管理
executable:/data/redis-server
config_file:/etc/redis.conf

# Clients
connected_clients:123                       # 已连接客户端的数量(不包括通过从属服务器连接的客户端)
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0                           # 正在等待阻塞命令(BLPOP、BRPOP、BRPOPLPUSH)的客户端的数量
tracking_clients:0
clients_in_timeout_table:0

# Memory
used_memory:5015728                      # 由 Redis 分配器分配的内存总量,以字节(byte)为单位
used_memory_human:4.78M                  # human read显示使用内存
used_memory_rss:18522112                 # 系统给redis分配的内存(即常驻内存)
used_memory_rss_human:17.66M
used_memory_peak:5638440                 # 内存使用的峰值大小
used_memory_peak_human:5.38M
used_memory_peak_perc:88.96%
used_memory_overhead:3979300
used_memory_startup:803088
used_memory_dataset:1036428
used_memory_dataset_perc:24.60%
allocator_allocated:5045584
allocator_active:6062080
allocator_resident:8814592
total_system_memory:33656483840
total_system_memory_human:31.35G
used_memory_lua:34816                      # lua引擎使用的内存
used_memory_lua_human:34.00K
used_memory_scripts:688
used_memory_scripts_human:688B
number_of_cached_scripts:2
maxmemory:10000000000
maxmemory_human:9.31G
maxmemory_policy:volatile-lru
allocator_frag_ratio:1.20
allocator_frag_bytes:1016496
allocator_rss_ratio:1.45
allocator_rss_bytes:2752512
rss_overhead_ratio:2.10
rss_overhead_bytes:9707520
mem_fragmentation_ratio:3.76              # 内存碎片率,used_memory_rss/used_memory比例,一般情况下,used_memory_rss略高于used_memory,mem_fragmentation_ratio
mem_fragmentation_bytes:13589848
mem_not_counted_for_evict:1594
mem_replication_backlog:1048576
mem_clients_slaves:33972
mem_clients_normal:2089278
mem_aof_buffer:1594
mem_allocator:jemalloc-5.1.0              # 内存分配器
active_defrag_running:0
lazyfree_pending_objects:0

# Persistence
loading:0
rdb_changes_since_last_save:1582               # 自上次dump后rdb的改动
rdb_bgsave_in_progress:0                       # 标识rdb save是否进行中
rdb_last_save_time:1611305472                  #上次save的时间戳
rdb_last_bgsave_status:ok                      # 上次的save操作状态
rdb_last_bgsave_time_sec:0                     # 上次rdb save操作使用的时间(单位s)
rdb_current_bgsave_time_sec:-1                 # 如果rdb save操作正在进行,则是所使用的时间
rdb_last_cow_size:6893568
aof_enabled:1                                  # 是否开启aof,默认没开启
aof_rewrite_in_progress:0                      # 标识aof的rewrite操作是否在进行中
aof_rewrite_scheduled:0                        # 标识是否将要在rdb save操作结束后执行
aof_last_rewrite_time_sec:-1                   # 上次rewrite操作使用的时间(单位s)
aof_current_rewrite_time_sec:-1                # 如果rewrite操作正在进行,则记录所使用的时间
aof_last_bgrewrite_status:ok                   # 上次rewrite操作的状态
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0
aof_current_size:5011803                      # aof当前大小
aof_base_size:1794084                         # aof上次启动或rewrite的大小
aof_pending_rewrite:0                         # 同上面的aof_rewrite_scheduled
aof_buffer_length:0                           # aof buffer的大小
aof_rewrite_buffer_length:0                   # aof rewrite buffer的大小
aof_pending_bio_fsync:0                       # 后台IO队列中等待fsync任务的个数
aof_delayed_fsync:0                        # 延迟的fsync计数器 TODO

# Stats
total_connections_received:171                # 自启动起连接过的总数
total_commands_processed:609865               # 自启动起运行命令的总数
instantaneous_ops_per_sec:7                   # 每秒执行的命令个数,OPS
total_net_input_bytes:30018817
total_net_output_bytes:599180586
instantaneous_input_kbps:0.23
instantaneous_output_kbps:7.67
rejected_connections:0                        # 因为最大客户端连接书限制,而导致被拒绝连接的个数
sync_full:2
sync_partial_ok:0
sync_partial_err:0
expired_keys:0                                # 自启动起过期的key的总数
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:1352
evicted_keys:0                                # 因为内存大小限制,而被驱逐出去的键的个数
keyspace_hits:1740                            # 在main dictionary(todo)中成功查到的key个数,缓存命中次数
keyspace_misses:355                           # 同上,未查到的key的个数,缓存未命中次数
pubsub_channels:1                             # 发布/订阅频道数
pubsub_patterns:12                            # 发布/订阅模式数
latest_fork_usec:421                          # 上次的fork操作使用的时间(单位ms)
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
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0

# Replication
role:master                          # 角色
connected_slaves:2                   # 连接的从库数
slave0:ip=10.136.28.84,port=6379,state=online,offset=18913723,lag=1
slave1:ip=10.136.28.85,port=6379,state=online,offset=18913723,lag=1
master_replid:7924f0b14e3fafecc431e595e7c59a9eb3aa6815
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:18913723
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:17865148
repl_backlog_histlen:1048576

# CPU
used_cpu_sys:169.705450          # redis server的sys cpu使用率
used_cpu_user:125.248001          # redis server的user cpu使用率
used_cpu_sys_children:0.007192      # 后台进程的sys cpu使用率
used_cpu_user_children:0.002494     # 后台进程的user cpu使用率

# Modules

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=39,expires=0,avg_ttl=0
 
原文地址:https://www.cnblogs.com/daydayup-lin/p/14317535.html