l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2009 Aug 23 10:27

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] command to monitor memory usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] command to monitor memory usage

On Sun, 2009-08-23 at 01:45 -0400, Peter Jay Salzman wrote:
> On Sat 22 Aug 09, 10:37 PM, Bill Kendrick <nbs@sonic.net> said:
> > On Sat, Aug 22, 2009 at 09:37:49PM -0500, Ken Bloom wrote:
> > > Top is good if you get the filtering and sorting options right so that
> > > the process you're interested in stays on the list (and doesn't get
> > > crowded out of the list by more resource-hungry programs).
> > <snip>
> > 
> > Not that I've ever really done it, but it's probably also reasonable
> > to go into /proc/{PROCESS_ID}/ and do a 'cat status' and/or some other
> > 'file(s).'  No?
> > 
> > -bill!
> Prolly not.  Which fields relate to memory usage?  I took a look; can't
> figure it out.  Proc files aren't terribly concerned with human readability;
> they are more meant for tools.
> Why not just use ps?  It's there, it works, it's reasonably friendly, it has
> a man page.  :)

The fields in /proc/$pid/status that start with Vm (e.g. VmExe, VmStk,
VmRss) the sizes of various different pieces of memory. /proc/$pid/maps
tells you the addresses taken up by mmapped files (such as libraries) as
well as the size of the stack and the heap. Some quick hexidecimal
subtraction can tell you how big these spaces are.

AFAIK, because Linux has lots of great ways of sharing physical memory
pages between processes, and only loading the parts of libraries that it
needs, nothing can tell you how much physical memory space is occupied
by a given program.

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!