> But one should keep an eye on the queue and have alarms ring when it
> gets bigger than your `usual' one. I have some servers where a queue of
> 40 is far too big and something is wrong, others where a queue of 10k is
> about average. YMMV.
Indeed. On Linux, I use this to monitor the queue size with MRTG:
#!/bin/sh
n=`find /var/exim/spool/input -name '*-H' -print 2>/dev/null | wc -l`
echo $n
awk 'END{
print "0"
getline <"/proc/uptime"
seconds=$1
if (seconds>24*3600) {
s=sprintf("%d days, ",seconds/(24*3600))
seconds=seconds%(24*3600)
}
if (seconds>3600) {
s=sprintf(s "%d hours, ",seconds/3600)
seconds=seconds%3600
}
if (seconds>60) {
s=sprintf(s "%d minutes, ",seconds/60)
seconds=seconds%60
}
s=sprintf(s "%d seconds",seconds%60)
print s
print "'$1'"
exit
}' /dev/null
A quick hack, but it gets the job done.
Michael