"busy" load counters

From: Xuân Baldauf
Date: Thu Sep 11 2003 - 22:01:07 EST


Currently, tools like "top" show stats like

Cpu(s): 92.1% user, 6.9% system, 0.0% nice, 1.0% idle

Unfortunately, these stats are not sufficient to determine wether the system is "busy". Determining wether the system is "busy" is very useful in case an interactive application (e.g. a shell or some shell command) does not respond.
Maybe it just hangs (waits for input) or does serious work (e.g. uses the CPU or accesses the disk). Disk access is not visible in "top". Depending on the machine, on disk accesses, there might be a slight or significant rise in the "system" portion of those stats, but this is not trustable.

I'd like a new stat "busy", which simply is one minus the time, when the system is idle but does _not_ have outstanding IO requests. Users may judge from this stat, wether their application waits for input or just needs some time. This way, they know better what to do when they get impatient, and they now it faster. (Yes, they can know it by looking up all processes of their application, strace them and check wether the actions observed involve just waiting and polling or maybe IO. But this is very tedious.)

How do you think about this? Would kernel hackers oppose such a "feature" for any reason?

Xuân.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/