php脚本监控程序 #!/bin/sh# find ipip=`/sbin/ifconfig eth1 | grep 'inet addr' | awk '{ print substr($2, index($2, :)+1)}'`#monitor procname scriptnamemonitor(){ procname=$1 scriptname=$2 # find proc by procname rc=$(ps -ef | grep $procname | grep -v grep | wc -l) if [ $rc -eq 0 ]; then echo $procname start php $scriptname & else echo $procname running fi sleep 1}#monitor procmonitor beanstalkd_service /home/www/phpxiu/public/beanstalkd_service.php
http://www.bkjia.com/phpjc/894188.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/894188.htmltecharticlephp脚本监控程序 #!/bin/sh# find ipip=`/sbin/ifconfig eth1 | grep inet addr | awk { print substr($2, index($2, :)+1)}`#monitor procname scriptnamemonitor(){procname=$1script...