一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Memcached stats 命令

时间:2026-08-12 10:20:50 编辑:袖梨 来源:一聚教程网

Memcached stats 命令用于返回统计信息例如 PID(进程号)、版本号、连接数等。

Memcached stats 命令

语法:

stats 命令的基本语法格式如下:

stats

实例

在以下实例中,我们使用了 stats 命令来输出 Memcached 服务信息。

statsSTAT pid 1162STAT uptime 5022STAT time 1415208270STAT version 1.4.14STAT libevent 2.0.19-stableSTAT pointer_size 64STAT rusage_user 0.096006STAT rusage_system 0.152009STAT curr_connections 5STAT total_connections 6STAT connection_structures 6STAT reserved_fds 20STAT cmd_get 6STAT cmd_set 4STAT cmd_flush 0STAT cmd_touch 0STAT get_hits 4STAT get_misses 2STAT delete_misses 1STAT delete_hits 1STAT incr_misses 2STAT incr_hits 1STAT decr_misses 0STAT decr_hits 1STAT cas_misses 0STAT cas_hits 0STAT cas_badval 0STAT touch_hits 0STAT touch_misses 0STAT auth_cmds 0STAT auth_errors 0STAT bytes_read 262STAT bytes_written 313STAT limit_maxbytes 67108864STAT accepting_conns 1STAT listen_disabled_num 0STAT threads 4STAT conn_yields 0STAT hash_power_level 16STAT hash_bytes 524288STAT hash_is_expanding 0STAT expired_unfetched 1STAT evicted_unfetched 0STAT bytes 142STAT curr_items 2STAT total_items 6STAT evictions 0STAT reclaimed 1END

这里显示了很多状态信息,下边详细解释每个状态项:

  1. pid:memcache服务器进程ID
  2. uptime:服务器已运行秒数
  3. time:服务器当前Unix时间戳
  4. version:memcache版本
  5. pointer_size:操作系统指针大小
  6. rusage_user:进程累计用户时间
  7. rusage_system:进程累计系统时间
  8. curr_connections:当前连接数量
  9. total_connections:Memcached运行以来连接总数
  10. connection_structures:Memcached分配的连接结构数量
  11. cmd_get:get命令请求次数
  12. cmd_set:set命令请求次数
  13. cmd_flush:flush命令请求次数
  14. get_hits:get命令命中次数
  15. get_misses:get命令未命中次数
  16. delete_misses:delete命令未命中次数
  17. delete_hits:delete命令命中次数
  18. incr_misses:incr命令未命中次数
  19. incr_hits:incr命令命中次数
  20. decr_misses:decr命令未命中次数
  21. decr_hits:decr命令命中次数
  22. cas_misses:cas命令未命中次数
  23. cas_hits:cas命令命中次数
  24. cas_badval:使用擦拭次数
  25. auth_cmds:认证命令处理的次数
  26. auth_errors:认证失败数目
  27. bytes_read:读取总字节数
  28. bytes_written:发送总字节数
  29. limit_maxbytes:分配的内存总大小(字节)
  30. accepting_conns:服务器是否达到过最大连接(0/1)
  31. listen_disabled_num:失效的监听数
  32. threads:当前线程数
  33. conn_yields:连接操作主动放弃数目
  34. bytes:当前存储占用的字节数
  35. curr_items:当前存储的数据总数
  36. total_items:启动以来存储的数据总数
  37. evictions:LRU释放的对象数目
  38. reclaimed:已过期的数据条目来存储新数据的数目

热门栏目