Re: [Hampshire] maximum memory use for a process

Top Page
Author: Andy Smith
Date:  
To: hampshire
Subject: Re: [Hampshire] maximum memory use for a process

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x57bb8100.hantslug.org.uk.4420': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Wed Feb 6 19:32:49 2008 GMT
gpg: using DSA key 2099B64CBF15490B
gpg: Can't check signature: No public key
Hi Chris,

On Wed, Feb 06, 2008 at 06:04:39PM +0000, Chris Liddell wrote:
> So, is there a command like, for example, "time" which, instead of
> processor time used, gives the (maximum) amount of memory?


The first value in /proc/<pid>/statm is the VSZ and the second value
is the RSS. i.e. The total amount of memory used including that in
swap, and the amount of resident memory used.

Both values are in pages -- usually (always?) 4096kiB

You could periodically check those values and keep a record of the
time when they are largest.

"man proc" for more details.

Cheers,
Andy