Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Location
    USA
    Posts
    80

    Unanswered: CPU utilization by db2sysc

    Hi,

    I am trying to fetch CPU utilization by db2sysc process. So that if its crossed 80 or 90% of cpu utilization we will get an automatic alert.
    Following formula I am using to calucate CPU utilization be db2sysc process :

    ps -eo pcpu,pid,comm | grep -i db2sysc | awk '{ SUM+=$1; } END { print SUM }'

    Result of above formula and topas output are not same its always different.
    Please let me know the best way to calculate CPU utilization by db2sysc process.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by niteshtheone View Post
    Please let me know the best way to calculate CPU utilization by db2sysc process.
    Best according to what criteria? ps shows the cumulative CPU utilization over the lifetime of a process, while topas shows it over the measurement interval (1 s). I think neither is useful for your purpose.

  3. #3
    Join Date
    Jul 2011
    Location
    USA
    Posts
    80
    I want CPU utilization by db2sysc process at real time ( or you can say the time when I fired the query, it needs to collects actual statistics like topas, but I want only one output in flat file, no need of frequncy like 1 s )

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Again, CPU utilization is measured over a period of time. So, what period are you interested in?

  5. #5
    Join Date
    Nov 2011
    Location
    Shen Zhen,China
    Posts
    37
    ps -elf and sort by C column,this is same way as topas

  6. #6
    Join Date
    Jul 2011
    Location
    USA
    Posts
    80
    thanks for reply.
    But it is not sharing cpu utilization as percentage by db2sysc process.

    My objective is to fetch cpu utilization in the terms of percentage by db2sysc process at a particular time. So that I can throw an alert to DBA that cpu utilization by db2sysc process is more than 90%.

    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
    =================
    Problem with the above command is I am finding its output is not similar what I am finding from topas. Topas at this particular time (Tue Dec 13 22:39:53 PST 2011) is displaying 53% is utilized by db2sysc process.

  7. #7
    Join Date
    Nov 2011
    Location
    Shen Zhen,China
    Posts
    37
    you are using dual cores cpu,is it right?

  8. #8
    Join Date
    Nov 2011
    Location
    Shen Zhen,China
    Posts
    37
    topas shows % cpu per cpu.
    ps shows % cpu per total available cpu.

  9. #9
    Join Date
    Jul 2011
    Location
    USA
    Posts
    80
    From db2pd osinfo I am finding following details :
    CPU Information:
    TotalCPU OnlineCPU ConfigCPU Speed(MHz) HMTDegree Cores/Socket
    10 4 10 4704 2 n/a

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •