Created
September 27, 2013 11:24
-
-
Save stevenwilkin/6727189 to your computer and use it in GitHub Desktop.
Calculating memcached miss-rate
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
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