From: P2P-Next User Date: Mon, 24 Jan 2011 14:53:23 +0000 (+0200) Subject: tsup exeperiment scripts X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=789e0bfebbdfd1edeb606f29f9b8f079bdf6e2a5;p=p2p-testing-infrastructure.git tsup exeperiment scripts --- diff --git a/ControlScripts/batch_tsup.sh b/ControlScripts/batch_tsup.sh new file mode 100755 index 0000000..65fc11c --- /dev/null +++ b/ControlScripts/batch_tsup.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "usage: $0 number_of_repeats" + exit 1 +fi + +for i in $(seq 1 $1); do + echo "Running repeat $i..." + date + ./run_campaign.sh tsup-mta-3.cfg + + date + ./stop_xbt_tracker.sh + ./start_xbt_tracker.sh + ./run_campaign.sh tsup-1t-3.cfg + ./stop_xbt_tracker.sh +done diff --git a/ControlScripts/globalconfig b/ControlScripts/globalconfig index a899062..df992f2 100644 --- a/ControlScripts/globalconfig +++ b/ControlScripts/globalconfig @@ -34,6 +34,9 @@ HRK_LOG_ABS_PATH="/home/p2p/p2p-clients/hrktorrent-logging/hrktorrent" # XBTUT_PATH XBTUT_ABS_PATH="/home/p2p/export/unified-tracker/trunk/xbt/Tracker" +# XBT_PATH +XBT_ABS_PATH="/home/p2p/export/xbt_tracker/xbt/Tracker" + # SWIFT_PATH SWIFT_ABS_PATH="/home/p2p/swift-vs-utp/swift" diff --git a/ControlScripts/run_campaign_more_times.sh b/ControlScripts/run_campaign_more_times.sh new file mode 100755 index 0000000..64a16f0 --- /dev/null +++ b/ControlScripts/run_campaign_more_times.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ $# -lt 2 ]; then + echo "usage: $0 campaign_file n_times sleep_sec" + exit 1 +fi + +campaign="$1" +n_times="$2" +sleep_sec="$3" + +for i in $(seq 1 "$n_times"); do + ./run_campaign.sh "$campaign" + echo Waiting "$sleep_sec" seconds... + sleep "$sleep_sec" +done diff --git a/ControlScripts/schedule_client.sh b/ControlScripts/schedule_client.sh index 45503dd..c0f4de6 100755 --- a/ControlScripts/schedule_client.sh +++ b/ControlScripts/schedule_client.sh @@ -120,6 +120,7 @@ background_pid=$! DEBUG echo "$(basename $0): background_pid is ${background_pid}" # wait for client to start +sleep 5 while true; do #echo "ps --ppid ${background_pid} -o pid -o cmd" #ps --ppid ${background_pid} -o pid -o cmd @@ -127,16 +128,18 @@ while true; do #ps --ppid ${background_pid} -o 'pid=' -o 'cmd=' | grep './swift' | grep -v 'grep' | grep -v 'ps' #client_pid=$(ps --ppid ${background_pid} -o 'pid=' -o 'cmd=' | grep './swift' | grep -v 'grep' | grep -v 'ps' | awk '{print $1;}') #client_pid=$(ps --ppid ${background_pid} | grep -v '/bin/.*sh' | grep -v 'PID' | tail -1 | awk '{print $1;}') - #client_pid=$(pgrep -P ${background_pid}) + client_pid=$(pgrep -P ${background_pid}) + DEBUG echo "background_pid=${background_pid}; client_pid=${client_pid}" #if ! test -z ${client_pid}; then # ps ended successfully - pidof swift - client_pid=$(pidof swift) +# pidof swift +# client_pid=$(pidof swift) if [ ! -z "$client_pid" ]; then break fi done + DEBUG echo "$(basename $0): client_pid is ${client_pid}" if [ -z $(ps -p "$background_pid" -o pid=) ]; then diff --git a/ControlScripts/start_xbt_tracker.sh b/ControlScripts/start_xbt_tracker.sh new file mode 100755 index 0000000..40a55b1 --- /dev/null +++ b/ControlScripts/start_xbt_tracker.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com +# +# Use this script to manually run the tsup trackers from 08 301-312. +# + +# Read the global configuration file +# Check if the global configuration file exists +if [ ! -e globalconfig ]; then + echo "Warning: The global config file globalconfig does not exist." +else + source globalconfig +fi + +ssh p2p@p2p-next-08.grid.pub.ro -p 30122 "cd ${XBT_ABS_PATH}; ./xbt_tracker" + diff --git a/ControlScripts/stop_xbt_tracker.sh b/ControlScripts/stop_xbt_tracker.sh new file mode 100755 index 0000000..a44ce3a --- /dev/null +++ b/ControlScripts/stop_xbt_tracker.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com +# +# Use this script to manually stop the tsup trackers from 08 301-312. +# + +ssh p2p@p2p-next-08.grid.pub.ro -p 30122 "pkill -KILL -f xbt_tracker" +