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

Re: Easy way to determine how much memory a program used?

On 9/15/05, Adam Funk <a24061@yahoo.com> wrote:
roberto wrote:

> and what about "free -m" ??
> it gives output like this
> ~:$ free -m
>                   total       used       free     shared    buffers
>                   cached
> Mem:           885        583        302          0         58        319
> -/+ buffers/cache:        204        680
> Swap:         1906          0       1906
> perhaps it may be useful for you : )

Only if I run it repeatedly (or use top) and watch it closely while the
program I'm testing is running.

I was hoping for something I could run in a batch job to get the maximum
memory use after the fact.

perhaps you could use top in batch mode: top -b and pipe the ouput to a file for analysis.

Reply to: