scrips updated
authorP2P-Next User <p2p@p2p-next-04-201.grid.pub.ro>
Wed, 5 Jan 2011 15:31:34 +0000 (17:31 +0200)
committerP2P-Next User <p2p@p2p-next-04-201.grid.pub.ro>
Wed, 5 Jan 2011 15:31:34 +0000 (17:31 +0200)
ControlScripts/check_tsup_trackers.sh
ControlScripts/clients/hrk/start_hrk_leecher_limit.sh
ControlScripts/clients/hrk/start_hrk_seeder_limit.sh
ControlScripts/clients/hrk/stop_hrk.sh
ControlScripts/clients/xbt-unified-tracker/stop_xbtut.sh
ControlScripts/run_campaign.sh
ControlScripts/start_tsup_trackers_debug.sh [new file with mode: 0755]
ControlScripts/stop_all_clients.sh [new file with mode: 0755]
ControlScripts/stop_tsup_trackers.sh
Utils/tsup-experiment/tsup_torrents_gen.sh

index 824de46..b2b166e 100755 (executable)
@@ -2,7 +2,26 @@
 #
 # Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com
 #
-# Use this script to manually test if the tsup trackers from 08 301-312 are still running.
+# Use this script to check if the trackers from 08 301-312 are running.
 #
 
-telnet p2p-next-08.grid.pub.ro 30169
+if [ $# -eq 0 ]; then
+       a=1
+       b=12
+elif [ $# -eq 1 ]; then
+       a=$1
+       b=$1
+else
+       a=$1
+       b=$2
+fi
+
+for i in $(seq -f "%02g" $a $b); do
+       wget "http://p2p-next-08.grid.pub.ro:3${i}69/swarms" --timeout=5 --tries=2 -O /dev/null &> /dev/null
+       if [ $? -eq 0 ]; then
+               echo "Tracker ${i} is running."
+       else
+               echo "Tracker ${i} is not running."
+       fi
+done
+
index 9a31b19..0d3a0ef 100755 (executable)
@@ -39,6 +39,8 @@ KB_DOWN_LIMIT=$1
 KB_UP_LIMIT=$2
 CONN_LIMIT=$3
 
+ulimit -c unlimited
 LD_LIBRARY_PATH=$HRK_ABS_PATH/../libtorrent-rasterbar/lib $HRK_ABS_PATH/hrktorrent --limitlocal --maxdown ${KB_DOWN_LIMIT} --maxup ${KB_UP_LIMIT} --maxconnections ${CONN_LIMIT} --nodht ../TorrentsAndData/$TORRENT_FILE
+echo "hrktorrent_leecher_limit return code: $?"
 
 rm -rf *
index 8424ae0..b68c27b 100755 (executable)
@@ -43,4 +43,6 @@ _DEBUG="on"
 
 DEBUG echo "Command is: $HRK_ABS_PATH/../libtorrent-rasterbar/lib $HRK_ABS_PATH/hrktorrent --limitlocal --maxdown ${KB_DOWN_LIMIT} --maxup ${KB_UP_LIMIT} --maxconnections ${CONN_LIMIT} $TORRENT_FILE"
 
+ulimit -c unlimited
 LD_LIBRARY_PATH=$HRK_ABS_PATH/../libtorrent-rasterbar/lib $HRK_ABS_PATH/hrktorrent --limitlocal --maxdown ${KB_DOWN_LIMIT} --maxup ${KB_UP_LIMIT} --maxconnections ${CONN_LIMIT} --nodht --nohashcheck $TORRENT_FILE
+echo "hrktorrent_seeder_limit return code: $?"
index c63a631..009ade4 100755 (executable)
@@ -11,4 +11,4 @@ if [ ! $# -eq 0 ]; then
        exit 1
 fi
 
-pkill hrktorrent
+pkill -KILL -f hrktorrent
index eea5a98..dfecf07 100755 (executable)
@@ -11,4 +11,4 @@ if [ ! $# -eq 0 ]; then
        exit 1
 fi
 
-pkill -f xbt_tracker
+pkill -KILL -f xbt_tracker
index c130601..99d9135 100755 (executable)
@@ -47,6 +47,8 @@ if [ ! -f $CONFIG_FILES_REL_PATH/$CAMPAIGN_FILE ]; then
        exit 1
 fi
 
+# Kill all the clients that are still running
+./stop_all_clients.sh
 
 
 # Create the results folder for the campaign
diff --git a/ControlScripts/start_tsup_trackers_debug.sh b/ControlScripts/start_tsup_trackers_debug.sh
new file mode 100755 (executable)
index 0000000..5778e38
--- /dev/null
@@ -0,0 +1,30 @@
+#!/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
+
+#XBTUT_ABS_PATH="/home/p2p/export/xbt_tracker/xbt/Tracker"
+echo ${XBTUT_ABS_PATH}
+
+ssh p2p@p2p-next-08.grid.pub.ro -p 30122 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30222 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30322 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30422 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30522 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30622 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30722 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30822 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30922 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 31022 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 31122 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
+ssh p2p@p2p-next-08.grid.pub.ro -p 31222 "cd ${XBTUT_ABS_PATH}; nohup ./debug.sh &> ~/xbt_tracker_debug.log &"
diff --git a/ControlScripts/stop_all_clients.sh b/ControlScripts/stop_all_clients.sh
new file mode 100755 (executable)
index 0000000..7cb38d7
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+machines=( 01 03 04 05 06 07 08 09 10 )
+ports=( 10122 10222 10322 10422 10522 10622 10722 10822 10922 11022 )
+
+for machine in ${machines[@]}; do
+       for port in ${ports[@]}; do
+               ssh -l root "p2p-next-${machine}.grid.pub.ro" -p ${port} "pkill -u p2p; pkill -KILL -u p2p"
+       done
+done
index a5c0651..3ca1e55 100755 (executable)
@@ -5,15 +5,15 @@
 # Use this script to manually stop the tsup trackers from 08 301-312.
 #
 
-ssh p2p@p2p-next-08.grid.pub.ro -p 30122 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30222 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30322 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30422 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30522 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30622 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30722 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30822 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 30922 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 31022 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 31122 "pkill xbt_tracker"
-ssh p2p@p2p-next-08.grid.pub.ro -p 31222 "pkill xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30122 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30222 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30322 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30422 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30522 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30622 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30722 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30822 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 30922 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 31022 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 31122 "pkill -KILL -f xbt_tracker"
+ssh p2p@p2p-next-08.grid.pub.ro -p 31222 "pkill -KILL -f xbt_tracker"
index 165bbda..d2b371d 100755 (executable)
@@ -14,20 +14,21 @@ fi
 
 filename=$1
 
-tracker_url_array=( http://10.3.8.1:6969 http://10.3.8.2:6969
-http://10.3.8.3:6969 http://10.3.8.4:6969
-http://10.3.8.5:6969 http://10.3.8.6:6969
-http://10.3.8.7:6969 http://10.3.8.8:6969
-http://10.3.8.9:6969 http://10.3.8.10:6969
-http://10.3.8.11:6969 http://10.3.8.12:6969 )
+#tracker_url_array=( http://10.3.8.1:6969 http://10.3.8.2:6969
+#http://10.3.8.3:6969 http://10.3.8.4:6969
+#http://10.3.8.5:6969 http://10.3.8.6:6969
+#http://10.3.8.7:6969 http://10.3.8.8:6969
+#http://10.3.8.9:6969 http://10.3.8.10:6969
+#http://10.3.8.11:6969 http://10.3.8.12:6969 )
 
-for url_item in ${tracker_url_array[@]}; do            
+#for url_item in ${tracker_url_array[@]}; do           
+for i in $(seq 1 12); do
        if [ -e $filename ]; then
-               echo "Making $filename.tracker$index.torrent for"
-               echo "  tracker_index: $index, tracker_url: $url_item"
-               btmakemetafile $url_item/announce $filename --target $filename.tracker$index.torrent
+               echo "Making $filename.tracker$i.torrent for"
+               echo "  tracker_index: $i, tracker_url: $url_item"
+               #btmakemetafile $url_item/announce $filename --target $filename.tracker$i.torrent
+               btmakemetafile "http://10.3.8.${i}:6969/announce" $filename --target "$filename.tracker${i}.torrent"
        else
                echo "Warning: $filename does not exist."
        fi
-       index=$(($index + 1))
 done