Added the folder with scripts that show flow statistics summaries in a mininet with...
[integration/test.git] / test / tools / odl-mdsal-clustering-tests / clustering-performance-test / ovs-scripts / get-total-found.sh
1 #!/bin/bash
2
3 # author__ = "Jan Medved"
4 # copyright__ = "Copyright(c) 2014, Cisco Systems, Inc."
5 # license__ = "New-style BSD"
6 # email__ = "jmedved@cisco.com"
7
8 ECHO=`which echo`
9
10 TOTAL=0
11 i=1
12
13 while true;
14 do
15     CUR=$((`./OVS-dump-flows.sh.13 s$i 2> /dev/null |  grep -v "flags=\[more\]" | wc -l` - 1))
16
17     if [ "$CUR" == "-1" ];
18     then 
19         break
20     else
21         printf "Switch s%d: %d flows\n" $i $CUR
22         TOTAL=$(($TOTAL + $CUR))
23         i=$(($i + 1))
24     fi
25 done
26
27 printf "\nTotal: %d\n\n" $TOTAL