> Memory management is tricky though. Hard to tell which values sum up to
> the
> real thing.
> 
> Probably best meter on Linux is the actual free value highlighted
> below?
> Check it before starting amavisd/spamd/whatnot and check it again after
> running for a while.  Also double check it after killing all the
> processes.
> I'm open to be proved otherwise..
> 
> $ free
>              total       used       free     shared    buffers
> cached
> Mem:       1047496     944236     103260          0       2904
> 284336
> -/+ buffers/cache:     656996     ___390500___
> Swap:       524272     266668     257604

Let's see if Private_ entries in smaps do the right thing.

This is the command I use to get allocated private memory from a process (in
kB):

 awk 'BEGIN {p=0;} $1 ~ /Private_/ {p += $2;} END {print p;}'
/proc/PID/smaps

Besides, one can specify the smaps file of more than a process, not only
one.

Regards,

Giampaolo

Reply via email to