Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
agent: Fix CPU usage reporting for cgroup v2 in kata-agent
kata-agent incorrectly reports CPU time for cgroup v2, causing 1000x underreporting. For cgroup v2, kata-agent reads the cpu.stat file, which reports the time consumed by the processes in the cgroup in µs. However, there was a bug in kata-agent where it returned this value in µs without converting it to ns. This commit adds the necessary µs to ns conversion for cgroup v2, aligning it with v1 behavior and kata-shim's expectations. This fixes kata-containers#10278 Signed-off-by: Alex Man <[email protected]>
- Loading branch information