Tuesday, November 5, 2013

Watching Memcached Traffic with TCPDump

Here's a fun little one-liner I just hacked together to keep tabs on the get/set commands coming in on a memcached server that I administer.
sudo tcpdump -i eth0 -s 65535 -A -ttt port 11211| cut -c 9- | grep -i '^get\|set'
It'd be easy to feed the output of this command into another script to aggregate key summary data over a given sample period.

No comments: