#!/bin/ksh #################################################################### # qstat.sh - watch lawson application compiles run # J. David Schronce #################################################################### SLEEPTIME=5 # Seconds to sleep between checks DISPLAYERRORS=10 # Number of error files to display #################################################################### pl=$1 while true do clear if [ "X$1" = "X" ]; then pl=`qstatus | grep "On local" | head -1 | awk '{print $6}'` fi echo "Currently compiling in productline: $pl \c" cd $LAWDIR/$pl pwd echo "Last $DISPLAYERRORS errors.." ls -lrt ??src/*.err | tail -$DISPLAYERRORS 2> /dev/null echo "\n Total number of error files: `ls -1 ??src/*.err | wc -l`" echo; if [ `qstatus | grep "On local" | wc -l` -eq 0 ];then date exit fi echo "Currently Compiling: " qstatus | grep "On local" echo; echo " L`uptime | cut -d"l" -f2`" echo; echo " Last job(s) entered into the QUEUE." qstatus | tail -1 sleep ${SLEEPTIME} done