Netflix-Skunkworks / atlas-system-agent

Agent that reports system metrics through SpectatorD.
Apache License 2.0
5 stars 8 forks source link

cgroupv2 system metrics #114

Closed copperlight closed 1 year ago

copperlight commented 1 year ago

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.