[K12OSN] Mail Server

Eric Harrison eharrison at mail.mesd.k12.or.us
Thu Jul 22 21:27:51 UTC 2004


On Thu, 2004-07-22 at 14:28, Rick O'Dell wrote:
> 	I ran top, Of course, I'm not having  a problem at the moment. I didn't see
> anything that looked excessive. MailScanner is using about 1.6% of memory is
> use.
> 

There is probably a much better way to do this, but here is quick-and-dirty method
for watching for memory hogs:

1) run "crontab -e" 
2) enter in this line:

    * * * * * (echo; date; ps -eo pmem,args,user | sort -nr | head) >> $HOME/memory-pigs.txt


This will create a file in your home directory that contains the top 10 memory hogs
every minute. The output will look like this:

Thu Jul 22 14:23:45 PDT 2004
 2.8 amavisd (child)  vscan
 2.7 amavisd (virgin  vscan
 2.7 amavisd (master) vscan
 0.9 ntpd -U ntp -p / ntp
 0.8 /usr/sbin/snmpd  root
 0.4 /usr/bin/perl /u root
 0.4 sshd: root at pts/1 root
 0.4 smtpd -n smtp -t postfix
 0.4 smtpd -n 127.0.0 postfix
 0.4 nqmgr -l -n qmgr postfix

In this case, the amavisd is the top memory hog, each process taking up about
2.7% percent of the available memory.


Once you are done debugging, run "crontab -e" again and remove the line.

-Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/k12osn/attachments/20040722/cf053add/attachment.sig>


More information about the K12OSN mailing list