Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Assess most serious Linux privilege escalation bug 17 144
Error installing extension Linux 4 58
How to learn Linux? 10 41
Setting up two Raspberry Pi gateways/routers 3 36
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). …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…

929 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

15 Experts available now in Live!

Get 1:1 Help Now