As long as log monitoring program can also achieve the program start date: 2004/07/30 Author: zcatlinux Source: zclinux
#! / bin / bash
While [1]; do jsprog = `ps -ef | grep jsrun | sed -e '/ grep / d'ration [" $ pROG "]; THEN JSLOG =` tail -n 12 / var / jmis / log / nohup .out | grep "over stop" | WC -L` IF [$ jslog -gt 0]; THEN CD / VAR / JMIS / BIN / NOHUP /VAR/JMIS/bin/jsrun.sh & else Sleep 60 Fi Else CD / VAR / JMIS / BIN / NOHUP /VAR/JMIS/bin/jsrun.sh & sleep 120 Fidone