linux脚本-判断进程是否存在,从而可以做预警处理..
count=`ps -ef | grep Seeyon | grep -v "grep" | wc -l` echo $count if [ $count -gt 0 ]; then echo "Good." >> /home/admin/test123.txt else echo "Down!" >> /home/admin/test123.txt fi
判断进程是否存在,从而可以做预警处理..
count=`ps -ef | grep Seeyon | grep -v "grep" | wc -l` echo $count if [ $count -gt 0 ]; then echo "Good." >> /home/admin/test123.txt else echo "Down!" >> /home/admin/test123.txt fi
判断进程是否存在,从而可以做预警处理..