[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] qstat.sh script available



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