Query Memcached statistics with netcat
is memcached running | memcached hit rate | memcached memory full | memcached | nc | statisticsprintf 'stats\nquit\n' | nc 127.0.0.1 11211 | grep -E 'STAT (curr_items|bytes|limit_maxbytes|get_hits|get_misses|evictions|curr_connections) 'Sends the stats command to Memcached over the text protocol and filters out the most meaningful lines. bytes and limit_maxbytes show usage and limit, get_hits and get_misses show how effective the cache is. If evictions keeps rising, the memory (option -m in /etc/memcached.conf) is too small.
Note: Without the final grep, the full statistics are shown. If nothing answers, Memcached is not running or is listening on a different address.
Also searched as
- is memcached running
- memcached hit rate
- memcached memory full