aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Traynor <ktraynor@redhat.com>2018-02-07 17:07:24 +0000
committerBryn M. Reeves <bmr@redhat.com>2018-02-07 17:07:24 +0000
commit5e6195192417f04dc4706a77ee7e110fda4c4282 (patch)
tree48f2b9323ba17eb4fb9d22c2a038db156e41be20
parent4562b41f0d9dcfc07e7fc0ab3b0b253d609a459f (diff)
downloadsos-5e6195192417f04dc4706a77ee7e110fda4c4282.tar.gz
[openvswitch] Add DPDK port mempool information.
"ovs-appctl netdev-dpdk/get-mempool-info <port>" will dump the mempool information for DPDK ports. This can be used to help debug memory issues with DPDK ports. Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/openvswitch.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index a137eda7..d4e055f3 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -135,6 +135,18 @@ class OpenVSwitch(Plugin):
"ovs-ofctl -O %s dump-ports-desc %s" % (flow, br)
])
+ # Gather info on the DPDK mempools associated with each DPDK port
+ br_list_result = self.call_ext_prog("ovs-vsctl -t 5 list-br")
+ if br_list_result['status'] == 0:
+ for br in br_list_result['output'].splitlines():
+ port_list_result = self.call_ext_prog("ovs-vsctl -t 5 "
+ "list-ports %s" % br)
+ if port_list_result['status'] == 0:
+ for port in port_list_result['output'].splitlines():
+ self.add_cmd_output(
+ "ovs-appctl netdev-dpdk/get-mempool-info %s" % port
+ )
+
class RedHatOpenVSwitch(OpenVSwitch, RedHatPlugin):