Ubuntu | c7027f9 | 2013-03-01 00:57:11 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | CLUSTER=/home/masayosi/bin/hosts-3x3.txt |
| 3 | function ilink_up { |
| 4 | echo "add link at $2" |
| 5 | n=`dsh -w $1 "sudo tc qdisc show dev $2" | grep netem | wc -l` |
| 6 | if [ $n -eq 1 ]; then |
| 7 | echo "dsh -w $1 sudo tc qdisc change dev $2 root netem loss 0%" |
| 8 | dsh -w $1 "sudo tc qdisc change dev $2 root netem loss 0%" |
| 9 | else |
| 10 | echo "dsh -w $1 sudo tc qdisc add dev $2 root netem loss 0%" |
| 11 | dsh -w $1 "sudo tc qdisc add dev $2 root netem loss 0%" |
| 12 | fi |
| 13 | echo "done" |
| 14 | } |
| 15 | |
| 16 | ilink_up onos9vpc tapa0 |
| 17 | ilink_up onos10vpc tapb0 |
| 18 | ilink_up onos10vpc tapb1 |
| 19 | ilink_up onos11vpc tapc0 |
| 20 | |
| 21 | #echo "stopping mininet" |
| 22 | #dsh -g onos 'sudo mn -c' |
| 23 | echo "stopping ONOS" |
| 24 | dsh -g onos 'cd ONOS; ./start-onos.sh stop' |
| 25 | echo "stopping Cassandra" |
| 26 | dsh -g onos 'cd ONOS; ./start-cassandra.sh stop' |
| 27 | echo "Removing Cassandra DB" |
| 28 | dsh -g onos 'sudo rm -rf /var/lib/cassandra/*' |