Xymon Mailing List Archive search

qstat.sh script available

2 messages in this thread

list Taylor Lewick · Thu, 28 Aug 2008 08:20:20 -0500 ·
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?

 
Thanks,
list Henrik Størner · Tue, 30 Sep 2008 11:52:47 +0000 (UTC) ·
quoted from Taylor Lewick
In <user-32ce826cb344@xymon.invalid> "Taylor Lewick" <user-ccbabb0b3ab0@xymon.invalid> 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