--- /dev/null
+_OVS-dump-flows.sh
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+# author__ = "Michal Rehak"
+# copyright__ = "Copyright(c) 2014, Cisco Systems, Inc."
+# license__ = "New-style BSD"
+# email__ = "jmedved@cisco.com"
+
+if [ -z "$1" ]; then
+ echo "usage:: $0 <switch name, e.g.: s1>"
+ exit 1
+fi
+
+key="${0##*.}"
+#echo "${key}"
+
+sudo ovs-ofctl -O OpenFlow${key} dump-tables $1
--- /dev/null
+Put these files into a directory on your mininet VM.
+
+To find the number of all flows reported on all OVS switches running in
+mininet, type:
+
+> ./get-total-found.sh
+
+To find the number of all flows reported in table statistics in all OVS
+switches running in mininet, type:
+
+> ./get-total-reported.sh
--- /dev/null
+#!/bin/bash
+
+# author__ = "Jan Medved"
+# copyright__ = "Copyright(c) 2014, Cisco Systems, Inc."
+# license__ = "New-style BSD"
+# email__ = "jmedved@cisco.com"
+
+ECHO=`which echo`
+
+TOTAL=0
+i=1
+
+while true;
+do
+ CUR=$((`./OVS-dump-flows.sh.13 s$i 2> /dev/null | grep -v "flags=\[more\]" | wc -l` - 1))
+
+ if [ "$CUR" == "-1" ];
+ then
+ break
+ else
+ printf "Switch s%d: %d flows\n" $i $CUR
+ TOTAL=$(($TOTAL + $CUR))
+ i=$(($i + 1))
+ fi
+done
+
+printf "\nTotal: %d\n\n" $TOTAL
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+# author__ = "Jan Medved"
+# copyright__ = "Copyright(c) 2014, Cisco Systems, Inc."
+# license__ = "New-style BSD"
+# email__ = "jmedved@cisco.com"
+
+ECHO=`which echo`
+TOTAL=0
+
+i=1
+
+while true;
+do
+ CURSTRING=`./OVS-dump-tables.sh.13 s$i 2> /dev/null | grep -v "active=0" | grep "active"`
+
+ if [ "$CURSTRING" = "" ];
+ then
+ break
+ else
+ CUR=`echo $CURSTRING | awk -F'[:=,]' '{print $3}'`
+ TOTAL=$(($TOTAL + $CUR))
+ printf "Switch s%d:\n" $i
+ echo " Table " $CURSTRING
+ i=$(($i + 1))
+ fi
+done
+
+printf "\nTotal: %d\n\n" $TOTAL
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+ECHO=`which echo`
+
+TOTAL=0
+
+i=1
+
+while true;
+do
+ CUR=$((`./OVS-dump-flows.sh.13 s$i 2> /dev/null |wc -l` - 1))
+
+ if [ "$CUR" == "-1" ];
+ then
+ break
+ else
+ printf "Switch s%d: %d flows\n" $i $CUR
+ TOTAL=$(($TOTAL + $CUR))
+ i=$(($i + 1))
+ fi
+done
+
+printf "\nTotal: %d\n\n" $TOTAL
\ No newline at end of file