Fix missing system statistics
Resolves: RHEL-70167 Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
parent
1632376582
commit
1d8a2377bf
91
rteval-Fix-missing-statistics-for-system-with-timerl.patch
Normal file
91
rteval-Fix-missing-statistics-for-system-with-timerl.patch
Normal file
@ -0,0 +1,91 @@
|
||||
From 5edb31a58bea3c2433e817439e053b79221a06df Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Fri, 13 Dec 2024 15:07:09 -0500
|
||||
Subject: [PATCH] rteval: Fix missing statistics for system with timerlat
|
||||
|
||||
Fix missing statistics for the system with timerlat by fixing the test
|
||||
in rteval_test.xsl for stoptrace_invoked
|
||||
|
||||
In addition
|
||||
- Add --no-summary to the rtla command line
|
||||
- Parse out "ALL:" for good measure although this should be surpressed
|
||||
with the --no-summary command line option.
|
||||
- timerlat reports stop tracing when receiving a SIGINT, so also check
|
||||
whether the maximum value is greater than the --timerlat-stoptrace value
|
||||
|
||||
Tested the following scenarios.
|
||||
- timerlat-stoptrace USEC is NOT used
|
||||
- timerlat-stoptrace USEC is used AND the max value recorded is greater
|
||||
than the value to trigger stop tracing
|
||||
- timerlat-stoptrace USEC is used AND the max value recorded is not
|
||||
greater than the value to trigger stop tracing
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
rteval/modules/measurement/timerlat.py | 14 +++++++++++---
|
||||
rteval/rteval_text.xsl | 2 +-
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/rteval/modules/measurement/timerlat.py b/rteval/modules/measurement/timerlat.py
|
||||
index 3fcdb5ff2819..5bfc495217ea 100644
|
||||
--- a/rteval/modules/measurement/timerlat.py
|
||||
+++ b/rteval/modules/measurement/timerlat.py
|
||||
@@ -230,6 +230,7 @@ class Timerlat(rtevalModulePrototype):
|
||||
self.__cmd = ['rtla', 'timerlat', 'hist', self.__interval, '-P', f'f:{int(self.__priority)}', '-u']
|
||||
self.__cmd.append(f'-c{self.__cpulist}')
|
||||
self.__cmd.append(f'-E{self.__buckets}')
|
||||
+ self.__cmd.append('--no-summary')
|
||||
|
||||
if self.__cfg.stoptrace:
|
||||
self.__cmd.append(f"-T{int(self.__cfg.stoptrace)}")
|
||||
@@ -392,6 +393,10 @@ class Timerlat(rtevalModulePrototype):
|
||||
self.__stoptrace = True
|
||||
self.__posttrace += line
|
||||
continue
|
||||
+ elif line.startswith('ALL:'):
|
||||
+ # We should only see 'ALL:' without timerlat --no-summary
|
||||
+ # print(line)
|
||||
+ continue
|
||||
else:
|
||||
#print(line)
|
||||
pass
|
||||
@@ -424,17 +429,20 @@ class Timerlat(rtevalModulePrototype):
|
||||
for n in list(self.__timerlatdata.keys()):
|
||||
self.__timerlatdata[n].reduce()
|
||||
|
||||
- self.__timerlat_out.close()
|
||||
-
|
||||
self._setFinished()
|
||||
self.__started = False
|
||||
|
||||
+ self.__timerlat_err.close()
|
||||
+ self.__timerlat_out.close()
|
||||
+
|
||||
def MakeReport(self):
|
||||
rep_n = libxml2.newNode('timerlat')
|
||||
rep_n.newProp('command_line', ' '.join(self.__cmd))
|
||||
|
||||
+ max_val = self.__timerlatdata['system'].max
|
||||
+
|
||||
stoptrace_invoked_n = libxml2.newNode('stoptrace_invoked')
|
||||
- if self.stcpu != -1:
|
||||
+ if self.stcpu != -1 and max_val > int(self.__cfg.stoptrace):
|
||||
stoptrace_invoked_n.newProp("invoked", "true")
|
||||
else:
|
||||
stoptrace_invoked_n.newProp("invoked", "")
|
||||
diff --git a/rteval/rteval_text.xsl b/rteval/rteval_text.xsl
|
||||
index 70f3e0fd4b1c..146302744f58 100644
|
||||
--- a/rteval/rteval_text.xsl
|
||||
+++ b/rteval/rteval_text.xsl
|
||||
@@ -342,7 +342,7 @@
|
||||
</xsl:if>
|
||||
|
||||
<!-- If stoptrace_invoked is true, no Statistics are available -->
|
||||
- <xsl:if test="stoptrace_invoked != true">
|
||||
+ <xsl:if test="stoptrace_invoked != 'true'">
|
||||
<xsl:text> Statistics: </xsl:text>
|
||||
<xsl:apply-templates select="system/statistics"/>
|
||||
</xsl:if>
|
||||
--
|
||||
2.47.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: rteval
|
||||
Version: 3.9
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Utility to evaluate system suitability for RT Linux
|
||||
|
||||
Group: Development/Tools
|
||||
@ -34,6 +34,7 @@ Requires: rtla
|
||||
BuildArch: noarch
|
||||
|
||||
# Patches
|
||||
Patch1: rteval-Fix-missing-statistics-for-system-with-timerl.patch
|
||||
|
||||
%description
|
||||
The rteval script is a utility for measuring various aspects of
|
||||
@ -45,7 +46,7 @@ a statistical analysis of the event response times is done and printed
|
||||
to the screen.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -v -p1
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
@ -66,6 +67,10 @@ to the screen.
|
||||
%{_bindir}/rteval
|
||||
|
||||
%changelog
|
||||
* Fri Dec 13 2024 John Kacur <jkacur@redhat.com> - 3.9-2
|
||||
- Fix missing system statistics
|
||||
Resolves: RHEL-70167
|
||||
|
||||
* Fri Nov 15 2024 John Kacur <jkacur@redhat.com> - 3.9-1
|
||||
- Rebase to upstream rteval-3.9
|
||||
Resolves: RHEL-65483
|
||||
|
Loading…
Reference in New Issue
Block a user