[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2002-05-17
5
Medium Priority
?
3,751 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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 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