#!/bin/bash pid=`ps -ef | grep 61850Gui_Release_zhenan | grep -v 'grep' | awk '{print $2}'` rid=`ps -ef | grep sreadd | grep -v "grep" | awk '{print $2}'` err=0 if [ ! $pid ]; then echo "61850Gui_Release_zhenan is down" err=1 else echo "61850Gui_Release_zhenan is running" fi if [ ! $rid ]; then echo "sreadd is down" else echo "sreadd is running" fi if [ $err == 0 ]; then touch /home/xydl/61850_GUI/RUNNING.lock else echo `date +%F_%T`" restart61850" >> /home/xydl/61850_GUI/restart.log /home/xydl/bin/restart61850.sh fi