ovs-bugtool: Add ovs-appctl dpif commands to debug bundle.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 25 Mar 2013 16:48:55 +0000 (09:48 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Mon, 25 Mar 2013 17:09:23 +0000 (10:09 -0700)
With single datapath, 'ovs-dpctl dump-flows ' dumps datapath flows for
all the userspace bridges in a system. It can get a little harder
to figure out the datapath flows belonging to a particular userspace
bridge.

This patch adds the 'ovs-appctl dpif/show' and 'ovs-appctl dpif/dump-flows'
output for each userspace bridge. This gives us a summary of configured
datapaths and all datapath flow entries for each bridge separately.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
utilities/bugtool/automake.mk
utilities/bugtool/ovs-bugtool-ovs-appctl-dpif [new file with mode: 0755]
utilities/bugtool/plugins/network-status/openvswitch.xml
xenserver/README

index 022ed71..9d1ff66 100644 (file)
@@ -24,6 +24,7 @@ bugtool_scripts = \
        utilities/bugtool/ovs-bugtool-daemons-ver \
        utilities/bugtool/ovs-bugtool-ovs-ofctl-show \
        utilities/bugtool/ovs-bugtool-ovs-ofctl-dump-flows \
+       utilities/bugtool/ovs-bugtool-ovs-appctl-dpif \
        utilities/bugtool/ovs-bugtool-bond-show
 scripts_SCRIPTS += $(bugtool_scripts)
 
diff --git a/utilities/bugtool/ovs-bugtool-ovs-appctl-dpif b/utilities/bugtool/ovs-bugtool-ovs-appctl-dpif
new file mode 100755 (executable)
index 0000000..3560ef0
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General
+# Public License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+#
+# Copyright (C) 2013 Nicira, Inc.
+
+for bridge in `ovs-vsctl -- --real list-br`
+do
+    echo "ovs-appctl dpif/show ${bridge}"
+    ovs-appctl dpif/show "${bridge}"
+    echo "ovs-appctl dpif/dump-flows ${bridge}"
+    ovs-appctl dpif/dump-flows "$bridge"
+    echo ""
+done
index ebd0260..d79b4f3 100644 (file)
@@ -27,4 +27,5 @@
   <command label="ovs-appctl-memory-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-memory-show</command>
   <command label="ovs-ofctl-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-show</command>
   <command label="ovs-ofctl-dump-flows" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-dump-flows</command>
+  <command label="ovs-appctl-dpif" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-appctl-dpif</command>
 </collect>
index c278c16..4674f40 100644 (file)
@@ -88,6 +88,7 @@ debugging.  The sources for the extensions are in
             * ovs-bugtool-bond-show
             * ovs-bugtool-ovs-ofctl-show
             * ovs-bugtool-ovs-ofctl-dump-flows
+            * ovs-bugtool-ovs-appctl-dpif
 
     system-configuration/openvswitch.xml
 
@@ -132,6 +133,10 @@ scripts are located in ../utilities/bugtool:
 
         Script to dump openflow flows of each bridge.
 
+    ovs-bugtool-ovs-appctl-dpif
+
+        Script to collect a summary of configured datapaths and datapath flows.
+
     ovs-bugtool-daemons-ver
 
         Script to dump version information for all Open vSwitch daemons.