cadvisor 运行报错/sys/fs/cgroup/cpuacct,cpu: no such file or directory

Posted 张首富1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cadvisor 运行报错/sys/fs/cgroup/cpuacct,cpu: no such file or directory相关的知识,希望对你有一定的参考价值。

运行docker监控容器cadvisor的时候提示如下错误

Dec 13 17:36:39 prd_java-cc8 dockerd-current[2586]: W1213 17:36:39.185606       1 manager.go:349] Could not configure a source for OOM detection, disabling OOM events: open /dev/kmsg: no such file or directory
Dec 13 17:36:39 prd_java-cc8 dockerd-current[2586]: F1213 17:36:39.252012       1 cadvisor.go:172] Failed to start container manager: inotify_add_watch /sys/fs/cgroup/cpuacct,cpu: no such file or directory
Dec 13 17:36:39 prd_java-cc8 dockerd-current[2586]: time="2021-12-13T17:36:39.432483334+08:00" level=warning msg="f9d2bf4404dbe433d4fe063483b63f7d3e6222b79e538a66f3a4e92ef2331d68 cleanup: failed to unmount secrets: invalid argument"

解决办法

mount -o remount,rw /sys/fs/cgroup/
ln -s /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/cpuacct,cpu
mount -o remount,ro /sys/fs/cgroup/

以上是关于cadvisor 运行报错/sys/fs/cgroup/cpuacct,cpu: no such file or directory的主要内容,如果未能解决你的问题,请参考以下文章

分区错误,根分区满了,卸载home添加给根分区

docker监控: cAdvisor

容器监控:cAdvisor

cAdvisor + Prometheus + grafana的安装

使用 cAdvisor 和 Prometheus 监控未命名容器

cAdvisor 显示的磁盘使用情况