Redis笔记 info命令

你。 提交于 2019-12-11 16:27:04

命令具体实现在redis-3.0/src/redis.c:genRedisInfoString

Memory

  • used_memory是redis通过在每次执行mallocfree等函数的时候维护定义在src/zmalloc.c中的used_memory变量实现的
  • used_memory_rss在linux中是通过读/proc/{pid}/stat这个文件的第24个字段rss实现的
  • used_memory_peakRecord the max memory used since the server was started.
  • mem_fragmentation_ratioFragmentation = RSS / allocated-bytes,allocated-bytes即为used_memory

CPU

  • used_cpu_user调用getrusage得到的ru_utime
  • used_cpu_sys调用getrusage得到的ru_stime
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!