* lxc_guests2: Enhanced and fixed lxc_guests plugin
- Working with systemd and cgroup version 2 (tested on debian bullseye and debian booksworm)
- Fixed processes (with cgroup version 2)
- Simplified labels
- Simplified memory usage graph
- Added CPU usage in percent (using systemd-cgtop)
- Added Tasks
- No cgrouppath guessing
* Rename lxc_guests2 to lxc_guests to replace old plugin
---------
Co-authored-by: Sebastian L <sl@momou.ch>
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.
- SYSFS: buster has an existing /sys/fs/cgroup/systemd/lxc/$guest_name/tasks,
which does not contain anything useful, so checking
/sys/fs/cgroup/cpuacct/lxc/$guest_name/tasks first.
- spurious blank space for lxc_net and lxc_ram in here document
The attempt of compatibility (introduced in c0fe6dc3c) did not work,
since the previous implementation *replaced* the first character
(if it was invalid - e.g. a digit) instead of prepending an underscore.