...
|
...
|
@@ -15,6 +15,10 @@ INFLUXDB_DB=ypt |
|
|
|
|
|
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}')
|
|
|
|
|
|
#YPTLOCKPATH_USER=/Data/logs/jmeter/ypt.user.lock
|
|
|
#YPTLOCKPATH_RESULTID=/Data/logs/jmeter/ypt.resultId.lock
|
|
|
#RUNTIMELOG_PATH=/Data/logs/jmeter/runtime.log
|
...
|
...
|
@@ -32,10 +36,10 @@ curl -XPOST "http://${YPT_IP}:8080/ypt/machines/updateMachines" --data-binary "$ |
|
|
function uploadLoadInfo(){
|
|
|
tmp_file_path=/tmp/yohoPerformanceTestAuto_Mysql_Monitor.nmon
|
|
|
#生成1次nmon结果文件
|
|
|
/opt/jmeter/shell/auto/nmon_linux_x86_64 -F ${tmp_file_path} -N -s 1 -c 1
|
|
|
${basepath}/nmon_linux_x86_64 -F ${tmp_file_path} -N -s 1 -c 1
|
|
|
sleep 2
|
|
|
#ip=$(/sbin/ifconfig | grep "inet "|grep -v "127.0.0.1" | awk '{print $2}' | awk '{print substr($0 , index($0 , ":")+1)}')
|
|
|
ip=$(/sbin/ip addr show | grep eth | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
|
|
|
#ip=$(/sbin/ip addr show | grep eth | grep inet | awk '{print $2}' | awk -F '/' '{print $1}')
|
|
|
|
|
|
#cpu负载-1分钟
|
|
|
cpu_load=$(cat /proc/loadavg | awk '{print $1}')
|
...
|
...
|
|