This change adds support for cgroupv2 system metrics for containers, which
is introduced in the Ubuntu Jammy release. The super magic number of
/sys/fs/cgroup is checked to determnine whether or not the system supports
cgroupv2.
All of the functions which returned metrics for cgroupv1 were duplicated
when there were cgroupv2 equivalents, and the switch between the versions
happens at the entry points in the code.
This change adds support for cgroupv2 system metrics for containers, which is introduced in the Ubuntu Jammy release. The super magic number of
/sys/fs/cgroup
is checked to determnine whether or not the system supports cgroupv2.All of the functions which returned metrics for cgroupv1 were duplicated when there were cgroupv2 equivalents, and the switch between the versions happens at the entry points in the code.