[原创]我的进程管家
发表于 : 2007-08-04 7:33
因为一次mldonkey意外挂掉(但我不得不说它平时的稳定性是很好的),导致我产生了监控它的想法。
于是,这段东西诞生了。
初学shell,写得不好。
于是,这段东西诞生了。
代码: 全选
#!/bin/sh
mywar=1
while [ $mywar>0 ]
do
ps -e > myps.log
if [ 'grep -c mlnet myps.log'=0 ];then
echo We got problem.I will try to fix it. >> ~/checkMK.log
date >> checkMK.log
~/download/mldonkey-distrib-2.8.7/mlnet
fi
done