Urivan Saaib wrote:
> James,
> 
> What about this:
> 
> CPU=0.0; for load in $(ps axu | awk '{print $3}' | grep -vE "^%|0.0"); do
> CPU=$(echo $CPU + $load | bc); done; echo CPU Idle: $(echo 100 - $CPU | bc)

Neat! I'll stash that recipe away, too.

> Of course, discard the load from the loop, pipes and 'bc' :)
> 

(Of course; an exercise for the interested reader.)

Thanks,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to