...
|
...
|
@@ -7,8 +7,9 @@ echo "-p : jmx文件全父路径" |
|
|
echo "-n : jmx文件名称"
|
|
|
echo "-t : 线程数"
|
|
|
echo "-c : 运行次数"
|
|
|
echo "-e : 要修改的hosts"
|
|
|
echo ""
|
|
|
echo "举例:sh debugJmx.sh -p /opt/jmeter/script/default -n test123.jmx -t 1 -c 1"
|
|
|
echo "举例:sh debugJmx.sh -p /opt/jmeter/script/default -n test123.jmx -t 1 -c 1 -e \"10.10.11.1 test.test.com\" -e \"192.168.1.1 test.yoho.cn\""
|
|
|
echo "----------------------------------"
|
|
|
}
|
|
|
|
...
|
...
|
@@ -32,6 +33,13 @@ threadCount=$OPTARG |
|
|
c)
|
|
|
loops=$OPTARG
|
|
|
;;
|
|
|
e)
|
|
|
if [ ! $e ];then
|
|
|
hosts=$OPTARG
|
|
|
else
|
|
|
hosts="$hosts\n$OPTARG"
|
|
|
fi
|
|
|
;;
|
|
|
h)
|
|
|
usage
|
|
|
exit 1
|
...
|
...
|
@@ -43,7 +51,12 @@ exit 1 |
|
|
esac
|
|
|
done
|
|
|
|
|
|
###
|
|
|
HOST_NAME=$(hostname)
|
|
|
IP=$(/sbin/ip addr show | grep -e eth -e p4p | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
|
|
|
echo -e "127.0.0.1 localhost\n::1 localhost\n${IP} ${HOST_NAME}\n${hosts}" > /etc/hosts
|
|
|
|
|
|
###
|
|
|
DEBUG_JMX_PATH=/tmp/debugJmx
|
|
|
DEBUG_LOG_PATH=$DEBUG_JMX_PATH/${jmxName}.debug.log
|
|
|
ResultCollector="<ResultCollector guiclass=\"StatVisualizer\" testclass=\"ResultCollector\" testname=\"聚合报告\" enabled=\"true\">\n"
|
...
|
...
|
|