memcached-tool脚本可以方便地获得slab的使用情况 (它将memcached的返回值整理成容易阅读的格式),可以从下面的地址获得脚本:
http://www.netingcn.com/demo/memcached-tool.zip
使用方法也极其简单:
perl memcached-tool server_ip:prot option
例子:
perl memcached-tool 10.72.23.179:12001 stats
perl memcached-tool 10.72.23.179:12001 display
输出示例:
# Item_Size Max_age 1MB_pages Count Full?
14 1.8 kB 23587 s 1 2 yes
15 2.3 kB 23815 s 39 17589 yes
16 2.8 kB 24029 s 26051 9404411 yes
17 3.5 kB 24066 s 2207 635616 yes
18 4.4 kB 24029 s 367 84410 yes
19 5.5 kB 24111 s 9 1656 yes
20 6.9 kB 24112 s 5 621 yes
21 8.7 kB 24114 s 2 231 yes
22 10.8 kB 24067 s 1 93 yes
23 13.6 kB 24103 s 1 43 yes
24 16.9 kB 24000 s 1 10 yes
各列的含义:
# slab class编号
Item_Size Chunk大小
Max_age LRU内最旧的记录的生存时间
1MB_pages 分配给Slab的页数
Count Slab内的记录数
Full? Slab内是否含有空闲chunk
http://www.netingcn.com/demo/memcached-tool.zip
使用方法也极其简单:
perl memcached-tool server_ip:prot option
例子:
perl memcached-tool 10.72.23.179:12001 stats
perl memcached-tool 10.72.23.179:12001 display
输出示例:
# Item_Size Max_age 1MB_pages Count Full?
14 1.8 kB 23587 s 1 2 yes
15 2.3 kB 23815 s 39 17589 yes
16 2.8 kB 24029 s 26051 9404411 yes
17 3.5 kB 24066 s 2207 635616 yes
18 4.4 kB 24029 s 367 84410 yes
19 5.5 kB 24111 s 9 1656 yes
20 6.9 kB 24112 s 5 621 yes
21 8.7 kB 24114 s 2 231 yes
22 10.8 kB 24067 s 1 93 yes
23 13.6 kB 24103 s 1 43 yes
24 16.9 kB 24000 s 1 10 yes
各列的含义:
# slab class编号
Item_Size Chunk大小
Max_age LRU内最旧的记录的生存时间
1MB_pages 分配给Slab的页数
Count Slab内的记录数
Full? Slab内是否含有空闲chunk