Originally posted by: niteshtheone
Hi,
I am trying to write a script which will fire alert mail to dba ( db2dba) when there process will
utilize CPU more than 90%. But I am unable to do so.
I am using following command to calucate CPU utilization be db2sysc process :
ps -eo pcpu,pid,comm | grep -i db2sysc | awk '{ SUM+=$1; } END { print SUM }'
But Result of above formula and topas output are not same its always different.
like I am finding from ps -eo , are you having any similar kind of command
=================
bash-3.2$ date
Tue Dec 13 22:39:53 PST 2011
bash-3.2$ ps -eo pcpu,pid,comm | grep -i db2sysc | awk '{ SUM+=$1; } END { print SUM }'
20
=================
Topas at this particular time (Tue Dec 13 22:39:53 PST 2011) is displaying 53% is utilized by db2sysc process.
So please let me know from where I can find correct real time CPU utilization of db2sysc process.
#AIX-Forum