aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
10 daysCreate rteval-3.8HEADmainJohn Kacur1-1/+1
Create rteval-3.8 Signed-off-by: John Kacur <jkacur@redhat.com>
13 daysrteval: stress-ng: Use inherited method to set exclusive moduleJohn Kacur2-1/+6
Add the method set_exclusive() in the rtevalModuleProtype and use it in stress-ng instead of setting the variable directly Signed-off-by: John Kacur <jkacur@redhat.com>
2024-05-02rteval: Use get instead of setdefault for calculating rangeJohn Kacur2-2/+2
As Crystal Wood <crwood@redhat.com> points out, there is no need to setdefault when calculating the range, just use get if there is no value. Signed-off-by: John Kacur <jkacur@redhat.com>
2024-05-01rteval: cyclictest.py: reduce: Fix exception with missing samplesCrystal Wood1-1/+1
If cyclictest omits a line of zeroes rather than printing it, __samples[high] will not exist (rather than be zero). Handle this in preparation for cyclictest doing this. Note that get() seems more suitable than setdefault(), but the latter is used in order to match the code in timerlat.py. Signed-off-by: Crystal Wood <crwood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-29rteval: Make output work with new dmiinfo formatTomas Glozar1-7/+7
Commit 43c45ba7 ("rteval: Implement initial dmidecode support") re-introduced DMI information into rteval XML summary, but in a different format, which is not correctly picked up in rteval_text.xsl for formatting BIOS and vendor information into rteval text output. This lead to the information not being displayed correctly: Model: - BIOS version: (ver: , rev :, release date: ) Modify the relevant section of rteval_text.xsl to make it understand the new format. Also, adjust the incorrect spacing around "rev". New output (in QEMU VM): Model: QEMU - Standard PC (Q35 + ICH9, 2009) BIOS version: SeaBIOS (ver: 1.16.3-1.fc39, rev: 0.0, release date: 04/01/2014) Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-29rteval: Generate raw histogram data for an existing timerlat reportJohn Kacur1-1/+28
Generate raw histogram data for an existing timerlat report. Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-26rteval: Add summary reporting for timerlatJohn Kacur2-4/+100
This adds an rteval section to the xsl file and generates a timerlat report at the end of a run. To use it edit your rteval.conf file to comment out cyclictest and uncomment timerlat Another interesting thing you can do is uncomment both of them and get a report from both in one run. You can also use this with the summary report, for example rteval -Z rteval-20240426-3/summary.xml will work with timerlat now. (or both cyclictest and timerlat at the same time.) Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-26rteval: Use -j with make mrproperCrystal Wood1-1/+1
This reduces the startup overhead somewhat. Signed-off-by: Crystal Wood <crwood@redhat.com>
2024-04-25rteval: timerlat.py Add statistics and generate xmlJohn Kacur1-7/+259
This adds calculating statitics such as samples (count), min, max, mean, median, mode, range, absolute and standard deviations to xml Currently it combines the kernel thread, IRQs and userspace threads into one statistic like it does with cyclictest, but in the future we can separate this out too. To see this functioning from git, do this, su -c 'python rteval/modules/measurement/timerlat.py ' Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-25rteval: cyclictest.py: Fix the median calculationJohn Kacur1-6/+14
Fix the calculation of the median in rteval for cyclictest Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-19rteval: cyclictest.py: Remove unused method sampleJohn Kacur1-6/+0
Remove the unused method sample() in class RunData Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-18rteval: cyclictest.py: Fix the description in the xml reportJohn Kacur1-2/+2
If the __type is 'system' we should add the description to the xml The output should be something like this <system description="(12 cores) Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz"> Before this fix it was <system description=""> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-12rteval: Add rtla timerlat as a measurement moduleJohn Kacur2-0/+132
This is the first step to adding timerlat as a measurement module With this change you can run timerlat as a standalone rteval file like this (as root) python rteval/modules/measurement/timerlat.py You can also modify your rteval.conf to list timerlat in the [measurement] section, for example like this [measurement] cyclictest: module timerlat: module and then both measurement moduels will be run from rteval, for example rteval -D -d5m --measurement-cpulist=1-5 Will run rteval with Debug info, for 5m and cyclictest and timerlat will run on cpus 1-5 and load modules will run on the other available cpus. Currently MakeReport just prints to standard out the same information that timerlat outputs, in otherwords, there is no processing into xml yet. Also, there is no way to invoke tracing at the time, but that will be added soon! Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-12rteval: Cyclictest.py: Make standalone file work againJohn Kacur1-11/+8
Make standalone Cyclictest.py work again for testing purposes - remove unused parse_cpulist_from_config - Instead of "import as", use "from" and the requested functionality - Obtain the default buckets from the ModuleParameters to use if a number is not otherwise provided - set the cpulist to "" if not otherwise provided - add a few docstrings to functions - obtain a default cpulist from online_cpus for the standalone test Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-05rteval: Add relative cpulists for loadsTomas Glozar1-7/+10
Relative cpulists were added for measurements in 64ce7848 ("rteval: Add relative cpulists for measurements"). It was observed since that this feature would also be useful for load cpulists, for example when the measurements are performed externally and rteval is only used to run loads. Add support for relative cpulists also for loads. This works the same way as for measurements using parse_cpulist_from_config, only difference is there is no --loads-run-on-isolcpus option. That is, --loads-cpulist now also takes lists with addition (+) and removal (-) of CPUs against the default list, e.g. +0,1,-7,8. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-02rteval: Remove 30 second "settling" periodCrystal Wood1-2/+0
Waiting for 30 seconds for loads to "settle down" adds unneccesary delay to very short runs, besides being a giant hack. Load modules already have the opportunity to do setup beforehand. Even if there are a few seconds before the loads get to their expected "heaviness", that shouldn't meaningfully affect the output except for: - very short runs where you either - don't care about the latency because you're debugging rteval itself, or - are debugging a latency that reliably shows quickly, in which case consistent behavior is enough - latency spikes that only show up during load startup activity, in which case measuring it is a good thing - minimum latency values, which are not really the point of rteval. ...and the 30 second delay is *especially* useless if loads are disabled. Currently there's no official way to do that (as far as I can find), but it can be done by disabling all but stressng in the conf file, and not supplying stressng options on the command line. Signed-off-by: Crystal Wood <crwood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-04-02rteval: Break out of main loop faster on interrupt/stoptimeCrystal Wood1-6/+5
Waiting up to a full minute for rteval to stop on ctrl-c can be frustrating. Likewise, if a very short run is requested (e.g. for testing rteval itself) rounding it up to a minute is not polite. Signed-off-by: Crystal Wood <crwood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-03-28rteval: kcompile: Fix path lookups in _remove_build_dirsCrystal Wood1-3/+2
- Use the actual source directory rather than the incorrect kernel* to match what the tarball generates - Use glob to expand the node* wildcard - Fix the incorrect variable name in the error message Signed-off-by: Crystal Wood <crwood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-03-28rteval: default_config_search: Return None on failureCrystal Wood2-2/+2
If False is used without checking, it will be interpreted as stdin, hanging rteval waiting for input. OTOH, None will cause os.path.exists() to throw an exception, so we need to check both the name and the existence separately anyway. However, this is a better failure mode than hanging on stdin if the user of the filename fails to check both. Signed-off-by: Crystal Wood <crwood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-03-28rteval: Remove XML-RPC serverTomas Glozar71-9604/+2
Remove code for rteval XML-RPC server and client as well as associated modules (rtevalMailer). The code was disabled in 2d547eb6 ("rteval: Disable options for remote xmlrpc server"). Also remove all references to the functionality in documentation except for author credits. Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2024-03-19rteval: Implement initial dmidecode supportTomas Glozar3-64/+118
Previously rteval used python-dmidecode to gather DMI data from a system. Since python-dmidecode is without a maintainer, its support was removed in d142f0d2 ("rteval: Disable use of python-dmidecode"). Add get_dmidecode_xml() function into rteval/sysinfo/dmi.py that does simple parsing of dmidecode command-line tool output without any structure changes and include it into the rteval report. Notes: - ProcessWarnings() in rteval.sysinfo.dmi was reworked into a class method of DMIinfo and to use the class's __log field as logger. It now also does not ignore warnings that appear when running rteval as non-root, since that is no longer supported. Additionally, a duplicate call in rteval-cmd was removed. - rteval/rteval_dmi.xsl XSLT template was left untouched and is currectly not used. In a future commit, it is expected to be rewritten to transform the XML format outputted by get_dmidecode_xml() into the same format that was used with python-dmidecode. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-02-13rteval: More formatting using f-string changes for readabilityJohn Kacur2-39/+39
More formatting using f-string changes for readability Signed-off-by: John Kacur <jkacur@redhat.com>
2024-01-23rteval: Add Dockerfile READMEChris White1-0/+49
Add README.md for Docker setup, covering build and test instructions in a containerized environment. Signed-off-by: Chris White <chwhite@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-01-23rteval: Add interactive source-to-image DockerfileChris White2-0/+70
This Dockerfile sets up a base image for rteval, copies the code, and installs it, providing an interactive container for testing rteval directly. Signed-off-by: Chris White <chwhite@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-01-18rteval: Add relative cpulists for measurementsTomas Glozar5-61/+90
Instead of specifying an absolute list of CPUs to run measurements on in --measurement-cpulist, implement an option to specify a relative list with respect to the current cpuset of rteval. The relative cpulist can include CPUs both for addition and for removal, e.g. +0,1,-7,8. Also move the logic for processing cpulists specified by the user as a string into cpulists usable by rteval to a single function. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2024-01-18rteval: Convert CpuList class to a moduleTomas Glozar9-181/+177
Move out code from CpuList class in rteval.systopology into a separate module named rteval.cpulist_utils and avoid wrapping CPU lists in a CpuList object. Almost all uses of CpuList in the code either use the static methods of the class or its constructor to filter online CPUs by running CpuList(...).cpulist. The only exception to this are NumaNode and SimNumaNode classes in systopology; these store a CpuList object, however their .getcpulist() method extracts the list out. Thus, the class is completely unnecessary. Note: A better name for the module would be cpulist, consistent with the original name of the class, but this name is already used for variables throughout the code, hence cpulist_utils is used instead. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-20rteval: Disable use of python-dmidecodeJohn Kacur3-17/+2
python-dmidecode is not being maintained upstream. For now just disable it's use in rteval since it is useful but not essential information for running rteval In the future look at generating this info directly using dmidecode. Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-20rteval: Makefile: More rpm cleanupsJohn Kacur1-8/+3
Afer having removed the upstream specfile, there were still a few references to rpms in the Makefile. These are not necessary because any work with rpms can be done with modern rpm tools and are typically done by distributions Also test whether directory 'run' exists since it may have been removed by make realclean, and create it if it does not Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-15rteval: systopology: Fix incorrect test to invert a cpulistJohn Kacur1-1/+2
Fix incorrect test of invert_cpulist in rteval/systopology Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-15rteval: Minor improvements to CpuList classTomas Glozar1-14/+15
- Remove unnecessary if-else from online_file_exists - Use cpupath in online_file_exists - In is_online, remove check for n in cpuset and make it static - Mark also the remaining methods static since they do not rely on any fields of the class Signed-off-by: Tomas Glozar <tglozar@redhat.com> - Removed incorrect line from commit message Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-11rteval: Refactor collapse_cpulist in systopologyTomas Glozar5-56/+30
Instead of having duplicate code in two functions, one top-level and one member function of CpuList, have only one static function in CpuList. Additionally re-write the implementation to use a more straight forward one-pass algorithm. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-11-13rteval: Remove upstream spec fileJohn Kacur2-521/+0
Specfiles should be maintained by distributions and not in the upstream code. In practice they are not maintained upstream except for version numbers, so just remove the specfile. This also moves a lot of functionality around rpms in the Makefile, but this functionality exists in tools such as rpmbuild and friends anyway. Signed-off-by: John Kacur <jkacur@redhat.com>
2023-11-09rteval: Change the default kernel for kcompile to linux-6.6.1John Kacur3-4/+4
Change the default kernel for kcompile to linux-6.6.1 Signed-off-by: John Kacur <jkacur@redhat.com>
2023-10-03rteval: Update version to v3.7v3.7John Kacur2-2/+2
Update version to v3.7 Signed-off-by: John Kacur <jkacur@redhat.com>
2023-09-13rteval: Support run-on-isolcpus in cyclictestTomas Glozar1-2/+10
If --measurement-run-on-isolcpus is enabled, add isolated CPUs to the cpumask for the case when --measurement-cpulist is not specified. If both options are specified, display a warning. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-09-13rteval: Add run_on_isolcpus option to measurementsTomas Glozar1-3/+14
Add option --measurement-run-on-isolcpus for the user to specify to include isolcpus in the default cpulist (without --measurement-cpulist). A default value might also be specified in rteval.conf: [measurement] run-on-isolcpus: true Note that values different from true evaluate as false. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-09-13rteval: Allow arguments specific to module groupTomas Glozar1-8/+10
Return grparser from ModuleContainer.SetupModuleOptions, which allows it to be used to setup additional options in *Modules class. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-08-31rteval: return empty string in compress_cpulist for an empty listJohn Kacur1-0/+2
If an empty list is passed to the function compress_cpulist in systopology.py, return an empty string, or else an IndexError will be triggered. Signed-off-by: John Kacur <jkacur@redhat.com>
2023-08-14rteval: Add SPDX-License-Identifier to rtevalEder Zulian86-1055/+87
Add the SPDX-License-Identifier tag to Makefile. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to stressng.py Add the SPDX-License-Identifier tag to stressng.py. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval_dmi.xsl Add the SPDX-License-Identifier tag to rteval_dmi.xsl. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval_histogram_raw.xsl Add the SPDX-License-Identifier tag to rteval_histogram_raw.xsl. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval_text.xsl Add the SPDX-License-Identifier tag to rteval_text.xsl. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to cmdline.py Add the SPDX-License-Identifier tag to cmdline.py. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to newnet.py Add the SPDX-License-Identifier tag to newnet.py. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to Logger.py Add the SPDX-License-Identifier tag to Logger.py. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to gen_config.sh Add the SPDX-License-Identifier tag to gen_config.sh. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to delta-1.0_1.1.sql Add the SPDX-License-Identifier tag to delta-1.0_1.1.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to delta-1.1_1.2.sql Add the SPDX-License-Identifier tag to delta-1.1_1.2.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to delta-1.2_1.3.sql Add the SPDX-License-Identifier tag to delta-1.2_1.3.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to delta-1.3_1.4.sql Add the SPDX-License-Identifier tag to delta-1.3_1.4.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to delta-1.4_1.5.sql Add the SPDX-License-Identifier tag to delta-1.4_1.5.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval-1.0.sql Add the SPDX-License-Identifier tag to rteval-1.0.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval-1.1.sql Add the SPDX-License-Identifier tag to rteval-1.1.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval-1.2.sql Add the SPDX-License-Identifier tag to rteval-1.2.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval-1.3.sql Add the SPDX-License-Identifier tag to rteval-1.3.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval-1.4.sql Add the SPDX-License-Identifier tag to rteval-1.4.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to rteval-1.5.sql Add the SPDX-License-Identifier tag to rteval-1.5.sql. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to unittest.py Add the SPDX-License-Identifier tag to unittest.py. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Add SPDX-License-Identifier tag to setup.py Add the SPDX-License-Identifier tag to setup.py. As this file does not contain direct license references it falls under the project license, i.e., GPL v2 or later. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rteval-cmd Replace GPL boilerplate with SPDX-License-Identifier tag in rteval-cmd. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in Log.py Replace GPL boilerplate with SPDX-License-Identifier tag in Log.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in __init__.py Replace GPL boilerplate with SPDX-License-Identifier tag in __init__.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in __init__.py Replace GPL boilerplate with SPDX-License-Identifier tag in __init__.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in __init__.py Replace GPL boilerplate with SPDX-License-Identifier tag in __init__.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in hackbench.py Replace GPL boilerplate with SPDX-License-Identifier tag in hackbench.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in kcompile.py Replace GPL boilerplate with SPDX-License-Identifier tag in kcompile.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in configparser.h Replace GPL boilerplate with SPDX-License-Identifier tag in configparser.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in __init__.py Replace GPL boilerplate with SPDX-License-Identifier tag in __init__.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_nullsafe.c Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_nullsafe.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in cyclictest.py Replace GPL boilerplate with SPDX-License-Identifier tag in cyclictest.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_nullsafe.h Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_nullsafe.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in sysstat.py Replace GPL boilerplate with SPDX-License-Identifier tag in sysstat.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_values.c Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_values.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rtevalConfig.py Replace GPL boilerplate with SPDX-License-Identifier tag in rtevalConfig.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_values.h Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_values.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rtevalMailer.py Replace GPL boilerplate with SPDX-License-Identifier tag in rtevalMailer.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_values_struct.h Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_values_struct.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rtevalReport.py Replace GPL boilerplate with SPDX-License-Identifier tag in rtevalReport.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_xml.c Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_xml.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rtevalXMLRPC.py Replace GPL boilerplate with SPDX-License-Identifier tag in rtevalXMLRPC.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in eurephia_xml.h Replace GPL boilerplate with SPDX-License-Identifier tag in eurephia_xml.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rtevalclient.py Replace GPL boilerplate with SPDX-License-Identifier tag in rtevalclient.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in log.c Replace GPL boilerplate with SPDX-License-Identifier tag in log.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in __init__.py Replace GPL boilerplate with SPDX-License-Identifier tag in __init__.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in log.h Replace GPL boilerplate with SPDX-License-Identifier tag in log.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in cputopology.py Replace GPL boilerplate with SPDX-License-Identifier tag in cputopology.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in parsethread.c Replace GPL boilerplate with SPDX-License-Identifier tag in parsethread.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in dmi.py Replace GPL boilerplate with SPDX-License-Identifier tag in dmi.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in parsethread.h Replace GPL boilerplate with SPDX-License-Identifier tag in parsethread.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in kernel.py Replace GPL boilerplate with SPDX-License-Identifier tag in kernel.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in pgsql.c Replace GPL boilerplate with SPDX-License-Identifier tag in pgsql.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in memory.py Replace GPL boilerplate with SPDX-License-Identifier tag in memory.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in pgsql.h Replace GPL boilerplate with SPDX-License-Identifier tag in pgsql.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in osinfo.py Replace GPL boilerplate with SPDX-License-Identifier tag in osinfo.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rteval-parserd.c Replace GPL boilerplate with SPDX-License-Identifier tag in rteval-parserd.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in services.py Replace GPL boilerplate with SPDX-License-Identifier tag in services.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in statuses.h Replace GPL boilerplate with SPDX-License-Identifier tag in statuses.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in tools.py Replace GPL boilerplate with SPDX-License-Identifier tag in tools.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in threadinfo.h Replace GPL boilerplate with SPDX-License-Identifier tag in threadinfo.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in systopology.py Replace GPL boilerplate with SPDX-License-Identifier tag in systopology.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in xmlparser.c Replace GPL boilerplate with SPDX-License-Identifier tag in xmlparser.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in version.py Replace GPL boilerplate with SPDX-License-Identifier tag in version.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in xmlparser.h Replace GPL boilerplate with SPDX-License-Identifier tag in xmlparser.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in xmlout.py Replace GPL boilerplate with SPDX-License-Identifier tag in xmlout.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in xmlparser.xsl Replace GPL boilerplate with SPDX-License-Identifier tag in xmlparser.xsl. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in Makefile.am Replace GPL boilerplate with SPDX-License-Identifier tag in Makefile.am. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in remove_rtevalrun Replace GPL boilerplate with SPDX-License-Identifier tag in remove_rtevalrun. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in apache-rteval-wsgi.conf.tpl Replace GPL boilerplate with SPDX-License-Identifier tag in apache-rteval-wsgi.conf.tpl. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rteval_testserver.py Replace GPL boilerplate with SPDX-License-Identifier tag in rteval_testserver.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in apache-rteval.conf.tpl Replace GPL boilerplate with SPDX-License-Identifier tag in apache-rteval.conf.tpl. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rteval_xmlrpc.py Replace GPL boilerplate with SPDX-License-Identifier tag in rteval_xmlrpc.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in configure.ac Replace GPL boilerplate with SPDX-License-Identifier tag in configure.ac. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rteval_xmlrpc.wsgi Replace GPL boilerplate with SPDX-License-Identifier tag in rteval_xmlrpc.wsgi. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in database.py Replace GPL boilerplate with SPDX-License-Identifier tag in database.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in rtevaldb.py Replace GPL boilerplate with SPDX-License-Identifier tag in rtevaldb.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in Makefile.am Replace GPL boilerplate with SPDX-License-Identifier tag in Makefile.am. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in testclient.py Replace GPL boilerplate with SPDX-License-Identifier tag in testclient.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in argparser.c Replace GPL boilerplate with SPDX-License-Identifier tag in argparser.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in testclient_sendreportfile Replace GPL boilerplate with SPDX-License-Identifier tag in testclient_sendreportfile. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in argparser.h Replace GPL boilerplate with SPDX-License-Identifier tag in argparser.h. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in xmlrpc_API1.py Replace GPL boilerplate with SPDX-License-Identifier tag in xmlrpc_API1.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in configparser.c Replace GPL boilerplate with SPDX-License-Identifier tag in configparser.c. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> rteval: Replace GPL license notice with SPDX tag in unittest.py Replace GPL boilerplate with SPDX-License-Identifier tag in unittest.py. Signed-off-by: Eder Zulian <ezulian@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-08-08rteval: Correct Python version in doc/rteval.txtTomas Glozar1-1/+1
doc/rteval.txt specifies that rteval is a Python 2.x program. This is not true, since rteval no longer works with Python 2.x: $ python2 rteval-cmd File "rteval-cmd", line 67 print(f"Don't know how to summarize {repfile} (tarfile open failed)") ^ SyntaxError: invalid syntax Replace "Python 2.x" with "Python 3.x". Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-07-26rteval: Add missing docstrings in SysTopologyTomas Glozar1-0/+2
Add docstrings for isolated_cpus_str and default_cpus_str. Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2023-07-25rteval: Exclude isolcpus from loads reportTomas Glozar2-2/+2
Use SysTopology.default_cpus() to report cores on which measurements and loads and run by default to reflect the default behavior (no isolcpus). Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2023-07-25rteval: Fix CPU count calculation for hackbenchTomas Glozar1-1/+5
Use count from cpulist when specified and all CPUs on node excluding offline ones and isolated ones if not specified. Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2023-07-25rteval: Exclude isolcpus from stressng by defaultTomas Glozar1-0/+5
Note: this has little effect now, because the cpus variables is only used for removing empty nodes unless a cpulist is specified by the user. However, this can change in the future. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-07-25rteval: Exclude isolcpus from kcompile by defaultTomas Glozar1-2/+6
Allows correct calculation of make job count that does not include isolated CPUs, on which the loads won't be scheduled. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-07-25rteval: Report isolated CPUsTomas Glozar2-0/+15
Add a flag for whether a CPU is isolated in CPUtopology and display the number of isolated CPUs in text report. Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-07-25rteval: Detect isolcpus in systopologyTomas Glozar1-0/+47
Works similarly to online_cpus: - add CpuList.isolated_cpulist to filter isolated CPUs - add SysTopology.isolated_cpus to get list of isolated CPUs - add CpuList.nonisolated_cpulist to do the opposite filter - add SysTopology.default_cpus to get CPUs that are used for scheduling by default, i.e. online and non-isolated CPUs Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-30Edited code from previous commit to exclude try-except blockAnubhav Shelat1-5/+1
Edited code, from previous commit that allowed -S to download kernel versions of the form x.y, to use an improved regular expression and remove an unecessary try/except block Signed-off-by: Anubhav Shelat <ashelat@redhat.com> - Modified comment Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-30Fixed bug in kcompile where run would fail if kcompile-source version had ↵Anubhav Shelat1-2/+2
the form x.y instead of x.y.z Fixed bug in kcompile where run would fail if kcompile-source version had the form x.y instead of x.y.z Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-28rteval/server: edited files to use optparse instead of argparseAnubhav Shelat3-14/+13
rteval/server: edited files to use optparse instead of argparse. Note: Since server is disabled, these changes have not been tested. Signed-off-by: Anubhav Shelat <ashelat@redhat.com> - Fixed spelling in commit comments Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-28rteval: fixed commentsAnubhav Shelat3-4/+4
rteval-cmd: fixed typo __init__.py, rtevalConfig: changed comments to use argparse instead of optparse Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-28rteval: added code to download default kernel version if no version is specifiedAnubhav Shelat1-1/+9
Previously, the usuage was "./rteval-cmd -S [KERNEL_VERSION]", and rteval-cmd would throw an error if no kernel version was provided. Now, rteval-cmd will download the default kernel version, as specified in rteval/modules/loads/kcompile.py. Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-28rteval-cmd: added code to handle downloading kernel versions of the x.xAnubhav Shelat1-1/+5
rteval-cmd: added code to handle downloading kernel versions of the x.x Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-28rteval: Changed files to use argparse library instead of optparseAnubhav Shelat5-53/+70
Replaced optparse.OptionParser() with argparse.ArgumentParser() and optparse.add_options() with argparse.add_arguments(). Added/changed code to assign the cmd_opts and cmd_args variables in rteval-cmd correctly to get the -Z/--summarize and -H/--raw-histogram working correctly. Note: the rteval/server files haven't been tested since server is disabled. Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-21rteval: osinfo.py: Added code to use 'sos report' instead of sosreport.Anubhav Shelat1-4/+6
sosreport is deprecated, so if available on the system osinfo will try to use the sos command instead. Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-12rteval: Use f-strings in tools.pyAnubhav Shelat1-1/+1
Use f-strings in tools.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-12rteval: Use f-strings in services.pyAnubhav Shelat1-6/+6
Use f-strings in services.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-12rteval: Use f-strings in osinfoAnubhav Shelat1-6/+6
Use f-strings in osinfo.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-12rteval: Use f-strings in memory.pyAnubhav Shelat1-4/+4
Use f-strings in memory.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-12rteval: Use f-strings in kernel.pyAnubhav Shelat1-2/+2
Use f-strings in kernel.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-12rteval: Use f-strings in cputopologyAnubhav Shelat1-3/+1
Use f-strings in cputopology Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-06Added code to check if the proc/net/if_inet6 file exists while loading IPv6 ↵Anubhav Shelat1-12/+16
addresses in the IPv6Addresses class Added code to check if the proc/net/if_inet6 file exists while loading IPv6 addresses in the IPv6Addresses class. If it doesn't, then the system has IPv6 disabled, and that chunk of code is passed. Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-05rteval: Use f-strings in rtevalConfigAnubhav Shelat1-1/+1
Use f-strings in rtevalConfig.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-06-05rteval: Use f-strings in rtevalclient.pyAnubhav Shelat1-1/+1
Use f-strings in rtevalclient.py Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2023-05-26rteval: Fix the unit test in osinfoJohn Kacur1-1/+1
Fix the unit test in osinfo The unit test will fail if /var/log/dmesg doesn't exist. However, the copy_dmesg method in the OSInfo Class will just return if the file doesn't exist. Fix the unit test by mimicing this behaviour by continuing if the /var/log/dmesg doesn't exist. Signed-off-by: John Kacur <jkacur@redhat.com>
2023-02-17rteval: Update version number to v3.6v3.6John Kacur2-2/+2
Update version number to v3.6 Signed-off-by: John Kacur <jkacur@redhat.com>
2023-02-17rteval: setup: Remove distutils and clean-upsJohn Kacur1-12/+15
Replace deprecated distutils with sysconfig and setuptools Clean-up a few other things in the file at the same time, such as the incorrect outdated git url. Signed-off-by: John Kacur <jkacur@redhat.com>
2023-02-17rteval: Use sysconfig instead of deprecated distutilsJohn Kacur1-2/+7
Use sysconfig instead of deprecated distutils to add the rteval directory to the module search path. Signed-off-by: John Kacur <jkacur@redhat.com>
2023-02-03rteval: Change the default kernel to compile to linux-6.1.8John Kacur3-4/+4
rteval compiles the linux kernel as a load Change the default kernel that rteval compiles to linux-6.1.8 Signed-off-by: John Kacur <jkacur@redhat.com>
2023-02-02rteval: Catch failures in python-dmidecodeJohn Kacur1-1/+13
python-dmidecode can generate incorrect xml, namely Attribute unit redefined Although useful, the dmidecode is not critical to rteval reporting. Therefore catch this, and first see if we can at least query the bios. If that works report the bios instead of all, and if that doesn't work, just continue without the dmidecode report. Signed-off-by: John Kacur <jkacur@redhat.com>
2022-12-06rteval: Log.py: Convert to f-stringsJohn Kacur1-6/+3
Convert Log.py to f-strings Signed-off-by: John Kacur <jkacur@redhat.com>
2022-12-06rteval: xmlout.py: Convert to f-strings where possibleJohn Kacur1-5/+5
Convert xmlout.py to f-strings where possible Signed-off-by: John Kacur <jkacur@redhat.com>
2022-11-09rteval: rtevalConfig.py: Convert regular strings to f-stringsJohn Kacur1-5/+5
Convert regular strings to f-strings in rtevalConfig.py Signed-off-by: John Kacur <jkacur@redhat.com>
2022-11-09rteval: rtevalXMLRPC.py: Convert regular strings to f-stringsJohn Kacur1-20/+14
Convert regular strings to f-strings in rtevalXMLRPC.py Signed-off-by: John Kacur <jkacur@redhat.com>
2022-11-09rteval: rtevalReport.py: Convert regular strings to f-stringsJohn Kacur1-3/+3
Convert regular strings to f-strings in rtevalReport.py Signed-off-by: John Kacur <jkacur@redhat.com>
2022-11-09rteval: rteval/__init__.py: Convert regular strings to f-stringsJohn Kacur1-17/+15
Convert regular strings to f-strings in __init__.py Signed-off-by: John Kacur <jkacur@redhat.com>
2022-10-27rteval: Don't attempt to get DMIinfo if there are dmi warningsJohn Kacur3-16/+24
If the python module dmidecode is available, but produces warnings, you can get a traceback. This happens on some arm boxes, as shown in the traceback below. Fix this by treating any warnings that are not listed in the ignorable warnings as if dmi info is not available. Also add logging to dmi.ProcessWarnings() ./rteval-cmd -d10s ** DMI WARNING ** /sys/firmware/efi/systab: SMBIOS entry point missing got system topology: 1 node system (4 cores per node) rteval run on 5.19.16-200.fc36.aarch64 started at Fri Oct 21 16:11:51 2022 started 3 loads on 4 cores started measurement threads on 4 cores Run duration: 10.0 seconds stopping run at Fri Oct 21 16:13:26 2022 Traceback (most recent call last): File "/root/src/rteval/./rteval-cmd", line 402, in <module> ec = rteval.Measure() File "/root/src/rteval/rteval/__init__.py", line 286, in Measure self._report(measure_start, self.__rtevcfg.xslt_report) File "/root/src/rteval/rteval/rtevalReport.py", line 76, in _report self.__xmlreport.AppendXMLnodes(self._sysinfo.MakeReport()) File "/root/src/rteval/rteval/sysinfo/__init__.py", line 69, in MakeReport report_n.addChild(dmi.DMIinfo.MakeReport(self)) File "/root/src/rteval/rteval/sysinfo/dmi.py", line 111, in MakeReport dmiqry = xmlout.convert_libxml2_to_lxml_doc(self.__dmixml.QuerySection('all')) File "/usr/lib64/python3.10/site-packages/dmidecode.py", line 64, in QuerySection ret = libxml2.xmlDoc( _obj = xmlapi(query_type='s', RuntimeError: [src/dmidecodemodule.c:331] Error decoding DMI data ** COLLECTED WARNINGS ** /sys/firmware/efi/systab: SMBIOS entry point missing ** END OF WARNINGS ** Signed-off-by: John Kacur <jkacur@redhat.com>
2022-10-10rteval: Replace python-ethtool with inline codeJohn Kacur3-118/+227
This patch adds the file newnet.py to replace the use of python-ethtool The information it generates will appear in the summary.xml You can also test the functionality by running python rteval/sysinfo/newnet.py Signed-off-by: John Kacur <jkacur@redhat.com> - V2 Add SPDX license identifier Signed-off-by: John Kacur <jkacur@redhat.com>
2022-09-29rteval: Fix "DMI WARNING" when not running as rootJohn Kacur2-25/+26
In some cases it is not necessary to run as root, for example when running -Z (--summarize) to summarize an existing report. In such cases we do not want to see the message: ** DMI WARNING ** Failed to open memory buffer (/dev/mem): Permission denied The fix here is to surpresses that message. In addition: - the unused "config" option to DMIinfo.__init__ is removed - A few strings are converted to f-strings - "with" is used to open the xsltfile Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-16rteval: Update version number to v3.5v3.5John Kacur2-2/+2
Update version number to v3.5 Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-16rteval: Use "with" for open of loadavgJohn Kacur1-4/+2
- Use "with" for open of loadavg - Remove pointless comment Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-16rteval: Add measurement and load location to run reportLeah Leshchinsky3-1/+26
The run report produced at the end of a run does not contain information on load and measurement thread locations. Adjust MakeReport() functions of LoadModules and MeasurementModules class so that new properties with number of loads and cpu information are added to the XML report and can be read by rteval_text.xsl. Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-11rteval: Move cpuinfo to systopology.py and delete misc.pyJohn Kacur3-117/+41
- Move the function cpuinfo() to systopology.py Since this is the last remaining use of misc - Delete misc.py to prevent it from being used again. Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-09rteval: Allow user to enter compressed cpu-lists, fix reportingJohn Kacur2-11/+32
Allow user to enter compressed cpu-lists (short form), that is 0-4 instead of 0,1,2,3,4 Fix reporting, make sure that early reports consider offline cpus For example If the user specifies su -c './rteval-cmd -d5s --loads-cpulist=2-4 --measurement-cpulist=0,9-11' but cpu3 has been turned off, then we should see the following started 3 loads on cores 2,4 started measurement threads on cores 0,9-11 and not started 3 loads on cores 2-4 So, to summarize the changes here 1. Allow user to input compressed cpulists 2. Fix reporting using the shortened form of the cpulists as well 3. Adds the method online_cpulist(self, cpulist) to SysTopology that returns the same list after removing offline cpus 4. converts one print to an f-string for --only-loads 5. Adds some more DEBUG messages Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-05rteval: Fix loads cpulist restrictionValentin Schneider3-3/+3
A recent batch of commits, one of them being: 39115f0a826d ("rteval: Make use of systopology instead of misc in hackbench") has made the loads modules use CpuList.expand_cpulist() (which produces a list(int)) instead of misc.expand_cpulist() (which produces a list(str)). However, the bits handling restricting CPU affinity based on a user argument still expects to handle a list(str), which results in: [DEBUG] [kcompile] node 0 has no available cpus, removing [...] [DEBUG] [hackbench] node 0 has no available cpus, removing Remove the leftover string casts. Cyclictest is unaffected. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-05rteval: enhancement to --kcompile-source option for kernel tarballManasi Godse1-4/+21
The --kcompile-source option is enhanced such that it can find the kernel source tarballs using the values as 'linux-5.18.1' , '5.18.1', 'linux-5.18.1.tar.xz' This eliminates the need to type the entire source filename as a value to the option. The enhancement will look for the tarballs in the loadsource directory. Signed-off-by: Manasi Godse <magodse@redhat.com> Reviewed-by: Leah Leshchinsky <lleshchi@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-04rteval: fix regex in kcompile to calculate patch number for kernel prefixManasi Godse1-1/+1
Updated the regular expression to find the kernel prefix of the source file. If there are kernel source files with the same major.minor version but different patch numbers, kcompile would pick up the first one that is listed based on the kernel prefix and ignore the patch number. Example: linux-5.17.11.tar.xz and linux-5.17.13.tar.xz. If 5.17.13 had to be tested, kcompile could pick up linux-5.17.11.tar.xz Signed-off-by: Manasi Godse <magodse@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-04rteval: restrict kernel source download with invalid file extensionsManasi Godse1-0/+4
If the user inputs an extension other than tar.xz or tar.gz to the -S or --source-download option, the program should exit. Signed-off-by: Manasi Godse <magodse@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-08-03rteval: cyclictest: Reset cpulist from newly calculated cpusJohn Kacur1-1/+3
After we recalculate self.__cpus to only include online cpus, we also need to reset the self.__cpulist which is the collapsed form of the list that we pass as parameters to cyclictest, otherwise we can potentially pass an offline cpu as a parameter to cyclictest which will then fail Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Make use of systopology instead of misc in cyclictestJohn Kacur1-31/+36
- Make use of systopology instead of misc in cyclictest - Use f-strings instead of regular strings - Use "with" for an open Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Make use of systopology instead of misc in stressng moduleJohn Kacur1-7/+8
- rteval: Make use of systopology instead of misc in stressng module - make use of f-strings instead of regular strings Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Make use of systopology instead of misc in kcompileJohn Kacur1-40/+46
- make use of systopology instead of misc in kcompile - use f-strings where necessary - Change """ to comment style # when not a docstring - Add docstrings to functions - Use python in (0, -2) for readability Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Make use of systopology instead of misc in hackbenchJohn Kacur1-16/+14
- Make use of systopology instead of misc in hackbench - Add a module docstring - Make use of f-strings Signed-off-by: John Kacur <jkacur@redhat.com> - Add missing "f" from f-string in __starton in hackbench.py Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Make use of systopology instead of misc in rteval-cmdJohn Kacur1-22/+23
- convert rteval-cmd to use methods / functions in systopology instead of misc. - strings converted to f-strings Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Create common functions in CpuList and SysTopologyJohn Kacur1-16/+74
The purpose is to remove functions out of misc and use the ones in the file systopolgy.py - Add function collapse_cpulist(cpulist) outside of the CpuList class - Make methods longest_sequence and expand_cpulist accesible outside of their class - Add function online_cpus(self) to class SysTopology - Add function online_cpus_str(self) to class SysTopology - Add function invert_cpulist(self, cpulist) to class SysTopology - Convert strings to f-strings for better readability - Add a few missing docstrings to methods / functions, module etc - Add a few more tests to the unit test TODO: CpuList is suited for use by SysTopology, but is not ideal for a generic CpuList. A more generally usable CpuList should be created Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-26rteval: Add man page entry for -S, --source-download optionManasi Godse1-0/+4
Update the man page for rteval kernel download option Signed-off-by: Manasi Godse <magodse@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-07-15rteval: Add option for downloading kernelManasi Godse2-0/+62
Added an option -S, --source-download to download a kernel source tarball from kernel.org to the appropriate loadsource directory. Acceptable strings for the kernel version are 'linux-5.18.1.tar.xz;, 'linux-5.18.1.tar.gz', 'linux-5.18.1', '5.18.1', 'linux-5.19-rc5'. Conditions have been added to check for default kernel packaged with rteval-loads and backing up the tarball if it already exists. This enhancement simplifies the manual downloading of kernel to the loadsource directory. Signed-off-by: Manasi Godse <magodse@redhat.com> Tested-by: Leah Leshchinsky <lleshchi@redhat.com> - Two small tweaks, non-standard "anyways" changed to "anyway", and added the words "and exit" to the end of the help option Signed-off-by: John Kacur <jkacur@redhat.com>
2022-06-28rteval: update version number to v3.4v3.4John Kacur2-2/+2
Update version number to v3.4 Signed-off-by: John Kacur <jkacur@redhat.com>
2022-06-07rteval: Change the default kernel to compile to linux-5.18.1John Kacur3-4/+4
rteval compiles the linux kernel as a load Change the default kernel that rteval compiles to linux-5.18.1 Signed-off-by: John Kacur <jkacur@redhat.com>
2022-06-03rteval: stressng: The stressng option should not be a stringJohn Kacur1-1/+2
When rteval passes stressng a timeout option, it should not be stringified. Signed-off-by: John Kacur <jkacur@redhat.com>
2022-06-03rteval: kcompile: Fix regular expression to match kernel prefixJohn Kacur1-1/+2
If the user specifies a kernel to compile as a load other than the default kernel, the kernel prefix is obtained with a regular expression. Currently the regular expression does not accomodate two digit numbers in the kernel version. Fix that regular expression to accomodate different kernel versions, with room to grow for the future. Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-06rteval: systopology.py: Use "with" for resource allocationJohn Kacur1-14/+16
- Use "with" with open Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-06rteval: cyclictest.py: Use "with" with resource allocationJohn Kacur1-8/+8
- Use "with" with open - Add a module docstring Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-06rteval: stressng.py: Remove unnecessary listJohn Kacur1-1/+1
Remove unnecessary word list around cpus.items() Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-06rteval: misc.py: Use "with" for resource allocationJohn Kacur1-11/+17
- Use "with" for resource allocation. - Add docstrings to the module and to functions Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-06rteval: rteval-cmd: Use "with" with openJohn Kacur1-7/+5
Use "with" for resource allocating operation open Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-03rteval: kcompile: Fix source tarball argument handlingValentin Schneider1-4/+7
Kcompile._WorkloadSetup() looks for a "tarball" and "tarfile" entry in the CfgSection, but I couldn't find a single setter for thoses. The only way for a user to specify a file is via --kcompile-source, which doesn't seem to be actually used by the module. Make Kcompile actually use --kcompile-source. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-05-03rteval: kcompile: Use systopology to get a list of cpus on a nodeJohn Kacur1-1/+1
kcompile gets a lists of cpus on a node but doesn't take into account whether the cpus are online or not. Instead of using the method in kcompile, use the method in systopology, since that will consider whether the cpus are online or not. Reported-by: Valentin Schneider <vschneid@redhat.com> Tested-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-04-29rteval: systopology: Fix offline NUMA node parsingValentin Schneider1-0/+4
An offline NUMA node will report in its cpulist an empty string. Unfortunately, "".split(sep=x) with x != None returns a list containing an empty string rather than an empty list, which causes CpuList._expand_cpulist() to try to run int(''), which ends up in the following exception: ValueError: invalid literal for int() with base 10: '' Prevent this by adding an early empty-string check. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-03-09rteval: Fix allmodconfig build on machines that don't allow sha1 signingJohn Kacur1-0/+1
rteval compiles the kernel using allmodconfig as a load. This can be a problem if sha1 signing of modules is disabled. Fix this by signing with sha512 Suggested-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2022-03-09rteval: Fix Popen for python3.6 where text=True is not availableJohn Kacur1-4/+4
Fix using text=True in Popen for python-3.6 by using encoding='utf-8' instead Signed-off-by: John Kacur <jkacur@redhat.com>
2022-02-14rteval: If the user doesn't specify a cpumask, use the inherited oneJohn Kacur1-0/+6
If the user doesn't specify a cpumask, then we need to use the inherited one to match what cyclictest currently does Signed-off-by: John Kacur <jkacur@redhat.com>
2022-02-07rteval: Don't restrict measurement threads to inherited cpumaskJohn Kacur1-11/+1
This patch reverses be811d28a471cfcaf7960289e00960e7f5b18f03 This patch syncs rteval to 795433f50f20ef7598db5cfe991b5386e4080d41 in rt-tests If the user does not specify a cpumask, rteval will still run on the cpus according to the cpumask inherited from the runtime environment. However, if the user specifies a cpumask, then it will overwrite the runtime environment where allowed. This will allow the user to run measurement threads on isolated cpus. Signed-off-by: John Kacur <jkacur@redhat.com>
2022-01-26rteval: Increase default buckets from 2000 to 3500John Kacur3-3/+3
Increase the default buckets from 2000 to 3500 With commit 0292c8963611 we skip statistics reporting if we run out of buckets. Increase the default number of buckets to make this less likely to occur. Signed-off-by: John Kacur <jkacur@redhat.com>
2022-01-14rteval: Fix test misses threshold assignmentJohn Kacur1-1/+1
Fix case where self.__cfg.threshold has a value but instead of 'threshold' in self.__cfg, 'breaktrace' in self.__cfg. by just checking whether self.__cfg.threshold has a value if self._cfg.breaktrace does not have a value Signed-off-by: John Kacur <jkacur@redhat.com>
2022-01-13rteval: update version number to v3.3v3.3John Kacur2-2/+2
Update version number to v3.3 Signed-off-by: John Kacur <jkacur@redhat.com>
2022-01-13rteval: Don't run hackbench by default on low memory systemsJohn Kacur1-1/+9
commit cb8263770e4f5834a43db6be8ffb55ffd7f876c9 Changed rteval to allow running on low memory systems by default because on some machines, such as certain Arm boards, it isn't a problem. However, on our automated testing systems it is causing problems. This patch disables running hackbench by default on a low memory system. In order to allow people to run on a lowmem system where this isn't a problem, this patch also creates the option --hackbench-runlowmem=True|False A user who wants hackbench to run in rteval on a low memory system, only needs to specify --hackbench-runlowmem=True Signed-off-by: John Kacur <jkacur@redhat.com>
2022-01-12rteval: Add --cyclictest-threshold=USECJohn Kacur1-2/+8
Add --cyclictest-threshold=USEC This option causes rteval to exit if latency is greater than USEC This is similar to --cyclictest-breaktrace=USEC and uses the --breaktrace option to cyclictest The difference is that --cyclictest-threshold does NOT write a tracemark when the latency is exceeded Signed-off-by: John Kacur <jkacur@redhat.com>
2021-12-10rteval: Change misc.py to be executableJohn Kacur1-0/+0
Some packages such as fedpkg lint mark python files that are not executable as errors. Fix this by making misc.py executable Signed-off-by: John Kacur <jkacur@redhat.com>
2021-11-09rteval: kcompile: Fix spelling in debug messageJohn Kacur1-1/+1
Fix spelling in debug message. "untar'ing" should be "untarring" Signed-off-by: John Kacur <jkacur@redhat.com>
2021-11-04rteval: cyclictest.py: Skip statistics reporting in case of an overflowPunit Agrawal1-0/+10
The cyclictest.py module recently gained the capability to parse max latency values as reported by cyclictest. When the max latency exceeds the range of the latency histogram (or in other words, the number of configured buckets), statistics such as mean and standard deviation can not be calculated correctly due to lost samples during measurement. In the case of lost samples, skip statistics generation and report the max latency warning to the user to rerun the measurement. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> - Small edit to the explanation Signed-off-by: John Kacur <jkacur@redhat.com>
2021-11-04rteval: cyclictest.py: Sort the list of cpusPunit Agrawal1-0/+4
online_cpus() returns a list of online cpus in arbitrary order. e.g., on a hexacore system it returns - ['5', '3', '1', '4', '2', '0'] Generally this wouldn't be a problem but the cyclictest.py module matches the unsorted list with the latencies output by "cyclictest" which are ordered by core number. This leads to incorrect reporting of per-core latencies in the final report generated by rteval. The issue was noticed when comparing the rteval report with cyclictest logs (enabled by a recent change). Fix the inconsistency in core numbering by sorting the list of cpus used by cyclictest.py module. As the cpus are represented as a string, sort with the integer key to avoid issues on systems with large number of cores. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-11-04rteval: cyclictest.py Parse max latencies from cyclictest outputPunit Agrawal1-6/+25
When collecting a histogram of latencies, "cyclictest" reports the maximum latency encountered on each core even if they fall outside the configured no. of buckets. This can be useful to understand the worst case latencies for the run as well as right sizing the number of buckets for the histogram. While processing the output of cyclictest, rteval skips the reported max latencies and calculates them by capping to the no. of buckets. Fix rteval by parsing the maximum latencies reported by cyclictest. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-27rteval: systopology: Update copyrightJohn Kacur1-0/+1
Update the copyright Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-27rteval: systopology: Use 'with' on open with sysreadJohn Kacur1-2/+2
Use 'with' for opening the file in sysread so that it also gets closed properly. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-23rteval: Add idea of exclusive load module and make stress-ng oneJohn Kacur2-0/+23
When running stress-ng as a load module in rteval, we don't want to run kcompile or hackbench, so create the notion of an exclusive load module and make stress-ng one. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-23rteval: Make donotrun work correctly in load modulesJohn Kacur4-3/+15
hackbench and kcompile don't correctly adhere to the donotrun variable which is inherited from class rtevalModulePrototype. If the variable is set after the modules are loaded, although the modules do not run, some thread accounting still occurs which causes problems on shutdown of rteval. Fix in the methods in hackbench and kcompile where this is relevant, by checking the variable before the method runs. While we are at it fix a few other things - change len(threading.enumerate()) to threading.active_count() - Fix a spelling typo This patch is in preparation for a patch to allow stress-ng to run as a load module without running other modules. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-15rteval: kernel.py: Add support for kthreads running with deadline policyPunit Agrawal1-1/+1
When running rteval on a system with kthreads running with "deadline" policy, an exception is encountered when parsing the output of "ps". [DEBUG] cmd: /usr/bin/ps -eocommand,pid,policy,rtprio,comm Traceback (most recent call last): ... File "...rteval/rteval/sysinfo/kernel.py", line 60, in kernel_get_kthreads ret_kthreads[v[0]] = {'policy' : policies[bytes.decode(v[1])], KeyError: 'DLN' The kernel uses deadline policy for "schedutil" cpufreq governor threads. Fix the crash in rteval by adding support for "deadline" to the list of policies. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-14rteval: Remove self.__err_sleepJohn Kacur1-1/+0
commit 5ed68ae77ec05786aab99fbed35d0347a5d25997 changed the code to exit gracefully if hackbench failed from memory errors. No attempt is made anymore to wait to see if memory pressures ease. The variable __err_sleep however was not removed at the time. Remove it now, as it is now longer used. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-14rteval: Remove mult from hackbench.pyJohn Kacur1-5/+2
The method for calculating the number of jobs to run for hackbench was changed with the following commit. commit 67629a1b69ffe72af6bfb3a0d4362ac1920005a7 However, the mult variable which was used to calculate the number of jobs using the older method was not removed. Remove it now and simplify the logic. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-14rteval: hackbench.py: Enable running on a system with low memoryPunit Agrawal1-2/+1
The hackbench workload refues to run on RockPro64, a hexacore 64bit Arm board with 4GB memory, complaining about insufficient memory per-core. On further investigation, it turns out that workload is using an arbitrary limit of 0.75 GB/core but will quite happily run on much lower lower memory systems. Instead of preventing execution, convert the info message to a warning when the memory is lower than expected but continue execution. This should enable the workload to be used on a wider range of systems. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-14rteval: services: Iterate through items in MakeReportJohn Kacur1-3/+3
Iterate through items instead of keys in MakeReport. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-13rteval: services.py: Fix incorrect detection of container environmentPunit Agrawal1-5/+5
rteval mistakenly detects that it is running inside a container even though it is running directly on the host. On further investigation this was found to be due to change in behaviour around byte strings and strings when going from python2 to python3. In python3 process output (stdout, stderr) for processes executed via Popen() is retuned as byte strings and byte strings are not equivalent to strings, i.e., b'' == '' is False. Update all call sites for Popen() to include "text=True" argument - this ensures that the process output is returned as a string. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-13rteval: osinfo.py: Fix RT kernel detectionPunit Agrawal1-1/+1
Since the osinfo.py module was developed, RT kernels have moved on from identifying as "RT" to "PREEMPT_RT". This change in the kernel identifier causes osinfo.py to incorrectly detect RT kernels as non-RT. Update the check for detecting RT kernel to be able to handle both the variants. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-13rteval: kcompile: Fix for no numactl and no cpulistJohn Kacur1-7/+17
Constructing a command to compile the kernel as a load can fail in certain cases such as when numactl is not available and the user doesn't pass a cpulist. Fix this for both the runcmd and the cleancmd by not assuming that numactl is available or that taskset will be used. Reported-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-13rteval: systopology.py: Add support for systems that don't have NumaPunit Agrawal1-6/+31
Certain systems such as Arm v7 do not have support for Numa nodes, i.e., "/sys/devices/system/node*" does not exist. Instead of erroring out in this situation, it would be better if rteval could use alternate sources to get the system topology and memory information. Introduce the notion of a fake Numa node (as a class) which is used when no numa nodes are found on the system. Other than the constructor, it provides the same interface as the existing NumaNode class so existing users should work without any changes. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> - Renamed Fake to Sim for simulated Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-13rteval: Construct a 'model name' on architectures that don't have oneJohn Kacur1-0/+21
This is based on an idea from Punit Agrawal <punit1.agrawal@toshiba.co.jp> On architectures that lack 'model name' in /proc/cpuinfo create 'model name' Unknown when creating the per core dictionaries in cpuinfo For arm, we can construct the 'model name' from the 'CPU implementer' 'CPU architecture' 'CPU variant' 'CPU part' 'CPU revision' Suggested-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Tested-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-09-13rteval: Only process warnings if dmidecode_loaded is TrueJohn Kacur1-0/+3
If python-dmidecode is not available, then you can't test hasattr or you will get a NameError. Simply return instead. Tested-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-07-29rteval: Add __contains__ in rtevalConfigJohn Kacur1-0/+2
Add the __contains__ function to the rtevalCfgSection class to make "in" function correctly. For example in cyclictest.py, self.__cfg is not a dictionary, it is an instance of the rtevalCfgSection class, therefore key in self.__cfg does not work as expected. In order to make sure this is fixed everywhere, instead of comparing to self.__cfg.keys() everywhere this is used, implement the __contains__ function so that "in" works as expected. This bug was introduced by the commit fd3b732f714d ("rteval: 2to3 transformations") Reported-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com> Correction Suggested-by: Jeff Epler <jepler@unpythonic.net> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-07-28rteval: cyclictest.py: Do not pass obsolete --notrace optionAtsushi Nemoto1-1/+0
The notrace option was removed from cyclictest on rt-tests v1.4 in 2019. Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-07-16rteval: Update to using the linux-5.13.2 kernelJohn Kacur3-4/+4
Update to using the linux-5.13.2 kernel Signed-off-by: John Kacur <jkacur@redhat.com>
2021-07-15rteval: Restrict measurement threads to the cpus in cpumaskJohn Kacur1-0/+9
Only run measurement threads on cpus in the list from sched_getaffinity Signed-off-by: John Kacur <jkacur@redhat.com>
2021-06-25rteval: update version number to v3.2v3.2John Kacur2-2/+2
Update version number in rteval.spec and rteval/version.py Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-06rteval: Remove rteval-loads.specJohn Kacur1-66/+0
The rteval-loads.spec file is obsolete here. It still exists but in a separate package. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-06rteval: doc: Remove obsolete release-checklist.txtJohn Kacur1-22/+0
Remove obsolte file release-checklist.txt Signed-off-by: John Kacur <jkacur@redhat.com>
2021-03-02rteval: cyclictest.py: Make build targets architecture independentPunit Agrawal1-1/+1
Not all kernel archiectures provide the "bzImage" target, e.g., arm64 provides "Image" which generates an uncompressed kernel binary. Instead of going down the path of customizing build targets per-architecture, let's drop them altogether. The default kernel target should build the kernel and modules on all architectures anyways. Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Signed-off-by: John Kacur <jkacur@redhat.com>
2021-01-13rteval: Remove requirement to install python-schedutilsJohn Kacur3-9/+2
This is actually a no-op in the code as no code was actually importing python-schedutils or using it! This patches removes mention of it from a few documentation files. Note: we should remove rteval.spec entirely, the reason we cannot yet is that there is some code that parses the version number from it. Signed-off-by: John Kacur <jkacur@redhat.com>
2021-01-13rteval: Fix incorrect import in sysinfo dirJohn Kacur1-1/+1
Fix incorrect import in rteval/sysinfo/__init__.py This could cause a traceback rteval --duration=60 Traceback (most recent call last): File "/usr/bin/rteval", line 196, in <module> from rteval.sysinfo import dmi File "/usr/lib/python3.6/site-packages/rteval/sysinfo/__init__.py", line 37, in <module> import rteval.sysinfo.dmi as dmi AttributeError: module 'rteval' has no attribute 'sysinfo' Signed-off-by: John Kacur <jkacur@redhat.com>
2021-01-07rteval: Update version numberv3.1John Kacur2-2/+2
Update version number in rteval.spec and rteval/version.py Signed-off-by: John Kacur <jkacur@redhat.com>
2020-12-22rteval: Update information files with the correct source code reposJohn Kacur2-10/+13
Update the information files with the correct place to get the most recent version of the code. Signed-off-by: John Kacur <jkacur@redhat.com>
2020-11-26rteval: Use rtevalConfig tp find histogram xsltJonathan Schwender2-1/+2
Add a new entry to rteval default_config with the location of rteval_histogram_raw.xsl as determined by default_config_search. This works even if distutils setup does not install the xslt into installdir. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2020-11-26rteval: Use rteval_text.xsl path found at config initializationJonathan Schwender1-1/+1
rtevcfg.installdir gives the location for the installed executable. The datafiles are not necessarilly copied to the same location by distutils setup. The Config initialization already finds the correct path, so just use that. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2020-11-26rteval: rtevalConfig.py: Add entry to ConfigDirectoriesJonathan Schwender1-1/+2
Distutils setup() may install datafiles to /usr/local This is the case on Ubuntu 20.04 with Python 3.8. Without this addition default_config_search fails to find e.g. rteval_dmi.xsl Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: services.py: a few clean-upsJohn Kacur1-10/+15
- imports on separate lines - whitespace fixes - remove unnecessary else clauses after returns - don't specify inhertiance from object Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: memory.py: convert mem_get_size to staticmethodJohn Kacur1-4/+6
- convert mem_get_size to staticmethod - Fix a whitespace problem - Don't specify inheritiance from object - return 0 from unit_test if successful Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: sysstat.py: Put imports on separate linesJohn Kacur1-1/+7
put imports on separate lines Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: hackbench.py: Comment out broken __main__John Kacur1-5/+10
- comment out the broken __main__ section. - imports on seperate lines Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: loads/__init__.py: line continuation fixesJohn Kacur1-2/+6
- a few line continuation / whitespace fixes Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: misc.py: Change type() to isinstance() for python3 idiomsJohn Kacur1-9/+7
- Change type() to isinstance() to conform to python3 idioms - also convert to sorted(info.keys()) for the same reason. - fix a number of whitespace problems Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: make __show_remaining_time a staticmethodJohn Kacur1-26/+36
- make __show_remaining_time a staticmethod in RtEval - imports on separate lines - add some docstrings - correct typo of return value in Measure - fix printing of RuntimeError during measurement Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-15rteval: Remove unnecessary importJohn Kacur1-4/+8
- Remove unnecessary import - Put imports on separate lines - Add a docstring to summarize Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-10rteval: tools.py: Add module docstringJohn Kacur1-2/+2
- Add module docstring - Fix whitespace Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-06rteval: cyclictest.py: change __get_debugfs_mount to staticmethodJohn Kacur1-14/+17
- remove unnecessary else - put break if and action into two lines - remove unused variable sorted[] - put import of math at the top of the files - make __get_debugfs_mount Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-06rteval: rteval/modules/__init__.py: docstring fixesJohn Kacur1-34/+50
- docstring fixes - remove unnecessary else Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-06rteval: kcompile.py a few clean-upsJohn Kacur1-13/+21
- put imports on separate lines - fix some lines that are too long - don't use len to determine whether there are files to process Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-06rteval: systopology.py: declare methods as staticJohn Kacur1-32/+41
declare methods as static, and various other fixes - class helper methods that don't refer to self can be declared static. - Change comments to docstrings - put imports on separate lines - remove unnessary else - declare self.current in the _init__ method - Add a little test to the unit_test Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: Clean-ups for rtevalXMLRPC.pyJohn Kacur1-14/+11
- imports on separate lines - remove 'object' from class - fix some whitespace problems Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: clean-ups to rtevalReportJohn Kacur1-7/+8
- Put imports on separate lines - Fix some spacing issues Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: Various fixes to xmlout.pyJohn Kacur1-101/+90
- Correct the order of imports - Fix the spacing of some default assignments - Fix some indentation problems, notable __parseToXML - change ' == None' to 'is None' - remove unnecessary else after return in function Write - remove unncessary semicolon - Fix spacing around commas - Fix some but not all lines that are too long. - Remove extra empty lines Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: Clean-up dmi.pyJohn Kacur1-14/+13
- Put imports on separate lines - Replace bare except with type of exception - Add some doc text - replace '== None' with 'is None' - remove unnecessary 'pass' statement - remove unnecessary 'object' in class statement - Fix reference to non-existent variable sharedir - Change unittest class name to conform to standard, but might remove entirely in the future Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: A few clean-ups to rtevalConfig.pyJohn Kacur1-16/+14
- Remove unnecessary else after return - Remove unused "as err" in except statement - Don't import sys twice. - No need to specify object in class - A few python3 idiom changes Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: A few cleanups to osinfo.pyJohn Kacur1-7/+10
- imports on separate lines, fix some spacing issues Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: kernel.py style modificationsJohn Kacur1-8/+10
A few style changes - separate imports on each line - No need to specify that a class inherits from object - Remove spaces between calls and brackets, etc Signed-off-by: John Kacur <jkacur@redhat.com>
2020-09-02rteval: A few style changes to cputopology.pyJohn Kacur1-9/+10
A few style changes to cputopology.py - remove unnecessary ; at the end of a line - use proper whitespace with comas - put imports on separate lines - remove unused import of sys Signed-off-by: John Kacur <jkacur@redhat.com>
2020-08-28rteval: Fully specify the location of imports in sysinfo/__init__.pyJohn Kacur1-14/+16
Various clean-ups - Fully specify the location of imports. - Fix the __main__ section for testing purposes - Fix the order of imports - Remove an unnecessary semi-colon Signed-off-by: John Kacur <jkacur@redhat.com>
2020-08-27rteval: Makefile: Add the ability to generate ctagsJohn Kacur1-0/+10
Add the options make tags make cleantags The first one generates ctags for python and the second removes them. Signed-off-by: John Kacur <jkacur@redhat.com>
2020-08-27rteval:unittest.py Apply some fixes to unittest.pyJohn Kacur1-3/+3
The unittest system in rteval is old, and broken, and not extensive enough. It should be removed and replaced with the the unittest facilities in python3 and expanded. However, rather than just throwing away what we have, I would like to take a look at what is there, and see what can be used and imported into a new scheme. With that in mind, here is a partial fix to the unittest.py that improves the results. Signed-off-by: John Kacur <jkacur@redhat.com>
2020-08-27rteval: Fix potential relative import error with rtevalConfigJohn Kacur1-2/+2
It is possible to get a relative import error with rtevalConfig. For example, if you are running from git without installing, you should only need to set PYTHONPATH to the base directory. To see the problem run python3 rteval/rtevalConfig.py Traceback (most recent call last): File "rteval/rtevalConfig.py", line 36, in <module> from .Log import Log ImportError: attempted relative import with no known parent package To fix this include the rteval dir in the import. Signed-off-by: John Kacur <jkacur@redhat.com>
2020-08-27rteval: 2to3 conversion on xmlout.pyJohn Kacur1-2/+2
Run 2to3 on xmlout.py Signed-off-by: John Kacur <jkacur@redhat.com>
2020-08-27rteval: Parse cpuinfo correctly when model name has a colonJohn Kacur1-2/+4
The function cpuinfo() splits fields in /proc/cpuinfo with a colon ':' This can cause a ValueError: too many values to unpack (expected 2) This is easily fixed by setting the maximum number of splits to 1 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-07-23rteval: Use linux-5.7 in kcompileJohn Kacur4-5/+5
Use linux-5.7 in kcompile since it has some fixes for code that breaks newer tools. Signed-off-by: John Kacur <jkacur@redhat.com>
2020-06-24rteval: Rename self.cmd to self.args for inheritance in stressngJohn Kacur1-8/+9
Load modules inherits from CommandLineLoad CommandLineLoad has a method MakeReport which relies on the variable "args". Class Stressng needs to use this variable name instead of it's own for this mechanism to work. This commit changes the name in Stressng, but perhaps a better fix in the future would be to use accessor methods, instead of relying on a variable name This commit also sets jobs to 1, which is required in MakeReport. The actual number of jobs is handled by the external stress-ng program, depending upon the arg that Class Stressng invokes it with. Signed-off-by: John Kacur <jkacur@redhat.com>
2020-06-15rteval: Add the stressng load moduleJohn Kacur4-2/+140
Add the stressng load module to run stress-ng as a load to rteval Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-07rteval/rtevalReport.py: Fix non-existant variableJohn Kacur1-1/+1
Fix non-existant variable Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-07rteval/rtevalReport.py: Some style changes suggested by pylint-3John Kacur1-4/+7
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-07rteval/rtevalConfig.py: Some style changes suggested by pylint-3John Kacur1-12/+13
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: cyclictest.py: Some style changes suggested by pylint-3John Kacur1-11/+16
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: Some style changes to rteval/modules/measurement/__init__.pyJohn Kacur1-6/+6
rteval: Some style changes to rteval/modules/measurement/__init__.py Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: sysstat: Some style changes suggested by pylint-3John Kacur1-7/+7
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: kcompile.py: Some style changes suggested by pylint-3John Kacur1-19/+19
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: hackbench.py: Some Style changes suggested by pylint-3John Kacur1-7/+7
Some Style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: modules/__init__.py: Some style changes suggested by pylint-3John Kacur1-11/+14
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: rteval/__init__.py: A few style changes suggested by pylint-3John Kacur1-2/+2
A few style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: systopology.py: Some style changes suggested by pylint-3John Kacur1-11/+11
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: rteval/Log.py: Some style changes suggested from pylint-3John Kacur1-7/+6
Some style changes suggested from pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-05-06rteval: rteval-cmd: Some style changes suggested by pylint-3John Kacur1-14/+13
Some style changes suggested by pylint-3 Signed-off-by: John Kacur <jkacur@redhat.com>
2020-04-07modules: Don't abort if a workload isn't runningScott Wood1-3/+0
Each module is responsible for respawning the load when it finishes. The only thing that the additional check at the rtevalModulePrototype level accomplishes is introducing a race condition that will kill rteval if a load ends after _WorkloadTask() checks, but before the check in the caller. Signed-off-by: Scott Wood <swood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2020-04-07Makefile: Use parentheses around print argsScott Wood1-1/+1
Otherwise, this fails on python3. Signed-off-by: Scott Wood <swood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2020-04-07Makefile: Remove non-distutil install leftoversScott Wood1-14/+0
setup.py installs into /usr/local by default, but the makefile is still creating directories in /usr that it doesn't install anything into. Worse, the uninstall target removes things from /usr rather than what was installed by "make install". Signed-off-by: Scott Wood <swood@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2019-12-10rteval: hackbench Fix interating through nodesJohn Kacur1-2/+2
Fix iterating through the nodes in hackbench. When creating a dictionary of node, cpus, we need to iterate through the nodes and not through sysTop alone. Also use python3 syntax for iterating through a dictionary. Signed-off-by: John Kacur <jkacur@redhat.com>