ovs-bugtool: Add an OVSDB snapshot to ovs-bugtool output.
authorBen Pfaff <blp@nicira.com>
Wed, 6 Jul 2011 17:26:57 +0000 (10:26 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 13 Jul 2011 19:44:50 +0000 (12:44 -0700)
The ovs-bugtool output already includes a copy of the configuration
database file, but this file omits many instantaneous details.  For
example, it does not include any information about controller connection
status or interface statistics.  This commit adds a snapshot of the
database contents that does include these details.

utilities/bugtool/automake.mk
utilities/bugtool/ovs-bugtool-ovsdb-dump [new file with mode: 0755]
utilities/bugtool/plugins/network-status/openvswitch.xml
xenserver/openvswitch-xen.spec

index 8cfbda2bb5ad516c250f8e41f5f4b2ae92bb055a..1d4f94e109b8fdc12e19b3dbcc60d920f6ccd70e 100644 (file)
@@ -8,7 +8,9 @@ bugtool_plugins = \
        utilities/bugtool/plugins/system-configuration.xml \
        utilities/bugtool/plugins/system-configuration/openvswitch.xml
 
-bugtool_scripts = utilities/bugtool/ovs-bugtool-tc-class-show
+bugtool_scripts = \
+       utilities/bugtool/ovs-bugtool-tc-class-show \
+       utilities/bugtool/ovs-bugtool-ovsdb-dump
 scripts_SCRIPTS += $(bugtool_scripts)
 
 bugtoolpluginsdir = $(sysconfdir)/openvswitch/bugtool-plugins
diff --git a/utilities/bugtool/ovs-bugtool-ovsdb-dump b/utilities/bugtool/ovs-bugtool-ovsdb-dump
new file mode 100755 (executable)
index 0000000..9e4d662
--- /dev/null
@@ -0,0 +1,19 @@
+#! /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) 2011 Nicira Networks.
+
+ovsdb-client -f csv dump unix:/var/run/openvswitch/db.sock Open_vSwitch
index 8b280aa2bdd1ef014cb5fb9dae47bea0cd6f9ee6..1ae5d9d82396a92f4427511353a9b29a22681913 100644 (file)
@@ -18,4 +18,5 @@
 
 <collect>
   <command label="tc-class-show">/usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show</command>
+  <command label="dump-ovsdb">/usr/share/openvswitch/scripts/ovs-bugtool-ovsdb-dump</command>
 </collect>
index 2864e048bfb05c3bfd40bf067b0c0aba6d8c9a83..b959b4aa9d007d65b5d488d833ff0595011375cf 100644 (file)
@@ -350,7 +350,7 @@ exit 0
 /usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py
 /usr/share/openvswitch/scripts/vif
 /usr/share/openvswitch/scripts/sysconfig.template
-/usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show
+/usr/share/openvswitch/scripts/ovs-bugtool-*
 /usr/share/openvswitch/scripts/ovs-save
 /usr/share/openvswitch/scripts/ovs-ctl
 /usr/share/openvswitch/scripts/ovs-lib.sh