hangkk2008

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

-r 选项重复执行一个命令指定的次数
-i 设置命令执行的间隔。
比如查看redis每秒执行的commands(qps)

# redis-cli -p 6379 -r 100 -i 1 info stats | grep instantaneous_ops_per_sec
instantaneous_ops_per_sec:0
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1
instantaneous_ops_per_sec:1

2.后台进程监控

/apps/sh/tool/nosql_stat --help
Unknown option: help
==========================================================================================
Usage :
Command line options :

-h,--host=s IP address.
-p,--port=i Port
-i,--interval Time(second) Interval. Default : 1
-l,--logfile Print to Logfile. One day a logfile,the suffix of logfile is 'yyyy-mm-dd';
-m Memcache Monitor. Default : Redis Monitor

Sample :
shell> nohup ./nosql_stat --host 127.0.0.1 --port 6379 -i 10 -l /tmp/redis_stat > /dev/null 2>&1 &

Tip : logfile name is redis_stat.2017-09-13

 

perl /apps/sh/tool/nosql_stat -i 1 -h 127.0.0.1 -p 6921 -l /apps/logs/redis/redis_stat_6921

 

posted on 2020-03-08 16:12  鱼儿也疯狂  阅读(135)  评论(0)    收藏  举报