-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Summary
- OS: POSIX
- Type: new-api
Description
A load average is the exponential weighted average of past "load" (run queue length) values. For fast-acting performance decisions, having the instantaneous load is probably more useful than both the 1-min avg and the CPU utilization value, as it takes into account what is waiting to run. This value can be obtained on Linux by reading /proc/stat, or on other systems by running ps -Max -o stat (Linux, macOS) or ps -Hax -o stat (BSD) and counting the lines starting with "R" in column "status", plus optionally "D" or "U" for diskwait. Of course psutil uses the C API equivalent of ps, but the idea is the same.