首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

过程监控

2013-08-13 
进程监控*/10 * * * * sh /opt/fetch/mintor/process_mintor.sh /opt/fetch/mintor/process_mintor.log

进程监控
*/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;

热点排行