数据库

批量查询 Redis ops

By karp 1410 Views 1 MIN READ 0 Comments

需求批量查询 redis 实例的 ops

#!/bin/bash
time=`date "+%Y-%m-%d_%H:%M:%S"`

for x in 10.44.67.15:121 10.44.101.11:401 10.44.15.112:906
do
    ip=${x%:*}
    port=${x#*:}
    ops=$(redis-cli -h $ip -p $port info stats |grep ops | cut -d : -f 2)
    echo $time $x "ops:" $ops
done

本文由 karp 原创

采用 CC BY-NC-SA 4.0 协议进行许可

转载请注明出处:https://www.ikarp.top/index.php/archives/193.html

标签: redis

0 评论