memcache 流量激增,抓包检测方式

  1. 使用tcpflow抓包 tcpflow -c -p -i eth0 dst port 11211 and dst host 10.x.x.x|grep ‘x.x.x.x.11211:’ > a.txt
  2. 跟进key的数量排序 awk -F ‘:’ ‘{print $2}’ a.txt|sort |uniq -c|sort -rn|head -n 10
  3. grep key 看看流量来自哪组服务器

tcpflow -c -p -i eth0 src port 11211 and src host 10.x.x.x|grep ’keyname′

发表新评论