[英]Some paths of cgroup of a docker container are missing
I use cadvisor to get CPU usage of my docker container, but it's always very small(about 0.001), which should be wrong because it's a production worker container and it should be more than 10% from htop outside the docker. 我使用cadvisor获取我的docker容器的CPU使用率,但它总是非常小(大约0.001),这应该是错误的,因为它是一个生产工人容器,它应该比docker之外的htop多10%。
And there's no processes in the container.
并且容器中没有进程。 But it has four processes
但它有四个过程
I found the cgroup of the container is strange like: 我发现容器的cgroup很奇怪,如:
$ cat /proc/14996/cgroup
10:pids:/docker/4d7976bc5814e85cc793cc4926c09c150a0e8bb453b8bc01856e8ac0ef17a34a
9:perf_event:/docker/4d7976bc5814e85cc793cc4926c09c150a0e8bb453b8bc01856e8ac0ef17a34a
8:net_cls,net_prio:/docker/4d7976bc5814e85cc793cc4926c09c150a0e8bb453b8bc01856e8ac0ef17a34a
7:freezer:/docker/4d7976bc5814e85cc793cc4926c09c150a0e8bb453b8bc01856e8ac0ef17a34a
6:devices:/
5:memory:/
4:blkio:/
3:cpu,cpuacct:/
2:cpuset:/docker/4d7976bc5814e85cc793cc4926c09c150a0e8bb453b8bc01856e8ac0ef17a34a
1:name=systemd:/system.slice/docker.service/docker/4d7976bc5814e85cc793cc4926c09c150a0e8bb453b8bc01856e8ac0ef17a34a
I have no idea what to do for this problem, but I can provide more information if necessary. 我不知道如何处理这个问题,但如果有必要,我可以提供更多信息。
I assume you are super in checking stats for the right container. 我假设你在检查正确容器的统计数据时非常出色。 What OS we are talking about?
我们在谈论什么操作系统? In the docs they explain some extra configurations required for RHEL for example.
在文档中,他们解释了RHEL所需的一些额外配置。
https://github.com/google/cadvisor/blob/master/docs/running.md
https://github.com/google/cadvisor/blob/master/docs/running.md
Have you specified any concrete run options? 你有没有指定任何具体的运行选项? Like
--cpu-period=100000 --cpu-q --cpuset-cpus 2 ...
? 喜欢
--cpu-period=100000 --cpu-q --cpuset-cpus 2 ...
?
You can cross check your status with the docker stats
command. 您可以使用
docker stats
命令交叉检查您的状态。
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
e21c0d937cb9 0.12% 8.27 MiB / 7.624 GiB 0.11% 4.386 kB / 2.192 kB 7.593 MB / 0 B 2
Here I have 0.12%
which means it's about one tenth of a percent. 在这里,我有
0.12%
,这意味着它约为十分之一。 In cAdvisor that would be 0.0012
. 在cAdvisor中,这将是
0.0012
。
If those don't match it might indicate an issue. 如果这些不匹配则可能表明存在问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.