Is total CPU usage for sar %user+%system+%iowait? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Is total CPU usage for sar %user+%system+%iowait?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-29-2012
newbie_01 newbie_01 is offline
Registered User
 
Join Date: May 2009
Last Activity: 12 November 2014, 3:17 PM EST
Posts: 174
Thanks: 29
Thanked 0 Times in 0 Posts
Is total CPU usage for sar %user+%system+%iowait?

Hi all

Can anyone advise/confirm whether total CPU usage when running sar is %user+%system+%iowait or is it %user+%system only?

I want to confirm whether I am having a CPU-bound problem or not.

This is a single-CPU VMware machine.


Code:
[oracle@prod01 bdump]$ sar 5 20
Linux 2.6.18-238.5.1.el5 (prod01.globe.local)     03/27/2012

08:00:55 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
08:01:00 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:01:05 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:01:10 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:01:15 AM       all     98.20      0.00      1.80      0.00      0.00      0.00
08:01:20 AM       all     99.40      0.00      0.60      0.00      0.00      0.00
08:01:25 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:01:30 AM       all     99.60      0.00      0.40      0.00      0.00      0.00
08:01:35 AM       all     98.80      0.00      1.20      0.00      0.00      0.00
08:01:40 AM       all     98.00      0.00      2.00      0.00      0.00      0.00
08:01:45 AM       all    100.00      0.00      0.00      0.00      0.00      0.00
08:01:50 AM       all    100.00      0.00      0.00      0.00      0.00      0.00
08:01:55 AM       all     63.93      0.00      1.20     34.87      0.00      0.00
08:02:00 AM       all     92.03      0.00      0.80      7.17      0.00      0.00
08:02:05 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:02:10 AM       all     99.60      0.00      0.40      0.00      0.00      0.00
08:02:15 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:02:20 AM       all     99.40      0.00      0.60      0.00      0.00      0.00
08:02:25 AM       all     99.40      0.00      0.60      0.00      0.00      0.00
08:02:30 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:02:35 AM       all     98.80      0.00      1.20      0.00      0.00      0.00
Average:          all     97.20      0.00      0.70      2.10      0.00      0.00
[oracle@prod01 bdump]$ sar 5 20
Linux 2.6.18-238.5.1.el5 (prod01.globe.local)     03/27/2012

08:03:50 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
08:03:55 AM       all      6.00      0.00      0.60     93.40      0.00      0.00
08:04:00 AM       all      8.42      0.00      0.80     90.78      0.00      0.00
08:04:05 AM       all     13.35      0.00      0.80     85.86      0.00      0.00
08:04:10 AM       all     27.51      0.00      0.20     72.29      0.00      0.00
08:04:15 AM       all      2.79      0.00      1.60     95.61      0.00      0.00
08:04:20 AM       all     58.80      0.00      1.20     40.00      0.00      0.00
08:04:25 AM       all     92.02      0.00      0.60      7.39      0.00      0.00
08:04:30 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:04:35 AM       all     32.06      0.00      0.40     67.54      0.00      0.00
08:04:40 AM       all     77.64      0.00      1.20     21.16      0.00      0.00
08:04:45 AM       all     53.69      0.00      1.00     45.31      0.00      0.00
08:04:50 AM       all     40.40      0.00      0.80     58.80      0.00      0.00
08:04:55 AM       all     98.00      0.00      2.00      0.00      0.00      0.00
08:05:00 AM       all     70.34      0.00      1.20     28.46      0.00      0.00
08:05:05 AM       all     85.46      0.00      4.38     10.16      0.00      0.00
08:05:10 AM       all     69.46      0.00      0.60     29.94      0.00      0.00
08:05:15 AM       all     46.00      0.00      3.60     50.40      0.00      0.00
08:05:20 AM       all     71.34      0.00      1.00     27.66      0.00      0.00
08:05:25 AM       all     32.34      0.00      0.80     66.87      0.00      0.00
08:05:30 AM       all     18.40      0.00      1.20     80.40      0.00      0.00
Average:          all     50.16      0.00      1.24     48.60      0.00      0.00
[oracle@prod01 bdump]$ uname -a
Linux prod01.globe.local 2.6.18-238.5.1.el5 #1 SMP Mon Feb 21 05:52:39 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[oracle@prod01 bdump]$

