Solved

Given a process, does Linux has a command/tool to find out the memory utilization?

Posted on 2002-05-17
5
3,486 Views
Last Modified: 2013-12-15
Solaris has pmap and AIX has svmon.
Does Linux has a similar command like those?
[Please no need to mention top, ps, sar ...].
Thanks.
0
Comment
Question by:waynezhu
5 Comments
 
LVL 4

Expert Comment

by:MFCRich
ID: 7018528
I'm not familiar with pmap or svmon but perhaps what you are looking for is vmstat ( man 8 vmstat ). On my Redhat system it is part of the procps package.
0
 
LVL 7

Author Comment

by:waynezhu
ID: 7021702
no, not vmstat. Thanks anyway.
0
 
LVL 1

Accepted Solution

by:
smisk earned 100 total points
ID: 7075896
Hmm...  This may help :

%> cat /proc/`/sbin/pidof <process>`/statm

The results are best explained from http://www.linuxhq.com/kernel/v2.2/doc/proc.txt.html :

The statm file contains more detailed information about the process
memory usage. It contains seven values with the following meanings:

size       total program size
resident   size of in memory portions
shared     number of the pages that are shared
trs        number of pages that are 'code'
drs        number of pages of data/stack
lrs        number of pages of library
dt   number of dirty pages
0
 
LVL 7

Author Comment

by:waynezhu
ID: 7081004
That helps. Thanks.
0
 

Expert Comment

by:eggressive
ID: 20330574
This was really helpful for me.
Thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question