1753798 Members
8216 Online
108805 Solutions
New Discussion юеВ

Check sar and top

 
Mehmood Ansari
Frequent Advisor

Check sar and top

Hi

I am running Oracle import from proeuction server to HP ia 11.23 server. When I check top it is showing CPU idle average is 90%.
When I check in sar iit is showing idle is 47,48%.

Can anyone can help me understand why there is two different CPU idle time.

Thanks and Regards
3 REPLIES 3
Steve Steel
Honored Contributor

Re: Check sar and top

Hi

Did you add

%wio idle with some process
waiting for I/O
(only block I/O, raw I/O, or
VM pageins/swapins
indicated);

%idle otherwise idle.

In sar

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Petr Simik_1
Valued Contributor

Re: Check sar and top

Hi,
I have the same experience.
My explanation for this is that TOP has different measured period for measuring a Load than sar - that can calculate a different load.
2nd explanation is because of you are having multiple CPU than you have to specify option in sar for example:
# sar -M -u 1 10 - this mesure per-CPU utilization as well as the average CPU utilization of all the processors.

Did you try to measure CPU by glance tool ??


Jerry Zhang
Frequent Advisor

Re: Check sar and top

Top and sar collect data and average out in different time period. (Default) Top period is 5 seconds and sar is 15 minutes.

Think this way, within 15 minutes, CPU idle is 90% in 5 minutes and 10% in 10 minutes. The average will be (5*90+10*10)/15=36.6%.
That means longer time period will lose detail and close to trend line.

If you want to compare apple to apple, specify time period in top as 15 minutes (?), such as
top -s 900
which should bring similar output with sar.

- Jerry