Redis 常用监控信息命令总结

本文详细介绍如何通过Redis命令行工具监控Redis服务器的性能,包括查看启动以来的命令处理总数、每秒操作数、已过期的key数量、内存碎片率、复制延迟以及slowlog慢查询配置等关键指标。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看启动到当前处理命令总数:

# redis-cli info stats | grep total_commands

total_commands_processed:23693286991


查看每秒操作数:

# redis-cli info stats | grep instantaneous_ops_per_sec 

instantaneous_ops_per_sec:10861


查看已过期的key数量:

# redis-cli info stats |grep expired_keys   

expired_keys:0


查看命令处理总数:

# redis-cli info stats  |grep total_commands_processed

total_commands_processed:23695648616


查看进入进出总流量:

# redis-cli info stats  |grep net

total_net_input_bytes:62429833490720

total_net_output_bytes:83883788471819


查看slowlog慢查询配置:

# redis-cli config get slowlog-log-slower-than

1) "slowlog-log-slower-than"

2) "10000"



查看内存碎片率:

# redis-cli info memory  | grep mem_fragmentation_ratio

mem_fragmentation_ratio:1.08


查看复制延迟命令:

# redis-cli --latency 

min: 0, max: 1, avg: 0.16 (174 samples)

min: 0, max: 1, avg: 0.16 (196 samples)

min: 0, max: 1, avg: 0.16 (253 samples)

min: 0, max: 1, avg: 0.16 (273 samples)

min: 0, max: 1, avg: 0.16 (292 samples)

min: 0, max: 1, avg: 0.16 (313 samples)

min: 0, max: 1, avg: 0.16 (335 samples)

min: 0, max: 1, avg: 0.15 (429 samples)

min: 0, max: 1, avg: 0.15 (467 samples)


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15498/viewspace-2214564/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15498/viewspace-2214564/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值