可以在性能测试过程中。定期检测startAgent和nmon的状态
#!/bin/sh
while true
do
pnmon=`ps aux | grep nmon | grep -v grep`;
if [ "$pnmon" == "" ]; then
sleep 1;
echo "no nmon process";
echo "正在启动中";
nmon -f -s3 -c300 -m /root/qumf/;
else
echo "process exsits";
break;
fi
done