LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-15-2009, 10:23 PM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,266

Rep: Reputation: 99
Question sar output shows different CPU utilization..


Hi All,

I am using RHEL 4
Code:
$ cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 4)
I have a issue with sar command. It is showing different idle CPU utilization, than showing in other commands like top, iostat, vmstat.


SAR OUTPUT where CPU idle state is 0 %
Code:
08:34:39 AM       CPU     %user     %nice   %system   %iowait     %idle
08:34:40 AM       all      0.00      0.00      0.00      0.00      0.00
08:34:41 AM       all      0.00      0.00      0.00    100.00      0.00
08:34:42 AM       all      0.00      0.00    100.00      0.00      0.00
08:34:43 AM       all      0.00      0.00      0.00    100.00      0.00
08:34:44 AM       all      0.00      0.00      0.00    100.00      0.00
08:34:45 AM       all      0.00      0.00      0.00    100.00      0.00
08:34:46 AM       all     14.29      0.00      0.00     85.71      0.00
08:34:47 AM       all      0.00      0.00      0.00    100.00      0.00
08:34:48 AM       all      0.00      0.00      0.00    100.00      0.00
08:34:49 AM       all      0.00      0.00     33.33     66.67      0.00
Average:          all      4.55      0.00      9.09     86.36      0.00

where as in other commands, it is showing CPU is above 84% idle.
Code:
$ vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  0 101436  45524 137288 1562948    0    0     0     2    0     0 14  1 85  0
$
$ iostat | head -4 | tail -2
avg-cpu:  %user   %nice    %sys %iowait   %idle
          13.66    0.00    1.02    0.45   84.87
$
$ top -bn1 | grep -i cpu
Cpu(s): 13.7% us,  1.0% sy,  0.0% ni, 84.9% id,  0.4% wa,  0.0% hi,  0.0% si
Am I missing out something. There is nothing in /var/log/messages also, other than session opening/closing messages.
 
Old 07-16-2009, 09:18 AM   #2
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
Is your output from the current sar report?

Can you post the output of:
Code:
# sar -u 5 60
and
Code:
# top -bn1 | grep -i cpu
I ran these two on my system and the %idle was identical along with vmstat and iostat
 
Old 07-16-2009, 10:58 PM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,266

Original Poster
Rep: Reputation: 99
Yes, the output is different, this is my problem.

Ideally all commands should have the same CPU idle %.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
High CPU utilization on only one CPU out of 4 CPUs makam.sreekanth Linux - Kernel 2 09-03-2009 04:12 AM
cpu utilization and cpu load soltanloo Linux - General 1 06-07-2009 02:19 AM
top, ps, sar which gives accurate data for CPU utilization makam.sreekanth Linux - Newbie 6 03-20-2009 09:39 AM
Linux desktop GUI tool for CPU utilization and bandwidth utilization karimasif Linux - Software 4 03-03-2008 01:09 PM
output of SAR yusufs Linux - Newbie 7 11-03-2007 03:10 AM


All times are GMT -5. The time now is 03:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration