Authored by Rong

auto commit by shell by gr

... ... @@ -4,11 +4,12 @@ then
. ~/.bash_profile
fi
basepath=$(cd `dirname $0`; pwd)
while true
do
#/opt/jmeter/shell/auto/yohoPerformanceTestAuto_Mysql.sh
/opt/jmeter/shell/auto/yohoPerformanceTestAuto_Mysql_InfluxDB.sh 1>/dev/null 2>&1
${basepath}/yohoPerformanceTestAuto_Mysql_InfluxDB.sh 1>/dev/null 2>&1
sleep 7
done
... ...
... ... @@ -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}')
... ...
... ... @@ -7,4 +7,4 @@ ps -ef | grep "yohoPerformanceTestAuto_Job.sh" | grep -v grep | cut -c 9-15 | xa
if [ "$1" == "stop" ];then
exit
fi
${basepath}/yohoPerformanceTestAuto_Job.sh 1>/dev/null 2>&1 &
${basepath}/auto/yohoPerformanceTestAuto_Job.sh 1>/dev/null 2>&1 &
... ...