Step 1: Move vm scripts to the right place
[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 dname=`dirname $0`
13
14 while true;
15 do
16     CUR=$((`${dname}/OVS-dump-flows.sh.13 s$i 2> /dev/null |  grep -v "flags=\[more\]" | wc -l` - 1))
17
18     if [ "$CUR" == "-1" ];
19     then
20         break
21     else
22         printf "Switch s%d: %d flows\n" $i $CUR
23         TOTAL=$(($TOTAL + $CUR))
24         i=$(($i + 1))
25     fi
26 done
27
28 printf "\nTotal: %d\n\n" $TOTAL
29