On Sat, Jun 14, 2003 at 08:43:20PM -0400, John May wrote: > Right - but I want one that I can use in a shell script to set a > variable to the current processor usage value, not one that I have to > manually read myself. Trying to construct a general processor-usage > monitoring script for a server. quick and dirtry: PERC_CPU=`ps -ax -o %cpu="" | perl -ne 'END {print "$tot\n"} $tot+=$_;'` -- ~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-., \|/ (___) \|/ _,.-=~'`^` Brian Medley @~./'O o`\.~@ "Knowledge is Power" brian.medley at verizon.net /__( \___/ )__\ *PPPFFBT!* -- Francis Bacon `\__`U_/' _,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~= <____|' ^^`'~=-.,__,.-= ~`'^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-==--^'~=-.,__,.-=~'`^`