Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-08-2010
Registered User
 

Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
How can I obtain the consumed memory of a process?

Hi!!!

how can I obtain the consumed memory of a process?
nowadays i'm using ps -efo pid, pmem, comm,args ....
but the information is in percentage, is that correct?
so, i want to know how can obtain the consumed memory of a process in mb?

thanks in advance!

Richard
Sponsored Links
  #2  
Old 02-09-2010
Registered User
 

Join Date: Aug 2009
Location: istanbul not constantinapole
Posts: 216
Thanks: 4
Thanked 0 Times in 0 Posts
I assume you know which process to check and lets say the process is run by root user:


Code:
prstat -u root -a -s size

will show processes ordered by Size descending way. If you know which process id to check you can print only one process too with PID, first column of prstat command:


Code:
prstat -u root -a -s size | nawk '$1~/855/'

  #3  
Old 02-10-2010
Registered User
 

Join Date: Dec 2009
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
pmap -x pid
  #4  
Old 02-10-2010
Registered User
 

Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
thank you very mach!!
i will test those comands!

thanks again!

Richard
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Most time consumed process Sreejith_VK Shell Programming and Scripting 2 09-20-2008 05:03 AM
Order process by consumed memory alfredo HP-UX 1 01-25-2008 12:15 PM
the amount of memory consumed per user big123456 UNIX for Advanced & Expert Users 1 11-24-2006 04:22 AM
Obtain Memory on HP UNIX jonesin HP-UX 4 10-30-2005 08:53 PM
1. To know the Memory consumed by a process at a time maheshkoushik Solaris 3 04-17-2005 01:32 AM



All times are GMT -4. The time now is 07:31 AM.