我想想象一下Memcached守护进程的RAM使用情况 - 最好的实用工具是什么?
理想情况下,我想用Perl.
Memcache报告了许多统计信息,例如使用的内存,存储的对象,命中和未命中.使用标准TCP套接字连接到服务器(可能是localhost:11211)并写入"stats \n"以获取统计信息列表.请参阅下面的示例.
查看Cacti实际绘制数据的图表.我用它取得了很大的成功.
> $ telnet localhost 11211 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. stats STAT pid 75723 STAT uptime 4166691 STAT time 1236609062 STAT version 1.2.4 STAT pointer_size 32 STAT rusage_user 115.028511 STAT rusage_system 326.163351 STAT curr_items 83335 STAT total_items 1822140 STAT bytes 239997834 STAT curr_connections 48 STAT total_connections 7840 STAT connection_structures 83 STAT cmd_get 4273541 STAT cmd_set 1822140 STAT get_hits 2442609 STAT get_misses 1830932 STAT evictions 1696494 STAT bytes_read 5162992092 STAT bytes_written 7000049654 STAT limit_maxbytes 268435456 STAT threads 1 END