[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] qstat.sh script available
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] qstat.sh script available
- From: Henrik Stoerner <henrik (at) hswn.dk>
- Date: Tue, 30 Sep 2008 11:52:47 +0000 (UTC)
- Newsgroups: lists.hobbit
- Organization: Linux Users Inc.
- References: <1F7B01020EC4D04DA17703634B9E888E09BFE2AD (at) ULPGCTMVMAI003.EU.COLT> <48A5513A.7020902 (at) lmco.com> <48B677CB.4010209 (at) lmco.com> <78ca5ea20808280556m1a559316of8f1cbb15315804d (at) mail.gmail.com> <98B0CDCB28A5EE4CB3678CD99406644E26ABF7 (at) tbmail2.tradebot.com>
- User-agent: nn/6.7.3
In <98B0CDCB28A5EE4CB3678CD99406644E26ABF7 (at) tbmail2.tradebot.com> "Taylor Lewick" <tlewick (at) tradebotsystems.com> writes:
>I see on the hobbit demo page Henrik's server is using qstat.sh being
>launched from the ext directory. Can anyone share this script or tell
>me where I can get it?
It's something I cooked up for myself. If you don't have the
unix-socket based QMail stats utilities, you can use the
"qmail-qstat" command to get the data.
#!/bin/sh
if [ -r /tmp/.qmail-qstat ]
then
QLEN=`unixcat /tmp/.qmail-qstat | head -n 1 | cut -d: -f2`
if [ $QLEN -gt 150 ]
then
$BB $BBDISP "status $MACHINE.qstat yellow `date`
Queue: $QLEN
"
else
$BB $BBDISP "status $MACHINE.qstat green `date`
Queue: $QLEN
"
fi
fi
exit 0