As far as I understand, un*x load by definition is an integral measure, averaged over a predefined and quite long time periods. On the other hand, CPU utilisation can be considered a temporary measure: although technically speaking it's still measured and averaged over a time period, this time period is actually very short. The end result is that when a cpu-intensive process terminates, the CPU utilisation drops immediately, while the load value decreases gradually over time. So you may have a computer doing actually nothing at the moment, while the load is still high, only because it did not have enough time yet to decrease. As such, the measure is not quite suitable for situations where the actual cpu load drammatically changes.

Now: is it possible to measure a 'load'-like value over a fraction of a second time periods? I do not mean printing it ten times a second, because it's trivial. I mean averaging the number of run-queued processes over 1 ms or 100ms periods rather than over 15 minutes.

  • The load is a measure of the length of the run queue. The duplicate question is asking for how to get this number.
    – Kusalananda
    Aug 31 '19 at 16:14

How to get the number of processes waiting for CPU on Linux? has the anser ;)

awk '/procs_running/ { print $2 }' /proc/stat gives you the number of processes which are waiting for CPU ressources. With this, you can integrate over every time you want.

Btw, the load average are measured on 1/5/15 minutes, so if 1 minute is short enough you could use this.

Not the answer you're looking for? Browse other questions tagged or ask your own question.