请通过浏览器功能收藏网页

memcached系统运行状况监测status命令详细说明 Memcached

发布时间:2018-08-21 23:06:39  作者:本站编辑  来源:本站原创  浏览次数:
我有话说 | 分享 |
www.javainfo.com.cn 上干货 欢迎收藏

 stats命令:查询服务器的运行状态和其他内部数据,包含如下这些:

1 pid :服务器进程 ID

2uptime :服务器运行时间,单位秒

3time:服务器当前的 UNIX 时间

4version :服务器的版本号

5libeventlibevent的版本

6pointer_size :服务器操作系统位数

7 rusage_user :该进程累计的用户时间       分析CPU占用是否高  

8 rusage_system :该进程累计的系统时间

9 curr_connections  :当前连接数       分析连接数是否过多    

10 total_connections  :服务器启动后总连接数

11connection_structures :服务器分配的连接结构的数量

12reserved_fds:内部使用的misc fds 数量

13 cmd_get  :获取请求数量                    分析命中率

14 get_hits  :获取成功的总次数,命中次数

15 get_misses  :获取失败的总次数

16 cmd_set  :存储请求数量

17cmd_flush flush请求的数量

18cmd_touchtouch请求的数量

19 delete_misses  :删除失败次数

20 delete_hits  :删除命中

21incr_misses :递增失败次数

22incr_hits :递增命中次数

23decr_misses :递减命中次数

24decr_hits :递减失败次数

25cas_misses Cas 原子设置操作失败次数

26cas_hits Cas 命中次数

27cas_badval Cas 操作找到 key, 但是版本过期,没有设置成功

28touch_hitstouch命中次数

29touch_missestouch失败次数

30auth_cmds :认证次数(包括成功和失败)

31auth_errors :认证失败次数

32 bytes  :已用缓存空间

33 bytes_read  :总共获取的数据量

34 bytes_written  :总写入数量数

35 limit_maxbytes  :总允许写入的数据量,和分配的内存有

36 accepting_conns :允许的总连接数

37listen_disabled_num :监听失败的次数

38threads:需要的工作线程数

39hash_bytes:当前使用的Hash table容量大小

40hash_is_expanding:指定Hash table是否自动增长

41malloc_failsmalloc内存分配失败的次数

42 curr_items :当前缓存 item  数量    分析对象LRU频率

43 total_items  从存 服务启动后,总的存储缓存 item  数量

44 evictions  通过除 删除 item  放内存的次数


 stats settings查看设置

maxbytes 字节 限制 0 无限制

maxconns :允许 大连接数

tcpportTCP端口

udpportUDP端口

verbosity:日志0=none,1=som,2=lots

oldest:最老对象过期时间

evictionson/off,是否禁用LRU

domain_socketsocketdomain

umask:创建Socket时的umask

growth_factor 增长因子

chunk_size key+value+flags

num_threads:线程数,可以通过-t设置,默认4

stat_key_prefixstats分隔符

detail_enabledyes/no,显示stats细节信息

reqs_per_event IO 吞吐 ( event)

cas_enabledyes/no,是否启用CAS-C禁用

tcp_backlogTCP监控日志

auth_enabled_saslyes/no,是否启用SASL验证



 stats items数据项统计

number :该slab 对象 数, 不包含过期对象

age LRU 列中 最老对象 过期 时间

evicted LRU 对象

evicted_nonzero 设置了非0 时间的LRU 对象

evicted_time 后一次LRU 数, 监控

outofmemory:不能存储对象次数,使用-M会报错

tailrepairs:修复slabs次数

reclaimed:使用过期对象空间存储对象次数


 stats slabs区块统计

chunk_size chunk byte

chunks_per_page 每个page chunk 数量

total_pages page 数量

total_chunks chunk 数量*page 数量

get_hits get 命中数

cmd_setset

delete_hitsdelete命中数

incr_hitsincr命中数

decr_hitsdecr命中数

cas_hitscas命中数

cas_badvalcas数据类型错误数

used_chunks :已 分配的chunk

free_chunks 剩余chunk

free_chunks_end:分完page浪费chunk

mem_requested :请求存储的 字节

active_slabs slab 数量

total_malloced :总内存数量

被浪费内存数=((total_chunks或者used_chunks) * chunk_size) - mem_requested,如果太大,需要调整factor



如有疑问 请留言 欢迎提供建议
  • 0

    开心

  • 0

    板砖

  • 0

    感动

  • 0

    有用

  • 0

    疑问

  • 0

    难过

  • 0

    无聊

  • 0

    震惊

评论已有 0