my head hurts
#!/bin/ksh
# you ever have a heavy transaction log writing app that hangs without any #indication of failure?
# the only indication is that the logs arnt being written to but the PIDS are still #alive
##################
time=`date +%T | awk -F: '{print $1$2}'`
export time
date=`date +%Y%m%d`
export date
while read LINE
do
# read the contents of the customerfile.txt which has a list of all active threads
# and we read each thread number one at a time. We check to see if a logfile has #started for the day
################################
if test -f /logs/$LINE.log.$date.txt
##################################
# we then check the time stamp against the system time and if there is a 15 minute #lag time assume there is a problem
################################
then foo=`ls -l /logs/$LINE.log.$date.txt | awk '{print $8}' | awk -F: '{print $1$2}'`
export foo
foobar=`echo $time-$foo | bc`
export foobar
fi
if [ $foobar -gt 15 ]
then /scripts/restart.ksh $LINE
else exit 1
fi
done <./custfile.txt
#####################
thanks,
bill who forgot years ago which tics go where in awk