Command Line to view the Memcached running status

Source: Internet
Author: User

It is often necessary to monitor the running status of Memcached on the server, such as the number of cache queries and hit rate. But
The memcached-tool is written in perl in linux, and I have never tried whether it can be used in windows. Later, I found a simple way to do this, that is, using Telnet.

1. In windows, connect to the memcached port. In the cmd command line, type telnet 192.168.1.1 11211 11211 as the port number bound to memcached.
2. After connecting to the port, enter the stats command to obtain the parameters that describe the running status of the Memcached server.
STAT pid 4356 server process ID
STAT uptime 56625 server running time, in seconds
STAT time 1225249079 current UNIX time of the server
STAT version 1.1.0 server version
STAT pointer_size 64
STAT rusage_user 151.845489 cumulative user time of the process (seconds: subtle)
STAT rusage_system 121.667603 accumulated system time of the process (seconds: subtle)
STAT ibuffer_size 4096
STAT curr_connections 13 connection count
STAT total_connections 54136 total number of connections received since the server was running
STAT connection_structures 318 Number of connection structures allocated by the server
STAT performance_get 100595 total number of retrieved requests
STAT performance_set 6510 total number of storage requests
STAT get_hits 96543 total number of successful requests
STAT get_misses 4052 total number of failed requests
STAT bytes_read 4427679 total number of bytes the server reads from the network
STAT bytes_written 6585596 total number of bytes the server sends to the network

1> uptime is the number of seconds for memcached to run,
2> pai_get is the number of times the cache is queried.
3> split the two data to get the average number of requests cached per second-the recent niupu traffic is very low, so the average request is more than once per second,
With such great pressure, it is no problem to use the file system cache, and it does not reflect the advantages of using memcached.
4>. The number of times the key => value is set in the cmd_set below. The entire memcached is a large hash, which is not found by using ipv_get.
Then, it will call cmd_set to write it into the cache.
5> followed by get_hits, which is the number of cache hits. Cache hit rate = get_hits/pai_get * 100%.
6> The following get_misses number plus get_hits should be equal to pai_get.
7>, while total_itemscurr_items indicates the number of key-value pairs in the cache.
8> total_items = resource_set = get_misses on the graph. However, when the maximum available memory is used up, memcached deletes some content and the above equation is not true.

 

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.