#!/bin/sh # # Check for zombie jobs (not terminated). # Also scan logs for ERROR messages # bin/bconsole -c bin/bconsole.conf <&1 >/dev/null @output tmp/dir.out status dir @output tmp/fd.out status client @output tmp/sd.out status $1 @output quit END_OF_DATA grep "No Jobs running." tmp/dir.out 2>&1 >/dev/null if [ $? != 0 ] ; then echo " " echo " !!!! Zombie Jobs in Director !!!!" echo " !!!! Zombie Jobs in Director !!!!" >>test.out echo " " fi grep "No Jobs running." tmp/fd.out 2>&1 >/dev/null if [ $? != 0 ] ; then echo " " echo " !!!! Zombie Jobs in File daemon !!!!" echo " !!!! Zombie Jobs in File daemon !!!!" >>test.out echo " " fi grep "No Jobs running." tmp/sd.out 2>&1 >/dev/null if [ $? != 0 ] ; then echo " " echo " !!!! Zombie Jobs in Storage daemon !!!!" echo " !!!! Zombie Jobs in Storage daemon !!!!" >>test.out echo " " fi grep "ERROR" tmp/log*.out 2>&1 >/dev/null if [ $? = 0 ] ; then echo " " echo " !!!! ERROR in log output !!!!" echo " !!!! ERROR in log output !!!!" >>test.out echo " " fi grep "Fatal Error" tmp/log*.out 2>&1 >/dev/null if [ $? = 0 ] ; then echo " " echo " !!!! Fatal Error in log output !!!!" echo " !!!! Fatal Error in log output !!!!" >>test.out echo " " fi