监控采集

docker.cpu Metrics from DataDog

2018-09-03  本文已影响42人  xufeibuaa
  • The percent of time the CPU is executing system calls on behalf of processes of this container, unnormalized
  • percent
  • The percent of time the CPU is under direct control of processes of this container, unnormalized
  • percent
  • The percent of CPU time obtained by this container
  • percent
  • Number of times the cgroup has been throttled
  • Shares of CPU usage allocated to the container

计算公式

docker.cpu.user = RATE(user)
docker.cpu.system = RATE(system)
docker.cpu.usage = RATE(usage / 10000000)
docker.cpu.throttled = RATE(nr_throttled)
docker.cpu.shares = RATE(shares)

数据来源

容器对应的cpuacct.stat and cpuacct.usage文件可能在如下三个位置:

容器对应的cpu.stat and cpu.shares文件可能在如下三个位置:

文件示例内容如下:

# cat cpuacct.stat

user 119045
system 75873

# cat cpuacct.usage

2397517073279

# cat cpu.stat

nr_periods 0
nr_throttled 0
throttled_time 0

# cat cpu.shares

1024
上一篇下一篇

猜你喜欢

热点阅读