1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

LXC v3.1 compatibility

The cgroup data was (yet again) moved to a new location in recent LXC
releases, starting with v3.1.0 from what I could gather.

https://github.com/lxc/lxc/issues/2782 states:
> [The cgroup lxc.payload] exists to adhere to cgroup2 delegation requirements.
This commit is contained in:
Lionel Sausin 2021-05-05 10:17:45 +02:00 committed by Lars Kruse
parent 5039842a4f
commit ae7a2f6c65

View file

@ -135,7 +135,8 @@ lxc_count_processes () {
"/sys/fs/cgroup/lxc/$guest_name/tasks" \ "/sys/fs/cgroup/lxc/$guest_name/tasks" \
"/sys/fs/cgroup/cpuacct/lxc/$guest_name/tasks" \ "/sys/fs/cgroup/cpuacct/lxc/$guest_name/tasks" \
"/sys/fs/cgroup/systemd/lxc/$guest_name/tasks" \ "/sys/fs/cgroup/systemd/lxc/$guest_name/tasks" \
"/sys/fs/cgroup/cpuacct/sysdefault/lxc/$guest_name/tasks" "/sys/fs/cgroup/cpuacct/sysdefault/lxc/$guest_name/tasks" \
"/sys/fs/cgroup/cpu/lxc.payload.$guest_name/tasks"
do do
if [ -e "$SYSFS" ]; then if [ -e "$SYSFS" ]; then
wc -l <"$SYSFS" wc -l <"$SYSFS"