Memcache (MC) series (vii) Memcache stats command

Source: Internet
Author: User
Tags memcached memcached stats
The Memcached Stats command is useful for viewing the memcache running state.

Telnet to the memcached server after a lot of commands can be used, in addition to the well-known add, get, set, INCR, DECR, replace, delete and other assignment commands, there are a series of commands to obtain server information, This part of the command starts with stats.
Common commands:

Stats
Display server information, statistics, etc.

Stats Reset
Clear statistics

stats cachedump slab_id limit_num
Displays a list of the first limit_num keys in a slab, shown in the following format
ITEM Key_name [Value_length b; expire_time|access_time s], where memcached 1.2.2 and previous versions show the access Time (timestamp), 1.2.4 or later, Include 1.2.4 Display expiration Time (timestamp), if it is never expired key,expire_time will be displayed as server startup time

Stats Cachedump 7 2
ITEM Copy_test1 [+ b; 1207795754 S]
ITEM Copy_test [248 b; 1207793649 S]
Note: Do not attempt to export all key lists of a slab in the Memcache service through this command, which returns only 1M of memory data by default.

Stats Slabs
Displays information about each slab, including the size, number, usage, etc. of the chunk

Stats items
Displays the number of item in each slab and the age of the oldest item (the number of seconds the last access distance is now)

Stats detail [On|off|dump]
Set or display detailed operation Records

parameter is on to open detailed operation record
parameter is off, close verbose operation record
The parameter is dump, showing the detailed operation record (number of times each key value get, set, hit, Del)

Stats Detail Dump
PREFIX Copy_test2 get 1 hit 1 set 0 del 0
PREFIX Copy_test1 get 1 hit 1 set 0 del 0

PREFIX cpy get 1 hit 0 set 0 del 0


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.