Skip to content

Commit

Permalink
Add RDMA plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Filanov <[email protected]>
Signed-off-by: Majd Dibbiny <[email protected]>
  • Loading branch information
filanov authored and aserdean committed Jul 11, 2024
1 parent e813458 commit 5d35a38
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions sos/report/plugins/rdma.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (C) 2023 Nvidia Corporation, Majd Dibbiny <[email protected]>
# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.report.plugins import Plugin, IndependentPlugin


class Rdma(Plugin, IndependentPlugin):

short_desc = 'RDMA plugin collects status, statistics and resources of all\
the RDMA devices in the system'

plugin_name = "rdma"
profiles = ('hardware',)
packages = ('rdma',)

def setup(self):

rdma_cmds = [
"dev show",
"link show",
"system show",
"statistic show"
]

rdma_rsc_obj = [
"qp",
"cm_id",
"cq",
"pd",
"mr",
"ctx",
"srq"
]

self.add_cmd_output([f"rdma {cmd} -d" for cmd in rdma_cmds])

self.add_cmd_output([f"rdma resource show {rsc} -d"
for rsc in rdma_rsc_obj])

0 comments on commit 5d35a38

Please sign in to comment.