blob: 63b82b7517f3f4419a03ec96866ac53f3f776f5e [file] [log] [blame]
Masayoshi Kobayashice249712013-03-15 02:29:38 +00001#! /bin/bash
2controller=""
Masayoshi Kobayashib738b212013-04-03 02:26:51 +00003switches=`sudo ovs-vsctl list-br`
Masayoshi Kobayashice249712013-03-15 02:29:38 +00004
Masayoshi Kobayashi8afa8822013-04-02 22:20:33 +00005dpids=()
Masayoshi Kobayashice249712013-03-15 02:29:38 +00006for s in $switches; do
Masayoshi Kobayashi8afa8822013-04-02 22:20:33 +00007 i=`sudo ovs-ofctl show $s |grep dpid | awk -F ":" '{print $4}'`
8 dpids+=($i)
9done
10((j=0))
11for s in $switches; do
Masayoshi Kobayashib738b212013-04-03 02:26:51 +000012 sudo ovs-ofctl dump-flows $s |grep cookie| awk -vsw=$s -vdpid=${dpids[$j]} '{printf("%s dpid=%s %s\n",sw,dpid,$0)}'
Masayoshi Kobayashi8afa8822013-04-02 22:20:33 +000013 ((j ++ ))
Masayoshi Kobayashice249712013-03-15 02:29:38 +000014done