日期:2014-05-16  浏览次数:20640 次

求Linux监测程序并自动重起脚本
如标题

------解决方案--------------------
this program is to find the process by the process name
if the process is not active
then start this process

pid=`/bin/ps -e |
/bin/grep $1 |
/bin/sed -e 's/^ *// ' -e 's/ .*// '`


if [ "$pid " = " " ]
then
cd *****
sleep 50
./$1
else
echo "The Process ($1) is running! " > > /dev/null
fi