Monitor Que Lengths
Julian Field
jkf at ecs.soton.ac.uk
Tue Jan 29 16:55:50 GMT 2002
At 16:40 29/01/2002, you wrote:
>I've had mailscanner stop processing mail a couple of times.
What version of MailScanner are you using? This was a known problem with
some of the early releases of version 3. You really need to be running 3.04.
>The mail just keeps building up until I restart the computer. (resarting
>the service doesn't seem to do it usually).
Running /usr/local/MailScanner/bin/check_mailscanner should restart
MailScanner if it is not running.
> How could I write a script to check the number of files in mqueue.in
> and mqueue and execute a init6 if it gets over a certain number?
How about something like
#!/bin/sh
# Define this to be your maximum allowed mail queue length
MAXLEN=300
LSLEN=`cd /var/spool/mqueue.in && ls | wc -l`
QUEUELEN=`expr $LSLEN / 2`
if [ $QUEUELEN -gt $MAXLEN ]; then
/sbin/reboot
fi
--
Julian Field Teaching Systems Manager
jkf at ecs.soton.ac.uk Dept. of Electronics & Computer Science
Tel. 023 8059 2817 University of Southampton
Southampton SO17 1BJ
More information about the MailScanner
mailing list