5 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
6 source set_bottlenecks_rubbos_env.sh
7 export scp_options='-o StrictHostKeyChecking=no -o BatchMode=yes'
9 scp $WORK_HOME/monitors_files/oprofile_start.sh $MYSQL1_HOST:/tmp/
11 echo "Starting RUBBoS"
13 ssh $RUBBOS_RESULTS_HOST "
14 mkdir -p $RUBBOS_RESULTS_DIR_BASE
17 mkdir -p $TMP_RESULTS_DIR_BASE/$RUBBOS_RESULTS_DIR_NAME
20 #TODO use for loop to genrate rubbos.properties file 200 ~ 1700
24 source /bottlenecks/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
25 rm -f $RUBBOS_HOME/Client/rubbos.properties
28 sed -e "s/REPLACE_HTTPD_HOST/$HTTPD_HOST/g" \
29 -e "s/REPLACE_TOMCAT1_HOST/$TOMCAT1_HOST/g" \
30 -e "s/REPLACE_MYSQL1_HOST/$MYSQL1_HOST/g" \
31 -e "s#REPLACE_CLIENT1_HOST#$CLIENT1_HOST#g" \
32 -e "s#REPLACE_CLIENT2_HOST#$CLIENT2_HOST#g" \
33 -e "s#REPLACE_CLIENT3_HOST#$CLIENT3_HOST#g" \
34 -e "s#REPLACE_CLIENT4_HOST#$CLIENT4_HOST#g" \
35 -e "s/REPLACE_NUMBER_OF_CLIENTS_PER_NODE/$((20*i))/g" \
36 $OUTPUT_HOME/rubbos_conf/rubbos.properties_template \
37 > $OUTPUT_HOME/rubbos_conf/rubbos.properties
38 scp $OUTPUT_HOME/rubbos_conf/rubbos.properties $BENCHMARK_HOST:$RUBBOS_HOME/Client/rubbos.properties
39 rm -rf $OUTPUT_HOME/rubbos_conf/rubbos.properties
41 #echo "Resetting all data"
42 #$OUTPUT_HOME/scripts/reset_all.sh
45 echo "Start Browsing Only with rubbos.properties_$((100*i))"
46 echo "Removing previous logs..."
47 ssh $HTTPD_HOST "rm -f $HTTPD_HOME/logs/*log"
48 ssh $TOMCAT1_HOST "rm -f $CATALINA_HOME/logs/*"
49 ssh $MYSQL1_HOST "rm -f $MYSQL_HOME/run/*.log $RUBBOS_APP/mysql_mon-*"
51 $OUTPUT_HOME/scripts/start_all.sh
54 for host in $BENCHMARK_HOST $CLIENT1_HOST $CLIENT2_HOST $CLIENT3_HOST \
55 $CLIENT4_HOST $HTTPD_HOST $TOMCAT1_HOST $MYSQL1_HOST
57 ssh $host "rm -f $RUBBOS_APP/sar-* $RUBBOS_APP/ps-* $RUBBOS_APP/iostat-*"
59 ssh $MYSQL1_HOST "rm -f /tmp/*.log"
60 ssh $MYSQL1_HOST chmod 777 /tmp/oprofile_start.sh
68 source /bottlenecks/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
74 echo "execute benchmark"
75 ./rubbos-servletsBO.sh
78 echo "The benchmark has finished. Now, collecting results..."
80 for host in $BENCHMARK_HOST $CLIENT1_HOST $CLIENT2_HOST $CLIENT3_HOST \
81 $CLIENT4_HOST $HTTPD_HOST $TOMCAT1_HOST $MYSQL1_HOST
83 for f in 'sar-*' 'ps-*' 'iostat-*' 'mysql_mon-*' 'postgres_lock-*'
85 scp $scp_options \$host:$RUBBOS_APP/\$f ./
90 find -type f | grep stat_client | xargs grep throughput
91 mv 20* $TMP_RESULTS_DIR_BASE/$RUBBOS_RESULTS_DIR_NAME/
94 #$OUTPUT_HOME/scripts/stop_all.sh
95 #$OUTPUT_HOME/scripts/kill_all.sh
97 echo "End Browsing Only with rubbos.properties_$((100*i))"
103 echo "Processing the results..."
104 ssh $BENCHMARK_HOST "
105 cd $TMP_RESULTS_DIR_BASE
106 #cd $RUBBOS_RESULTS_DIR_NAME
107 #scp $RUBBOS_RESULTS_HOST:$RUBBOS_RESULTS_DIR_BASE/calc-sarSummary.prl ../
108 #../calc-sarSummary.prl
113 tar zcf $RUBBOS_RESULTS_DIR_NAME.tgz $RUBBOS_RESULTS_DIR_NAME
114 scp $scp_options $RUBBOS_RESULTS_DIR_NAME.tgz $RUBBOS_RESULTS_HOST:$RUBBOS_RESULTS_DIR_BASE/
117 echo "Push the results to DB..."
118 cd $RUBBOS_RESULTS_DIR_BASE
120 ls $RUBBOS_RESULTS_DIR_NAME.tgz
121 tar zxf $RUBBOS_RESULTS_DIR_NAME.tgz
122 ls $RUBBOS_RESULTS_DIR_NAME
124 python $BOTTLENECKS_TOP/utils/dashboard/process_data.py \
125 $RUBBOS_RESULTS_DIR_BASE/$RUBBOS_RESULTS_DIR_NAME \
126 $BOTTLENECKS_TOP/utils/dashboard/dashboard.yaml
130 touch /tmp/rubbos_finished