admin avatar

使用stats一条命令监控memcached

🕙 by admin





使用stats一条命令监控memcached

当然使用telnet 监控memcached也挺方便的

telnet lcaohost:11211

比较喜欢使用stats一条命令监控memcached

echo "stats"|nc 127.0.0.1 11211

显示如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
STAT pid 758
STAT uptime 35017
STAT time 1653439473
STAT version 1.6.12
STAT libevent 2.1.12-stable
STAT pointer_size 64
STAT rusage_user 6.048980
STAT rusage_system 4.258726
STAT max_connections 1024
STAT curr_connections 1
STAT total_connections 84
STAT rejected_connections 0
STAT connection_structures 2
STAT response_obj_oom 0
STAT response_obj_count 1
STAT response_obj_bytes 65536
STAT read_buf_count 8
STAT read_buf_bytes 131072
STAT read_buf_bytes_free 49152
STAT read_buf_oom 0
STAT reserved_fds 20
STAT cmd_get 561
STAT cmd_set 180
STAT cmd_flush 14
STAT cmd_touch 0
STAT cmd_meta 0
STAT get_hits 383
STAT get_misses 178
STAT get_expired 0
STAT get_flushed 97
STAT delete_misses 2
STAT delete_hits 8
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 touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 367426
STAT bytes_written 820192
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 34
STAT lru_maintainer_juggles 274387
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 log_watchers 0
STAT unexpected_napi_ids 0
STAT round_robin_fallback 0
STAT bytes 0
STAT curr_items 0
STAT total_items 180
STAT slab_global_page_pool 0
STAT expired_unfetched 21
STAT evicted_unfetched 0
STAT evicted_active 0
STAT evictions 0
STAT reclaimed 62
STAT crawler_reclaimed 0
STAT crawler_items_checked 389
STAT lrutail_reflocked 15
STAT moves_to_cold 250
STAT moves_to_warm 122
STAT moves_within_lru 80
STAT direct_reclaims 0
STAT lru_bumps_dropped 0

下面是memcached状态信息相对应的介绍

  • 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:已过期的数据条目来存储新数据的数目




💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.18.3 Processed in 2ms