Hello,
we use Proxmox with lxc container and have a little problem with an joined group which causes problems with the lxc_container_cpu check.
We use check_mk 1.6.0p10
The part from check_mk_agent which gives me trouble is
echo '<<<lxc_container_cpu>>>'
fi
grep "^cpu " /proc/stat
echo "num_cpus $NUM_CPUS"
cat /sys/fs/cgroup/cpuacct/cpuacct.stat
Now initially /sys/fs/cgroup wasn’t mounted at all (I noticed this is happening on old Debian 7 containers), which i could fix by editing the container config file and adding
lxc.mount.auto = cgroup:rw:force
However it now gets mounted as following
[P]root@cas:/# ls -l /sys/fs/cgroup/
total 0
drwxr-xr-x 2 root root 0 Sep 22 00:26 blkio
drwxr-xr-x 2 root root 0 Sep 22 00:26 cpu,cpuacct
drwxr-xr-x 2 root root 0 Sep 22 00:26 cpuset
drwxr-xr-x 2 root root 0 Sep 22 00:26 devices
<snip>
Notice the joined cgroup cpu,cpuacct. Now the check can’t find the cpuacct.stat file since it’s looking in the cpuacct folder not the cpu,cpuacct folder…
When i create a symlink to this folder
[P]root@cas:/sys/fs/cgroup# ln -s cpu,cpuacct/ cpuacct
it does work, however when i reboot the symlink is obviously gone so this isn’t a permanent solution.
Any idea how to make this a permanent solution?
Thanks and best regards
Mike