Using memcached-tool


The memcached-tool, located within the scripts directory within the memcached source directory. The tool provides convenient access to some reports and statistics from any memcached instance.

The basic format of the command is:

shell> ./memcached-tool hostname:port [command]

The default output produces a list of the slab allocations and usage. For example:

shell> memcached-tool localhost:11211 display
 # Item_Size Max_age Pages Count Full? Evicted Evict_Time OOM
 1 80B 93s 1 20 no 0 0 0
 2 104B 93s 1 16 no 0 0 0
 3 136B 1335s 1 28 no 0 0 0
 4 176B 1335s 1 24 no 0 0 0
 5 224B 1335s 1 32 no 0 0 0
 6 280B 1335s 1 34 no 0 0 0
 7 352B 1335s 1 36 no 0 0 0
 8 440B 1335s 1 46 no 0 0 0
 9 552B 1335s 1 58 no 0 0 0
 10 696B 1335s 1 66 no 0 0 0
 11 872B 1335s 1 89 no 0 0 0
 12 1.1K 1335s 1 112 no 0 0 0
 13 1.3K 1335s 1 145 no 0 0 0
 14 1.7K 1335s 1 123 no 0 0 0
 15 2.1K 1335s 1 198 no 0 0 0
 16 2.6K 1335s 1 199 no 0 0 0
 17 3.3K 1335s 1 229 no 0 0 0
 18 4.1K 1335s 1 248 yes 36 2 0
 19 5.2K 1335s 2 328 no 0 0 0
 20 6.4K 1335s 2 316 yes 387 1 0
 21 8.1K 1335s 3 381 yes 492 1 0
 22 10.1K 1335s 3 303 yes 598 2 0
 23 12.6K 1335s 5 405 yes 605 1 0
 24 15.8K 1335s 6 384 yes 766 2 0
 25 19.7K 1335s 7 357 yes 908 170 0
 26 24.6K 1336s 7 287 yes 1012 1 0
 27 30.8K 1336s 7 231 yes 1193 169 0
 28 38.5K 1336s 4 104 yes 1323 169 0
 29 48.1K 1336s 1 21 yes 1287 1 0
 30 60.2K 1336s 1 17 yes 1093 169 0
 31 75.2K 1337s 1 13 yes 713 168 0
 32 94.0K 1337s 1 10 yes 278 168 0
 33 117.5K 1336s 1 3 no 0 0 0

This output is the same if you specify the command as display:

shell> memcached-tool localhost:11211 display
 # Item_Size Max_age Pages Count Full? Evicted Evict_Time OOM
 1 80B 93s 1 20 no 0 0 0
 2 104B 93s 1 16 no 0 0 0
...

The output shows a summarized version of the output from the slabs statistics. The columns provided in the output are shown below:

You can also obtain a dump of the general statistics for the server using the stats command:

Retornar