Skip to content

Instantly share code, notes, and snippets.

@elubow
Created October 21, 2013 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elubow/7092376 to your computer and use it in GitHub Desktop.
Save elubow/7092376 to your computer and use it in GitHub Desktop.
#!/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