appsignal / probes-rs

Rust library to read out system stats from a machine running Unix
MIT License
15 stars 2 forks source link

Normalize CPU percentages when using cgroup v2 #69

Closed luismiramirez closed 1 year ago

luismiramirez commented 1 year ago

If the cgroup v2 cpu.max file contains a value other than max for its first segment, we're able to calculate the number of used CPUs in containers. If that's possible, the usage percentage is divided by the number of CPUs.

This change will result in a non-backward compatible change for those relying on > 100% old values.

Meaning that if there're 5 CPUs available and they're all at 100% usage, the usage won't be reported anymore as 500% but as 100%.

Part of: #67

backlog-helper[bot] commented 1 year ago

This is a message from the daily scheduled checks.

New issue guide | Backlog management | Rules | Feedback