Solved

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

Posted on 2002-05-17
5
3,354 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now