blob: 9e05b43e8c377eaa4550522348807d042ee903c7 [file] [log] [blame]
Ubuntuc7027f92013-03-01 00:57:11 +00001#! /bin/sh
2CLUSTER=/home/masayosi/bin/hosts-3x3.txt
3function 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
16ilink_up onos9vpc tapa0
17ilink_up onos10vpc tapb0
18ilink_up onos10vpc tapb1
19ilink_up onos11vpc tapc0
20
21#echo "stopping mininet"
22#dsh -g onos 'sudo mn -c'
23echo "stopping ONOS"
24dsh -g onos 'cd ONOS; ./start-onos.sh stop'
25echo "stopping Cassandra"
26dsh -g onos 'cd ONOS; ./start-cassandra.sh stop'
27echo "Removing Cassandra DB"
28dsh -g onos 'sudo rm -rf /var/lib/cassandra/*'