进程检查机制

1. 是否超时

2.防止重复执行,同时执行

3. 超时清除机制

4.异常报警机制

5. 进程冗余机制

6. 逻辑依赖检查

ps -eo pid,args  xxx   

根据pid 查看进程当时执行的参数

for pid in `ps -eaf | grep xxx | grep xxx | awk '{print $2}' `

do

    time=`ps -eo pid,etime,stime | grep pid | awk '{print $2}'`

    if [[ "$time" > "xxxx" ]]

    then

        xxx

   else

       xxx

  fi

done

if [ -f xxx -a `ps -eaf | grep xxx | grep xxx | wc -l ` -gt 2 ]

then

    xxx

fi

 

posted @ 2019-07-12 10:35  林文波  阅读(109)  评论(0编辑  收藏  举报