As long as the log of the monitor can also realize the startup of the program. . . ^

zhaozj2021-02-16  103

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

转载请注明原文地址:https://www.9cbs.com/read-11093.html

New Post(0)