Sponsored Links
    #2  
Old 03-31-2012
botao's Avatar
botao botao is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 9 December 2013, 8:21 AM EST
Location: brazil
Posts: 86
Thanks: 0
Thanked 3 Times in 3 Posts
Tools yes - the math says it all

yes - as per your 'sar' output, the algebric sum of these 3 values will give you 100% ;

HTH
_____________
alexandre botao
Sponsored Links
    #3  
Old 03-31-2012
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 22 November 2014, 4:22 PM EST
Location: Amsterdam
Posts: 9,606
Thanks: 293
Thanked 2,445 Times in 2,193 Posts
Total CPU is %user + %system. %iowait is idle time during which there happens to be IO activity.
    #4  
Old 03-31-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
The very high %user figures can be caused by running sar with much to small a time interval on a system with only one or two cpu's. Try say 20 minutes sample interval not 5 seconds.

The %iowait is the percentage of i/o operations which had to wait for disc transfers. Worth looking at sar -d to see if you have a bottleneck on one or more of your discs.

Based on the statistics posted for just 4 minutes non-core time and knowing nothing about your hardware or software there appears to be a disc bottleneck not a cpu bottleneck ... but that's nothing unusual when Oracle is involved.
Sponsored Links
    #5  
Old 04-01-2012
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 22 November 2014, 4:22 PM EST
Location: Amsterdam
Posts: 9,606
Thanks: 293
Thanked 2,445 Times in 2,193 Posts
@methyl, %iowait measures CPU time, not I/O time. It shows when a CPU is idle, while waiting for I/O to complete. There is only an indirect relation to I/O performance, and you can have a healthy system performing at high percentages of iowait.
Sponsored Links
    #6  
Old 04-01-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
Thanks Scrutinizer, you are correct. I automatically read the column heading with its more usual meaning.
My unix sar has CPU idle% as a heading and a largely unrelated figure for I/O wait.
This version of sar is very strange because the figures in the sample always add up to 100% and there is no stated figure for genuine idle time ... unless perhaps this computer only has one CPU ?
Sponsored Links
    #7  
Old 04-01-2012
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 22 November 2014, 4:22 PM EST
Location: Amsterdam
Posts: 9,606
Thanks: 293
Thanked 2,445 Times in 2,193 Posts
It is a "single-CPU vmware machine", I presume OP means a virtual machine. In the 3rd column it says, all CPU, so I think it would not matter if there were more vCPUs.

There is a %idle column, but apparently there has not been an idle period without I/O activity. The three columns on the left are busy time, the three on the right are idle time..

So I think it is like this:
TOTAL USER = %user + %nice
TOTAL CPU = %user + %nice + %system
TOTAL IDLE = %iowait + %steal + %idle

Last edited by Scrutinizer; 04-01-2012 at 09:10 AM..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Total cpu usage in percent(%) proactiveaditya UNIX for Dummies Questions & Answers 3 12-09-2010 11:11 AM
HOWTO - Total memory and CPU usage ... without top? newbie_01 UNIX for Dummies Questions & Answers 2 09-21-2010 01:16 AM
Finding total Percentage CPU usage jal_capri Shell Programming and Scripting 14 04-30-2010 11:01 AM
How to check total disk usage ? bh_hensem UNIX for Advanced & Expert Users 3 02-10-2010 07:13 AM
Total usage memory by user yoavbe Shell Programming and Scripting 3 04-22-2009 05:00 AM



All times are GMT -4. The time now is 10:05 PM.