Created
October 21, 2013 23:07
-
-
Save elubow/7092376 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ports="6379 6380 6381 6382 6383 6384 6385" | |
for port in ${ports} | |
do | |
t0=$(redis-cli -p $port info | grep command | cut -d : -f 2 | tr -d ‘\r’) | |
sleep 1 | |
t1=$(redis-cli -p $port info | grep command | cut -d : -f 2 | tr -d ‘\r’) | |
val=$(($t1$t0)) | |
echo “$port,$val” | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment