From: Razvan Deaconescu Date: Mon, 20 Sep 2010 16:19:57 +0000 (+0200) Subject: ControlScript: terminate $USER owned processes on scenario start X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=e39a236622b6672c5d9dfbace9d15b4e212726cb;p=p2p-testing-infrastructure.git ControlScript: terminate $USER owned processes on scenario start --- diff --git a/ControlScripts/run_scenario.sh b/ControlScripts/run_scenario.sh index 46c84f0..b4b095e 100755 --- a/ControlScripts/run_scenario.sh +++ b/ControlScripts/run_scenario.sh @@ -100,6 +100,9 @@ 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 (ignore result) + ssh -n -p ${PORT} root@${SERVER} "pkill -u ${USER}; pkill -KILL -u ${USER}" + # 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"