STAT pid 14868
STAT uptime 175931
STAT time 1220540125
STAT version 1.2.2
STAT pointer_size 32
STAT rusage_user 620.299700
STAT rusage_system 1545.703017
STAT curr_items 228
STAT total_items 779
STAT bytes 15525
STAT curr_connections 92
STAT total_connections 1740
STAT connection_structures 165
STAT cmd_get 7411
STAT cmd_set 28445156
STAT get_hits 5183
STAT get_misses 2228
STAT evictions 0
STAT bytes_read 2112768087
STAT bytes_written 1000038245
STAT limit_maxbytes 52428800
STAT threads 1
END
内存统计
您可以使用以下命令查询当前内存统计信息
stats slabs
## Memcache Commands### Stats CommandThe `stats` command is used to retrieve general statistics about the Memcached server. This command can provide information such as total number of connections, memory usage, hit and miss ratio, and more.
To use the `stats` command, you can simply run:```bashstats
This will return a list of statistics that can help you analyze the performance and usage of the Memcached server.
Set Command
The set command is used to store a new key with some data on the Memcached server. This command requires the key, flags, expiration time, and the length of data in bytes.
To use the set command, you can run:
setmykey036005hello
In this example, we are setting a key mykey with a value of hello that expires in 3600 seconds.
Get Command
The get command is used to retrieve the data stored with a specific key on the Memcached server.
To use the get command, you can run:
getmykey
This will return the value associated with the key mykey, if it exists in the Memcached server.
STAT 1:chunk_size 80 STAT 1:chunks_per_page 13107 STAT 1:total_pages 1 STAT 1:total_chunks 13107 STAT 1:used_chunks 13106 STAT 1:free_chunks 1 STAT 1:free_chunks_end 12886 STAT 2:chunk_size 100 STAT 2:chunks_per_page 10485 STAT 2:total_pages 1 STAT 2:total_chunks 10485 STAT 2:used_chunks 10484 STAT 2:free_chunks 1 STAT 2:free_chunks_end 10477 [...] STAT active_slabs 3 STAT total_malloced 3145436 END