From ktraynor at redhat.com Wed Feb 7 16:28:49 2018 From: ktraynor at redhat.com (Kevin Traynor) Date: Wed, 7 Feb 2018 16:28:49 +0000 Subject: [sos-devel] [PATCH] [openvswitch] Add DPDK port mempool information. Message-ID: <1518020929-17635-1-git-send-email-ktraynor@redhat.com> "ovs-appctl netdev-dpdk/get-mempool-info " 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 --- sos/plugins/openvswitch.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py index a137eda..ceee80d 100644 --- a/sos/plugins/openvswitch.py +++ b/sos/plugins/openvswitch.py @@ -136,4 +136,14 @@ class OpenVSwitch(Plugin): ]) + # 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): -- 1.8.3.1 From bmr at redhat.com Wed Feb 7 16:36:15 2018 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 7 Feb 2018 16:36:15 +0000 Subject: [sos-devel] [PATCH] [openvswitch] Add DPDK port mempool information. In-Reply-To: <1518020929-17635-1-git-send-email-ktraynor@redhat.com> References: <1518020929-17635-1-git-send-email-ktraynor@redhat.com> Message-ID: <20180207163615.GC10304@localhost.localdomain> On Wed, Feb 07, 2018 at 04:28:49PM +0000, Kevin Traynor wrote: > + # 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 > + ]) No need for [] here - add_cmd_output() and add_copy_spec() both accept either a single string, or a list of strings. Aside from that the patch looks good, thanks. No need to resend for a minor style fix: I'll change those two lines when I merge. Regards, Bryn. From ktraynor at redhat.com Wed Feb 7 16:39:31 2018 From: ktraynor at redhat.com (Kevin Traynor) Date: Wed, 7 Feb 2018 16:39:31 +0000 Subject: [sos-devel] [PATCH] [openvswitch] Add DPDK port mempool information. In-Reply-To: <20180207163615.GC10304@localhost.localdomain> References: <1518020929-17635-1-git-send-email-ktraynor@redhat.com> <20180207163615.GC10304@localhost.localdomain> Message-ID: <0642e577-6ea9-c382-2649-cbb0bf59c092@redhat.com> On 02/07/2018 04:36 PM, Bryn M. Reeves wrote: > On Wed, Feb 07, 2018 at 04:28:49PM +0000, Kevin Traynor wrote: >> + # 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 >> + ]) > > No need for [] here - add_cmd_output() and add_copy_spec() both accept > either a single string, or a list of strings. > ah, ok. > Aside from that the patch looks good, thanks. No need to resend for a > minor style fix: I'll change those two lines when I merge. > Great - thank you for that. Kevin. > Regards, > Bryn. > From bmr at redhat.com Wed Feb 7 17:09:23 2018 From: bmr at redhat.com (Bryn M. Reeves) Date: Wed, 7 Feb 2018 17:09:23 +0000 Subject: [sos-devel] [PATCH] [openvswitch] Add DPDK port mempool information. In-Reply-To: <1518020929-17635-1-git-send-email-ktraynor@redhat.com> References: <1518020929-17635-1-git-send-email-ktraynor@redhat.com> Message-ID: <20180207170923.GD10304@localhost.localdomain> On Wed, Feb 07, 2018 at 04:28:49PM +0000, Kevin Traynor wrote: > "ovs-appctl netdev-dpdk/get-mempool-info " 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 > --- > sos/plugins/openvswitch.py | 10 ++++++++++ > 1 file changed, 10 insertions(+) Merged as 5e61951: commit 5e6195192417f04dc4706a77ee7e110fda4c4282 Author: Kevin Traynor Date: Wed Feb 7 17:07:24 2018 +0000 [openvswitch] Add DPDK port mempool information. "ovs-appctl netdev-dpdk/get-mempool-info " 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 Signed-off-by: Bryn M. Reeves Bryn.