From d5e5e9062fbb9445483d2707942a04d53aba50b1 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 13 Nov 2024 16:18:56 +0300 Subject: [PATCH] import rteval-3.8-7.el9 --- .gitignore | 2 +- .rteval.metadata | 2 +- SOURCES/Updated-rteval-man-page.patch | 109 ++++ .../rteval-Add-module-for-tuned-state.patch | 254 ++++++++ SOURCES/rteval-Add-noload-option.patch | 190 ++++++ ...d-relative-cpulists-for-measurements.patch | 278 -------- ...dd-tuned-state-to-rteval-text-report.patch | 46 ++ ...ctionality-to-allow-user-to-set-the-.patch | 221 +++++++ ...ange-the-default-kernel-for-kcompile.patch | 65 -- ...al-Convert-CpuList-class-to-a-module.patch | 616 ------------------ ...eval-Disable-use-of-python-dmidecode.patch | 87 --- ...nly-one-latency-measurement-module-a.patch | 84 +++ ...teval-Fix-default-measurement-config.patch | 42 ++ ...port-traceback-when-utility-sos-not-.patch | 42 ++ ...-Implement-initial-dmidecode-support.patch | 299 --------- .../rteval-Makefile-More-rpm-cleanups.patch | 64 -- ...-Minor-improvements-to-CpuList-class.patch | 85 --- ...ctor-collapse_cpulist-in-systopology.patch | 225 ------- .../rteval-Remove-MeasurementProfile.patch | 463 +++++++++++++ .../rteval-Remove-upstream-spec-file.patch | 566 ---------------- ...-RtEvalModules-Remove-unused-methods.patch | 87 +++ ...nt-Change-latency-flag-to-latency_te.patch | 89 +++ ...rteval-measurement-Remove-ModuleInfo.patch | 324 +++++++++ ...ctest-using-default-system-when-sett.patch | 71 ++ ...onvert-base64-data-to-text-before-wr.patch | 65 ++ ...erlat-Add-timerlat-tracing-to-rteval.patch | 526 +++++++++++++++ .../rteval-timerlat-tracing-clean-up.patch | 217 ++++++ SPECS/rteval.spec | 126 ++-- 28 files changed, 2917 insertions(+), 2328 deletions(-) create mode 100644 SOURCES/Updated-rteval-man-page.patch create mode 100644 SOURCES/rteval-Add-module-for-tuned-state.patch create mode 100644 SOURCES/rteval-Add-noload-option.patch delete mode 100644 SOURCES/rteval-Add-relative-cpulists-for-measurements.patch create mode 100644 SOURCES/rteval-Add-tuned-state-to-rteval-text-report.patch create mode 100644 SOURCES/rteval-Added-functionality-to-allow-user-to-set-the-.patch delete mode 100644 SOURCES/rteval-Change-the-default-kernel-for-kcompile.patch delete mode 100644 SOURCES/rteval-Convert-CpuList-class-to-a-module.patch delete mode 100644 SOURCES/rteval-Disable-use-of-python-dmidecode.patch create mode 100644 SOURCES/rteval-Enforce-only-one-latency-measurement-module-a.patch create mode 100644 SOURCES/rteval-Fix-default-measurement-config.patch create mode 100644 SOURCES/rteval-Fix-sysreport-traceback-when-utility-sos-not-.patch delete mode 100644 SOURCES/rteval-Implement-initial-dmidecode-support.patch delete mode 100644 SOURCES/rteval-Makefile-More-rpm-cleanups.patch delete mode 100644 SOURCES/rteval-Minor-improvements-to-CpuList-class.patch delete mode 100644 SOURCES/rteval-Refactor-collapse_cpulist-in-systopology.patch create mode 100644 SOURCES/rteval-Remove-MeasurementProfile.patch delete mode 100644 SOURCES/rteval-Remove-upstream-spec-file.patch create mode 100644 SOURCES/rteval-RtEvalModules-Remove-unused-methods.patch create mode 100644 SOURCES/rteval-measurement-Change-latency-flag-to-latency_te.patch create mode 100644 SOURCES/rteval-measurement-Remove-ModuleInfo.patch create mode 100644 SOURCES/rteval-run-cyclictest-using-default-system-when-sett.patch create mode 100644 SOURCES/rteval-sysstat-Convert-base64-data-to-text-before-wr.patch create mode 100644 SOURCES/rteval-timerlat-Add-timerlat-tracing-to-rteval.patch create mode 100644 SOURCES/rteval-timerlat-tracing-clean-up.patch diff --git a/.gitignore b/.gitignore index f0db1ab..d2b42b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rteval-3.7.tar.xz +SOURCES/rteval-3.8.tar.xz diff --git a/.rteval.metadata b/.rteval.metadata index 4772766..566017a 100644 --- a/.rteval.metadata +++ b/.rteval.metadata @@ -1 +1 @@ -fe85dce7852985e9ca916877b278feed31508f8f SOURCES/rteval-3.7.tar.xz +99d67b221f21f27366d48a23f2414894ccbdc002 SOURCES/rteval-3.8.tar.xz diff --git a/SOURCES/Updated-rteval-man-page.patch b/SOURCES/Updated-rteval-man-page.patch new file mode 100644 index 0000000..34c514d --- /dev/null +++ b/SOURCES/Updated-rteval-man-page.patch @@ -0,0 +1,109 @@ +From 66b6c5851ea2241b6e368a1538dc10fd1f3f76f7 Mon Sep 17 00:00:00 2001 +From: Anubhav Shelat +Date: Wed, 5 Jun 2024 14:04:54 -0400 +Subject: [PATCH] Updated rteval man page + +The rteval man page should reflect the functionality of the +current iteration of rteval. Currently the rteval man page +reflects the functionality of an outdated version. This patch +removes deprecated options and adds options that have been +added in recent updates. + +Signed-off-by: Anubhav Shelat +--- + doc/rteval.8 | 50 +++++++++++++++++++++++++++++++++----------------- + 1 file changed, 33 insertions(+), 17 deletions(-) + +diff --git a/doc/rteval.8 b/doc/rteval.8 +index 578de370effa..264bf5207716 100644 +--- a/doc/rteval.8 ++++ b/doc/rteval.8 +@@ -63,6 +63,9 @@ for example to execute a ten minute run of rteval: + .B \-v, \-\-verbose + Increase the verbosity of output during the test run + .TP ++.B \-q, \-\-quiet ++Set rteval to run in quiet mode. ++.TP + .B \-w WORKDIR, \-\-workdir=WORKDIR + Tell rteval to change directory to WORKDIR before creating any + subdirectories for report files. The default WORKDIR is the directory +@@ -71,11 +74,8 @@ in which rteval was started. + .B \-l LOADDIR, \-\-loaddir=LOADDIR + Tell rteval where to find the source for the loads + .TP +-.B \-\-loads\-cpulist=CPULIST +-List of CPUs where loads will run +-.TP +-.B \-\-measurement-cpulist=CPULIST +-List of CPUs where measurement applciation will run ++.B \-i INSTALLDIR, \-\-installdir=INSTALLDIR ++Tell rteval where to locate installed templates. + .TP + .B \-s, \-\-sysreport + Have rteval run the sysreport utility after a run to gather +@@ -103,11 +103,25 @@ Log the output of the loads in the report directory + .B \-O, \-\-onlyload + Only run the loads (don't run measurement threads) + .TP ++.B \-V, \-\-version ++Print rteval version and exit. ++.TP + .B \-S KERNEL_VERSION, \-\-source\-download=KERNEL_VERSION + download a source kernel from kernel.org and exit + ++.SH GROUP OPTIONS ++.TP ++.B \-\-loads\-cpulist=CPULIST ++List of CPUs where loads will run ++.TP ++.B \-\-measurement-cpulist=CPULIST ++List of CPUs where measurement applciation will run ++.TP ++.B \-\-measurement-run-on-isolcpus ++Include isolated CPUs in default cpulist ++ + +-.SH MODULE OPTIONS ++.SH CYCLICTEST OPTIONS + These are options that affect the execution behavior of the measurement and load modules. + .TP + .B \-\-cyclictest-priority=PRIORITY +@@ -116,21 +130,23 @@ SCHED_FIFO priority for measurement threads (default: 95) + .B \-\-cyclictest-interval=INTERVAL + Measurement thread interval in microseconds (default: 100) + .TP +-.B \-\-cyclictest-distance=DISTANCE +-Interval increment in microseconds (default: 0) +-.TP + .B \-\-cyclictest-buckets=NBUCKETS + Number of 1 microsecond histogram buckets (default: 3500) + .TP +-.B \-\-hackbench-jobspercore=N +-Number of jobs per online-core for hackbench load ++.B \-\-cyclictest-breaktrace=USEC ++Send a break trace command if latency exceeds the given number of microseconds. ++.TP ++.B \-\-cyclictest-threshold=USEC ++Exit rteval if latency exceeds the given number of microseconds. ++.TP ++.B \-\-stressng-option=OPTION ++Pass in command line options for the stress-ng package. ++.TP ++.B \-\-stressng-arg=ARG ++Pass in command line arguments for the stress-ng package. + .TP +-.B \-\-kcompile-jobspercore=N +-Number of jobs per online-core for kernel compile load +-.\" .SH SEE ALSO +-.\" .BR bar (1), +-.\" .BR baz (1). +-.\" .br ++.B \-\-stressng-timeout=T ++Timeout after T seconds. + + .SH FILES + .BR rteval-YYYYMMDD-S +-- +2.45.1 + diff --git a/SOURCES/rteval-Add-module-for-tuned-state.patch b/SOURCES/rteval-Add-module-for-tuned-state.patch new file mode 100644 index 0000000..a6f00d2 --- /dev/null +++ b/SOURCES/rteval-Add-module-for-tuned-state.patch @@ -0,0 +1,254 @@ +From 2b589a971f8895c81e13b5cfeb45879a28ea8cc6 Mon Sep 17 00:00:00 2001 +From: Tomas Glozar +Date: Wed, 24 Jul 2024 09:37:42 +0200 +Subject: [PATCH 1/2] rteval: Add module for tuned state + +Add a sysinfo module for collecting the tuned state. Three properties +are collected: +- whether tuned is present +- what the active tuned profile is +- whether tuned profile verification passes + +In case of a failed verification, the tuned log is also collected. + +Signed-off-by: Tomas Glozar +Signed-off-by: John Kacur +--- + rteval/sysinfo/__init__.py | 5 +- + rteval/sysinfo/tuned.py | 191 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 195 insertions(+), 1 deletion(-) + create mode 100644 rteval/sysinfo/tuned.py + +diff --git a/rteval/sysinfo/__init__.py b/rteval/sysinfo/__init__.py +index 09af52e..4b7b03c 100644 +--- a/rteval/sysinfo/__init__.py ++++ b/rteval/sysinfo/__init__.py +@@ -15,10 +15,11 @@ from rteval.sysinfo.memory import MemoryInfo + from rteval.sysinfo.osinfo import OSInfo + from rteval.sysinfo.newnet import NetworkInfo + from rteval.sysinfo.cmdline import cmdlineInfo ++from rteval.sysinfo.tuned import TunedInfo + from rteval.sysinfo import dmi + + class SystemInfo(KernelInfo, SystemServices, dmi.DMIinfo, CPUtopology, +- MemoryInfo, OSInfo, NetworkInfo, cmdlineInfo): ++ MemoryInfo, OSInfo, NetworkInfo, cmdlineInfo, TunedInfo): + def __init__(self, config, logger=None): + self.__logger = logger + KernelInfo.__init__(self, logger=logger) +@@ -28,6 +29,7 @@ class SystemInfo(KernelInfo, SystemServices, dmi.DMIinfo, CPUtopology, + OSInfo.__init__(self, logger=logger) + cmdlineInfo.__init__(self, logger=logger) + NetworkInfo.__init__(self, logger=logger) ++ TunedInfo.__init__(self, logger=logger) + + # Parse initial DMI decoding errors + self.ProcessWarnings() +@@ -49,6 +51,7 @@ class SystemInfo(KernelInfo, SystemServices, dmi.DMIinfo, CPUtopology, + report_n.addChild(MemoryInfo.MakeReport(self)) + report_n.addChild(dmi.DMIinfo.MakeReport(self)) + report_n.addChild(cmdlineInfo.MakeReport(self)) ++ report_n.addChild(TunedInfo.MakeReport(self)) + + return report_n + +diff --git a/rteval/sysinfo/tuned.py b/rteval/sysinfo/tuned.py +new file mode 100644 +index 0000000..063fcbf +--- /dev/null ++++ b/rteval/sysinfo/tuned.py +@@ -0,0 +1,191 @@ ++# -*- coding: utf-8 -*- ++# SPDX-License-Identifier: GPL-2.0-or-later ++# ++# Copyright 2024 Tomas Glozar ++# ++"""tuned sysinfo module""" ++import shutil ++import subprocess ++import sys ++import libxml2 ++from rteval.Log import Log ++ ++TUNED_ADM = "tuned-adm" ++TUNED_LOG_PATH = "/var/log/tuned/tuned.log" ++TUNED_VERIFY_START_LINE = "INFO tuned.daemon.daemon: verifying " \ ++ "profile(s): realtime" ++ ++ ++def tuned_present(): ++ """ ++ Checks if tuned is present on the system ++ :return: True if tuned is present, False otherwise ++ """ ++ return shutil.which(TUNED_ADM) is not None ++ ++ ++def tuned_active_profile(): ++ """ ++ Gets tuned active profile. ++ :return: Tuned profile (as a string) or "unknown" ++ """ ++ try: ++ result = subprocess.check_output([TUNED_ADM, "active"]) ++ except (OSError, subprocess.CalledProcessError): ++ return "unknown" ++ result = result.decode("utf-8") ++ split_result = result.split(": ") ++ if len(split_result) < 2: ++ return "unknown" ++ return split_result[1].strip() ++ ++ ++def tuned_verify(): ++ """ ++ Verifies if tuned profile is applied properly ++ :return: "success", "failure" or "unknown" ++ """ ++ try: ++ result = subprocess.run([TUNED_ADM, "verify"], ++ stdout=subprocess.PIPE, check=False).stdout ++ except (OSError, subprocess.CalledProcessError): ++ return "unknown" ++ result = result.decode("utf-8") ++ if result.startswith("Verification succeeded"): ++ return "success" ++ if result.startswith("Verification failed"): ++ return "failure" ++ return "unknown" ++ ++ ++def tuned_get_log(): ++ """ ++ Read entries related to last profile verification from tuned log ++ :return: List of strings containing the entires, or None if no ++ verification is found in the log ++ """ ++ try: ++ with open(TUNED_LOG_PATH, "r", encoding="utf-8") as file: ++ lines = file.readlines() ++ # Find start of last verification ++ start = None ++ for i in reversed(range(len(lines))): ++ if TUNED_VERIFY_START_LINE in lines[i]: ++ start = i ++ break ++ if start is None: ++ return None ++ return lines[start:] ++ except OSError: ++ return None ++ ++ ++class TunedInfo: ++ """ ++ Gather information about tuned and make an XML report. ++ Collected information: ++ - whether tuned is present ++ - which tuned profile is active ++ - whether the tuned profile is applied correctly ++ - if not applied correctly, collect relevant info from log ++ """ ++ def __init__(self, logger=None): ++ self.__logger = logger ++ ++ def __log(self, logtype, msg): ++ if self.__logger: ++ self.__logger.log(logtype, msg) ++ ++ def tuned_state_get(self): ++ """ ++ Gets the state of tuned on the machine ++ :return: A dictionary describing the tuned state ++ """ ++ result = { ++ "present": tuned_present() ++ } ++ if not result["present"]: ++ self.__log(Log.DEBUG, "tuned-adm not found; skipping tuned " ++ "sysinfo collection") ++ return result ++ result["active_profile"] = tuned_active_profile() ++ if result["active_profile"] == "unknown": ++ self.__log(Log.DEBUG, "could not retrieve tuned active profile") ++ return result ++ result["verified"] = tuned_verify() ++ if result["verified"] == "unknown": ++ self.__log(Log.DEBUG, "could not verify tuned state") ++ if result["verified"] == "failure": ++ # Include log to see cause to failure ++ result["verification_log"] = tuned_get_log() ++ ++ return result ++ ++ def MakeReport(self): ++ """ ++ Create XML report ++ :return: libxml2 node containing the report ++ """ ++ tuned = self.tuned_state_get() ++ ++ rep_n = libxml2.newNode("Tuned") ++ rep_n.newProp("present", str(int(tuned["present"]))) ++ for key, value in tuned.items(): ++ if key == "present": ++ continue ++ child = libxml2.newNode(key) ++ if key == "verification_log": ++ if value is None: ++ self.__log(Log.WARN, "could not get verification log") ++ continue ++ for line in value: ++ #