From 966f8a10431b98989c826201eedadaf898ebfd5f Mon Sep 17 00:00:00 2001 From: George Milescu Date: Fri, 6 Aug 2010 19:50:30 +0200 Subject: [PATCH] Updated client mappings for tribler Signed-off-by: George Milescu --- ConfigFiles/client_script_mappings | 52 +++++++++++++++++++ ...se_tribler_leecher.sh => parse_tribler.sh} | 3 +- .../clients/tribler/parse_tribler_doe.sh | 47 ----------------- .../clients/tribler/parse_tribler_proxy.sh | 47 ----------------- .../clients/tribler/parse_tribler_seeder.sh | 47 ----------------- 5 files changed, 53 insertions(+), 143 deletions(-) rename ControlScripts/clients/tribler/{parse_tribler_leecher.sh => parse_tribler.sh} (90%) delete mode 100755 ControlScripts/clients/tribler/parse_tribler_doe.sh delete mode 100755 ControlScripts/clients/tribler/parse_tribler_proxy.sh delete mode 100755 ControlScripts/clients/tribler/parse_tribler_seeder.sh diff --git a/ConfigFiles/client_script_mappings b/ConfigFiles/client_script_mappings index 678cf86..a954019 100644 --- a/ConfigFiles/client_script_mappings +++ b/ConfigFiles/client_script_mappings @@ -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 } diff --git a/ControlScripts/clients/tribler/parse_tribler_leecher.sh b/ControlScripts/clients/tribler/parse_tribler.sh similarity index 90% rename from ControlScripts/clients/tribler/parse_tribler_leecher.sh rename to ControlScripts/clients/tribler/parse_tribler.sh index 11974e8..2f76542 100755 --- a/ControlScripts/clients/tribler/parse_tribler_leecher.sh +++ b/ControlScripts/clients/tribler/parse_tribler.sh @@ -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 index e9de4bd..0000000 --- a/ControlScripts/clients/tribler/parse_tribler_doe.sh +++ /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 index 4b91a87..0000000 --- a/ControlScripts/clients/tribler/parse_tribler_proxy.sh +++ /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 index a695435..0000000 --- a/ControlScripts/clients/tribler/parse_tribler_seeder.sh +++ /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 -- 2.20.1