AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Checking CPU utilization by db2sysc process

    Posted Thu December 15, 2011 12:52 AM

    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


  • 2.  Re: Checking CPU utilization by db2sysc process

    Posted Fri December 16, 2011 03:25 PM

    Originally posted by: SystemAdmin


    The ps command is pretty useless when running in a virtualized environment, I tend to rely on nmon when doing performance troubleshooting in AIX.
    #AIX-Forum


  • 3.  Re: Checking CPU utilization by db2sysc process

    Posted Sat December 17, 2011 05:50 AM

    Originally posted by: niteshtheone


    I am a db2 dba... we dont have any access to nmon.
    So I cant use nmon. There is any other way to get exact utilization ?
    ( what command TOPAS use in backupground to identify top 10 cpu utilized query ? )
    #AIX-Forum


  • 4.  Re: Checking CPU utilization by db2sysc process

    Posted Sun December 18, 2011 09:31 AM

    Originally posted by: DjRobin69


    ps aug
    #AIX-Forum


  • 5.  Re: Checking CPU utilization by db2sysc process

    Posted Sun December 18, 2011 09:36 AM

    Originally posted by: DjRobin69


    for top 10
    ps aug | sort -rnk 3 | head -10
    third column is cpu
    #AIX-Forum


  • 6.  Re: Checking CPU utilization by db2sysc process

    Posted Wed January 04, 2012 12:59 AM

    Originally posted by: niteshtheone


    Any PS command option use to behave same.
    I mean to say its output is always different compare to topas output.
    So If you have any other solution please provide me information regarding that.
    #AIX-Forum