Thursday, January 27, 2011

CPU utilization of multi process program

(Via Emerson Gomes at Gemalto)

for a in FRWK RCA SAS GCCM GCDM GCDT;
do
total=0; echo -ne `/usr/ucb/ps auxww | egrep \($a\) | awk '{print $3}' | while read i; do total=$(echo "$total + $i" | bc); echo $total; done | tail -1` \ ;
done

No comments:

Post a Comment