Discussion: How to use the stats command to analyze the internal status of Memcached _ PHP Tutorial

Source: Internet
Author: User
Discussion: How to use the stats command to analyze the internal status of Memcached. Memcached has a stats command that allows you to view many status information of the Memcached service. Use the following method: first enter the telnet host name and port number in the command line to connect to m. MemcachedThere is StatsCommand to view the status information of the Memcached service. The usage is as follows:
First, enter the telnet host name and port number in the command line to connect to the memcached server. Then, enter the stats command to display the status information of the current memcached service.
For example, the test on my local machine is as follows:
Stats
STAT pid 1552
Statuptime 3792
STAT time 1262517674
STAT version 1.2.6
STAT pointer_size 32
STAT curr_items 1
STAT total_items 2
STAT bytes 593
STAT curr_connections 2
STAT total_connections 28
STAT connection_structures 9
STAT cmd_get 3
STAT performance_set 2
STAT get_hits 2
STAT get_misses 1
STAT evictions 0
STAT bytes_read 1284
STAT bytes_written 5362
STAT limit_maxbytes 67108864
STAT threads 1
END
A lot of status information is displayed here. each status item is explained in detail below:
1. pid: ID of the memcached service process
2. uptime: the time that the memcached service has elapsed since it was started. the unit is seconds.
3. time: The current system time of the host where the memcached server is located, in seconds.
4. version: version of the memcached component. Here is my current 1.2.6.
5. pointer_size: pointer size of the operating system of the host where the server is located, generally 32 or 64.
6. curr_items: number of cache objects in the current cache. Does not include objects that have been deleted from the cache.
7. total_items: indicates the number of all objects stored by the system from the memcached service start time to the current time, including the objects that have been deleted from the cache.
8. bytes: the storage space used by the system to store cached objects. the unit is byte.
9. curr_connections: number of connections opened by the current system.
10. total_connections: total number of connections opened by the system from memcached service start to current time.
11. connection_structures: indicates the number of connection structures allocated by the server from the memcached service start time to the current time. This explanation is given in the protocol document. what does it mean? I haven't figured it out yet.
12. performance_get: the cumulative amount of data to be obtained. here it is 3, because I tested it three times. for the first time, because no serialized object exists, data acquisition failed. it is null, I tested it twice with different objects.
13. accumulate _set: indicates the number of data sets to be stored cumulatively. here is 2. although I have stored the data three times, for the first time, there is no record because the data is not serialized, so it is not saved to the cache.
14. get_hits: indicates the number of successful data acquisition times.
15. get_misses: indicates the number of failed attempts to obtain data.
16. evictions: Number of cached objects removed from the cache to release space for new data projects. For example, objects removed by the LRU algorithm and expired objects that exceed the cache size.
17. bytes_read: total number of bytes read by the memcached server from the network.
18. bytes_written: total number of bytes that the memcached server sends to the network.
19. limit_maxbytes: maximum number of bytes allowed by the memcached service cache. The value is 67108864 bytes, that is, 64 MB. it is consistent with the size set when we start the memcached service.
20. threads: total number of requested worker threads. This explanation is given in the agreement document. what does it mean? I haven't understood it yet.
Summary:The stats command is useful in general. through this command, we can clearly understand all aspects of the current memcached service.

The http://www.bkjia.com/PHPjc/327617.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327617.htmlTechArticleMemcached has a stats command that allows you to view many status information about the Memcached service. Use the following method: Enter the telnet host name and port number in the command line to connect to m...

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.