CPU utilization: sar vs ps


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers CPU utilization: sar vs ps
# 1  
Old 08-21-2008
Question CPU utilization: sar vs ps

Any reason why the "sum of all" average cpu utilization numbers collected from ps during any given time sample are "consistently" lower than the corresponding numbers reported by sar (%usr, %sys). We have a Solaris O/S 2.8.

We have been trying to correlate the CPU numbers from the sar, to the processes reported by the ps for the same sampling periods, especially during periods of heavy usage. sar is set up to run every 5 seconds. We have tried to run ps every 5 seconds, and also every second, using the following script:

========================================
#!/bin/sh
while true
do
date
ps -eo pcpu,time,etime,pid,args
sleep 5
done
========================================

Either way, if we add up the "pcpu" numbers for all the reported processes for a given sample, we are as much as 30-40% short of the sar numbers for the same period, very consistently. I thought the ps pcpu numbers would reflect %usr+%sys for each process. What am I missing?

Thanks for any suggestions...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies

2. AIX

Using sar to get CPU utilization for WPARs

Based on the documentation (Help - AIX 6.1 Information Center), I should be able to get the CPU utilization on a WPAR. But when I ran sar on the LPAR, I don't see the -@ option: Usage: sar { -A | } ]] ]] | ALL] ] ] I'm on AIX 6.1. ... (0 Replies)
Discussion started by: PPPP
0 Replies

3. UNIX for Advanced & Expert Users

CPU utilization

Hi, any commande on AIX 6.1 that shows me total CPU utilization ? I saw curt in documentation but there should be a trace file before. Thank you. (1 Reply)
Discussion started by: big123456
1 Replies

4. AIX

CPU Utilization

Hi All, Can some one help me in finding % CPU Utilization ? From VMSTAT command, How we can find % utilization ? Thanks (3 Replies)
Discussion started by: VBudatha
3 Replies

5. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

6. Shell Programming and Scripting

CPU Utilization

Hi to All, Would you please help me. I would like to know, In Unix How to know CPU utilization for every process. Thanks in Advance. Thanks, Divyang (3 Replies)
Discussion started by: div_Neev
3 Replies

7. Shell Programming and Scripting

CPU Utilization

Dear friends, I am doing a report daily for all most 30 more serves... i need to check out CPU utlization bu (top command, 100 - (ideal value)) and Memory utilization too could some one help me how can i get it directly, if scripts also no problem.. i will very thankful if some one... (3 Replies)
Discussion started by: bullz26
3 Replies

8. HP-UX

sar output gives 98% idle CPU

Dear All, Our HPUX 8 GB 8CPU database server is behaving abnormally for the last 4+ weeks. I have generated a sar output and it is here- 11:46:52 %usr %sys %wio %idle 11:46:53 1 1 6 92 11:46:54 0 1 0 99 11:46:55 0 1 0... (3 Replies)
Discussion started by: Ashrunil
3 Replies

9. UNIX for Dummies Questions & Answers

% CPU utilization

Hi, iam new to AIX and had a basic question. I was asked to give a chart of CPU utilization in percentage for every hour. where can i look for information and which column should i look at? I would be very thankful if somebody could respond. Thanks! karthik (1 Reply)
Discussion started by: karthikosu
1 Replies

10. UNIX for Advanced & Expert Users

CPU Utilization

On user complains about the performance of web application, as a part application support, we use following commands to see the CPU utilization in the UNIX using ‘sar' command. Some times it goes below 20 and even reaches 0. HLW$~> sar -u 10 60 SunOS HLW 5.8 Generic_117350-14 sun4u ... (2 Replies)
Discussion started by: thinakarmani
2 Replies
Login or Register to Ask a Question