Skip to content

Commit d916d2d

Browse files
Addressed some review comments from Nathan for v1
Signed-off-by: Mohith Kumar Thummaluru <[email protected]>
1 parent 3147bb7 commit d916d2d

File tree

7 files changed

+11
-30
lines changed

7 files changed

+11
-30
lines changed

build/rpm/pcp.spec.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ collecting metrics from simple network checks.
17921792
#
17931793
%package pmda-rocestat
17941794
License: GPL-2.0-or-later
1795-
Summary: Performance Co-Pilot (PCP) metrics for simple network checks
1795+
Summary: Performance Co-Pilot (PCP) metrics for nVidia RoCE devices
17961796
URL: https://pcp.io
17971797
Requires: pcp = @package_version@ pcp-libs = @package_version@
17981798
%if "@enable_python3@" == "true"
@@ -1802,7 +1802,7 @@ Requires: %{__python2}-pcp
18021802
%endif
18031803
%description pmda-rocestat
18041804
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1805-
collecting statistics for RDMA over Converged Ethernet (RoCE) devices.
1805+
collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices.
18061806
# end pcp-pmda-rocestat
18071807

18081808
#

build/rpm/redhat.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ collecting metrics from simple network checks.
19251925
#
19261926
%package pmda-rocestat
19271927
License: GPL-2.0-or-later
1928-
Summary: Performance Co-Pilot (PCP) metrics for simple network checks
1928+
Summary: Performance Co-Pilot (PCP) metrics for nVidia RoCE devices
19291929
URL: https://pcp.io
19301930
Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
19311931
%if !%{disable_python3}
@@ -1935,7 +1935,7 @@ Requires: %{__python2}-pcp
19351935
%endif
19361936
%description pmda-rocestat
19371937
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
1938-
collecting statistics for RDMA over Converged Ethernet (RoCE) devices.
1938+
collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices.
19391939
# end pcp-pmda-rocestat
19401940
%endif
19411941

src/pmdas/rocestat/domain.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#define ROCESTAT 257
1+
#define ROCESTAT 254
22

src/pmdas/rocestat/pmdarocestat.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.\"
1717
.TH PMDAROCESTAT 1 "PCP" "Performance Co-Pilot" "General Commands Manual"
1818
.SH NAME
19-
.B pdmarocestat
19+
.B pmdarocestat
2020
\- Performance Metrics Domain Agent (PMDA) for RoCE devices
2121

2222
.SH DESCRIPTION

src/pmdas/rocestat/pmdarocestat.python

+2-19
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,7 @@ class MLNXCOUNTERS():
377377

378378
class ROCESTATPMDA(PMDA):
379379
"""
380-
A ROCE Performance Metrics Domain Agent.
381-
Install it and make basic use of it, as follows:
382-
383-
# $PCP_PMDAS_DIR/rocestat/Install
384-
[select python option]
385-
$ pminfo -fmdtT rocestat
380+
A ROCESTAT Performance Metrics Domain Agent.
386381
"""
387382

388383
# Cluster definitions
@@ -397,9 +392,7 @@ class ROCESTATPMDA(PMDA):
397392
pm_type_32 = c_api.PM_TYPE_U32
398393
pm_type_64 = c_api.PM_TYPE_U64
399394
pm_type_double = c_api.PM_TYPE_DOUBLE
400-
pm_type_str = c_api.PM_TYPE_STRING
401395

402-
null_indom = c_api.PM_INDOM_NULL
403396
inst_sem = c_api.PM_SEM_INSTANT
404397
count_sem = c_api.PM_SEM_COUNTER
405398

@@ -595,14 +588,6 @@ class ROCESTATPMDA(PMDA):
595588

596589
return [c_api.PM_ERR_PMID, 0]
597590

598-
599-
def roce_store_callback(self, cluster, item, inst, val):
600-
"""
601-
Store callback, executed when a request to write to a metric happens
602-
"""
603-
self.log("storing values\n")
604-
605-
606591
def __init__(self, name, domain, user, logfile):
607592

608593
super().__init__(name, domain, logfile)
@@ -615,9 +600,7 @@ class ROCESTATPMDA(PMDA):
615600

616601
self.register_metrics(name)
617602
self.set_fetch(self.roce_stat_fetch)
618-
619603
self.set_fetch_callback(self.roce_fetch_callback)
620-
self.set_store_callback(self.roce_store_callback)
621604

622605
@staticmethod
623606
def log(message):
@@ -636,7 +619,7 @@ if __name__ == "__main__":
636619
# This PMDA starts up in the "notready" state, see the Install script where
637620
# the IPC protocol is ipc_prot="binary notready". See also pmcd(1) man page.
638621
# The "binary notready" setting can also be manually configured in pmcd.conf.
639-
pmda = ROCESTATPMDA(name='rocestat', domain=257, user="root", logfile='rocestat.log')
622+
pmda = ROCESTATPMDA(name='rocestat', domain=254, user="root", logfile='rocestat.log')
640623

641624
pmda.pmda_ready()
642625
if not pmda.in_pmda_setup():

src/pmdas/rocestat/pmns

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rocestat 257:*:*
1+
rocestat 254:*:*

src/pmns/stdpmid.pcp

+2-4
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,9 @@ TRIVIAL 250
156156
FORQA 251
157157
QA_TEST_PERL 252
158158
SIMPLE 253
159-
### FREE SLOT 254 ###
159+
ROCESTAT 254
160160
MEMORY_PYTHON 255
161-
### FREE SLOT 256 ###
162-
ROCESTAT 257
163-
### MORE FREE SLOTS 258..510 ###
161+
### MORE FREE SLOTS 256..510 ###
164162
#
165163
# 511 is REALLY reserved ... see DYNAMIC_PMID in libpcp.h
166164
#

0 commit comments

Comments
 (0)