diff --git a/Start scripts/On Controller Host/beacon/start.sh b/Start scripts/On Controller Host/beacon/start.sh new file mode 100644 index 0000000..7287136 --- /dev/null +++ b/Start scripts/On Controller Host/beacon/start.sh @@ -0,0 +1,3 @@ +#/bin/bash! +cd /home/openflow/controller/beacon-1.0.2/ +screen -AmdS beacon bash -c './beacon configuration configurationSwitch' diff --git a/Start scripts/On Controller Host/beacon/stop.sh b/Start scripts/On Controller Host/beacon/stop.sh new file mode 100644 index 0000000..239417a --- /dev/null +++ b/Start scripts/On Controller Host/beacon/stop.sh @@ -0,0 +1,3 @@ +#/bin/bash +#killall -9 screen +killall -9 beacon diff --git a/Start scripts/On Controller Host/flood/start.sh b/Start scripts/On Controller Host/flood/start.sh new file mode 100644 index 0000000..a1288d3 --- /dev/null +++ b/Start scripts/On Controller Host/flood/start.sh @@ -0,0 +1,4 @@ +#/bin/bash +cd ~/controller/floodlight/target/ +#cd ~/controller/latest_floodlight/target/ +screen -AmdS floodlight sudo java -jar floodlight.jar diff --git a/Start scripts/On Controller Host/flood/stop.sh b/Start scripts/On Controller Host/flood/stop.sh new file mode 100644 index 0000000..5b00b66 --- /dev/null +++ b/Start scripts/On Controller Host/flood/stop.sh @@ -0,0 +1,3 @@ +#/bin/bash +#killall -9 screen +sudo killall -9 java diff --git a/Start scripts/On Controller Host/launch_config.sh b/Start scripts/On Controller Host/launch_config.sh new file mode 100644 index 0000000..1b8b407 --- /dev/null +++ b/Start scripts/On Controller Host/launch_config.sh @@ -0,0 +1,105 @@ +#/bin/bash! +#BenchmarkingHosts: +IPS[0]="192.168.42.21" +#IPS[1]="192.168.42.22" +#IPS[2]="192.168.42.31" +#IPS[3]="192.168.42.32" + +EXPECTED_ARGS=2 +if [ $# -ne $EXPECTED_ARGS ] +then + echo "Usage: 'launch.sh runCount Controllername'" + exit -1 +fi + +#scripts starting the controller +if [[ $2 == *"flood"* ]] +then + controllerstart=flood/start.sh +fi + +if [[ $2 == *"nox"* ]] +then + controllerstart=nox/start.sh +fi + +if [[ $2 == *"beacon"* ]] +then + controllerstart=beacon/start.sh +fi + +if [[ $2 == *"pox"* ]] +then + controllerstart=pox/start.sh +fi + +controller=$2 +echo ">>Killing Controller" +stop_controller.sh +sleep 3s + +maxswitchnum=100 +if [ ${#IPS[@]} -eq 2 ] +then + maxswitchnum=50 +fi +if [ ${#IPS[@]} -eq 4 ] +then + maxswitchnum=25 +fi + +runArray=$(seq 5 5 $maxswitchnum) +runArray=("1" "${runArray[@]}") +runArray=("${runArray[@]}" "${runArray[@]}") + + +for i in $(seq 1 1 $1) +do + #runs 1,5-maxswitchnum + for j in ${runArray[@]} + do + echo ">Run #$i, Switch #$j" + echo ">>Starting Controller" + $controllerstart + + echo ">>Kill all alive BenchingTools" + for ip in ${IPS[@]} + do + ssh openflow@${ip} killall -9 java + done + sleep 8s + + echo ">>Start BenchingTools" + for ip in ${IPS[@]} + do + ssh openflow@${ip} "~/ssh_redirector.sh $j" + done + sleep 111s + + echo ">>Kill Controller" + stop_controller.sh + sleep 5s + + echo ">>Moving Logfiles" + target=$(printf "%03d" $j) + for ip in ${IPS[@]} + do + ssh openflow@${ip} mv "/home/openflow/ofcprobe/MyLog.log" "/home/openflow/ofcprobe/statistics/$target/" + done + done + + echo ">Moving statistics to statistics_$i" + for ip in ${IPS[@]} + do + ssh openflow@${ip} mv "/home/openflow/ofcprobe/statistics/" "/home/openflow/ofcprobe/statistics_$i/" + done + +done + +echo "Moving Statistics_* into new Dir and taring" +for ip in ${IPS[@]} +do + ssh openflow@${ip} mkdir "/home/openflow/ofcprobe/$controller" + ssh openflow@${ip} mv "/home/openflow/ofcprobe/statistics_*" "/home/openflow/ofcprobe/$controller/" +# ssh openflow@${ip} tar czf "/home/openflow/ofcprobe/$controller.tar.gz" "/home/openflow/ofcprobe/$controller/" & +done diff --git a/Start scripts/On Controller Host/nox/start.sh b/Start scripts/On Controller Host/nox/start.sh new file mode 100644 index 0000000..1f51e9f --- /dev/null +++ b/Start scripts/On Controller Host/nox/start.sh @@ -0,0 +1,4 @@ +#/bin/bash +cd ~/controller/nox/build/src/ +screen -AmdS nox bash -c './nox_core -t 4 -i ptcp: switch' +#screen -AmdS nox bash -c './nox_core -t 4 -i ptcp: openflow-manager' diff --git a/Start scripts/On Controller Host/nox/stop.sh b/Start scripts/On Controller Host/nox/stop.sh new file mode 100644 index 0000000..75b535e --- /dev/null +++ b/Start scripts/On Controller Host/nox/stop.sh @@ -0,0 +1 @@ +sudo killall lt-nox_core diff --git a/Start scripts/On Controller Host/pox/start.sh b/Start scripts/On Controller Host/pox/start.sh new file mode 100644 index 0000000..38ab945 --- /dev/null +++ b/Start scripts/On Controller Host/pox/start.sh @@ -0,0 +1,4 @@ +#/bin/bash +cd ~/controller/pox/ +screen -AmdS pox bash -c './pox.py forwarding.l2_learning' +#screen -AmdS pox bash -c './pox.py forwarding.l2_learning topology openflow.discovery openflow.topology' diff --git a/Start scripts/On Controller Host/pox/stop.sh b/Start scripts/On Controller Host/pox/stop.sh new file mode 100644 index 0000000..756b1c3 --- /dev/null +++ b/Start scripts/On Controller Host/pox/stop.sh @@ -0,0 +1,3 @@ +#/bin/bash +#killall -9 screen +sudo killall -9 python2.7 diff --git a/Start scripts/On Controller Host/stop_controller.sh b/Start scripts/On Controller Host/stop_controller.sh new file mode 100644 index 0000000..8436d60 --- /dev/null +++ b/Start scripts/On Controller Host/stop_controller.sh @@ -0,0 +1,9 @@ +#/bin/bash! +cd /home/openflow/controller/remote/flood/ +./stop.sh +cd /home/openflow/controller/remote/nox/ +./stop.sh +cd /home/openflow/controller/remote/beacon/ +./stop.sh +cd /home/openflow/controller/remote/pox/ +./stop.sh diff --git a/Start scripts/On OFCProbe Host/ssh_redirector.sh b/Start scripts/On OFCProbe Host/ssh_redirector.sh new file mode 100644 index 0000000..b30b038 --- /dev/null +++ b/Start scripts/On OFCProbe Host/ssh_redirector.sh @@ -0,0 +1,4 @@ +#/bin/bash! +#path containing ofcprobe.jar +cd /home/openflow/ofcprobe/ +screen -AmdS ofcprobe bash -c "java -jar ofcprobe.jar config.ini $1"