Commit a459096c authored by Dávid Patrik Pintér's avatar Dávid Patrik Pintér Committed by Ben Pfaff

ovs-bugtool: Enhancement of bugtool plugins.

Bugtool extended with NUMA related, QoS related and RHEL specific
information.
Signed-off-by: default avatarDavid Patrik Pinter <david.patrik.pinter@ericsson.com>
Signed-off-by: default avatarMiklos Pelyva <miklos.pelyva@ericsson.com>
Co-authored-by: default avatarMiklos Pelyva <miklos.pelyva@ericsson.com>
Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
parent 368ed9d0
......@@ -18,7 +18,11 @@ bugtool_scripts = \
utilities/bugtool/ovs-bugtool-tc-class-show \
utilities/bugtool/ovs-bugtool-daemons-ver \
utilities/bugtool/ovs-bugtool-ovs-ofctl-loop-over-bridges \
utilities/bugtool/ovs-bugtool-ovs-appctl-dpif
utilities/bugtool/ovs-bugtool-ovs-appctl-dpif \
utilities/bugtool/ovs-bugtool-ovs-bridge-datapath-type \
utilities/bugtool/ovs-bugtool-ovs-vswitchd-threads-affinity \
utilities/bugtool/ovs-bugtool-qos-configs \
utilities/bugtool/ovs-bugtool-get-dpdk-nic-numa
scripts_SCRIPTS += $(bugtool_scripts)
......
#! /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) 2017 Ericsson AB
for PCI_ADDRESS in $(lspci -D | cut -d' ' -f1)
do
if [ -n "$(find /sys/bus/pci/drivers | grep drivers.*$PCI_ADDRESS | grep -e uio_pci_generic -e igb_uio -e vfio-pci)" ]
then
grep -H "" $(find /sys/devices/ -path "*$PCI_ADDRESS*numa_node")
fi
done
#! /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) 2017 Ericsson AB
for br in `ovs-vsctl -- --real list-br`
do
echo bridge $br datapath_type=$(ovs-vsctl get bridge $br datapath_type)
done
#! /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) 2017 Ericsson AB
for pid in $(pgrep ovs-vswitchd)
do
for i in $(ls /proc/$pid/task)
do
taskset -pc $i
done
done
#! /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) 2017 Ericsson AB
for br in `ovs-vsctl -- --real list-br`
do
for iface in $(ovs-vsctl list-ifaces ${br})
do
echo "Rate limiting configuration for ${iface} (of ${br}):"
ovs-vsctl list interface ${iface} | grep ingress
echo "Interface options:"
ovs-vsctl get Interface ${iface} options
echo ""
done
done
......@@ -17,7 +17,7 @@
-->
<collect>
<files>
/proc/slabinfo
</files>
<files>
/proc/slabinfo
</files>
</collect>
......@@ -17,19 +17,27 @@
-->
<collect>
<command label="tc-class-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show</command>
<command label="ovs-vsctl-show" filters="ovs">ovs-vsctl show</command>
<command label="dump-ovsdb" filters="ovs">ovsdb-client -f csv dump unix:/var/run/openvswitch/db.sock Open_vSwitch</command>
<command label="ovs-appctl-fdb-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-fdb-show</command>
<command label="ovs-appctl-lacp-show" filters="ovs">ovs-appctl lacp/show</command>
<command label="ovs-appctl-cfm-show" filters="ovs">ovs-appctl cfm/show</command>
<command label="ovs-appctl-bfd-show" filters="ovs">ovs-appctl bfd/show</command>
<command label="ovs-appctl-conntrack-dump" filters="ovs">ovs-appctl dpctl/dump-conntrack</command>
<command label="ovs-appctl-coverage-show" filters="ovs">ovs-appctl coverage/show</command>
<command label="ovs-appctl-bond-show" filters="ovs">ovs-appctl bond/show</command>
<command label="ovs-appctl-memory-show" filters="ovs">ovs-appctl memory/show</command>
<command label="ovs-ofctl-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "show"</command>
<command label="ovs-ofctl-dump-flows" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "dump-flows"</command>
<command label="ovs-appctl-dpif" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-appctl-dpif</command>
<command label="ovs-appctl-list-dbs" filters="ovs">ovs-appctl -t ovsdb-server ovsdb-server/list-dbs</command>
<command label="tc-class-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show</command>
<command label="ovs-vsctl-show" filters="ovs">ovs-vsctl show</command>
<command label="get_other_config" filters="ovs">ovs-vsctl --no-wait get Open_vSwitch . other_config</command>
<command label="dump-ovsdb" filters="ovs">ovsdb-client -f csv dump unix:/var/run/openvswitch/db.sock Open_vSwitch</command>
<command label="ovs-appctl-fdb-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-fdb-show</command>
<command label="ovs-appctl-lacp-show" filters="ovs">ovs-appctl lacp/show</command>
<command label="ovs-appctl-cfm-show" filters="ovs">ovs-appctl cfm/show</command>
<command label="ovs-appctl-bfd-show" filters="ovs">ovs-appctl bfd/show</command>
<command label="ovs-appctl-conntrack-dump" filters="ovs">ovs-appctl dpctl/dump-conntrack</command>
<command label="ovs-appctl-coverage-show" filters="ovs">ovs-appctl coverage/show</command>
<command label="ovs-appctl-bond-show" filters="ovs">ovs-appctl bond/show</command>
<command label="ovs-appctl-memory-show" filters="ovs">ovs-appctl memory/show</command>
<command label="ovs-appctl-dpif" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-appctl-dpif</command>
<command label="ovs-appctl-list-dbs" filters="ovs">ovs-appctl -t ovsdb-server ovsdb-server/list-dbs</command>
<command label="ovs-appctl-dpctl-dump-flows-netdev" filters="ovs">ovs-appctl dpctl/dump-flows netdev@ovs-netdev</command>
<command label="ovs-appctl-dpctl-dump-flows-system" filters="ovs">ovs-appctl dpctl/dump-flows system@ovs-system</command>
<command label="ovs-appctl-dpctl-show-s" filters="ovs">ovs-appctl dpctl/show -s</command>
<command label="ovs-ofctl-show" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "show"</command>
<command label="ovs-ofctl-dump-flows" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "dump-flows"</command>
<command label="ovs-ofctl-dump-ports" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "dump-ports"</command>
<command label="ovs-ofctl-dump-groups" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "dump-groups"</command>
<command label="ovs-ofctl-dump-group-stats" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-loop-over-bridges "dump-group-stats"</command>
<command label="get_dpdk_nic_numa" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-get-dpdk-nic-numa</command>
</collect>
......@@ -19,4 +19,29 @@
<collect>
<command label="timezone">date --rfc-3339=seconds</command>
<command label="ovs-daemons-ver" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-daemons-ver</command>
<command label="dpif-show" filters="ovs">ovs-appctl dpif/show</command>
<command label="installed_openvswitch_debs" filters="ovs">dpkg -l | grep openvswitch</command>
<command label="installed_dpdk_debs" filters="ovs">dpkg -l | grep dpdk</command>
<command label="hugepages" filters="ovs">grep -H "" /sys/kernel/mm/hugepages/hugepages*/*</command>
<command label="hugepages_numa" filters="ovs">grep -H "" /sys/devices/system/node/node*/hugepages/hugepages*/*</command>
<command label="ovs_vswitchd_cmdline" filters="ovs">ps -C ovs-vswitchd -f</command>
<command label="ovsdb_server_cmdline" filters="ovs">ps -C ovsdb-server -f</command>
<command label="ovs_vswitchd_threads" filters="ovs">ps H -C ovs-vswitchd -o 'pid tid cmd comm'</command>
<command label="ovs_rundir_ls-la" filters="ovs">ls -la /var/run/openvswitch/</command>
<command label="open_files_lsof-U" filters="ovs">lsof -U</command>
<command label="ovs_version" filters="ovs">ovs-vsctl --version</command>
<command label="virsh_list" filters="ovs">virsh list --all</command>
<command label="pmd-rxq-show" filters="ovs">ovs-appctl dpif-netdev/pmd-rxq-show</command>
<command label="lscpu" filters="ovs">lscpu</command>
<command label="ovs_vswitchd_threads_affinity" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-vswitchd-threads-affinity</command>
<command label="ovs_bridge_datapath_type" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-ovs-bridge-datapath-type</command>
<command label="qos_configs" filters="ovs">/usr/share/openvswitch/scripts/ovs-bugtool-qos-configs</command>
<files filters="ovs">
/etc/default/openvswitch-switch
/etc/default/qemu-kvm
/etc/init/openvswitch-switch.conf
/etc/init/ovs-delay.conf
/etc/init.d/openvswitch-switch
/usr/share/openvswitch/scripts/ovs-ctl
</files>
</collect>
......@@ -17,6 +17,23 @@
-->
<collect>
<directory label="ovsdb-backups" filters="ovs" pattern=".*/conf.db.backup[0-9][^/]*$">/etc/openvswitch</directory>
<directory label="ovsdb-backups2" filters="ovs" pattern=".*/conf.db.backup[0-9][^/]*$">/var/lib/openvswitch</directory>
<directory label="ovsdb-backups" filters="ovs" pattern=".*/conf.db.backup[0-9][^/]*$">/etc/openvswitch</directory>
<directory label="ovsdb-backups2" filters="ovs" pattern=".*/conf.db.backup[0-9][^/]*$">/var/lib/openvswitch</directory>
<command label="system_memory_status" filters="ovs">df -h</command>
<command label="check_number_of_pmds" filters="ovs">ovs-appctl dpif-netdev/pmd-stats-show | grep pmd</command>
<command label="ovs-appctl-vlog-list" filters="ovs">ovs-appctl vlog/list</command>
<command label="journalctl" filters="ovs">journalctl</command>
<command label="user_limits" filters="ovs">ulimit -a</command>
<files filters="ovs">
/var/log/syslog
/var/log/daemon.log
/var/log/upstart/libvirt-bin.log
/var/log/upstart/ndevalarm.log
/var/log/upstart/nova-compute.log
/var/log/upstart/neutron-plugin-openvswitch-agent.log
/var/log/upstart/openvswitch-switch.log
/var/log/messages*
/var/log/secure
/var/log/dmesg*
</files>
</collect>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment