Discussion: How to analyze the internal state of memcached by stats command _php tutorial

Source: Internet
Author: User
MemcachedHave a Statscommand, through which you can view many status information for the memcached service. here's how to use it:
Enter the Telnet host name port number directly on the command line, connect to the memcached server, and then after successful connection, enter the stats command to display the status information for the current memcached service.
For example, my native test is as follows:
Stats
STAT PID 1552
STAT Uptime 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 Cmd_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 shown here, and each state entry is explained in detail below:
1. Process ID of the pid:memcached service process
2. Uptime:memcached the time, in seconds, from the start of the service to the current.
3. The time, in seconds, that the time:memcached server hosts the current system.
4. Version of the version:memcached component. Here is the 1.2.6 I am currently using.
5. Pointer_size: The pointer size of the host operating system on which the server is located, typically 32 or 64.
6. Curr_items: Represents the number of cached objects that are stored in the current cache. Objects that are currently removed from the cache are not included.
7. Total_items: Represents the number of objects that have been stored by the system since the Memcached service was started to the current time, including objects that are currently removed from the cache.
8. Bytes: Represents the storage space used by the system to store cached objects in bytes.
9. Curr_connections: Indicates the number of connections that are open on the current system.
Total_connections: Represents the total number of connections that have been opened by the system from the Memcached service start to the current time.
Connection_structures: Indicates the number of connection structures that have been allocated by the server since the start of the Memcached service to the current time, this explanation is given by the Protocol document, and I do not understand it at this point.
Cmd_get: The cumulative amount of data obtained, here is 3, because I tested 3 times, the first time because there is no serialized object, so get data failure, is NULL, 2 times behind is I tested with different objects 2 times.
Cmd_set: Cumulative number of saved data, here is 2. Although I have stored 3 times, but for the first time because there is no serialization, it is not saved to the cache, there is no record.
Get_hits: Indicates the number of times the data was successfully obtained.
Get_misses: Indicates the number of times the data failed to get.
Evictions: The number of cached objects removed from the cache in order to free up space for new data items. For example, objects that are removed based on the LRU algorithm when the cache size is exceeded, as well as expired objects.
Bytes_read:memcached The total number of bytes that the server reads from the network.
The total number of bytes sent to the network by the bytes_written:memcached server.
The maximum number of bytes allowed to be used by the limit_maxbytes:memcached service cache. This is 67108864 bytes, which is 64M. Match the size of the memcached service setting that we started.
Threads: The total number of worker threads that are requested. This explanation is given in the protocol document, what exactly does it mean, I don't understand yet.
Summary:The stats command is generally useful, and through this command we are well aware of the various aspects of the current memcached service.

http://www.bkjia.com/PHPjc/327617.html www.bkjia.com true http://www.bkjia.com/PHPjc/327617.html techarticle Memcached has a stats command that allows you to view many of the status information for the Memcached service. Use the following method: Enter the Telnet host name port number directly on the command line and connect to M ...

  • Related Article

    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.