Authored by Rong

auto commit by shell by gr

No preview for this file type
... ... @@ -17,7 +17,7 @@ YPT_IP=192.168.104.43
basepath=$(cd `dirname $0`; pwd)
ip=$(/sbin/ip addr show | grep eth | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
ip=$(/sbin/ip addr show | grep -e eth -e p4p | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
#YPTLOCKPATH_USER=/Data/logs/jmeter/ypt.user.lock
#YPTLOCKPATH_RESULTID=/Data/logs/jmeter/ypt.resultId.lock
... ...
... ... @@ -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"
... ...
... ... @@ -54,7 +54,7 @@ CMD_STOP_MONITOR="${CMD_RESTART_MONITOR} stop"
CMD_SYNC_SYSTEMTIME="ntpdate asia.pool.ntp.org"
HOST_NAME=$(hostname)
IP=$(/sbin/ip addr show | grep eth | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
IP=$(/sbin/ip addr show | grep -e eth -e p4p | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
function startJmeter(){
echo "[startJmeter]脚本路径:${PATH_JMETER_HOME}${s}"
... ...