Memcache监控工具 -- mctop

介绍


mctop 与 memcache-top 相似,主要用于监视 Memcache 的流量,包括 key 的调用次数、对象存储大小、每秒的请求数、以及消耗的网络带宽等。


源代码:https://github.com/etsy/mctop

 

安装


1
2
3
4
5
6
7
8
9
10
11
12
13
cd  /usr/local
yum  install  libpcap-devel ruby-devel rubygems git
gem sources --remove https: //rubygems .org/
gem sources -a https: //ruby .taobao.org/
gem sources -l
gem  install  ruby-pcap - v  '0.7.8'
gem  install  bundle
gem  install  rake
git clone https: //github .com /etsy/mctop .git
cd  mctop
bundle  install
rake  install
ln  -s  /usr/local/mctop/bin/mctop  /usr/bin/mctop

 

使用


查看帮助:

1
mctop –h
1
2
3
4
5
6
7
Usage: mctop [options]
-i, --interface=NIC Network interface to sniff (required)
--host=HOST Network host to sniff on (default all)
-p, --port=PORT Network port to sniff on (default 11211)
-d, --discard=THRESH Discard keys with request/sec rate below THRESH
-r, --refresh=MS Refresh the stats display every MS milliseconds
-h, --help Show usage info

 

1
mctop -i eth0 -p 11211

 

输出类似如下信息:

1
2
3
4
5
6
7
memcache key calls objsize req/sec bw(kbps)
key12 1 6 0.02 0.00
key10 1 6 0.02 0.00
username 1 12 0.02 0.00
  
sort mode: reqsec (desc) keys: 3 packets (recv/dropped): 21 / 0 ( 0.00%) rt: 0.719 (ms)
Q:quit | C:sort by calls | S:sort by size | R:sort by req/sec | B:sort by bandwidth | T:toggle sort order (asc|desc)















本文转自UltraSQL51CTO博客,原文链接:http://blog.51cto.com/ultrasql/1637615  ,如需转载请自行联系原作者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值