From f5e50e067483e80d8d1712fcceecc4940c0ce5d3 Mon Sep 17 00:00:00 2001 From: Calin Burloiu Date: Tue, 19 Oct 2010 13:44:09 +0300 Subject: [PATCH] Utils/tsup-experiment: scripts updated --- Utils/tsup-experiment/.gitignore | 2 ++ Utils/tsup-experiment/test-shell-arrays | 9 ++++++++ Utils/tsup-experiment/tsup_torrents_gen.sh | 26 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 Utils/tsup-experiment/.gitignore create mode 100644 Utils/tsup-experiment/test-shell-arrays create mode 100755 Utils/tsup-experiment/tsup_torrents_gen.sh diff --git a/Utils/tsup-experiment/.gitignore b/Utils/tsup-experiment/.gitignore new file mode 100644 index 0000000..baadb25 --- /dev/null +++ b/Utils/tsup-experiment/.gitignore @@ -0,0 +1,2 @@ +/Data* +/*.torrent diff --git a/Utils/tsup-experiment/test-shell-arrays b/Utils/tsup-experiment/test-shell-arrays new file mode 100644 index 0000000..595e66a --- /dev/null +++ b/Utils/tsup-experiment/test-shell-arrays @@ -0,0 +1,9 @@ +#!/bin/bash + +tracker_url_array=( http://10.1.8.1:6969 http://10.1.8.2:6969 http://10.1.8.3:6969 http://10.1.8.4:6969 http://10.1.8.5:6969 http://10.1.8.6:6969 http://10.1.8.7:6969 http://10.1.8.8:6969 http://10.1.8.9:6969 http://10.1.8.10:6969 http://10.1.8.11:6969 http://10.1.8.12:6969 ) + +index=1 +for url_item in ${tracker_url_array[@]}; do + echo "index: $index, tracker-ul: $url_item" + index=$(($index + 1)) +done diff --git a/Utils/tsup-experiment/tsup_torrents_gen.sh b/Utils/tsup-experiment/tsup_torrents_gen.sh new file mode 100755 index 0000000..2055c8d --- /dev/null +++ b/Utils/tsup-experiment/tsup_torrents_gen.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Copyright: Calin-Andrei Burloiu 2010 - calin.burloiu@gmail.com +# +# Bash script used generate torrent files for the TSUP Experiment +# The script +# * generates a torrent file for each of the 12 trackers, for files of 4MiB, +# 16MiB, 64MiB, 256MiB, 1GiB. +# + +tracker_url_array=( http://10.1.8.1:6969 http://10.1.8.2:6969 http://10.1.8.3:6969 http://10.1.8.4:6969 http://10.1.8.5:6969 http://10.1.8.6:6969 http://10.1.8.7:6969 http://10.1.8.8:6969 http://10.1.8.9:6969 http://10.1.8.10:6969 http://10.1.8.11:6969 http://10.1.8.12:6969 ) + +for i in 4M 16M 64M 256M 1024M; do + index=1 + for url_item in ${tracker_url_array[@]}; do + filename=Data.$i + if [ -e $filename ]; then + echo "Making $filename.tracker$index.torrent for" + echo " tracker_index: $index, tracker_url: $url_item, file_size: $i" + btmakemetafile $url_item/announce $filename --target $filename.tracker$index.torrent + else + echo "Warning: $filename does not exist." + fi + index=$(($index + 1)) + done +done -- 2.20.1