- peaCS test framework imported from the bachelor thesis of Martin Friedrich
authorJosef Spillner <josef.spillner@tu-dresden.de>
Tue, 13 Aug 2013 13:35:42 +0000 (15:35 +0200)
committerJosef Spillner <josef.spillner@tu-dresden.de>
Tue, 13 Aug 2013 13:35:42 +0000 (15:35 +0200)
39 files changed:
conf [new file with mode: 0644]
scripts/availability_test.sh [new file with mode: 0644]
scripts/createsamplefiles.sh [new file with mode: 0644]
scripts/directory_test.sh [new file with mode: 0644]
scripts/generate_directory_storages.sh [new file with mode: 0644]
scripts/generate_webdav_storages.sh [new file with mode: 0644]
scripts/gnuplotavail.sh [new file with mode: 0644]
scripts/gnuplotiozone.sh [new file with mode: 0644]
scripts/gnuplotred.sh [new file with mode: 0644]
scripts/iozone_test.sh [new file with mode: 0644]
scripts/nubiclean.sh [new file with mode: 0644]
scripts/plot.sh [new file with mode: 0644]
scripts/plots/avail_space_red_parallel.dem [new file with mode: 0644]
scripts/plots/avail_space_red_robin.dem [new file with mode: 0644]
scripts/plots/availparallel-red.dem [new file with mode: 0644]
scripts/plots/availparallel-storage.dem [new file with mode: 0644]
scripts/plots/availparallel.dem [new file with mode: 0644]
scripts/plots/availroundrobin-red.dem [new file with mode: 0644]
scripts/plots/availroundrobin-storage.dem [new file with mode: 0644]
scripts/plots/availroundrobin.dem [new file with mode: 0644]
scripts/plots/iozone.dem [new file with mode: 0644]
scripts/plots/redperfcpuparallel.dem [new file with mode: 0644]
scripts/plots/redperfcpurobin.dem [new file with mode: 0644]
scripts/plots/redperffragsparallel.dem [new file with mode: 0644]
scripts/plots/redperffragsrobin.dem [new file with mode: 0644]
scripts/plots/redperfmemparallel.dem [new file with mode: 0644]
scripts/plots/redperfmemrobin.dem [new file with mode: 0644]
scripts/plots/redperfreadparallel.dem [new file with mode: 0644]
scripts/plots/redperfreadrobin.dem [new file with mode: 0644]
scripts/plots/redperfrereadparallel.dem [new file with mode: 0644]
scripts/plots/redperfrereadrobin.dem [new file with mode: 0644]
scripts/plots/redperfrewriteparallel.dem [new file with mode: 0644]
scripts/plots/redperfrewriterobin.dem [new file with mode: 0644]
scripts/plots/redperfspaceparallel.dem [new file with mode: 0644]
scripts/plots/redperfspacerobin.dem [new file with mode: 0644]
scripts/plots/redperfwriteparallel.dem [new file with mode: 0644]
scripts/plots/redperfwriterobin.dem [new file with mode: 0644]
scripts/redundancy_test.sh [new file with mode: 0644]
start.sh [new file with mode: 0755]

