『葉狂人』的怕失憶筆記 Back-End

Watching Memcached Traffic with TCPDump

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.

『葉狂人』的怕失憶筆記, author
「若想說服人,就要用對方的語言。」
美國廣告大師奧格威