Updated client mappings for tribler
authorGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 17:50:30 +0000 (19:50 +0200)
committerGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 17:50:30 +0000 (19:50 +0200)
Signed-off-by: George Milescu <george.milescu@gmail.com>
ConfigFiles/client_script_mappings
ControlScripts/clients/tribler/parse_tribler.sh [moved from ControlScripts/clients/tribler/parse_tribler_leecher.sh with 90% similarity]
ControlScripts/clients/tribler/parse_tribler_doe.sh [deleted file]
ControlScripts/clients/tribler/parse_tribler_proxy.sh [deleted file]
ControlScripts/clients/tribler/parse_tribler_seeder.sh [deleted file]

index 678cf86..a954019 100644 (file)
@@ -24,6 +24,22 @@ start_client()
                        clients/hrk/start_hrk_leecher.sh &
                        return $!
                        ;;
+               "tribler_seeder")
+                       clients/tribler/start_tribler_seeder.sh &
+                       return $!
+                       ;;
+               "tribler_leecher")
+                       clients/tribler/start_tribler_leecher.sh &
+                       return $!
+                       ;;
+               "tribler_doe")
+                       clients/tribler/start_tribler_doe.sh &
+                       return $!
+                       ;;
+               "tribler_proxy")
+                       clients/tribler/start_tribler_proxy.sh &
+                       return $!
+                       ;;
        esac
 }
 
@@ -39,6 +55,18 @@ stop_client()
                "hrktorrent_leecher")
                        clients/hrk/stop_hrk.sh
                        ;;
+               "tribler_seeder")
+                       clients/tribler/stop_tribler.sh
+                       ;;
+               "tribler_leecher")
+                       clients/tribler/stop_tribler.sh
+                       ;;
+               "tribler_doe")
+                       clients/tribler/stop_tribler.sh
+                       ;;
+               "tribler_proxy")
+                       clients/tribler/stop_tribler.sh
+                       ;;
        esac
 }
 
@@ -55,6 +83,18 @@ detect_complete_client()
                "hrktorrent_leecher")
                        clients/hrk/detect_complete_hrk.sh ${log_file}
                        ;;
+               "tribler_seeder")
+                       clients/tribler/detect_complete_tribler_seeder.sh ${log_file}
+                       ;;
+               "tribler_leecher")
+                       clients/tribler/detect_complete_tribler_leecher.sh ${log_file}
+                       ;;
+               "tribler_doe")
+                       clients/tribler/detect_complete_tribler_doe.sh ${log_file}
+                       ;;
+               "tribler_proxy")
+                       clients/tribler/detect_complete_tribler_proxy.sh ${log_file}
+                       ;;
        esac
 }
 
@@ -74,5 +114,17 @@ parse_client_log()
                        DEBUG echo "hello hrktorrent_leecher"
                        clients/hrk/parse_hrk.sh ${log_folder} ${log_file}
                        ;;
+               "tribler_seeder")
+                       clients/tribler/parse_tribler.sh ${log_file}
+                       ;;
+               "tribler_leecher")
+                       clients/tribler/parse_tribler.sh ${log_file}
+                       ;;
+               "tribler_doe")
+                       clients/tribler/parse_tribler.sh ${log_file}
+                       ;;
+               "tribler_proxy")
+                       clients/tribler/parse_tribler.sh ${log_file}
+                       ;;
        esac
 }
@@ -2,8 +2,7 @@
 #
 # Copyright: George Milescu 2010 - george.milescu@gmail.com
 #
-# Bash script used to parse the log file generated by a regular
-#(leecher) client and to generate a data file
+# Bash script used to parse the log file generated by a tribler client and to generate a data file
 #
 # Script arguments:
 #  * a folder where the log and data files are stored
diff --git a/ControlScripts/clients/tribler/parse_tribler_doe.sh b/ControlScripts/clients/tribler/parse_tribler_doe.sh
deleted file mode 100755 (executable)
index e9de4bd..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-#
-# Copyright: George Milescu 2010 - george.milescu@gmail.com
-#
-# Bash script used to parse the log file generated by a doe client and to generate a data file
-# The script
-#  * TODO
-#
-# Script arguments:
-#  * a folder where the log and data files are stored
-#  * the name of a log file in that folder
-
-
-if [ ! $# -eq 2 ]; then
-       echo "usage: $0 log-folder log-file"
-       exit 1
-fi
-
-LOG_FOLDER=$1
-LOG_FILE=$2
-DATA_FILE=$LOG_FOLDER/${LOG_FILE}.data
-
-# Check if the log folder exists
-if [ ! -d $LOG_FOLDER ]; then
-       echo "Error: The folder $LOG_FOLDER does not exist."
-       exit 1
-fi
-
-# Check if the log file exists
-if [ ! -e $LOG_FOLDER/$LOG_FILE ]; then
-       echo "Error: The log file $LOG_FOLDER/$LOG_FILE does not exist."
-       exit 1
-fi
-
-# Check if the log file is a regular file
-if [ ! -f $LOG_FOLDER/$LOG_FILE ]; then
-       echo "Error: The log file $LOG_FOLDER/$LOG_FILE is not a regular file."
-       exit 1
-fi
-
-# Write the header to the data file
-echo "time percent upspeed dlspeed" > $DATA_FILE
-
-# Clean and parse the log file
-cat -b $LOG_FOLDER/$LOG_FILE | grep DLSTATUS | grep -v HASHCHECKING | tr '\t' ' ' | tr -s ' ' | cut -d ' ' -f 2,5,8,10 | sed -e s/'%'/''/g -e s/"KB\/s"//g >> $DATA_FILE
-
-exit 0
diff --git a/ControlScripts/clients/tribler/parse_tribler_proxy.sh b/ControlScripts/clients/tribler/parse_tribler_proxy.sh
deleted file mode 100755 (executable)
index 4b91a87..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-#
-# Copyright: George Milescu 2010 - george.milescu@gmail.com
-#
-# Bash script used to parse the log file generated by a proxy client and to generate a data file
-# The script
-#  * TODO
-#
-# Script arguments:
-#  * a folder where the log and data files are stored
-#  * the name of a log file in that folder
-
-
-if [ ! $# -eq 2 ]; then
-       echo "usage: $0 log-folder log-file"
-       exit 1
-fi
-
-LOG_FOLDER=$1
-LOG_FILE=$2
-DATA_FILE=$LOG_FOLDER/${LOG_FILE}.data
-
-# Check if the log folder exists
-if [ ! -d $LOG_FOLDER ]; then
-       echo "Error: The folder $LOG_FOLDER does not exist."
-       exit 1
-fi
-
-# Check if the log file exists
-if [ ! -e $LOG_FOLDER/$LOG_FILE ]; then
-       echo "Error: The log file $LOG_FOLDER/$LOG_FILE does not exist."
-       exit 1
-fi
-
-# Check if the log file is a regular file
-if [ ! -f $LOG_FOLDER/$LOG_FILE ]; then
-       echo "Error: The log file $LOG_FOLDER/$LOG_FILE is not a regular file."
-       exit 1
-fi
-
-# Write the header to the data file
-echo "time percent upspeed dlspeed" > $DATA_FILE
-
-# Clean and parse the log file
-cat -b $LOG_FOLDER/$LOG_FILE | grep DLSTATUS | grep -v HASHCHECKING | tr '\t' ' ' | tr -s ' ' | cut -d ' ' -f 2,5,8,10 | sed -e s/'%'/''/g -e s/"KB\/s"//g >> $DATA_FILE
-
-exit 0
diff --git a/ControlScripts/clients/tribler/parse_tribler_seeder.sh b/ControlScripts/clients/tribler/parse_tribler_seeder.sh
deleted file mode 100755 (executable)
index a695435..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-#
-# Copyright: George Milescu 2010 - george.milescu@gmail.com
-#
-# Bash script used to parse the log file generated by a seeder client and to generate a data file
-# The script
-#  * TODO
-#
-# Script arguments:
-#  * a folder where the log and data files are stored
-#  * the name of a log file in that folder
-
-
-if [ ! $# -eq 2 ]; then
-       echo "usage: $0 log-folder log-file"
-       exit 1
-fi
-
-LOG_FOLDER=$1
-LOG_FILE=$2
-DATA_FILE=$LOG_FOLDER/${LOG_FILE}.data
-
-# Check if the log folder exists
-if [ ! -d $LOG_FOLDER ]; then
-       echo "Error: The folder $LOG_FOLDER does not exist."
-       exit 1
-fi
-
-# Check if the log file exists
-if [ ! -e $LOG_FOLDER/$LOG_FILE ]; then
-       echo "Error: The log file $LOG_FOLDER/$LOG_FILE does not exist."
-       exit 1
-fi
-
-# Check if the log file is a regular file
-if [ ! -f $LOG_FOLDER/$LOG_FILE ]; then
-       echo "Error: The log file $LOG_FOLDER/$LOG_FILE is not a regular file."
-       exit 1
-fi
-
-# Write the header to the data file
-echo "time percent upspeed dlspeed" > $DATA_FILE
-
-# Clean and parse the log file
-cat -b $LOG_FOLDER/$LOG_FILE | grep DLSTATUS | grep -v HASHCHECKING | tr '\t' ' ' | tr -s ' ' | cut -d ' ' -f 2,5,8,10 | sed -e s/'%'/''/g -e s/"KB\/s"//g >> $DATA_FILE
-
-exit 0