diff --git a/conf b/conf
new file mode 100644 (file)
index 0000000..4302abc
--- /dev/null
+++ b/conf
@@ -0,0 +1,71 @@
+nubisavelog = off
+
+#creates samplefiles with the following sizes in KB
+[samplefiles]
+state = on
+filesizes = 1024
+
+#creates sample directories-storages
+#example: use quantity = 10 and availability = 0.8 for 10 storages with the same availability
+#or set availability = 0.8 0.5 .. 0.3 for storages with different availability-values
+[sampledirectories]
+state = on
+quantity = 10
+availability = 0.5 
+
+#creates sample webdav-storages http://141.76.41.201/peacs/davXX/
+[samplewebdavs]
+state = off
+quantity = 10
+
+
+#need a file from samplefiles-script and storages from sampledirecories-script
+[redundancytest]
+state = on
+strategy = AllUseInParallel
+filesizes = 1024 
+quantityofstorages = 10
+startbystorage = 1
+iterations = 1
+startbyrun = 1
+startbyredundancy = 0
+redundancysteps = 1
+storagetype = directory
+
+#filesystem benchmark
+[iozonetest]
+state = off
+iozonedir = iozone3_420
+testdir = /home/martin/.nubisave/nubisavemount/data
+reclenBegin = 4
+reclenEnd = 2048
+
+
+#output the the calculated availability-values of the storage-controller for the different strategies
+#need only the created directories of the sampledirectories-script
+#Strategies are AllUseInParallel or RoundRobin
+[availabilitytest]
+state = off
+strategy = AllUseInParallel
+quantityofstorages = 10
+
+
+#test the maximum filenamelength and the maximum directorydepth of a mounted storage
+[directorytest]
+state = off
+mountscript = mount_directory.sh
+storage = directory
+storageconfig = directory1
+
+#only activate plots if it sure that the csv-file is exist or the dependent test is running before
+#if the value for state is off, the other values for the seperate plots (yes or no) are immaterial
+[plot]
+state = off
+availabilityUAIP = no
+availabilityRR = no
+redundancyUAIP = yes
+redundancyRR = no
+iozonePLOTS = no
+
+
+
diff --git a/scripts/availability_test.sh b/scripts/availability_test.sh
new file mode 100644 (file)
index 0000000..5feedd4
--- /dev/null
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+
+echo
+echo "###################################################################"
+echo "Availability Test"
+echo "###################################################################"
+
+
+
+#initialize all variables
+mntpoint="$HOME/.nubisave/nubisavemount"
+statsfile=output/results/storage-availability
+startconfig="output/temp/config"
+strategy=$(sed -ne "$(($(grep -n '\[availabilitytest\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/strategy = //g')
+qtystorages=$(sed -ne "$(($(grep -n '\[availabilitytest\]' conf | cut -d : -f 1)+3)) p" conf | sed 's/quantityofstorages = //g') 
+
+
+#build a startconfig-file for nubisave
+echo "[splitter]" > $startconfig
+echo "redundancy = 0" >> $startconfig
+echo "availability = 0.0" >> $startconfig
+echo "storagestrategy = $strategy" >> $startconfig
+
+mkdir -p output/results/storage-availability
+mkdir -p "$HOME/.nubisave/db/splitter_configuration"
+
+cp $startconfig "$mntpoint/config/config"
+
+
+
+
+echo "run      qtystorages     redundancy      availability    strategy" > "$statsfile/availability$strategy.csv"
+
+
+qtystorage=1
+
+limit=$(echo   $(($qtystorages))*101 | bc)
+iteration=1
+
+
+
+
+redundancy=101 #jump in mount loop
+
+
+       while [ "$iteration" -lt "$(($limit+1))" ]
+       do
+               
+
+        if [ "$redundancy" -gt 100 ]
+then 
+redundancy=0
+sleep 5
+#mounting storages
+cp "output/sampledata/samplestorages/sampledirectory/directory$qtystorage" $HOME/.nubisave/db/splitter_configuration
+sh /usr/share/nubisave/splitter/mountscripts/mount_directory.sh "$HOME/.nubisave/storages/directory$qtystorage" "$HOME/storages/mydir$qtystorage"
+cp "$HOME/.nubisave/db/splitter_configuration/directory$qtystorage" "$HOME/.nubisave/nubisavemount/config/"
+cat "$HOME/.nubisave/db/splitter_configuration/directory$qtystorage" > "$HOME/.nubisave/storages/directory$qtystorage/config/config"
+
+fi
+           qtystorage=$(($(ls -1 $HOME/storages/| wc -l)+1))
+               
+                      
+          sed "s/redundancy=.*/redundancy=$redundancy/g" /usr/share/nubisave/bin/nubi.properties > output/temp/nubitmp
+          sed "s/redundancy = .*/redundancy = $redundancy/g" "$mntpoint/config/config" > output/temp/conftmp           
+           cp output/temp/nubitmp /usr/share/nubisave/bin/nubi.properties
+           cp output/temp/conftmp "$mntpoint/config/config"
+
+sleep 2
+#read the availability from the config file
+availability=$(sed -ne '3p' "$mntpoint/config/config" | sed 's/availability = //g')
+
+#solve the problem with floats without leading zero
+eformat=$(echo $availability | sed 's/[./0-9]//g')
+
+if [ -n "$eformat" ]
+then
+availability=$(printf "%.5f\n" $availability)
+fi
+
+if [ $(echo "if ($availability < 0.0001) 1 else 0" | bc) -eq 1 ]
+then 
+
+availability=0
+fi
+
+
+#writes values in the csv-file
+echo $iteration        $(($qtystorage-1))      $redundancy     $(echo   $availability*100 | bc | awk '{printf "%05f\n", $0}')  $strategy | tee -a "$statsfile/availability$strategy.csv"
+
+redundancy=$(($redundancy+1))
+iteration=$(($iteration+1))
+
+done
+
+echo "times written to $statsfile" 
+
+
+
diff --git a/scripts/createsamplefiles.sh b/scripts/createsamplefiles.sh
new file mode 100644 (file)
index 0000000..7b336a9
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+filesizes=$(sed -ne "$(($(grep -n '\[samplefiles\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/filesizes = //g')
+
+mkdir -p output/sampledata/samplefiles
+rm -f output/sampledata/samplefiles/*
+cd output/sampledata/samplefiles
+
+echo
+echo "creating samplefiles..."
+
+for N in $filesizes
+do
+       dd if=/dev/urandom of=${N}kb bs=${N}K count=1
+done
+
+echo "create checksums"
+md5sum * > checksums
+echo "done"
+echo
diff --git a/scripts/directory_test.sh b/scripts/directory_test.sh
new file mode 100644 (file)
index 0000000..5b5d2f9
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+mountscript=$(sed -ne "$(($(grep -n '\[directorytest\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/mountscript = //g')
+storage=$(sed -ne "$(($(grep -n '\[directorytest\]' conf | cut -d : -f 1)+3)) p" conf | sed 's/storage = //g')
+storageconfig=$(sed -ne "$(($(grep -n '\[directorytest\]' conf | cut -d : -f 1)+4)) p" conf | sed 's/storageconfig = //g')
+
+echo
+echo "###################################################################"
+echo "Test directory depth & filename length of the filesystem"
+echo "###################################################################"
+echo
+
+
+mkdir -p "$HOME/.nubisave/db/splitter_configuration"
+mkdir -p output/sampledata/samplehierarchy
+
+cp "output/sampledata/samplestorages/sample$storage/$storageconfig" $HOME/.nubisave/db/splitter_configuration
+sh "/usr/share/nubisave/splitter/mountscripts/$mountscript" "$HOME/.nubisave/storages/$storageconfig" "$HOME/storages/mydir1"
+cp "$HOME/.nubisave/db/splitter_configuration/$storageconfig" "$HOME/.nubisave/nubisavemount/config/"
+cat "$HOME/.nubisave/db/splitter_configuration/$storageconfig" > "$HOME/.nubisave/storages/$storageconfig/config/config"
+sleep 2
+cd output/sampledata/samplehierarchy
+
+echo
+
+dd if=/dev/urandom of=1k bs=1K count=1
+
+
+
+iteration=1
+limit=500
+filenameflag=8 #fileflag _1k#U#C#F without C
+
+rm -rf 0
+
+
+while [ "$iteration" -lt "$limit" ]
+do
+iterationlength=${#iteration} #Length of the C-Flag
+
+
+mkdir 0
+cd 0
+cp /home/martin/ba/output/sampledata/samplehierarchy/1k .
+
+if cp  -r /home/martin/ba/output/sampledata/samplehierarchy/0  /home/martin/.nubisave/nubisavemount/data/
+then echo
+else exit $?
+fi
+
+rm 1k #delete file 1k in the last folder level for a better performance
+
+echo "Creating Directory Depth: $iteration "
+echo "Maximum Filename Length: "`expr \( $filenameflag + $iterationlength + $iteration \* 2 \)`
+
+
+
+
+iteration=$(($iteration+1))
+
+done
+
+cd ..
diff --git a/scripts/generate_directory_storages.sh b/scripts/generate_directory_storages.sh
new file mode 100644 (file)
index 0000000..52a3e97
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/bash
+
+quantity=$(sed -ne "$(($(grep -n '\[sampledirectories\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/quantity = //g')
+availability=$(sed -ne "$(($(grep -n '\[sampledirectories\]' conf | cut -d : -f 1)+3)) p" conf | sed 's/availability = //g')
+echo $availability
+mkdir -p output/sampledata/samplestorages/sampledirectory
+rm -f output/sampledata/samplestorages/sampledirectory/*
+cd output/sampledata/samplestorages/sampledirectory
+if ! [ -d "$HOME/.nubisave/db/splitter_configuration" ]
+then
+mkdir -p "$HOME/.nubisave/db/splitter_configuration"
+fi
+rm -f $HOME/.nubisave/db/splitter_configuration/*
+
+
+echo "creating directorys-samplestorages..."
+
+limit=$quantity
+iteration=1
+row=0
+qty=0 #qty of the different storage-availabilities
+
+for N in $availability
+do
+qty=$(($qty+1))
+done
+
+#creates storages with different availabilities
+if [ "$qty" -gt 1 ]
+then
+for N in $availability
+do
+
+                                               
+                       if [ "$row" -gt 4 ]
+                                                       then
+                               row=0
+                       fi
+
+
+                       echo "[module]" >> "directory${iteration}"
+                       echo "name = Testdirectory${iteration}" >> "directory${iteration}"
+                       echo "desc = This is a Testdirectory" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "[parameter]" >> "directory${iteration}"
+                       echo "directory = ~/storages/mydir${iteration}" >> "directory${iteration}"
+                               echo "" >> "directory${iteration}"
+                       echo "#hidden" >> "directory${iteration}"
+                       echo "[mounting]" >> "directory${iteration}"
+                       echo "#mountpoint is substituted by the mountpoint" >> "directory${iteration}"
+                       echo "mountcommand = sh mountscripts/mount_directory.sh mountpoint directory" >> "directory${iteration}"
+                       echo "unmountcommand = sh mountscripts/unmount_directory.sh mountpoint" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "[splitter]" >> "directory${iteration}"
+                       echo "fileparts = 1" >> "directory${iteration}"
+                       echo "availability = ${N}" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "[gui]" >> "directory${iteration}"
+                       echo "graphlocationx = `expr \( 65 + $row \* 170 \)`" >> "directory${iteration}"
+                       echo "graphlocationy = `expr \( 45 + $((iteration/5)) \* 70 \)`" >> "directory${iteration}"
+                       
+                       cp "directory${iteration}" $HOME/.nubisave/db/splitter_configuration
+                       
+                       echo "created testdirectory $iteration"
+                       iteration=$(($iteration+1))
+                       row=$(($row+1))
+                       
+done
+
+else
+
+#creates storages with the same availability
+while [ "$iteration" -lt "$(($limit+1))" ]
+                       do
+                                               
+                       if [ "$row" -gt 4 ]
+                                                       then
+                               row=0
+                       fi
+
+
+                       echo "[module]" >> "directory${iteration}"
+                       echo "name = Testdirectory${iteration}" >> "directory${iteration}"
+                       echo "desc = This is a Testdirectory" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "[parameter]" >> "directory${iteration}"
+                       echo "directory = ~/storages/mydir${iteration}" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "#hidden" >> "directory${iteration}"
+                       echo "[mounting]" >> "directory${iteration}"
+                       echo "#mountpoint is substituted by the mountpoint" >> "directory${iteration}"
+                       echo "mountcommand = sh mountscripts/mount_directory.sh mountpoint directory" >> "directory${iteration}"
+                       echo "unmountcommand = sh mountscripts/unmount_directory.sh mountpoint" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "[splitter]" >> "directory${iteration}"
+                       echo "fileparts = 1" >> "directory${iteration}"
+                       echo "availability = $availability" >> "directory${iteration}"
+                       echo "" >> "directory${iteration}"
+                       echo "[gui]" >> "directory${iteration}"
+                       echo "graphlocationx = `expr \( 65 + $row \* 170 \)`" >> "directory${iteration}"
+                       echo "graphlocationy = `expr \( 45 + $((iteration/5)) \* 70 \)`" >> "directory${iteration}"
+                       
+                       cp "directory${iteration}" $HOME/.nubisave/db/splitter_configuration
+                       
+                       echo "created testdirectory $iteration"
+                       iteration=$(($iteration+1))
+                       row=$(($row+1))
+                       
+                                               
+
+done
+fi
+               
+echo "done"
+echo
+               
+
+
diff --git a/scripts/generate_webdav_storages.sh b/scripts/generate_webdav_storages.sh
new file mode 100644 (file)
index 0000000..685e92a
--- /dev/null
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+quantity=$(sed -ne "$(($(grep -n '\[samplewebdavs\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/quantity = //g')
+
+mkdir -p output/sampledata/samplestorages/samplefusedav
+rm -f output/sampledata/samplestorages/samplefusedav/*
+cd output/sampledata/samplestorages/samplefusedav
+if ! [ -d "$HOME/.nubisave/db/splitter_configuration" ]
+then
+mkdir -p "$HOME/.nubisave/db/splitter_configuration"
+fi
+rm -f $HOME/.nubisave/db/splitter_configuration/*
+
+
+echo "creating webdav-samplestorages..."
+
+limit=$quantity
+iteration=1
+row=0
+
+
+               while [ "$iteration" -lt "$(($limit+1))" ]
+                       do
+                                               
+                       if [ "$row" -gt 4 ]
+                                                       then
+                               row=0
+                       fi
+
+
+                       echo "[module]" >> "fusedav${iteration}"
+                       echo "name = TestWebedav${iteration}" >> "fusedav${iteration}"
+                       echo "desc = This is a TestWebDav" >> "fusedav${iteration}"
+                       echo "" >> "fusedav${iteration}"
+                       echo "[parameter]" >> "fusedav${iteration}"
+                       echo "password = nubisave" >> "fusedav${iteration}"
+                       
+
+                       if [ $iteration -lt 11 ]
+                       then
+                       echo "user = dav0$(($iteration-1))" >> "fusedav${iteration}"
+                       echo "davurl = http://141.76.41.201/peacs/dav0$(($iteration-1))/" >> "fusedav${iteration}"
+                       else
+                       echo "user = dav$(($iteration-1))" >> "fusedav${iteration}"
+                       echo "davurl = http://141.76.41.201/peacs/dav$(($iteration-1))/" >> "fusedav${iteration}"
+                       fi
+                 
+
+                       echo "" >> "fusedav${iteration}"
+                       echo "#hidden" >> "fusedav${iteration}"
+                       echo "[mounting]" >> "fusedav${iteration}"
+                       echo "#mountpoint is substituted by the mountpoint" >> "fusedav${iteration}"
+                       echo "mountcommand = sh mountscripts/mount_fusedav.sh user password davurl mountpoint" >> "fusedav${iteration}"
+                       echo "unmountcommand = sh mountscripts/unmount_fusedav.sh mountpoint" >> "fusedav${iteration}"
+                       echo "" >> "fusedav${iteration}"
+                       echo "[splitter]" >> "fusedav${iteration}"
+                       echo "fileparts = 1" >> "fusedav${iteration}"
+                       echo "" >> "fusedav${iteration}"
+                       echo "[gui]" >> "fusedav${iteration}"
+                       echo "graphlocationx = `expr \( 65 + $row \* 170 \)`" >> "fusedav${iteration}"
+                       echo "graphlocationy = `expr \( 45 + $((iteration/5)) \* 70 \)`" >> "fusedav${iteration}"
+                       
+                       cp "fusedav${iteration}" $HOME/.nubisave/db/splitter_configuration
+                       
+                       echo "created testwebdav $iteration"
+                       iteration=$(($iteration+1))
+                       row=$(($row+1))
+                       
+                                               
+
+done
+
+echo "done"
+echo
+               
+
+
diff --git a/scripts/gnuplotavail.sh b/scripts/gnuplotavail.sh
new file mode 100644 (file)
index 0000000..1355a33
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+#
+# Copyright (c) 2001 Yves Rougy Yves@Rougy.net
+#
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+
+file_name=$1
+query=$2
+set -e
+
+write_gnuplot_file() {
+       echo \#test : $query
+       case $query in
+               (availabilityparallel) awk '$1 ~ /^[0-9]+/ { print  $2 " " $3 " " $4  }' < $file_name ;;
+               (availabilityroundrobin) awk '$1 ~ /^[0-9]+/ { print  $2 " " $3 " " $4  }' < $file_name ;;
+               (storageavailparallel) awk '$1 ~ /^[0-9]+/ {if ($3==0) print  $2 " " $3 " " $4  }' < $file_name ;;
+               (storageavailroundrobin) awk '$1 ~ /^[0-9]+/ {if ($3==0) print  $2 " " $3 " " $4  }' < $file_name ;;
+                            
+
+       esac }
+
+       write_gnuplot_file > "output/results/storage-availability/$query.gnuplot"
+
diff --git a/scripts/gnuplotiozone.sh b/scripts/gnuplotiozone.sh
new file mode 100644 (file)
index 0000000..b8c1954
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Copyright (c) 2001 Yves Rougy Yves@Rougy.net
+#
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+
+file_name=$1
+query=$2
+set -e
+
+write_gnuplot_file() {
+       echo \#test : $query
+       case $query in
+               (write) awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $3  }' < $file_name ;;
+               (rewrite)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $4  }' < $file_name ;;
+               (read)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $5  }' < $file_name ;;
+               (reread)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $6  }' < $file_name ;;
+               (randread)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $7  }' < $file_name ;;
+               (randwrite)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $8  }' < $file_name ;;
+               (bkwdread)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $9  }' < $file_name ;;
+               (recrewrite)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $10  }' < $file_name ;;
+               (strideread)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $11  }' < $file_name ;;
+               (fwrite)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $12  }' < $file_name ;;
+               (frewrite)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $13  }' < $file_name ;;
+               (fread)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $14  }' < $file_name ;;
+               (freread)  awk '$1 ~ /^[0-9]+/ { print  $1 " " $2 " " $15  }' < $file_name ;;
+               (*)  echo "Usage : gengnuplot.sh <filename> <test>" >> /dev/stderr ; 
+                            echo "filename is the output of iozone -a" >> /dev/stderr ;
+                            echo "test is one of write rewrite read reread randread randwrite bkwdread recrewrite strideread fwrite frewrite fread freread" >> /dev/stderr ;;
+       esac }
+
+if ( [ $# -eq 2 ] ) ; 
+then 
+       write_gnuplot_file > output/results/iozone/$query.gnuplot
+else
+       echo "Usage : gengnuplot.sh <filename> <test>" 2>&1
+       echo "filename is the output of iozone -a" 2>&1
+       echo "test is one of write rewrite read reread randread randwrite bkwdread recrewrite strideread fwrite frewrite fread freread" 2>&1
+fi
diff --git a/scripts/gnuplotred.sh b/scripts/gnuplotred.sh
new file mode 100644 (file)
index 0000000..9f42e58
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+
+file_name=$1
+query=$2
+set -e
+
+write_gnuplot_file() {
+       echo \#test : $query
+       case $query in  
+               (redperformanceparallel) awk '$1 ~ /^[0-9]+/ {print  $5 " " $4 " " $10/1024/1024 " " $11 " " $6 " " $7 " " $8 " " $9 " " $14 " " $15 }' < $file_name ;;
+               (redperformancerobin) awk '$1 ~ /^[0-9]+/ {print  $5 " " $4 " " $10/1024/1024 " " $11 " "$6 " " $7 " " $8 " " $9 " " $14 " " $15 }' < $file_name ;;
+                           
+               
+
+               
+               
+       esac }
+
+
+       write_gnuplot_file > "output/results/redundancy-performance/$query.gnuplot"
+
+#awk '{a = a + $2} END{print a/$NFR}' Beispiel.txt
+#uniq "output/results/redundancy-performance/$query.gnuplot" > "output/temp/$query.gnuplottmp"
+#cp "output/temp/$query.gnuplottmp" "output/results/redundancy-performance/$query.gnuplot"
diff --git a/scripts/iozone_test.sh b/scripts/iozone_test.sh
new file mode 100644 (file)
index 0000000..b344a9f
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+iozonedir=$(sed -ne "$(($(grep -n '\[iozonetest\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/iozonedir = //g')
+testdir=$(sed -ne "$(($(grep -n '\[iozonetest\]' conf | cut -d : -f 1)+3)) p" conf | sed 's/testdir = //g')
+reclenBegin=$(sed -ne "$(($(grep -n '\[iozonetest\]' conf | cut -d : -f 1)+4)) p" conf | sed 's/reclenBegin = //g')
+reclenEnd=$(sed -ne "$(($(grep -n '\[iozonetest\]' conf | cut -d : -f 1)+5)) p" conf | sed 's/reclenEnd = //g')
+
+mkdir -p output/results/iozone
+
+echo
+echo "###################################################################"
+echo "IOZONE Tests"
+echo "###################################################################"
+
+
+"$iozonedir"/src/current/iozone -acMed -y $reclenBegin -g $reclenEnd -f "$testdir"/.iozone |tee output/results/iozone/iozone_results
+
+
diff --git a/scripts/nubiclean.sh b/scripts/nubiclean.sh
new file mode 100644 (file)
index 0000000..23b8576
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "Unmount Nubisave"
+fusermount -zu $HOME/.nubisave/nubisavemount
+
+echo "Deleting .nubisave"
+rm -rf $HOME/.nubisave/db.*
+rm -rf $HOME/storages/*
+rm -rf $HOME/.nubisave
+sleep 2
+
+echo "Starting Nubisave without Gui"
+nubisave headless
+
+sleep 2
+
diff --git a/scripts/plot.sh b/scripts/plot.sh
new file mode 100644 (file)
index 0000000..d7e011f
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+echo "plottig graphs..."
+
+#initialize all variables
+availabilityUAIP=$(sed -ne "$(grep -n availabilityUAIP conf | cut -d : -f 1) p" conf | sed 's/availabilityUAIP = //g')
+availabilityRR=$(sed -ne "$(grep -n availabilityRR conf | cut -d : -f 1) p" conf | sed 's/availabilityRR = //g')
+redundancyUAIP=$(sed -ne "$(grep -n redundancyUAIP conf | cut -d : -f 1) p" conf | sed 's/redundancyUAIP = //g')
+redundancyRR=$(sed -ne "$(grep -n redundancyRR conf | cut -d : -f 1) p" conf | sed 's/redundancyRR = //g')
+iozonePLOTS=$(sed -ne "$(grep -n iozonePLOTS conf | cut -d : -f 1) p" conf | sed 's/iozonePLOTS = //g')
+
+statsfileavailparallel="output/results/storage-availability/availabilityAllUseInParallel.csv"
+statsfileavailroundrobin="output/results/storage-availability/availabilityRoundRobin.csv"
+statsfileredparallel="output/results/redundancy-performance/redundancyperformance_AllUseInParallel.csv"
+statsfileredrobin="output/results/redundancy-performance/redundancyperformance_RoundRobin.csv"
+statsfileiozone="output/results/iozone/iozone_results"
+
+
+
+
+
+if  [ $availabilityUAIP == yes ]
+then
+bash scripts/gnuplotavail.sh $statsfileavailparallel availabilityparallel
+bash scripts/gnuplotavail.sh $statsfileavailparallel storageavailparallel 
+gnuplot scripts/plots/availparallel.dem
+gnuplot scripts/plots/availparallel-red.dem
+gnuplot scripts/plots/availparallel-storage.dem
+else
+echo
+fi
+
+if  [ $availabilityRR == yes ]
+then
+bash scripts/gnuplotavail.sh $statsfileavailroundrobin availabilityroundrobin
+bash scripts/gnuplotavail.sh $statsfileavailroundrobin storageavailroundrobin
+gnuplot scripts/plots/availroundrobin.dem
+gnuplot scripts/plots/availroundrobin-red.dem
+gnuplot scripts/plots/availroundrobin-storage.dem
+else
+echo
+fi
+
+if  [ $redundancyUAIP == yes ]
+then
+bash scripts/gnuplotred.sh $statsfileredparallel redperformanceparallel
+gnuplot scripts/plots/redperfspaceparallel.dem
+gnuplot scripts/plots/redperffragsparallel.dem
+gnuplot scripts/plots/redperfmemparallel.dem
+gnuplot scripts/plots/redperfcpuparallel.dem
+gnuplot scripts/plots/redperfreadparallel.dem
+gnuplot scripts/plots/redperfrereadparallel.dem
+gnuplot scripts/plots/redperfwriteparallel.dem
+gnuplot scripts/plots/redperfrewriteparallel.dem
+else
+echo
+fi
+
+if  [ $redundancyRR == yes ]
+then
+bash scripts/gnuplotred.sh $statsfileredrobin redperformancerobin
+gnuplot scripts/plots/redperfspacerobin.dem
+gnuplot scripts/plots/redperffragsrobin.dem
+gnuplot scripts/plots/redperfmemrobin.dem
+gnuplot scripts/plots/redperfcpurobin.dem
+gnuplot scripts/plots/redperfreadrobin.dem
+gnuplot scripts/plots/redperfrereadrobin.dem
+gnuplot scripts/plots/redperfwriterobin.dem
+gnuplot scripts/plots/redperfrewriterobin.dem
+else
+echo
+fi
+
+if  [ $iozonePLOTS == yes ]
+then
+sh scripts/gnuplotiozone.sh $statsfileiozone write
+sh scripts/gnuplotiozone.sh $statsfileiozone rewrite
+sh scripts/gnuplotiozone.sh $statsfileiozone read
+sh scripts/gnuplotiozone.sh $statsfileiozone reread
+sh scripts/gnuplotiozone.sh $statsfileiozone randread
+sh scripts/gnuplotiozone.sh $statsfileiozone randwrite
+sh scripts/gnuplotiozone.sh $statsfileiozone bkwdread
+sh scripts/gnuplotiozone.sh $statsfileiozone recrewrite
+sh scripts/gnuplotiozone.sh $statsfileiozone strideread
+sh scripts/gnuplotiozone.sh $statsfileiozone fwrite
+sh scripts/gnuplotiozone.sh $statsfileiozone frewrite
+sh scripts/gnuplotiozone.sh $statsfileiozone fread
+sh scripts/gnuplotiozone.sh $statsfileiozone freread
+gnuplot scripts/plots/iozone.dem
+
+else
+echo
+fi
+
+
+
+
+
+
+
+#gnuplot scripts/plots/avail_space_red_parallel.dem
+#gnuplot scripts/plots/avail_space_red_robin.dem
+
+
+
diff --git a/scripts/plots/avail_space_red_parallel.dem b/scripts/plots/avail_space_red_parallel.dem
new file mode 100644 (file)
index 0000000..0823c06
--- /dev/null
@@ -0,0 +1,29 @@
+set terminal x11
+set title "Nubisave Availability/Storage Footprint - UseAllInParallel"
+set grid lt rgb "#191970"
+set hidden3d
+set xtics 1
+set ytics 10
+set ztics 20
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:100.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel ""
+
+set dgrid3d 100,10,8
+set terminal svg
+set view 30,60
+
+
+set palette defined ( 0 '#DF0101#006400',\
+                      1 '#D7DF01',\
+                      2 '#006400')
+set cbrange [0.0:100.0] 
+
+set output "output/results/strategies/avail_space_red_parallel.svg"
+splot 'output/results/strategies/avail_space_red_parallel.gnuplot' using 1:2:3 notitle with lines palette
+
+
+
diff --git a/scripts/plots/avail_space_red_robin.dem b/scripts/plots/avail_space_red_robin.dem
new file mode 100644 (file)
index 0000000..0de0721
--- /dev/null
@@ -0,0 +1,31 @@
+set terminal x11
+set title "Nubisave Availability/Storage Footprint - RoundRobin"
+set grid lt rgb "#191970"
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 20
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:100.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel ""
+set style data lines
+set dgrid3d 100,10,8
+set terminal svg
+set view 30,60
+
+
+set palette defined ( 0 '#DF0101#006400',\
+                      1 '#D7DF01',\
+                      2 '#006400')
+set cbrange [0.0:100.0] 
+
+set output "output/results/strategies/avail_space_red_robin.svg"
+splot 'output/results/strategies/avail_space_red_robin.gnuplot' using 1:2:3 notitle with lines palette
+
+
+
diff --git a/scripts/plots/availparallel-red.dem b/scripts/plots/availparallel-red.dem
new file mode 100644 (file)
index 0000000..595d468
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Storage-Availability with Redundancy - UseAllInParallel"
+set grid lt 2 lw 1 lc rgb "#a9a9a9"
+set parametric
+set xtics 10
+set ytics 10
+set xrange [0:100]
+set yrange [0.0:100.0]
+set key outside box 
+set ylabel "Availability in %"
+set xlabel "Redundancy"
+set terminal svg
+
+set output "output/results/storage-availability/redundancyparallel-availability.svg"
+plot  'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==1 ? $3 :1/0) title "1 Storage" with line lt 1 lw 2 lc rgb "#0105F7", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==2 ? $3 :1/0) title "2 Storages" with line lt 1 lw 2 lc rgb "#1ADD00", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==3 ? $3 :1/0) title "3 Storages" with line lt 1 lw 2 lc rgb "#F40000", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==4 ? $3 :1/0) title "4 Storages" with line lt 1 lw 2 lc rgb "#05AEAB", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==5 ? $3 :1/0) title "5 Storages" with line lt 1 lw 2 lc rgb "#E8B911", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==6 ? $3 :1/0) title "6 Storages" with line lt 1 lw 2 lc rgb "#84826D", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==7 ? $3 :1/0) title "7 Storages" with line lt 1 lw 2 lc rgb "#0C5709", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==8 ? $3 :1/0) title "8 Storages" with line lt 1 lw 2 lc rgb "#AB45A6", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==9 ? $3 :1/0) title "9 Storages" with line lt 1 lw 2 lc rgb "#56B2FC", \
+'output/results/storage-availability/availabilityparallel.gnuplot'  using 2:($1==10 ? $3 :1/0) title "10 Storages" with line lt 1 lw 2 lc rgb "#102070B"
+
+
+
diff --git a/scripts/plots/availparallel-storage.dem b/scripts/plots/availparallel-storage.dem
new file mode 100644 (file)
index 0000000..bb539d7
--- /dev/null
@@ -0,0 +1,17 @@
+set terminal x11
+set title "Nubisave Storage-Availability without Redundancy - UseAllInParallel"
+set grid lt 2 lw 1 lc rgb "#a9a9a9"
+set parametric
+set xtics 1
+set ytics 10
+set xrange [1:10]
+set yrange [0.0:50.0]
+set ylabel "Availability in %"
+set xlabel "Storages"
+set terminal svg
+
+set output "output/results/storage-availability/storageparallel-availability.svg"
+plot  'output/results/storage-availability/storageavailparallel.gnuplot'  using 1:3 title "Availability" with lines 
+
+
+
diff --git a/scripts/plots/availparallel.dem b/scripts/plots/availparallel.dem
new file mode 100644 (file)
index 0000000..7bfa1ba
--- /dev/null
@@ -0,0 +1,31 @@
+set terminal x11
+set title "Nubisave Storage-Availability - UseAllInParallel"
+set grid lt rgb "#191970"
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 10
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:100.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "%"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+set palette defined ( 0 '#DF0101',\
+                      1 '#D7DF01',\
+                      2 '#006400')
+set cbrange [0.0:100.0]   
+
+set output "output/results/storage-availability/availabilityparallel.svg"
+splot 'output/results/storage-availability/availabilityparallel.gnuplot' using 1:2:3 title "Availability" with lines palette
+
+
+
+
+
diff --git a/scripts/plots/availroundrobin-red.dem b/scripts/plots/availroundrobin-red.dem
new file mode 100644 (file)
index 0000000..486fc0b
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Storage-Availability with Redundancy - RoundRobin"
+set grid lt 2 lw 1 lc rgb "#a9a9a9"
+set parametric
+set xtics 10
+set ytics 10
+set xrange [0:100]
+set yrange [0.0:100.0]
+set key outside box 
+set ylabel "Availability in %"
+set xlabel "Redundancy"
+set terminal svg
+
+set output "output/results/storage-availability/redundancyroundrobin-availability.svg"
+plot  'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==1 ? $3 :1/0) title "1 Storage" with line lt 1 lw 2 lc rgb "#0105F7", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==2 ? $3 :1/0) title "2 Storages" with line lt 1 lw 2 lc rgb "#1ADD00", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==3 ? $3 :1/0) title "3 Storages" with line lt 1 lw 2 lc rgb "#F40000", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==4 ? $3 :1/0) title "4 Storages" with line lt 1 lw 2 lc rgb "#05AEAB", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==5 ? $3 :1/0) title "5 Storages" with line lt 1 lw 2 lc rgb "#E8B911", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==6 ? $3 :1/0) title "6 Storages" with line lt 1 lw 2 lc rgb "#84826D", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==7 ? $3 :1/0) title "7 Storages" with line lt 1 lw 2 lc rgb "#0C5709", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==8 ? $3 :1/0) title "8 Storages" with line lt 1 lw 2 lc rgb "#AB45A6", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==9 ? $3 :1/0) title "9 Storages" with line lt 1 lw 2 lc rgb "#56B2FC", \
+'output/results/storage-availability/availabilityroundrobin.gnuplot'  using 2:($1==10 ? $3 :1/0) title "10 Storages" with line lt 1 lw 2 lc rgb "#102070B"
+
+
+
diff --git a/scripts/plots/availroundrobin-storage.dem b/scripts/plots/availroundrobin-storage.dem
new file mode 100644 (file)
index 0000000..56f553d
--- /dev/null
@@ -0,0 +1,17 @@
+set terminal x11
+set title "Nubisave Storage-Availability without Redundancy - RoundRobin"
+set grid lt 2 lw 1 lc rgb "#a9a9a9"
+set parametric
+set xtics 1
+set ytics 10
+set xrange [1:10]
+set yrange [0.0:100.0]
+set ylabel "Availability in %"
+set xlabel "Storages"
+set terminal svg
+
+set output "output/results/storage-availability/storageroundrobin-availability.svg"
+plot  'output/results/storage-availability/storageavailroundrobin.gnuplot'  using 1:3 title "Availability" with lines 
+
+
+
diff --git a/scripts/plots/availroundrobin.dem b/scripts/plots/availroundrobin.dem
new file mode 100644 (file)
index 0000000..2f3c535
--- /dev/null
@@ -0,0 +1,29 @@
+set terminal x11
+set title "Nubisave Storage-Availability - RoundRobin"
+set grid lt rgb "#191970"
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 10
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:100.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "%"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+set palette defined ( 0 '#DF0101#006400',\
+                      1 '#D7DF01',\
+                      2 '#006400')
+set cbrange [0.0:100.0] 
+
+set output "output/results/storage-availability/availabilityroundrobin.svg"
+splot 'output/results/storage-availability/availabilityroundrobin.gnuplot' using 1:2:3 title "Availability" with lines palette
+
+
+
diff --git a/scripts/plots/iozone.dem b/scripts/plots/iozone.dem
new file mode 100644 (file)
index 0000000..121e006
--- /dev/null
@@ -0,0 +1,54 @@
+set terminal x11
+set title "Iozone Performance Nubisave - UseAllInParallel"
+set grid lt 2 lw 1
+set surface
+set parametric
+set xtics
+set ytics
+set logscale x 2
+set logscale y 2
+set xlabel "Filesize in KB"
+set ylabel "Recordsize in KB"
+set style data lines
+set dgrid3d ,,8
+set terminal svg size 700,550
+
+set output "output/results/iozone/write.svg"
+splot 'output/results/iozone/write.gnuplot' using 1:2:($3/1024) title "Write in MB/s" with lines palette
+
+set output "output/results/iozone/rewrite.svg"
+splot 'output/results/iozone/rewrite.gnuplot' using 1:2:($3/1024) title "ReWrite in MB/s" with lines palette
+
+set output "output/results/iozone/read.svg"
+splot 'output/results/iozone/read.gnuplot' using 1:2:($3/1024) title "Read in MB/s" with lines palette
+
+set output "output/results/iozone/reread.svg"
+splot 'output/results/iozone/reread.gnuplot' using 1:2:($3/1024) title "ReRead in MB/s" with lines palette
+
+set output "output/results/iozone/randread.svg"
+splot 'output/results/iozone/randread.gnuplot' using 1:2:($3/1024) title "RandomRead in MB/s" with lines palette
+
+set output "output/results/iozone/randwrite.svg"
+splot 'output/results/iozone/randwrite.gnuplot' using 1:2:($3/1024) title "RandomWrite in MB/s" with lines palette
+
+set output "output/results/iozone/bkwdread.svg"
+splot 'output/results/iozone/bkwdread.gnuplot' using 1:2:($3/1024) title "ReadBackwards in MB/s" with lines palette
+
+set output "output/results/iozone/recrewrite.svg"
+splot 'output/results/iozone/recrewrite.gnuplot' using 1:2:($3/1024) title "RecordRewrite in MB/s" with lines palette
+
+set output "output/results/iozone/strideread.svg"
+splot 'output/results/iozone/strideread.gnuplot' using 1:2:($3/1024) title "StrideRead in MB/s" with lines palette
+
+set output "output/results/iozone/fwrite.svg"
+splot 'output/results/iozone/fwrite.gnuplot' using 1:2:($3/1024) title "Fwrite in MB/s" with lines palette
+
+set output "output/results/iozone/frewrite.svg"
+splot 'output/results/iozone/frewrite.gnuplot' using 1:2:($3/1024) title "Frewrite in MB/s" with lines palette
+
+set output "output/results/iozone/fread.svg"
+splot 'output/results/iozone/fread.gnuplot' using 1:2:($3/1024) title "Fread in MB/s" with lines palette
+
+set output "output/results/iozone/freread.svg"
+splot 'output/results/iozone/freread.gnuplot' using 1:2:($3/1024) title "Freread in MB/s" with lines palette
+
diff --git a/scripts/plots/redperfcpuparallel.dem b/scripts/plots/redperfcpuparallel.dem
new file mode 100644 (file)
index 0000000..0088d5d
--- /dev/null
@@ -0,0 +1,30 @@
+set terminal x11
+set title "Nubisave CPU Usage - 1MB File - UseAllInParallel"
+set grid lt rgb "#191970"
+set hidden3d
+set surface
+set parametric
+set xtics 1 
+set ytics 10
+set ztics 10
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:100.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "%"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+set palette defined ( 0 '#006400',\
+                      1 '#D7DF01',\
+                      2 '#DF0101')
+set cbrange [0.0:100.0]                                              
+
+set output "output/results/redundancy-performance/redundancyperformancecpuparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:10 title "cpu usage" with lines palette
+
+
+
+
diff --git a/scripts/plots/redperfcpurobin.dem b/scripts/plots/redperfcpurobin.dem
new file mode 100644 (file)
index 0000000..21fedfc
--- /dev/null
@@ -0,0 +1,29 @@
+set terminal x11
+set title "Nubisave CPU Usage - 1MB File - RoundRobin"
+set grid lt rgb "#191970"
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 10
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:100.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "%"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+set palette defined ( 0 '#006400',\
+                      1 '#D7DF01',\
+                      2 '#DF0101')
+set cbrange [0.0:100.0]                                                         
+
+set output "output/results/redundancy-performance/redundancyperformancecpurobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:10 title "cpu usage" with lines palette
+
+
+
diff --git a/scripts/plots/redperffragsparallel.dem b/scripts/plots/redperffragsparallel.dem
new file mode 100644 (file)
index 0000000..adffe03
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Fragments Quantity - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 1
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0:10]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "Frags"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancefragsparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:4 title "fragments" with lines lt rgb "#191970"
+
+
+
diff --git a/scripts/plots/redperffragsrobin.dem b/scripts/plots/redperffragsrobin.dem
new file mode 100644 (file)
index 0000000..f94e7dc
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Fragments Quantity - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 1
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0:10]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "Frags"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancefragsrobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:4 title "fragments" with lines lt rgb "#191970"
+
+
+
diff --git a/scripts/plots/redperfmemparallel.dem b/scripts/plots/redperfmemparallel.dem
new file mode 100644 (file)
index 0000000..950f07d
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Memory Usage - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 0.5
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:4.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "%"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancememparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:9 title "memory usage" with lines palette
+
+
+
diff --git a/scripts/plots/redperfmemrobin.dem b/scripts/plots/redperfmemrobin.dem
new file mode 100644 (file)
index 0000000..568c73e
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Memory Usage - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 0.5
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.0:4.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "%"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancememrobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:9 title "memory usage" with lines palette
+
+
+
diff --git a/scripts/plots/redperfreadparallel.dem b/scripts/plots/redperfreadparallel.dem
new file mode 100644 (file)
index 0000000..54e8a71
--- /dev/null
@@ -0,0 +1,23 @@
+set terminal x11
+set title "Nubisave Read Performance - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+set output "output/results/redundancy-performance/redundancyperformancereadparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:7 title "Read in KB/s" with lines lt palette
+
+
diff --git a/scripts/plots/redperfreadrobin.dem b/scripts/plots/redperfreadrobin.dem
new file mode 100644 (file)
index 0000000..50b44ee
--- /dev/null
@@ -0,0 +1,26 @@
+set terminal x11
+set title "Nubisave Read Performance - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancereadrobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:7 title "Read in KB/s" with lines palette
+
+
+
diff --git a/scripts/plots/redperfrereadparallel.dem b/scripts/plots/redperfrereadparallel.dem
new file mode 100644 (file)
index 0000000..b7c58fd
--- /dev/null
@@ -0,0 +1,23 @@
+set terminal x11
+set title "Nubisave ReRead Performance - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+set output "output/results/redundancy-performance/redundancyperformancerereadparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:8 title "ReRead in KB/s" with lines palette
+
+
diff --git a/scripts/plots/redperfrereadrobin.dem b/scripts/plots/redperfrereadrobin.dem
new file mode 100644 (file)
index 0000000..e2c14e4
--- /dev/null
@@ -0,0 +1,26 @@
+set terminal x11
+set title "Nubisave ReRead Performance - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancerereadrobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:8 title "ReRead in KB/s" with lines palette
+
+
+
diff --git a/scripts/plots/redperfrewriteparallel.dem b/scripts/plots/redperfrewriteparallel.dem
new file mode 100644 (file)
index 0000000..017e174
--- /dev/null
@@ -0,0 +1,23 @@
+set terminal x11
+set title "Nubisave ReWrite Performance - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+set output "output/results/redundancy-performance/redundancyperformancerewriteparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:6 title "ReWrite in KB/s" with lines palette
+
+
diff --git a/scripts/plots/redperfrewriterobin.dem b/scripts/plots/redperfrewriterobin.dem
new file mode 100644 (file)
index 0000000..58e378c
--- /dev/null
@@ -0,0 +1,26 @@
+set terminal x11
+set title "Nubisave ReWrite Performance - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancerewriterobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:6 title "ReWrite in KB/s" with lines palette
+
+
+
diff --git a/scripts/plots/redperfspaceparallel.dem b/scripts/plots/redperfspaceparallel.dem
new file mode 100644 (file)
index 0000000..f5f6167
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Storage Footprint - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 1
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.9:10.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "MB"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancespaceparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:3 title "storage footprint" with lines lt rgb "#191970"
+
+
+
diff --git a/scripts/plots/redperfspacerobin.dem b/scripts/plots/redperfspacerobin.dem
new file mode 100644 (file)
index 0000000..116d4e6
--- /dev/null
@@ -0,0 +1,27 @@
+set terminal x11
+set title "Nubisave Storage Footprint - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 1
+set xrange [1:10]
+set yrange [0:100]
+set zrange [0.9:10.0]
+set xlabel "Storages"
+set ylabel "Redundancy"
+set zlabel "MB"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,320
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancespacerobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:3 title "storage footprint" with lines lt rgb "#191970"
+
+
+
diff --git a/scripts/plots/redperfwriteparallel.dem b/scripts/plots/redperfwriteparallel.dem
new file mode 100644 (file)
index 0000000..3e5de43
--- /dev/null
@@ -0,0 +1,23 @@
+set terminal x11
+set title "Nubisave Write Performance - 1MB File - UseAllInParallel"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,10,8
+set view 60,140
+set terminal svg
+
+set output "output/results/redundancy-performance/redundancyperformancewriteparallel.svg"
+splot 'output/results/redundancy-performance/redperformanceparallel.gnuplot' using 1:2:5 title "Write in KB/s" with lines palette
+
+
diff --git a/scripts/plots/redperfwriterobin.dem b/scripts/plots/redperfwriterobin.dem
new file mode 100644 (file)
index 0000000..6e8c49a
--- /dev/null
@@ -0,0 +1,26 @@
+set terminal x11
+set title "Nubisave Write Performance - 1MB File - RoundRobin"
+set grid lt 2 lw 1
+set hidden3d
+set surface
+set parametric
+set xtics 1
+set ytics 10
+set ztics 2000
+set xrange [1:10]
+set yrange [0:100]
+set autoscale z
+set xlabel "Storages"
+set ylabel "Redundancy"
+set style data lines
+set dgrid3d 100,100,8
+set view 60,140
+set terminal svg
+
+                                                       
+
+set output "output/results/redundancy-performance/redundancyperformancewriterobin.svg"
+splot 'output/results/redundancy-performance/redperformancerobin.gnuplot' using 1:2:5 title "Write in KB/s" with lines palette
+
+
+
diff --git a/scripts/redundancy_test.sh b/scripts/redundancy_test.sh
new file mode 100644 (file)
index 0000000..6fbecbf
--- /dev/null
@@ -0,0 +1,187 @@
+#!/bin/bash
+
+echo
+echo "###################################################################"
+echo "Test Performance Of Redundancy"
+echo "###################################################################"
+echo
+
+mkdir -p output/results/redundancy-performance
+mkdir -p output/temp/copies
+
+
+function shouldexist {
+if [ -e "$mntpoint/data/$1" ]
+then
+       echo "  OK" 
+else
+       echo "  ERROR"
+fi
+}
+
+
+function checksum {
+       csum=`md5sum -b "output/sampledata/samplefiles/$1" | cut -d " "  -f 1`
+       sum=`md5sum -b "output/temp/copies/$1" | cut -d " "  -f 1`
+       if [ $csum == $sum ]
+       then
+               echo "  OK" 
+       else
+               echo "  ERROR"
+       fi
+}
+
+#initialize all variables
+mntpoint="$HOME/.nubisave/nubisavemount"
+strategy=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+2)) p" conf | sed 's/strategy = //g')
+statsfilered="output/results/redundancy-performance/redundancyperformance_$strategy.csv"
+filesizes=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+3)) p" conf | sed 's/filesizes = //g')
+qtymax=$(($(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+4)) p" conf | sed 's/quantityofstorages = //g')+1))
+repeatlimit=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+6)) p" conf | sed 's/iterations = //g')
+ismounted=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+5)) p" conf | sed 's/startbystorage = //g')
+run=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+7)) p" conf | sed 's/startbyrun = //g')
+startbyredundancy=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+8)) p" conf | sed 's/startbyredundancy = //g')
+redundancysteps=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+9)) p" conf | sed 's/redundancysteps = //g')
+
+
+startconfig="output/temp/config"
+#build a startconfig-file for nubisave
+echo "[splitter]" > $startconfig
+echo "redundancy = 0" >> $startconfig
+echo "availability = 0.0" >> $startconfig
+echo "storagestrategy = $strategy" >> $startconfig
+
+
+cp $startconfig "$mntpoint/config/config"
+
+
+
+if [ $run == 1 ]
+then
+echo "run      repeat  size    redundancy      qtystorages     write   rewrite read    reread  storagespace    fragments       exist           checksum        mem     cpu" > $statsfilered
+fi
+echo "run      repeat  size    redundancy      qtystorages     write   rewrite read    reread  storagespace    fragments       exist           checksum        mem     cpu"
+
+
+
+limit=101
+qtystorage=1
+storagespace=0
+repeat=1
+fragments=0
+
+
+
+sleep 1
+  
+   qtystorage=$(($(ls -1 $HOME/.nubisave/storages/| wc -l)))
+
+for N in $filesizes
+do
+
+iteration=0
+redundancy=$startbyredundancy
+size=$(echo $N"kb")
+
+
+       while [ "$redundancy" -lt "$limit" ]
+
+
+       do
+
+                 
+               beginwrite=$(date +%s.%N) 
+               cp output/sampledata/samplefiles/${N}kb "$mntpoint/data/"
+                cpuwrite=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $3 }')
+               memwrite=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $4 }')
+               endwrite=$(date +%s.%N)
+              
+               beginrewrite=$(date +%s.%N)
+               cp output/sampledata/samplefiles/${N}kb "$mntpoint/data/"
+               cpurewrite=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $3 }')
+               memrewrite=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $4 }')
+               endrewrite=$(date +%s.%N)
+       
+               beginread=$(date +%s.%N)
+               cp "$mntpoint/data/${N}kb" output/temp/copies/
+               cpuread=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $3 }')
+               memread=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $4 }')
+               endread=$(date +%s.%N)
+       
+               beginreread=$(date +%s.%N)
+               cp "$mntpoint/data/${N}kb" output/temp/copies/
+               cpureread=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $3 }')
+               memreread=$(ps aux | grep `pgrep -f com.github.joe42.splitter.Main` | grep -v grep | awk '{ print $4 }')
+               endreread=$(date +%s.%N)
+       
+                
+
+
+
+
+cpu=$(echo "scale=2; $cpuwrite/4+$cpurewrite/4+$cpuread/4+$cpureread/4" | bc)
+mem=$(echo "scale=2; $memwrite/4+$memrewrite/4+$memread/4+$memreread/4" | bc)
+
+#add a leading zero if the format is .80
+eformatcpu=0
+eformatmem=0
+eformatcpu=$(echo $cpu |cut -c1)
+eformatmem=$(echo $mem |cut -c1)
+
+if [ "$eformatmem" == .  ]
+then
+mem=0${mem}
+fi
+
+if [ "$eformatcpu" == .  ]
+then
+cpu=0${cpu}
+fi
+
+
+storagespace=$(find $HOME/storages/ -type f -print0 | xargs -r0 du -ab | awk '{sum+=$1} END {print sum}')
+fragments=$(find $HOME/storages/ -type f | wc -l)
+               
+exist=$(shouldexist ${N}kb)
+check=$(checksum ${N}kb)
+
+
+rm -rf "$mntpoint/data/${N}kb"
+
+
+
+# writes the values in a csv-file
+echo "$run     $repeat $N      $redundancy             $qtystorage             `echo "scale=0; $N / ($endwrite - $beginwrite)" | bc`   `echo "scale=0; $N / ($endrewrite - $beginrewrite)" | bc`       `echo "scale=0; $N / ($endread - $beginread)" | bc`     `echo "scale=0; $N / ($endreread - $beginreread)" | bc` $storagespace           $fragments      $exist  $check          $mem    $cpu" | tee -a $statsfilered
+
+run=$(($run+1))
+
+if [ "$repeat" -lt "$repeatlimit" ]
+
+then
+repeat=$(($repeat+1))
+rm /tmp/*.tmp
+else
+redundancy=$(($redundancy+$redundancysteps))
+iteration=$(($iteration+1))
+repeat=1;
+fi
+
+          #set a new nubisave configfile
+           sed "s/redundancy=.*/redundancy=$redundancy/g" /usr/share/nubisave/bin/nubi.properties > output/temp/nubitmp
+          sed "s/redundancy = .*/redundancy = $redundancy/g" "$mntpoint/config/config" > output/temp/conftmp           
+           cp output/temp/nubitmp /usr/share/nubisave/bin/nubi.properties
+           cp output/temp/conftmp "$mntpoint/config/config"
+
+       done
+done
+qtystorage=$(($qtystorage+1))
+
+
+sed "s/run = .*/run = $run/g" conf > output/temp/scriptconftmp
+cp output/temp/scriptconftmp conf
+sed "s/startbyredundancy = .*/startbyredundancy = 0/g" conf > output/temp/scriptconftmp
+cp output/temp/scriptconftmp conf
+
+echo "times written to $statsfilered"
+
+
diff --git a/start.sh b/start.sh
new file mode 100755 (executable)
index 0000000..1766072
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,172 @@
+#!/bin/bash
+
+
+mkdir -p output/temp
+mkdir -p output/logs
+
+#initialize all variables
+syslog=output/logs/syslog
+if [ $(sed -ne "$(grep -n nubisavelog conf | cut -d : -f 1) p" conf | sed 's/nubisavelog = //g') == on ]
+then
+nubisavelog=output/logs/nubisavelog
+else
+nubisavelog=/dev/null
+fi
+
+qtystart=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+5)) p" conf | sed 's/startbystorage = //g')
+storagetype=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+10)) p" conf | sed 's/storagetype = //g')
+sed "s/startbystorage = .*/startbystorage = $qtystart/g" conf > output/temp/scriptconftmp
+cp output/temp/scriptconftmp conf
+
+test_samplefiles_state=$(sed -ne "$(($(grep -n '\[samplefiles\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+test_sampledirectories_state=$(sed -ne "$(($(grep -n '\[sampledirectories\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+test_samplewebdavs_state=$(sed -ne "$(($(grep -n '\[samplewebdavs\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+test_redundancytest_state=$(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+test_directorytest_state=$(sed -ne "$(($(grep -n '\[directorytest\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+test_availabilitytest_state=$(sed -ne "$(($(grep -n '\[availabilitytest\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+test_iozone_state=$(sed -ne "$(($(grep -n '\[iozonetest\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+plot_state=$(sed -ne "$(($(grep -n '\[plot\]' conf | cut -d : -f 1)+1)) p" conf | sed 's/state = //g')
+qtymax=$(($(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+4)) p" conf | sed 's/quantityofstorages = //g')+2))
+ismounted=$(($(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+5)) p" conf | sed 's/startbystorage = //g')+1))
+mountiteration=1
+
+
+
+#init git
+if [ ! -d ".git" ]
+ then
+    echo "create git repository"
+    
+    git init
+      
+fi
+
+
+  
+#writes system information in a logfile
+echo "saving sys info"
+echo "##################################################################################################" >> $syslog
+cat /proc/cpuinfo >> $syslog
+free >> $syslog
+echo "User:$(whoami)" >> $syslog
+date >> $syslog
+echo $(lsb_release -a) >> $syslog
+echo $(getconf LONG_BIT) "Bit" >> $syslog
+uname -a >> $syslog
+java -version >> $syslog 2>&1
+echo "##################################################################################################" >> $syslog
+
+
+clear
+
+#checks the state of the test in configfile
+if  [ $test_samplefiles_state == on ]
+then
+sh scripts/createsamplefiles.sh
+else
+echo
+fi
+
+if  [ $test_sampledirectories_state == on ]
+then
+sh scripts/generate_directory_storages.sh
+else
+echo
+fi
+
+if  [ $test_samplewebdavs_state == on ]
+then
+sh scripts/generate_webdav_storages.sh
+else
+echo
+fi
+
+#redundancytest begin
+if  [ $test_redundancytest_state == on ]
+then
+while [ "$ismounted" -lt "$qtymax" ]
+do
+sh scripts/nubiclean.sh > $nubisavelog
+sleep 5
+mkdir -p "$HOME/.nubisave/db/splitter_configuration"
+while [ "$mountiteration" -lt "$ismounted" ]
+do
+echo $mountiteration
+echo $ismounted
+cp "output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration" $HOME/.nubisave/db/splitter_configuration
+
+if [ $storagetype == directory ]
+then
+
+#mount directories with the require parameters for mount_directory.sh
+sh /usr/share/nubisave/splitter/mountscripts/mount_$storagetype.sh "$HOME/.nubisave/storages/$storagetype$mountiteration" "$HOME/storages/mydir$mountiteration"
+else
+#mount webdavs with the require parameters for mount_fusedav.sh
+sh /usr/share/nubisave/splitter/mountscripts/mount_$storagetype.sh $(sed -ne "$(grep -n 'user =' output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration | cut -d : -f 1) p" output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration | sed 's/user = //g') $(sed -ne "$(grep -n 'password =' output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration | cut -d : -f 1) p" output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration | sed 's/password = //g') $(sed -ne "$(grep -n 'davurl =' output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration | cut -d : -f 1) p" output/sampledata/samplestorages/sample$storagetype/$storagetype$mountiteration | sed 's/davurl = //g') "$HOME/.nubisave/storages/$storagetype$mountiteration"
+fi
+echo $storagetype$mountiteration
+cp -rf "$HOME/.nubisave/db/splitter_configuration/$storagetype$mountiteration" "$HOME/.nubisave/nubisavemount/config/"
+cat "$HOME/.nubisave/db/splitter_configuration/$storagetype$mountiteration" > "$HOME/.nubisave/storages/$storagetype$mountiteration/config/config"
+mountiteration=$(($mountiteration+1))
+sleep 2
+done
+bash scripts/redundancy_test.sh
+
+sed "s/startbystorage = .*/startbystorage = $mountiteration/g" conf > output/temp/scriptconftmp
+       
+          cp output/temp/scriptconftmp conf
+mountiteration=1
+ismounted=$(($(sed -ne "$(($(grep -n '\[redundancytest\]' conf | cut -d : -f 1)+5)) p" conf | sed 's/startbystorage = //g')+1))
+done
+
+else
+echo
+fi
+#redundancytest end
+
+
+if  [ $test_availabilitytest_state == on ]
+then
+sh scripts/nubiclean.sh > $nubisavelog
+sleep 5
+sh scripts/availability_test.sh
+else
+echo
+fi
+
+if  [ $test_iozone_state == on ]
+then
+sh scripts/iozone_test.sh
+sleep 5
+#sh scripts/nubiclean.sh > $nubisavelog
+else
+echo
+fi
+
+if  [ $test_directorytest_state == on ]
+then
+sh scripts/nubiclean.sh > $nubisavelog
+sleep 5
+sh scripts/directory_test.sh
+else
+echo
+fi
+
+if  [ $plot_state == on ]
+then
+bash scripts/plot.sh 
+else
+echo
+fi
+
+
+
+git add output/logs/*
+git add output/results/*
+git commit -m "Test $(date)"
+
+
+
+
+
+