If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > CPU utilization by db2sysc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-11, 02:42
niteshtheone niteshtheone is offline
Registered User
 
Join Date: Jul 2011
Posts: 19
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.
Reply With Quote
  #2 (permalink)  
Old 12-12-11, 08:15
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #3 (permalink)  
Old 12-12-11, 12:38
niteshtheone niteshtheone is offline
Registered User
 
Join Date: Jul 2011
Posts: 19
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 )
Reply With Quote
  #4 (permalink)  
Old 12-12-11, 13:10
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Again, CPU utilization is measured over a period of time. So, what period are you interested in?
Reply With Quote
  #5 (permalink)  
Old 12-13-11, 01:50
wolaos123 wolaos123 is offline
Registered User
 
Join Date: Nov 2011
Location: Shen Zhen,China
Posts: 37
ps -elf and sort by C column,this is same way as topas
Reply With Quote
  #6 (permalink)  
Old 12-14-11, 01:47
niteshtheone niteshtheone is offline
Registered User
 
Join Date: Jul 2011
Posts: 19
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.
Reply With Quote
  #7 (permalink)  
Old 12-14-11, 04:24
wolaos123 wolaos123 is offline
Registered User
 
Join Date: Nov 2011
Location: Shen Zhen,China
Posts: 37
you are using dual cores cpu,is it right?
Reply With Quote
  #8 (permalink)  
Old 12-14-11, 04:29
wolaos123 wolaos123 is offline
Registered User
 
Join Date: Nov 2011
Location: Shen Zhen,China
Posts: 37
topas shows % cpu per cpu.
ps shows % cpu per total available cpu.
Reply With Quote
  #9 (permalink)  
Old 12-14-11, 04:48
niteshtheone niteshtheone is offline
Registered User
 
Join Date: Jul 2011
Posts: 19
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
Reply With Quote
Reply

Tags
cpu utilization, db2sysc process

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On