Skip to content

Instantly share code, notes, and snippets.

@stevenwilkin
Created September 27, 2013 11:24
Show Gist options
  • Save stevenwilkin/6727189 to your computer and use it in GitHub Desktop.
Save stevenwilkin/6727189 to your computer and use it in GitHub Desktop.
Calculating memcached miss-rate
HITS=`echo "stats" | nc 127.0.0.1 11211 | grep get_hits | awk '{print $3}' | sed 's/[^0-9]//'`
MISSES=`echo "stats" | nc 127.0.0.1 11211 | grep get_misses | awk '{print $3}' | sed 's/[^0-9]//'`
echo "($MISSES * 100) / ($HITS + $MISSES)" | bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment