From 9933c207b52759ecda52cdabd396bc2e8c889b78 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Thu, 21 Mar 2013 13:46:15 -0700 Subject: [PATCH] ovs-bugtool: Add ovs-ofctl commands to bugtool plugin scripts. This patch adds two new scripts that run "ovs-ofctl show" and "ovs-ofctl dump-flows" on each bridge. Signed-off-by: Gurucharan Shetty --- utilities/bugtool/automake.mk | 2 ++ .../bugtool/ovs-bugtool-ovs-ofctl-dump-flows | 24 +++++++++++++++++++ utilities/bugtool/ovs-bugtool-ovs-ofctl-show | 24 +++++++++++++++++++ .../plugins/network-status/openvswitch.xml | 2 ++ xenserver/README | 10 ++++++++ 5 files changed, 62 insertions(+) create mode 100755 utilities/bugtool/ovs-bugtool-ovs-ofctl-dump-flows create mode 100755 utilities/bugtool/ovs-bugtool-ovs-ofctl-show diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk index 88f905a84..022ed7111 100644 --- a/utilities/bugtool/automake.mk +++ b/utilities/bugtool/automake.mk @@ -22,6 +22,8 @@ bugtool_scripts = \ utilities/bugtool/ovs-bugtool-vsctl-show \ utilities/bugtool/ovs-bugtool-ovsdb-dump \ 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-bond-show scripts_SCRIPTS += $(bugtool_scripts) diff --git a/utilities/bugtool/ovs-bugtool-ovs-ofctl-dump-flows b/utilities/bugtool/ovs-bugtool-ovs-ofctl-dump-flows new file mode 100755 index 000000000..61fb841cf --- /dev/null +++ b/utilities/bugtool/ovs-bugtool-ovs-ofctl-dump-flows @@ -0,0 +1,24 @@ +#! /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 list-br` +do + echo "ovs-ofctl dump-flows ${bridge}" + ovs-ofctl dump-flows "$bridge" + echo "" +done diff --git a/utilities/bugtool/ovs-bugtool-ovs-ofctl-show b/utilities/bugtool/ovs-bugtool-ovs-ofctl-show new file mode 100755 index 000000000..2843395d9 --- /dev/null +++ b/utilities/bugtool/ovs-bugtool-ovs-ofctl-show @@ -0,0 +1,24 @@ +#! /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 list-br` +do + echo "ovs-ofctl show ${bridge}" + ovs-ofctl show "$bridge" + echo "" +done diff --git a/utilities/bugtool/plugins/network-status/openvswitch.xml b/utilities/bugtool/plugins/network-status/openvswitch.xml index 9539f7c0e..ebd02609d 100644 --- a/utilities/bugtool/plugins/network-status/openvswitch.xml +++ b/utilities/bugtool/plugins/network-status/openvswitch.xml @@ -25,4 +25,6 @@ /usr/share/openvswitch/scripts/ovs-bugtool-coverage-show /usr/share/openvswitch/scripts/ovs-bugtool-bond-show /usr/share/openvswitch/scripts/ovs-bugtool-memory-show + /usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-show + /usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-dump-flows diff --git a/xenserver/README b/xenserver/README index e72655f77..c278c16dd 100644 --- a/xenserver/README +++ b/xenserver/README @@ -86,6 +86,8 @@ debugging. The sources for the extensions are in * ovs-bugtool-ovsdb-dump * ovs-bugtool-tc-class-show * ovs-bugtool-bond-show + * ovs-bugtool-ovs-ofctl-show + * ovs-bugtool-ovs-ofctl-dump-flows system-configuration/openvswitch.xml @@ -122,6 +124,14 @@ scripts are located in ../utilities/bugtool: Script to dump tc class configuration for all network interfaces. + ovs-bugtool-ovs-ofctl-show + + Script to dump information about flow tables and ports of each bridge. + + ovs-bugtool-ovs-ofctl-dump-flows + + Script to dump openflow flows of each bridge. + ovs-bugtool-daemons-ver Script to dump version information for all Open vSwitch daemons. -- 2.43.0