[root@node110 ~]# memcached-tool
Usage: memcached-tool <host[:port]> [mode]
memcached-tool 10.0.0.5:11211 display # shows slabs
memcached-tool 10.0.0.5:11211 # same. (default is display)
memcached-tool 10.0.0.5:11211 stats # shows general stats
memcached-tool 10.0.0.5:11211 dump # dumps keys and values
[root@node110 ~]# telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
set mykey 0 3600 11
hello world
STORED
quit
Connection closed by foreign host.
[root@node110 ~]# memcached-tool 127.0.0.1
# Item_Size Max_age Pages Count Full? Evicted Evict_Time OOM
1 96B 480s 1 1 no 0 0 0
参数说明:
#:slab class编号
Item_Size:Chunk大小
Max_age:生存时间
Pages:为了缓存数据,用了多少个内存页数
Count:slab内的记录数
Full?:表示slab是否还有空闲trunk
[root@node110 ~]# memcached-tool 127.0.0.1 stats
#127.0.0.1:11211 Field Value
accepting_conns 1
auth_cmds 0
auth_errors 0
bytes 0
bytes_read 59
bytes_written 108
cas_badval 0