From: Razvan Deaconescu Date: Tue, 3 Aug 2010 12:44:48 +0000 (+0300) Subject: ControlScripts: update run_scenario.sh to schedule clients X-Git-Tag: classic-scenario-config~9 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=5b1302fcebc1dca8de58d7fa4f4680c04ccece38;p=p2p-testing-infrastructure.git ControlScripts: update run_scenario.sh to schedule clients --- diff --git a/ControlScripts/run_scenario.sh b/ControlScripts/run_scenario.sh index 3a0ba36..37b236f 100755 --- a/ControlScripts/run_scenario.sh +++ b/ControlScripts/run_scenario.sh @@ -149,6 +149,20 @@ scenario_wait() { } +# Schedule start/stop +scenario_schedule() +{ + echo "---------------------- scenario_schedule" >> $ERR_LOG + while IFS=$'\t' read SERVER PORT USER REMOTE_PATH REMOTE_IF DL_BW DL_BURST UL_BW UL_BURST START_DELAY START_CMD DETECT_STOP_CMD STOP_CMD TC_SCRIPT LOG_PARSER PERIODS; do + echo " ** Scheduling $SERVER:$PORT" + if ! ssh -f -p $PORT ${USER}@${SERVER} "cd $REMOTE_PATH/P2P-Testing-Infrastructure/ControlScripts; ./client_schedule.sh ${CLIENT_TYPE} ${TORRENT_FILE} ${PERIODS}" &>> $ERR_LOG; then + echo "Error: error running client_schedule.sh on $SERVER" + break + fi + done < $TMP_FILE + unset IFS + echo "---------------------- _scenario_schedule" >> $ERR_LOG +} # Clean the nodes and retrieve the log files scenario_clean() {