From: P2P-Next User Date: Fri, 20 Aug 2010 13:35:39 +0000 (+0300) Subject: ControlScripts: add process terminate functionality in run_scenario.sh in scenario_se... X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=fc660c9b3316080127abded9fe52b7880459d96e;p=p2p-testing-infrastructure.git ControlScripts: add process terminate functionality in run_scenario.sh in scenario_setup() function - kill user-owned processes before running scenario --- diff --git a/ControlScripts/run_scenario.sh b/ControlScripts/run_scenario.sh index 46c84f0..409fd29 100755 --- a/ControlScripts/run_scenario.sh +++ b/ControlScripts/run_scenario.sh @@ -100,6 +100,12 @@ scenario_setup() { while IFS=$'\t' read SERVER PORT USER REMOTE_PATH REMOTE_IF DL_BW DL_BURST UL_BW UL_BURST NO_CONNECTIONS PRE_RUN_SCRIPT POST_RUN_SCRIPT CLIENT_TYPE TORRENT_FILE PERIODS; do echo " ** Setting-up $SERVER:$PORT" + # Terminate $USER owned processes + if ! ssh -n -p ${PORT} root@${SERVER} "pkill -u ${USER}; pkill -KILL -u ${USER}"; then + echo "Error: cannot kill $USER owned processes" + exit 1 + fi + # Clean-up the host by using rsync if ! rsync -avP --del --exclude 'Results' --rsh='ssh -p'$PORT $TEST_INFRASTRUCTURE_REL_PATH ${USER}@${SERVER}:${REMOTE_PATH} >> $ERR_LOG 2>&1; then echo "Error: rsync error on $SERVER"