标签:redis监控
redis-cli info > /tmp/red.txt 2>/dev/null
m1=`cat /tmp/red.txt|grep total_commands_processed|sed -r ‘s/\r//‘|awk -F ":" ‘{print $2}‘`
sleep 10
continue
redis-cli info > /tmp/red1.txt 2>/dev/null
m2=`cat /tmp/red1.txt|grep total_commands_processed|sed -r ‘s/\r//‘|awk -F ":" ‘{print $2}‘`
ma=$(echo "($m2-$m1)/10"|bc)
echo $ma
本文出自 “学习linux” 博客,请务必保留此出处http://10265013.blog.51cto.com/10255013/1769066
标签:redis监控
原文地址:http://10265013.blog.51cto.com/10255013/1769066