commit | ce2497160bf2c80653271b6d44cc21283160e5f0 | [log] [tgz] |
---|---|---|
author | Masayoshi Kobayashi <masayoshi@onlab.us> | Fri Mar 15 02:29:38 2013 +0000 |
committer | Masayoshi Kobayashi <masayoshi@onlab.us> | Fri Mar 15 02:29:38 2013 +0000 |
tree | 511b75201e88e182d74a9361335b82945ef74b9c | |
parent | a05f01f8da0281642de88499a5d2c8ed43613396 [diff] |
add show flow
diff --git a/showflow.sh b/showflow.sh new file mode 100755 index 0000000..757c69d --- /dev/null +++ b/showflow.sh
@@ -0,0 +1,17 @@ +#! /bin/bash +controller="" +switches=`ifconfig -a | grep sw |grep -v eth | awk '{print $1}'` + +function host2ip (){ + ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'` + echo $ip +} + +url="" +for c in $controller; do + url="$url tcp:`host2ip $c`:6633" +done +echo $url +for s in $switches; do + sudo ovs-ofctl dump-flows $s +done