Memcached stats命令
Memcached stats命令用于返回统计信息例如PID(进程号)、版本号、连接数等。
语法:文章源自小柒网-https://www.yangxingzhen.cn/6963.html
stats 命令的基本语法格式如下:文章源自小柒网-https://www.yangxingzhen.cn/6963.html
stats文章源自小柒网-https://www.yangxingzhen.cn/6963.html
实例文章源自小柒网-https://www.yangxingzhen.cn/6963.html
在以下实例中,我们使用了stats命令来输出 Memcached 服务信息。文章源自小柒网-https://www.yangxingzhen.cn/6963.html
[root@localhost ~]# telnet 127.0.0.1 11211文章源自小柒网-https://www.yangxingzhen.cn/6963.html
Trying 127.0.0.1...文章源自小柒网-https://www.yangxingzhen.cn/6963.html
Connected to 127.0.0.1.文章源自小柒网-https://www.yangxingzhen.cn/6963.html
Escape character is '^]'.文章源自小柒网-https://www.yangxingzhen.cn/6963.html
stats文章源自小柒网-https://www.yangxingzhen.cn/6963.html
STAT pid 3446
STAT uptime 2075
STAT time 1589185990
STAT version 1.6.5
STAT libevent 2.0.21-stable
STAT pointer_size 64
STAT rusage_user 0.194141
STAT rusage_system 0.112501
STAT max_connections 1024
STAT curr_connections 2
STAT total_connections 7
STAT rejected_connections 0
STAT connection_structures 3
STAT response_obj_bytes 4672
STAT response_obj_total 4
STAT response_obj_free 3
STAT response_obj_oom 0
STAT read_buf_bytes 65536
STAT read_buf_bytes_free 49152
STAT read_buf_oom 0
STAT reserved_fds 20
STAT cmd_get 5
STAT cmd_set 5
STAT cmd_flush 0
STAT cmd_touch 0
STAT cmd_meta 0
STAT get_hits 4
STAT get_misses 1
STAT get_expired 0
STAT get_flushed 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 231
STAT bytes_written 2318
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT time_in_listen_disabled_us 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT slab_reassign_rescues 0
STAT slab_reassign_chunk_rescues 0
STAT slab_reassign_evictions_nomem 0
STAT slab_reassign_inline_reclaim 0
STAT slab_reassign_busy_items 0
STAT slab_reassign_busy_deletes 0
STAT slab_reassign_running 0
STAT slabs_moved 0
STAT lru_crawler_running 0
STAT lru_crawler_starts 2041
STAT lru_maintainer_juggles 4138
STAT malloc_fails 0
STAT log_worker_dropped 0
STAT log_worker_written 0
STAT log_watcher_skipped 0
STAT log_watcher_sent 0
STAT bytes 65
STAT curr_items 1
STAT total_items 4
STAT slab_global_page_pool 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT evicted_active 0
STAT evictions 0
STAT reclaimed 0
STAT crawler_reclaimed 1
STAT crawler_items_checked 15
STAT lrutail_reflocked 0
STAT moves_to_cold 4
STAT moves_to_warm 0
STAT moves_within_lru 0
STAT direct_reclaims 0
STAT lru_bumps_dropped 0
END
这里显示了很多状态信息,下边详细解释每个状态项:
pid: memcache服务器进程ID
uptime:服务器已运行秒数
time:服务器当前Unix时间戳
version:memcache版本
pointer_size:操作系统指针大小
rusage_user:进程累计用户时间
rusage_system:进程累计系统时间
curr_connections:当前连接数量
total_connections:Memcached运行以来连接总数
connection_structures:Memcached分配的连接结构数量
cmd_get:get命令请求次数
cmd_set:set命令请求次数
cmd_flush:flush命令请求次数
get_hits:get命令命中次数
get_misses:get命令未命中次数
delete_misses:delete命令未命中次数
delete_hits:delete命令命中次数
incr_misses:incr命令未命中次数
incr_hits:incr命令命中次数
decr_misses:decr命令未命中次数
decr_hits:decr命令命中次数
cas_misses:cas命令未命中次数
cas_hits:cas命令命中次数
cas_badval:使用擦拭次数
auth_cmds:认证命令处理的次数
auth_errors:认证失败数目
bytes_read:读取总字节数
bytes_written:发送总字节数
limit_maxbytes:分配的内存总大小(字节)
accepting_conns:服务器是否达到过最大连接(0/1)
listen_disabled_num:失效的监听数
threads:当前线程数
conn_yields:连接操作主动放弃数目
bytes:当前存储占用的字节数
curr_items:当前存储的数据总数
total_items:启动以来存储的数据总数
evictions:LRU释放的对象数目
reclaimed:已过期的数据条目来存储新数据的数目
若文章图片、下载链接等信息出错,请在评论区留言反馈,博主将第一时间更新!如本文“对您有用”,欢迎随意打赏,谢谢!
![weinxin](https://www.yangxingzhen.com/images/weixin.jpg)
![weinxin](https://www.yangxingzhen.com/images/weixingongzhonghao.png)
评论