Walt Mankowski on 17 Sep 2012 09:41:47 -0700

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

Re: [PLUG] Report the max memory used by a given command?

On Mon, Sep 17, 2012 at 09:32:19AM -0700, Paul Jungwirth wrote:
> > I think "maxresident" might be what you're looking for.  If not, look
> > through the "Formatting the Output" section of time(1)'s manpage and
> > try out some of the other options.
> Thanks for the reply! I eventually found this page which recommends
> /usr/bin/time -v, although supposedly that only gives you real numbers
> if your system supports it:
> http://stackoverflow.com/questions/774556/peak-memory-usage-of-a-linux-unix-process
> Also further down is a way to use valgrind to get the info; in my case
> that might be overkill.

Nice, I didn't even notice the -v flag!  By the way, you can get at
most of this information inside your own Linux programs via the
getrusage(2) system call.


Attachment: signature.asc
Description: Digital signature

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