in reply to Finding out Processor Usage

If I want to check cpu usage and related info quitly, I go for vmstat, which will give you, amongst other info, the % idle, system and user time, or vmstat 1 which will do the same, but polls every second.

The output of vmstat should not be difficult to parse, though I don't know if it's available everywhere (or gives output in the same format).

One thing to watch out for, though, is that AFAIK it can produce "counter intuitive" results (like a maximum of 50% in fairly common cases) when you have intel hyper-threading cpu's.

HTH,
Joost.