shell监控进程脚本
#!/bin/env sh
while [ true ];do
count=$(ps -ef|grep $1|grep -v grep|grep -v $1)
if [[ -z $count ]];then
echo failed
sh $1
else
echo success
fi
sleep 2
done
~

浙公网安备 33010602011771号