redis用的都比较多了,这里简单记录下通过info 查看redis当前运行状态参数,以及参数说明。资料来自网络,之前根据这些参数做了一个redis监控报警,就是基于这里进行的取值,不过不是很完善,还有待完善。
info以一种易于解释(parse)且易于阅读的格式,返回关于 Redis 服务器的各种信息和统计数值。通过给定可选的参数 section ,可以让命令只返回某一部分的信息:包含了server端redis的基本信息、cpu 、memore、状态等等各种信息。
下边我们先看一个redis服务器的info信息:
[[email protected] etc]# redis-cli -h 127.0.0.1 -p 6379 info
# Server
redis_version:3.2.3
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:b79c0f10d567cce1
redis_mode:standalone
os:Linux 2.6.32-573.7.1.el6.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.7
process_id:4148
run_id:0eac8a6b364d6fe7149a1d89aa67fc1bee5c0ffc
tcp_port:6379
uptime_in_seconds:115181
uptime_in_days:1
hz:10
lru_clock:1506363
executable:/root/redis-server
config_file:/etc/redis.conf
# Clients
connected_clients:13
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:90783144
used_memory_human:86.58M
used_memory_rss:118874112
used_memory_rss_human:113.37M
used_memory_peak:18079106264
used_memory_peak_human:16.84G
total_system_memory:32094814208
total_system_memory_human:29.89G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:1.31
mem_allocator:jemalloc-4.0.3
# Persistence
loading:0
rdb_changes_since_last_save:4738
rdb_bgsave_in_progress:0
rdb_last_save_time:1477901339
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_cu