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
判断进程是否存在,从而可以做预警处理..
2023-08-28 12:10:16
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
判断进程是否存在,从而可以做预警处理..