src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 monitor
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info clients|grep connected_clients 查看客戶端已連接個數(shù)
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info memory|egrep '(used_memory_human|used_memory_peak_human)'
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info memory|grep -e "used_memory_human" -e "used_memory_peak_human" 查看當(dāng)前使用內(nèi)存量和歷史最高峰值
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info stats | grep total_commands 查看啟動到當(dāng)前處理命令總數(shù)
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info stats | grep instantaneous_ops_per_sec 每秒操作數(shù)
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info stats | grep expired_keys 已過期的key數(shù)量
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info stats | grep instantaneous_input_kbps 每秒進(jìn)出流量(70444byte)0.07M
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info stats | grep rejected_connections拒絕的連接請求量
src/redis-cli -h 10.20.137.141 -p 6379 -a 123456789 info memory|grep mem_fragmentation_ratio
內(nèi)存碎片比例(如果超過1,表示存在內(nèi)存碎片;如果小于1,說明內(nèi)存被交換到swap里面去了。計算公式為:used_memory_rss/used_memory)
src/redis-cli -h IP -p 26379 -a 123456 info|grep process_id
src/redis-cli info clients|grep connected_clients 查看客戶端已連接個數(shù)