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 8cfbda2..1d4f94e 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 8b280aa..1ae5d9d 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 2864e04..b959b4a 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