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 dc266dc..e46171d 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 b736d56..64367cd 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 0ebded5..9bf948b 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 b3c16b5..69265b0 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 ab31826..7d979cf 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 ffa569f..ff14157 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 5b686e8..1c38bee 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 660ff38..2cd8cbb 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 fd0bd3b..b85ddf0 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 8ab88e1..84436f5 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 f6c2f62..c3b17a7 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