Memcache monitoring Tool--Memkeys

Source: Internet
Author: User

Memcache Monitoring Tools--Memkeys


Introduced


Memkeys is a top-of-the-line, Tumblr-like tool that can be used to view memcached's key usage in real time.

Installation


Install autoconf (requires version 2.68 or more):

# wget-c http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz# tar zxvf autoconf-latest.tar.gz# cd autoconf-2.69#./ configure# make && make install

Install other dependencies:

# yum Install libpcap-devel pcre-devel ncurses-devel

Install Memkeys:

# git clone https://github.com/tumblr/memkeys.git# cd memkeys#/autogen.sh#./configure# make && make install

Use


# memkeys-h
usage: memkeys -i nic [options]-d, --discard= thresh discard keys where req/s rate is below thresh-i, -- interface=nic network interface to capture traffic on  (required)-p, -- port=port network port to capture memcache traffic on  (default  11211)-r, --refresh=interval refresh the stats display every interval  ms  (default 500)-l, --logfile=file output logs to file-r, --report= report output data in report format  (csv or curses, default  Curses)-h, --help this help-v, --verbose increase verbosity. may be  used multiple times.-v, --version show program info and exit. 

Capture the usage of memcached key on eth0, logging to/tmp/memkeys.log:

Memkeys-i eth0-l/tmp/memkeys.log

The results appear similar to the following:

Memcache Key calls ObjSize req/sec BW (kbps) Username 1 0.14 0.01key12 1 6 0.07 0.00key10 1 6 0.06 0.00sort mode:reqrate (DESC) keys:3 Packets (recv/dropped): 24/0 (0.00%) rt:1 (ms) B:sort by bandwidth | C:sort by calls | Q:quit | R:sort by Req/sec | S:sort by Size | T:toggle sort order (ASC|DESC)

When you run Memkeys on a machine with a large amount of network traffic, you need to define a threshold for requests per second, filter out req/sec less than the specified value, or the memory footprint will grow quite large.

Memkeys-i eth0-d 10.0-l/tmp/memkeys.log


This article is from the SQL Server deep dives blog, so be sure to keep this source http://ultrasql.blog.51cto.com/9591438/1637555

Memcache monitoring Tool--Memkeys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.