By the time your code has obtained an instantaneous cpu load reading, it has changed.True, but that's not what the OP wants. He mentions an interface to getloadavg which returns the average load of the past 1, 5 and 15 minutes.
In reply to Re^6: portable way to get system load average
by JavaFan
in thread portable way to get system load average
by loadaverage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |