]> p2p-next.cs.pub.ro Git - p2p-testing-infrastructure.git/commitdiff
Updated relative paths for client-specific scripts; updated run_scenario.sh to suppor...
authorGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 22:13:00 +0000 (00:13 +0200)
committerGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 22:13:00 +0000 (00:13 +0200)
Signed-off-by: George Milescu <george.milescu@gmail.com>
ConfigFiles/campaign01.cfg
ConfigFiles/client_script_mappings
ConfigFiles/globalconfig
ControlScripts/clients/hrk/start_hrk_leecher.sh
ControlScripts/clients/hrk/start_hrk_seeder.sh
ControlScripts/clients/tribler/start_tribler_doe.sh
ControlScripts/clients/tribler/start_tribler_leecher.sh
ControlScripts/clients/tribler/start_tribler_proxy.sh
ControlScripts/clients/tribler/start_tribler_seeder.sh
ControlScripts/pre-run.sh
ControlScripts/run_scenario.sh

index dc266dc2f0fb31f2352e9ac696304505c0a5fe72..e46171d00bbf2c323e4d1815b1eafcdbdfdc8dac 100644 (file)
@@ -4,11 +4,11 @@
 #
 # ScenarioDescription  PlotScript
 scenario01.cfg         scenario01.r
-scenario02.cfg         scenario02.r
-scenario03.cfg         scenario03.r
-scenario04.cfg         scenario04.r
-scenario05.cfg         scenario05.r
-scenario06.cfg         scenario06.r
-scenario07.cfg         scenario07.r
-scenario08.cfg         scenario08.r
-scenario09.cfg         scenario09.r
+#scenario02.cfg                scenario02.r
+#scenario03.cfg                scenario03.r
+#scenario04.cfg                scenario04.r
+#scenario05.cfg                scenario05.r
+#scenario06.cfg                scenario06.r
+#scenario07.cfg                scenario07.r
+#scenario08.cfg                scenario08.r
+#scenario09.cfg                scenario09.r
\ No newline at end of file
index b736d56e0eed3e952fc993b6858e1c46ed458cd7..64367cdd4a364f7db81f502dd017f72dd6269203 100644 (file)
@@ -145,25 +145,25 @@ parse_client_log()
                        clients/hrk/parse_hrk.sh ${log_folder} ${log_file}
                        ;;
                "tribler_seeder")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
                "tribler_leecher")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
                "tribler_doe")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
                "tribler_proxy_01")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
                "tribler_proxy_02")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
                "tribler_proxy_03")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
                "tribler_proxy_04")
-                       clients/tribler/parse_tribler.sh ${log_file}
+                       clients/tribler/parse_tribler.sh ${log_folder} ${log_file}
                        ;;
        esac
 }
index 0ebded55d7631208729c7e074a81850c59f84e92..9bf948b31bd7bde24b67226fd1a268c5da9d2c1d 100644 (file)
@@ -17,8 +17,8 @@ TEST_INFRASTRUCTURE_REL_PATH="../../P2P-Testing-Infrastructure"
 # No / at the end is important for rsync to work properly
 TEST_INFRASTRUCTURE_ABS_PATH="/home/george/P2P-Next/P2P-Testing-Infrastructure"
 
-# TRIBLER_REL_PATH is relative to ControlScripts/clients/<client-name> folder
-TRIBLER_REL_PATH="../../../../TriblerBranches/proxyservice-5.3"
+# TRIBLER_REL_PATH is relative to ControlScripts folder
+TRIBLER_REL_PATH="../../TriblerBranches/proxyservice-5.3"
 TRIBLER_ABS_PATH="/home/george/P2P-Next/TriblerBranches/proxyservice-5.3"
 
 # TRIBLER_UTIL_REL_PATH is relative to Util folder
index b3c16b585e614ce66775f3f9aa18341c221fbf25..69265b04cec8cf3dbd9cf0f228c78521d531f72e 100755 (executable)
@@ -8,21 +8,24 @@
 #  * starts a hrktorrent session - use LD_LIBRARY_PATH to point to
 #    libtorrent-rasterbar location
 #  * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
 
 # Read the global configuration file
 # Check if the global configuration file exists
-if [ ! -e ../../../ConfigFiles/globalconfig ]; then
-       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
 else
-       source ../../../ConfigFiles/globalconfig
+       source ../ConfigFiles/globalconfig
 fi
 
 # Read the node-specific configuration file (TORRENT_FILE)
 # Check if the node-specific configuration file exists
-if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
-       echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+       echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
 else
-       source ../../../ClientWorkingFolders/TmpLogs/node_config
+       source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
 cd $WORKING_FOLDER_REL_PATH/Regular/
index ab31826cfecf1805367f34e2dfa1487a257020b9..7d979cf19349fa7c29ae67928b15a03a58217534 100755 (executable)
@@ -8,21 +8,24 @@
 #  * starts a hrktorrent session - use LD_LIBRARY_PATH to point to
 #    libtorrent-rasterbar location
 #  * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
 
 # Read the global configuration file
 # Check if the global configuration file exists
-if [ ! -e ../../../ConfigFiles/globalconfig ]; then
-       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
 else
-       source ../../../ConfigFiles/globalconfig
+       source ../ConfigFiles/globalconfig
 fi
 
 # Read the node-specific configuration file (TORRENT_FILE)
 # Check if the node-specific configuration file exists
-if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
-       echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+       echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
 else
-       source ../../../ClientWorkingFolders/TmpLogs/node_config
+       source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
 cd $WORKING_FOLDER_REL_PATH/TorrentsAndData/
index ffa569f3909307daa6684e76afcc292a9a3042c3..ff1415746b864673f3e11d5bc6b3952812b2f5bc 100755 (executable)
@@ -7,21 +7,24 @@
 #  * changes current working directory to proxyservice-m32
 #  * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder
 #  * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
 
 # Read the global configuration file
 # Check if the global configuration file exists
-if [ ! -e ../../../ConfigFiles/globalconfig ]; then
-       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
 else
-       source ../../../ConfigFiles/globalconfig
+       source ../ConfigFiles/globalconfig
 fi
 
 # Read the node-specific configuration file (TORRENT_FILE)
 # Check if the node-specific configuration file exists
-if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
-       echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+       echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
 else
-       source ../../../ClientWorkingFolders/TmpLogs/node_config
+       source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
 export PYTHONPATH=$PYTHONPATH:.
index 5b686e8418ea3df214585fcedd51edb9bb2251b7..1c38bee7cd0931ae8a40c4ccdc54a0e6959f852a 100755 (executable)
@@ -7,21 +7,25 @@
 #  * changes current working directory to proxyservice-m32
 #  * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder
 #  * at the end deletes the downloaded data
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
 
 # Read the global configuration file
 # Check if the global configuration file exists
-if [ ! -e ../../../ConfigFiles/globalconfig ]; then
-       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+echo "pwd=$(pwd)"
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
 else
-       source ../../../ConfigFiles/globalconfig
+       source ../ConfigFiles/globalconfig
 fi
 
 # Read the node-specific configuration file (TORRENT_FILE)
 # Check if the node-specific configuration file exists
-if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
-       echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+       echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
 else
-       source ../../../ClientWorkingFolders/TmpLogs/node_config
+       source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
 export PYTHONPATH=$PYTHONPATH:.
index 660ff3832126b191acc4f53c7e8b13a3f6886a73..2cd8cbb654c49ee8710eba369ee245d7138e19ff 100755 (executable)
@@ -10,6 +10,9 @@
 #
 # Script arguments:
 #  * proxy number [1-4]
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
 
 if [ ! $# -eq 1 ]; then
        echo "usage: $0 proxy-no"
@@ -18,18 +21,18 @@ fi
 
 # Read the global configuration file
 # Check if the global configuration file exists
-if [ ! -e ../../../ConfigFiles/globalconfig ]; then
-       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
 else
-       source ../../../ConfigFiles/globalconfig
+       source ../ConfigFiles/globalconfig
 fi
 
 # Read the node-specific configuration file
 # Check if the node-specific configuration file exists
-if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
-       echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+       echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
 else
-       source ../../../ClientWorkingFolders/TmpLogs/node_config
+       source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
 # Read arguments
index fd0bd3b36379ca976545b6984834ce60d5f27c29..b85ddf051e616cc3dd9906d0392eb5d0753ff657 100755 (executable)
@@ -6,21 +6,25 @@
 # The script
 #  * changes current working directory to proxyservice-m32
 #  * starts a command line BT client seeding the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder
+#
+# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder
+#
 
 # Read the global configuration file
 # Check if the global configuration file exists
-if [ ! -e ../../../ConfigFiles/globalconfig ]; then
-       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+echo "pwd=$(pwd)"
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
 else
-       source ../../../ConfigFiles/globalconfig
+       source ../ConfigFiles/globalconfig
 fi
 
 # Read the node-specific configuration file (TORRENT_FILE)
 # Check if the node-specific configuration file exists
-if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
-       echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+       echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
 else
-       source ../../../ClientWorkingFolders/TmpLogs/node_config
+       source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
 
index 8ab88e1088d9b15827ccede092d42d48efe5a033..84436f570a797e29b1865e50f900ca0496c9cebd 100755 (executable)
@@ -12,4 +12,4 @@ else
        source ../ClientWorkingFolders/TmpLogs/node_config
 fi
 
-./bw_limit_ct.sh set ${IFACE} ${DL_BW} ${DL_BURST} ${UL_BW} ${UL_BURST}
+./bw_limit.sh set ${IFACE} ${DL_BW} ${DL_BURST} ${UL_BW} ${UL_BURST}
index f6c2f62802e153fb4e6bc4c366affcc7bae6dcc9..c3b17a7c457b046021b9d59019861fe8e1923851 100755 (executable)
@@ -181,6 +181,25 @@ scenario_clean() {
        while IFS=$'\t' read SERVER PORT USER REMOTE_PATH REMOTE_IF DL_BW DL_BURST UL_BW UL_BURST PRE_RUN_SCRIPT POST_RUN_SCRIPT CLIENT_TYPE TORRENT_FILE PERIODS; do
                echo " ** Cleaning-up $SERVER:$PORT"
 
+               # Create node config file
+               if ! ssh -n -p ${PORT} ${USER}@${SERVER} "
+cat > $REMOTE_PATH/P2P-Testing-Infrastructure/ClientWorkingFolders/TmpLogs/node_config << END
+IFACE=\"${REMOTE_IF}\"
+DL_BW=\"${DL_BW}\"
+DL_BURST=\"${DL_BURST}\"
+UL_BW=\"${UL_BW}\"
+UL_BURST=\"${UL_BURST}\"
+PRE_RUN_SCRIPT=\"${PRE_RUN_SCRIPT}\"
+POST_RUN_SCRIPT=\"${POST_RUN_SCRIPT}\"
+CLIENT_TYPE=\"${CLIENT_TYPE}\"
+TORRENT_FILE=\"${TORRENT_FILE}\"
+PERIODS=\"${PERIODS}\"
+END
+" &>> ${ERR_LOG}; then
+                       echo "Error: cannot create scenario config file"
+                       exit 1
+               fi
+
                # stopping the client on the server
                # -n is used to redirect the ssh stdin from /dev/null, in order to keep the stdin in place for the read command
                if ! ssh -n -p $PORT ${USER}@${SERVER} "cd $REMOTE_PATH/P2P-Testing-Infrastructure/ControlScripts; ./stop_client.sh" &>> $ERR_LOG; then