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

Re: Getting the memory used by a process



On 8.12.2010 12:59, Mathieu Malaterre wrote:
> Hi there,
> 
>   I am trying to find out the memory used by a process (peak memory
> actually). I found the command 'pmap', howeverI cannot find a way to
> retrieve the PID of a process when execution time is really short. For
> instance, this does not work:
> 
> /bin/ls && (ps ax | grep ls)
> 
>   Any other tool, other than pmap to do find that information ? I
> would also like to avoid something as heady as valgrind --tool=massif.
> 
> Thanks !

Try this: the_program_to_measure & pmap $!
or maybe this: https://gist.github.com/526585

-- 
Juha Tuuna


Reply to: