Memcached stats 命令
Memcached stats 命令用于返回統(tǒng)計(jì)信息例如 PID(進(jìn)程號(hào))、版本號(hào)、連接數(shù)等。
語(yǔ)法:
stats 命令的基本語(yǔ)法格式如下:
stats
實(shí)例
在以下實(shí)例中,我們使用了 stats 命令來(lái)輸出 Memcached 服務(wù)信息。
stats STAT pid 1162 STAT uptime 5022 STAT time 1415208270 STAT version 1.4.14 STAT libevent 2.0.19-stable STAT pointer_size 64 STAT rusage_user 0.096006 STAT rusage_system 0.152009 STAT curr_connections 5 STAT total_connections 6 STAT connection_structures 6 STAT reserved_fds 20 STAT cmd_get 6 STAT cmd_set 4 STAT cmd_flush 0 STAT cmd_touch 0 STAT get_hits 4 STAT get_misses 2 STAT delete_misses 1 STAT delete_hits 1 STAT incr_misses 2 STAT incr_hits 1 STAT decr_misses 0 STAT decr_hits 1 STAT cas_misses 0 STAT cas_hits 0 STAT cas_badval 0 STAT touch_hits 0 STAT touch_misses 0 STAT auth_cmds 0 STAT auth_errors 0 STAT bytes_read 262 STAT bytes_written 313 STAT limit_maxbytes 67108864 STAT accepting_conns 1 STAT listen_disabled_num 0 STAT threads 4 STAT conn_yields 0 STAT hash_power_level 16 STAT hash_bytes 524288 STAT hash_is_expanding 0 STAT expired_unfetched 1 STAT evicted_unfetched 0 STAT bytes 142 STAT curr_items 2 STAT total_items 6 STAT evictions 0 STAT reclaimed 1 END
這里顯示了很多狀態(tài)信息,下邊詳細(xì)解釋每個(gè)狀態(tài)項(xiàng):
- pid: memcache服務(wù)器進(jìn)程ID
- uptime:服務(wù)器已運(yùn)行秒數(shù)
- time:服務(wù)器當(dāng)前Unix時(shí)間戳
- version:memcache版本
- pointer_size:操作系統(tǒng)指針大小
- rusage_user:進(jìn)程累計(jì)用戶時(shí)間
- rusage_system:進(jìn)程累計(jì)系統(tǒng)時(shí)間
- curr_connections:當(dāng)前連接數(shù)量
- total_connections:Memcached運(yùn)行以來(lái)連接總數(shù)
- connection_structures:Memcached分配的連接結(jié)構(gòu)數(shù)量
- cmd_get:get命令請(qǐng)求次數(shù)
- cmd_set:set命令請(qǐng)求次數(shù)
- cmd_flush:flush命令請(qǐng)求次數(shù)
- get_hits:get命令命中次數(shù)
- get_misses:get命令未命中次數(shù)
- delete_misses:delete命令未命中次數(shù)
- delete_hits:delete命令命中次數(shù)
- incr_misses:incr命令未命中次數(shù)
- incr_hits:incr命令命中次數(shù)
- decr_misses:decr命令未命中次數(shù)
- decr_hits:decr命令命中次數(shù)
- cas_misses:cas命令未命中次數(shù)
- cas_hits:cas命令命中次數(shù)
- cas_badval:使用擦拭次數(shù)
- auth_cmds:認(rèn)證命令處理的次數(shù)
- auth_errors:認(rèn)證失敗數(shù)目
- bytes_read:讀取總字節(jié)數(shù)
- bytes_written:發(fā)送總字節(jié)數(shù)
- limit_maxbytes:分配的內(nèi)存總大?。ㄗ止?jié))
- accepting_conns:服務(wù)器是否達(dá)到過(guò)最大連接(0/1)
- listen_disabled_num:失效的監(jiān)聽數(shù)
- threads:當(dāng)前線程數(shù)
- conn_yields:連接操作主動(dòng)放棄數(shù)目
- bytes:當(dāng)前存儲(chǔ)占用的字節(jié)數(shù)
- curr_items:當(dāng)前存儲(chǔ)的數(shù)據(jù)總數(shù)
- total_items:?jiǎn)?dòng)以來(lái)存儲(chǔ)的數(shù)據(jù)總數(shù)
- evictions:LRU釋放的對(duì)象數(shù)目
- reclaimed:已過(guò)期的數(shù)據(jù)條目來(lái)存儲(chǔ)新數(shù)據(jù)的數(shù)目
更多建議: