On 9 December 2010 12:31, Bauer, Bobby (NIH/CIT) [E]
<[email protected]> wrote:
> Still learning this stuff. Wish I could write it in Rexx, now that I know.
Just one more change thrown in:
mpstat 1| awk '$3=="all"{print gensub(/^([^.]+).*/,"\\1",
"1",$4);fflush()}' | while read cpu;
do
echo $cpu;
if [ "$cpu" -ge 20 ]; then
echo "Red Alert";
fi;
done
Slightly less complex.
Cheers,
Andrej
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/