The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
.
google unix.com



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..? laknar AIX 3 07-16-2009 06:35 AM
current CPU usage, memory usage, disk I/O oid(snmp) S_venkatesh SUN Solaris 2 12-13-2008 06:19 AM
how can I find cpu usage memory usage swap usage and logical volume usage alert0919 HP-UX 3 12-02-2008 02:38 PM
Detailed disk usage versus age summary littleIdiot Shell Programming and Scripting 8 10-17-2008 11:58 AM
CTRL+H versus ^? versus BACKSPACE alan UNIX for Dummies Questions & Answers 3 07-23-2003 02:08 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-25-2009
liav liav is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 7
CPU usage: PS versus TOP - Different output

CPU usage: PS versus TOP - Different output

Hi

When monitoring a Linux environment with PS command, reported CPU value for a certain process differs, sometimes greatly, from the value seen in TOP.

I understood this is not a bug, they report different data.
I can't understand the nature of this difference.

My Question: Can someone explain it in simple manner, or alternativly provide a link to such documentation.

Thanks :-)
Liav
  #2 (permalink)  
Old 10-25-2009
thegeek thegeek is offline
Registered User
  
 

Join Date: Apr 2009
Location: /usr/bin/vim
Posts: 453
PS versus TOP at same instance or different instance !!!

If it is in different time, then it will differ because at different instance a process will occupy different percentage of it..
  #3 (permalink)  
Old 4 Weeks Ago
wakatana wakatana is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 36
That also interests me, only what i know is that ps reports the "actual" state of proces at the moment, top instead does some kind of summary and reports values during time
  #4 (permalink)  
Old 4 Weeks Ago
liav liav is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 7
1) I'm talking about the same instance at the same time. (meaning the same process id number).
2) The way I understand it NOW (from the man help) is that:
PS: reports on the accumulate CPU usage (from the time process started).
It gives some sort of an average.

TOP: reports on the CPU usage from the last time it was sampled. (E.G. if the sample
interval is 60 minutes, than it will report the CPU usage in the last 60 minutes).

My question is still open:
a) can someone point out on a good documentation about this?
b) Is there a simple command to calculate the CPU usage the
way top does it (without using top)? (top is too heavy, and if I have to filter out the
lines I need, it will be havier).

I need sort of Real Time CPU usage and not the average.

Thanks :-)
  #5 (permalink)  
Old 4 Weeks Ago
wakatana wakatana is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 36
Also I vote for this.... someone please clearly explain from practice view (or give good documentation) about how linux treat system resources: processes, memory, CPU usage, swap, load.... I think all of those questions should be replied together cause it is linked. I have read all what I have found, but still unclear many questions. Thanks a lot gurus
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0