. /usr/local/bin/setenv.sh cnt=`ps -ef | grep -v grep | grep -c "ontape -c"` if [ $cnt -eq 0 ] then date echo "Note: Informix Continuous Logging to Tape was not running" exit 0 fi date echo "Note: Informix Continuous Logging to Tape was running." ps -ef | grep -v grep | grep "ontape -c" PS_ID=`ps -ef | grep -v grep | grep "ontape -c" | awk '{print $2}'` echo "Attempt to terminate process ID $PS_ID..." kill -9 $PS_ID if [ $? != 0 ] then echo "Note: an error was encountered attempting to stop continuous logging to tape" echo "Logging was NOT stopped" exit 1 fi while true do cnt=`ps -ef | grep -v grep | grep -c "ontape -c"` if [ $cnt -eq 0 ] then echo "Note: Informix Continuous Logging to Tape was terminated" exit 0 fi echo "Waiting to continuous logging to tape to terminate..." sleep 5 done