Mark M. Hoffman on 29 Jan 2004 17:18:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Measuring the memory usage of a process


* Walt Mankowski <waltman@pobox.com> [2004-01-29 10:54:29 -0500]:
> On Thu, Jan 29, 2004 at 10:37:41AM -0500, Mark M. Hoffman wrote:
> > The man page says:
> > 
> > 	"Not all resources are measured by all versions of Unix,
> > 	so some of  the values  might  be  reported  as zero.  
> > 	The present selection was mostly inspired by the data
> > 	provided by 4.2 or 4.3BSD."
> > 
> > > better utility I could be using to get this information?
> > 
> > Is it a C program?  Try valgrind (if it's not too slow)...
> > 
> > http://valgrind.kde.org/
> > 
> > Or, you could also try to read it out of /proc/<pid>/status.
> 
> Yes, I read that in the man page as well.  But it seems to me that
> Linux *is* reporting memory usage.  The fields are set in
> /proc/<pid>/status, and they show up when I run top(1).  So why can't
> time(1) see them?

Sorry, I don't know.  Read the source? ;)

> > 	The present selection was mostly inspired by the data
> > 	provided by 4.2 or 4.3BSD."

Maybe they're just not there.

A couple bog-standard Linux boxes give the same results here,
so I don't think you've misconfigured anything (if that's what
you're after).

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug