lxcfs
lxcfs copied to clipboard
/proc/diskstats: Handle cgroup2
Required information
- Distribution:
- Debian GNU/Linux 11 (bullseye)
-
Linux 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux
- LXCFS version: 4.0.7
Issue description
With cgroup2 the disk io stats are not virtulized. Looking at the code in https://github.com/lxc/lxcfs/blob/main/src/proc_fuse.c#L579 it seems, that only blkio controller of cgroup1 is handled.
cgroup2 seems to provide the required information in /sys/fs/cgroup/lxc.payload.<container name>/io.stat
.