From 5f87e77ba8b3fbfa60ead9be883484827abd90c1 Mon Sep 17 00:00:00 2001 From: QiLiang Date: Fri, 18 Dec 2015 08:39:03 +0000 Subject: Update control configure Bug fix and scripts clean JIRA:BOTTLENECK-24 Change-Id: Iaeb84f6abaebc32372ab8e8d7636d1ea0bb6b343 Signed-off-by: QiLiang --- .../1-1-1/rubbos_conf/rubbos-servletsBO.sh | 60 +++++++--------- .../1-1-1/scripts/CONTROL_rubbos_exec.sh | 78 +++++++-------------- .../1-1-1/scripts/MYSQL1_ignition.sh | 4 +- .../1-1-1/scripts/TOMCAT1_configure.sh | 4 +- .../1-1-1/scripts/TOMCAT1_pkg_prepare.sh | 2 +- rubbos/rubbos_scripts/1-1-1/scripts/run.sh | 4 ++ rubbos/rubbos_scripts/1-1-1/scripts/run_mysql.sh | 19 ----- rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh | 6 +- rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml | 79 +++++++++++++++++++++ .../1-1-1/tomcat_conf/server.xml-ubuntu | 81 ---------------------- 10 files changed, 141 insertions(+), 196 deletions(-) delete mode 100644 rubbos/rubbos_scripts/1-1-1/scripts/run_mysql.sh create mode 100644 rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml delete mode 100644 rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml-ubuntu (limited to 'rubbos') diff --git a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh index c3e958d5..62c3c6cb 100644 --- a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh +++ b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh @@ -19,40 +19,33 @@ #setenv SERVLETDIR $RUBBOS_HOME/Servlets +set -x + # Go back to RUBBoS root directory cd .. +export scp_options='-o StrictHostKeyChecking=no -o BatchMode=yes' + # Browse only cp -fin ./workload/browse_only_transitions.txt ./workload/user_transitions.txt cp -fin ./workload/browse_only_transitions.txt ./workload/author_transitions.txt -scp ./workload/browse_only_transitions.txt ${CLIENT1_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt -scp ./workload/browse_only_transitions.txt ${CLIENT1_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt - -scp ./workload/browse_only_transitions.txt ${CLIENT2_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt -scp ./workload/browse_only_transitions.txt ${CLIENT2_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt - -scp ./workload/browse_only_transitions.txt ${CLIENT3_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt -scp ./workload/browse_only_transitions.txt ${CLIENT3_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt - -scp ./workload/browse_only_transitions.txt ${CLIENT4_HOST}:${RUBBOS_HOME}/workload/user_transitions.txt -scp ./workload/browse_only_transitions.txt ${CLIENT4_HOST}:${RUBBOS_HOME}/workload/author_transitions.txt - -scp Client/rubbos.properties ${CLIENT1_HOST}:${RUBBOS_HOME}/Client/rubbos.properties -scp Client/rubbos.properties ${CLIENT2_HOST}:${RUBBOS_HOME}/Client/rubbos.properties -scp Client/rubbos.properties ${CLIENT3_HOST}:${RUBBOS_HOME}/Client/rubbos.properties -scp Client/rubbos.properties ${CLIENT4_HOST}:${RUBBOS_HOME}/Client/rubbos.properties - - -bench/flush_cache 490000 -ssh $HTTPD_HOST "$RUBBOS_HOME/bench/flush_cache 880000" # web server -ssh $MYSQL1_HOST "$RUBBOS_HOME/bench/flush_cache 880000" # database server -ssh $TOMCAT1_HOST "$RUBBOS_HOME/bench/flush_cache 780000" # servlet server -ssh $CLIENT1_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client -ssh $CLIENT2_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client -ssh $CLIENT3_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client -ssh $CLIENT4_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client +for host in ${CLIENT1_HOST} ${CLIENT2_HOST} ${CLIENT3_HOST} ${CLIENT4_HOST} +do + scp ${scp_options} ./workload/browse_only_transitions.txt ${host}:${RUBBOS_HOME}/workload/user_transitions.txt + scp ${scp_options} ./workload/browse_only_transitions.txt ${host}:${RUBBOS_HOME}/workload/author_transitions.txt + scp ${scp_options} Client/rubbos.properties ${host}:${RUBBOS_HOME}/Client/rubbos.properties +done + +#bench/flush_cache 490000 +#ssh $HTTPD_HOST "$RUBBOS_HOME/bench/flush_cache 880000" # web server +#ssh $MYSQL1_HOST "$RUBBOS_HOME/bench/flush_cache 880000" # database server +#ssh $TOMCAT1_HOST "$RUBBOS_HOME/bench/flush_cache 780000" # servlet server +#ssh $CLIENT1_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client +#ssh $CLIENT2_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client +#ssh $CLIENT3_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client +#ssh $CLIENT4_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client RAMPUP=480000 MI=720000 @@ -61,15 +54,14 @@ start_seconds=`echo \( $RAMPUP / 1000 \) + $current_seconds - 60 | bc` SMI=`date -d "1970-01-01 $start_seconds secs UTC" +%Y%m%d%H%M%S` end_seconds=`echo \( $RAMPUP / 1000 + $MI / 1000 + 30 \) + $current_seconds | bc` EMI=`date -d "1970-01-01 $end_seconds secs UTC" +%Y%m%d%H%M%S` -ssh $BENCHMARK_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $CLIENT1_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $CLIENT2_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $CLIENT3_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $CLIENT4_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $HTTPD_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $TOMCAT1_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & -ssh $MYSQL1_HOST "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & +for host in $BENCHMARK_HOST $CLIENT1_HOST $CLIENT2_HOST $CLIENT3_HOST \ + $CLIENT4_HOST $HTTPD_HOST $TOMCAT1_HOST $MYSQL1_HOST +do + ssh $scp_options $host "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & +done make emulator +set -x + diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh b/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh index 8c4dcc85..3fa3047e 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/CONTROL_rubbos_exec.sh @@ -1,7 +1,10 @@ #!/bin/bash +set -x + cd /bottlenecks/rubbos/rubbos_scripts/1-1-1 source set_bottlenecks_rubbos_env.sh +export scp_options='-o StrictHostKeyChecking=no -o BatchMode=yes' scp $WORK_HOME/monitors_files/oprofile_start.sh $MYSQL1_HOST:/tmp/ @@ -34,19 +37,16 @@ do ssh $TOMCAT1_HOST "rm -f $CATALINA_HOME/logs/*" ssh $MYSQL1_HOST "rm -f $MYSQL_HOME/run/*.log $RUBBOS_APP/mysql_mon-*" - #$OUTPUT_HOME/scripts/start_all.sh - #sleep 15 - - ssh $BENCHMARK_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $CLIENT1_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $CLIENT2_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $CLIENT3_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $CLIENT4_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $HTTPD_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $TOMCAT1_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $MYSQL1_HOST "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" - ssh $MYSQL1_HOST "sudo rm -f /tmp/*.log" - ssh root@$MYSQL1_HOST chmod 777 /tmp/oprofile_start.sh + $OUTPUT_HOME/scripts/start_all.sh + sleep 15 + + for host in $BENCHMARK_HOST $CLIENT1_HOST $CLIENT2_HOST $CLIENT3_HOST \ + $CLIENT4_HOST $HTTPD_HOST $TOMCAT1_HOST $MYSQL1_HOST + do + ssh $host "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*" + done + ssh $MYSQL1_HOST "rm -f /tmp/*.log" + ssh $MYSQL1_HOST chmod 777 /tmp/oprofile_start.sh #ssh $MYSQL1_HOST " # cd /tmp # ./oprofile_start.sh @@ -54,6 +54,7 @@ do ssh $BENCHMARK_HOST " source /bottlenecks/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh + cd $RUBBOS_HOME/bench \rm -r 20* @@ -64,46 +65,14 @@ do # Collect results echo "The benchmark has finished. Now, collecting results..." cd 20* - scp $BENCHMARK_HOST:$RUBBOS_APP/sar-* ./ - scp $BENCHMARK_HOST:$RUBBOS_APP/ps-* ./ - scp $BENCHMARK_HOST:$RUBBOS_APP/iostat-* ./ - scp $BENCHMARK_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $BENCHMARK_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $CLIENT1_HOST:$RUBBOS_APP/sar-* ./ - scp $CLIENT1_HOST:$RUBBOS_APP/ps-* ./ - scp $CLIENT1_HOST:$RUBBOS_APP/iostat-* ./ - scp $CLIENT1_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $CLIENT1_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $CLIENT2_HOST:$RUBBOS_APP/sar-* ./ - scp $CLIENT2_HOST:$RUBBOS_APP/ps-* ./ - scp $CLIENT2_HOST:$RUBBOS_APP/iostat-* ./ - scp $CLIENT2_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $CLIENT2_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $CLIENT3_HOST:$RUBBOS_APP/sar-* ./ - scp $CLIENT3_HOST:$RUBBOS_APP/ps-* ./ - scp $CLIENT3_HOST:$RUBBOS_APP/iostat-* ./ - scp $CLIENT3_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $CLIENT3_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $CLIENT4_HOST:$RUBBOS_APP/sar-* ./ - scp $CLIENT4_HOST:$RUBBOS_APP/ps-* ./ - scp $CLIENT4_HOST:$RUBBOS_APP/iostat-* ./ - scp $CLIENT4_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $CLIENT4_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $HTTPD_HOST:$RUBBOS_APP/sar-* ./ - scp $HTTPD_HOST:$RUBBOS_APP/ps-* ./ - scp $HTTPD_HOST:$RUBBOS_APP/iostat-* ./ - scp $HTTPD_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $HTTPD_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $TOMCAT1_HOST:$RUBBOS_APP/sar-* ./ - scp $TOMCAT1_HOST:$RUBBOS_APP/ps-* ./ - scp $TOMCAT1_HOST:$RUBBOS_APP/iostat-* ./ - scp $TOMCAT1_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $TOMCAT1_HOST:$RUBBOS_APP/postgres_lock-* ./ - scp $MYSQL1_HOST:$RUBBOS_APP/sar-* ./ - scp $MYSQL1_HOST:$RUBBOS_APP/ps-* ./ - scp $MYSQL1_HOST:$RUBBOS_APP/iostat-* ./ - scp $MYSQL1_HOST:$RUBBOS_APP/mysql_mon-* ./ - scp $MYSQL1_HOST:$RUBBOS_APP/postgres_lock-* ./ + for host in $BENCHMARK_HOST $CLIENT1_HOST $CLIENT2_HOST $CLIENT3_HOST \ + $CLIENT4_HOST $HTTPD_HOST $TOMCAT1_HOST $MYSQL1_HOST + do + for f in sar-* ps-* iostat-* mysql_mon-* postgres_lock-* + do + scp $scp_options \$host:$RUBBOS_APP/\$f ./ + done + done cd .. mv 20* $TMP_RESULTS_DIR_BASE/$RUBBOS_RESULTS_DIR_NAME/ " @@ -134,3 +103,6 @@ ssh $BENCHMARK_HOST " " echo "Finish RUBBoS" + +set +x + diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh index f9ea6a41..a673537f 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_ignition.sh @@ -5,8 +5,6 @@ source set_bottlenecks_rubbos_env.sh echo "STARTING MYSQL on $HOSTNAME" -cd $MYSQL_HOME -bin/safe_mysqld --defaults-file="$MYSQL_HOME/my.cnf" --datadir=$MYSQL_DATA_DIR --pid-file=$MYSQL_PID_FILE --socket=$MYSQL_SOCKET --port=$MYSQL_PORT --user=root --log-bin=rubbos-bin --max_connections=500 --log-slow-queries & -#bin/safe_mysqld --defaults-file="$MYSQL_HOME/my.cnf" --datadir=$MYSQL_DATA_DIR --log=$MYSQL_ERR_LOG --pid-file=$MYSQL_PID_FILE --socket=$MYSQL_SOCKET --port=$MYSQL_PORT --user=root &#--log-bin=rubbos-bin +# TODO start mysqld here, currently mysql is started by MYSQL1_configure.sh echo "MYSQL IS RUNNING on $HOSTNAME" diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_configure.sh b/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_configure.sh index ea4b57a0..966c2f8b 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_configure.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_configure.sh @@ -5,6 +5,6 @@ source set_bottlenecks_rubbos_env.sh echo "CONFIGURING TOMCAT on $HOSTNAME" -cp $OUTPUT_HOME/tomcat_conf/server.xml-$HOSTNAME $CATALINA_HOME/conf/server.xml +cp $OUTPUT_HOME/tomcat_conf/server.xml $CATALINA_HOME/conf/server.xml -echo "DONE CONFIGURING TOMCAT on $HOSTNAME" +echo "DONE CONFIGURING TOMCAT on $HOSTNAME" diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_pkg_prepare.sh b/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_pkg_prepare.sh index ac5231e4..bdbb999f 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_pkg_prepare.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/TOMCAT1_pkg_prepare.sh @@ -39,7 +39,7 @@ fi # Packages for TOMCAT1 configure if true; then ssh $TOMCAT1_HOST "mkdir -p $OUTPUT_HOME/tomcat_conf" -scp $scp_options $OUTPUT_HOME/tomcat_conf/server.xml-$HOSTNAME $TOMCAT1_HOST:$OUTPUT_HOME/tomcat_conf/server.xml-$HOSTNAME +scp $scp_options $OUTPUT_HOME/tomcat_conf/server.xml $TOMCAT1_HOST:$OUTPUT_HOME/tomcat_conf/server.xml fi # Packages for TOMCAT1 rubbosSL configure diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/run.sh b/rubbos/rubbos_scripts/1-1-1/scripts/run.sh index e71c6ec2..9e523c3d 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/run.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/run.sh @@ -1,3 +1,6 @@ +#!/bin/bash +set -x + cd /bottlenecks/rubbos/rubbos_scripts/1-1-1 source set_bottlenecks_rubbos_env.sh cd /bottlenecks/rubbos/rubbos_scripts/1-1-1/scripts @@ -137,3 +140,4 @@ ssh $TOMCAT1_HOST /tmp/TOMCAT1_rubbosSL_configure.sh ssh $CONTROL_HOST /tmp/CONTROL_rubbos_exec.sh +set +x diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/run_mysql.sh b/rubbos/rubbos_scripts/1-1-1/scripts/run_mysql.sh deleted file mode 100644 index e9760362..00000000 --- a/rubbos/rubbos_scripts/1-1-1/scripts/run_mysql.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - - -ssh $MYSQL1_HOST /tmp/MYSQL1_install.sh - - - - -ssh $MYSQL1_HOST /tmp/MYSQL1_rubbos_install.sh - - - - -ssh $MYSQL1_HOST /tmp/MYSQL1_configure.sh & -sleep 60 - - -#ssh $CONTROL_HOST /tmp/CONTROL_rubbos_exec.sh - diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh b/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh index 605e1a58..ba7e8a27 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/start_all.sh @@ -3,11 +3,11 @@ cd /bottlenecks/rubbos/rubbos_scripts/1-1-1 source set_bottlenecks_rubbos_env.sh -ssh $MYSQL1_HOST /tmp/MYSQL1_ignition.sh & +ssh $MYSQL1_HOST /tmp/MYSQL1_ignition.sh sleep 10 -ssh $TOMCAT1_HOST /tmp/TOMCAT1_ignition.sh +ssh $TOMCAT1_HOST /tmp/TOMCAT1_ignition.sh sleep 10 -ssh $HTTPD_HOST /tmp/HTTPD_ignition.sh +ssh $HTTPD_HOST /tmp/HTTPD_ignition.sh sleep 5 diff --git a/rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml b/rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml new file mode 100644 index 00000000..525c4398 --- /dev/null +++ b/rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml-ubuntu b/rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml-ubuntu deleted file mode 100644 index 0998a819..00000000 --- a/rubbos/rubbos_scripts/1-1-1/tomcat_conf/server.xml-ubuntu +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit 1.2.3-korg