首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

求Linux监测程序并自动重起脚本,该怎么解决

2012-02-14 
求Linux监测程序并自动重起脚本如标题[解决办法]this program is to find the process by the process nam

求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

热点排行