forked from sosreport/sos
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michael Filanov <[email protected]> Signed-off-by: Majd Dibbiny <[email protected]>
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |