简体   繁体   English

缺少一个docker容器的cgroup路径

[英]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.

相关问题 新创建的Docker容器是否与新的cgroup相关联? - Is a newly created Docker container associated with a new cgroup? 测试 Docker 容器运行的 cgroup 版本 - Test what cgroup version a Docker container is running with 使用cadvisor / cgroup监视Docker容器性能的最佳方法 - monitoring docker container performance using cadvisor / cgroup, best approach 具有 cgroup v2 的 docker 容器内的 CPU 百分比 - CPU percentage inside a docker container with cgroup v2 Docker 容器启动问题:为 procHooks 进程设置 cgroup 配置导致 - Docker container starting issue: setting cgroup config for procHooks process caused Gentoo Linux:Docker 容器未启动:cgroup v2 - Gentoo Linux: Docker container doesn't start: cgroup v2 在现有cgroup中启动容器 - Start container in existing cgroup 如何使用 cgroup v2 从容器中获取 docker 容器 ID - How to get docker container ID from within the container with cgroup v2 内存使用率差异:cgroup memory.usage_in_bytes与docker容器内的RSS - Memory usage discrepancy: cgroup memory.usage_in_bytes vs. RSS inside docker container cgroup rss的memory远高于docker容器中所有进程的memory使用率汇总 - The memory of cgroup rss is much higher than the summary of the memory usage of all processes in the docker container
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM