I was hacking about with the python bindings for libpcap today and threw
together a little app for grabbing memcache stats usage by listening to
traffic on the network card.  It only works with the text protocol, but I
figured it might be of some use to others:
http://github.com/gmr/menwith/tree/master

If you have ideas on how to make it better or have patches, feel free to
send either my way.

Example Output:


374 packets received, 0 packets dropped, 0 packets dropped by interface.
Listened for 21.198040 seconds.

Top 10 set commands:

 foo_bar_1052968749: 1
 foo_bar_1014930624: 1
 staplr.check: 1
 foo_bar_1204420773: 1
 foo_bar_1067674038: 1
 foo_bar_1107012199: 1
 foo_bar_1167916291: 1
 foo_bar_1130493593: 1
 foo_potd: 1
 foo_bar_1119236135: 1


stats requests: 1

Top 10 get commands:

 foo_member_2648: 8
 foo_member_3071: 6
 foo_member_6057: 5
 foo_member_5076: 4
 foo_member_6284: 4
 foo_member_13: 3
 foo_member_6003: 3
 foo_member_3030: 2
 foo_member_6053: 2
 foo_member_6275: 2


Regards,

Gavin

Reply via email to