The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
CPU/Memory utilization khestoi UNIX for Dummies Questions & Answers 6 01-29-2009 06:15 PM
Memory and CPU utilization process learnbash Shell Programming and Scripting 4 05-21-2008 03:21 PM
Memory utilization question skotapal UNIX for Dummies Questions & Answers 1 06-29-2007 07:33 AM
Utilization for memory and cpu magasem AIX 2 11-11-2006 08:36 PM
Memory Utilization Negm AIX 1 04-03-2005 12:23 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-02-2009
radiatejava radiatejava is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 16
Getting CPU utilization and memory for a process

I am trying to get cpu util and memory occupied for a process. I use these (I am showing output also):

using top
----------
$ top p 25272 d 5
top - 01:52:17 up 2 days, 21:28, 2 users, load average: 0.02, 0.05, 0.06
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.1% hi, 0.0% si
Mem: 4147560k total, 1628824k used, 2518736k free, 37320k buffers
Swap: 0k total, 0k used, 0k free, 244200k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25272 911 16 0 1431m 1.1g 22m S 0.0 28.3 131:51.55 java

using ps
----------
$ ps -p 25272 u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
911 25272 50.3 28.3 1465912 1175352 ? S Mar01 131:51 /usr/java/jre-1

Question - why does these 2 programs show different utilization for the same process ? ps is showing 50.0 % whereas top is showing 0.0 %.
 

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 09:45 AM.


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