*/10 * * * * sh /opt/fetch/mintor/process_mintor.sh >> /opt/fetch/mintor/process_mintor.log 2 >&1
#!/usr/sh
date=`date`
echo "start : $date"
array="aircoeer aircoder"
for name in $array;
do
echo '\n -----------\n'
echo $name
pid=`ps aux | grep $name | grep -v grep | awk '{if (NR == 1) {print $2}}'`
echo "$pid"|grep -E '[0-9]+'
if [ $? -eq 0 ];then
echo "exist"
else
echo "not exist"
curl -q http://xx.13.81.10:10001/sms?appId=1001\&to=186xx\&msg=xxxx$name
fi
done;
#!/usr/sh
date=`date`
echo "start : $date"
array="aircoeer aircoder"
for name in $array;
do
echo '\n -----------\n'
echo $name
pid=`ps aux | grep $name | grep -v grep | awk '{if (NR == 1) {print $2}}'`
echo "$pid"|grep -E '[0-9]+'
if [ $? -eq 0 ];then
echo "exist"
else
echo "not exist"
curl -q http://xx.13.81.10:10001/sms?appId=1001\&to=186xx\&msg=xxxx$name
fi
done;


被折叠的 条评论
为什么被折叠?



