Monitor Que Lengths
Patterson, S R
S.R.Patterson at SOTON.AC.UK
Tue Jan 29 16:59:39 GMT 2002
-----Original Message-----
From: Julian Field [mailto:jkf at ECS.SOTON.AC.UK]
Sent: 29 January 2002 16:56
> 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`
Better: QUEUELEN=`find /var/spool/mqueue.in -name q*|wc -l`
> if [ $QUEUELEN -gt $MAXLEN ]; then
> /sbin/reboot
> fi
Steve
More information about the MailScanner
mailing list