summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2009-01-13 14:08:15 -0600
committerClark Williams <williams@redhat.com>2009-01-13 14:08:15 -0600
commit612b27e3dd1e0bc15a717375cd417172819ef5ec (patch)
tree9fc5a3a402409eece305fa0430712bdbc6eb43a0
parent52753692cfc2f30ad274c63451b0494349fce32d (diff)
downloadrteval-612b27e3dd1e0bc15a717375cd417172819ef5ec.tar.gz
rteval-612b27e3dd1e0bc15a717375cd417172819ef5ec.tar.xz
rteval-612b27e3dd1e0bc15a717375cd417172819ef5ec.zip
renamed from prevert to rteval
-rw-r--r--Makefile23
-rw-r--r--rteval.spec (renamed from prevert.spec)25
-rw-r--r--rteval/__init__.py (renamed from prevert/__init__.py)0
-rw-r--r--rteval/cyclictest.py (renamed from prevert/cyclictest.py)0
-rw-r--r--rteval/hackbench.py (renamed from prevert/hackbench.py)0
-rw-r--r--rteval/kcompile.py (renamed from prevert/kcompile.py)0
-rw-r--r--rteval/load.py (renamed from prevert/load.py)0
-rw-r--r--rteval/rteval.py (renamed from prevert/prevert.py)45
-rw-r--r--setup.py10
9 files changed, 67 insertions, 36 deletions
diff --git a/Makefile b/Makefile
index 6193fa9..ae0de81 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,16 @@
HERE := $(shell pwd)
-PACKAGE := prevert
+PACKAGE := rteval
VERSION := $(shell awk '/Version:/ { print $$2 }' ${PACKAGE}.spec)
D := 10
runit:
- python prevert/prevert.py -v --builddir=./run --loaddir=./loadsource --duration=$(D) --keepdata
+ python rteval/rteval.py -v --builddir=./run --loaddir=./loadsource --duration=$(D) --keepdata
+
+sysreport:
+ python rteval/rteval.py -v --builddir=./run --loaddir=./loadsource --duration=$(D) --keepdata --sysreport
clean:
- rm -f prevert/*~ prevert/*.py[co] *.tar.bz2
+ rm -f rteval/*~ rteval/*.py[co] *.tar.bz2
realclean: clean
rm -rf run tarball rpm
@@ -17,15 +20,15 @@ install:
tarfile:
- rm -rf tarball && mkdir -p tarball/prevert-$(VERSION)
- cp -r prevert tarball/prevert-$(VERSION)
- cp Makefile setup.py prevert.spec tarball/prevert-$(VERSION)
- tar -C tarball -cjvf prevert-$(VERSION).tar.bz2 prevert-$(VERSION)
+ rm -rf tarball && mkdir -p tarball/rteval-$(VERSION)
+ cp -r rteval tarball/rteval-$(VERSION)
+ cp Makefile setup.py rteval.spec tarball/rteval-$(VERSION)
+ tar -C tarball -cjvf rteval-$(VERSION).tar.bz2 rteval-$(VERSION)
rpm: tarfile
rm -rf rpm
mkdir -p rpm/{BUILD,RPMS,SRPMS,SOURCES,SPECS}
- cp prevert-$(VERSION).tar.bz2 rpm/SOURCES
- cp prevert.spec rpm/SPECS
+ cp rteval-$(VERSION).tar.bz2 rpm/SOURCES
+ cp rteval.spec rpm/SPECS
cp loadsource/* rpm/SOURCES
- rpmbuild -ba --define "_topdir $(HERE)/rpm" rpm/SPECS/prevert.spec
+ rpmbuild -ba --define "_topdir $(HERE)/rpm" rpm/SPECS/rteval.spec
diff --git a/prevert.spec b/rteval.spec
index f08b8c5..3b00c0c 100644
--- a/prevert.spec
+++ b/rteval.spec
@@ -2,14 +2,14 @@
%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
-Name: prevert
+Name: rteval
Version: 0.3
Release: 1%{?dist}
-Summary: utility to measure event response time under load
+Summary: utility to evaluate system suitability for RT Linux
Group: System/Utilities
License: GPL
-Source0: prevert-%{version}.tar.bz2
+Source0: rteval-%{version}.tar.bz2
Source1: linux-2.6.27.8-modified.tar.bz2
Source2: hackbench.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -19,12 +19,13 @@ Requires: rt-tests >= 0.29
BuildArch: noarch
%description
-The prevert script (PRe-VErification for Real Time)is a utility for measuring
-the event response time under load. The script unpacks the hackbench and kernel
-source, builds hackbench and then goes into a loop, running hackbench and compiling
-a kernel tree. During that loop the cyclictest program is run to measure event
-response time. After the run time completes, a statistical analysis of the event
-response times is done and printed to the screen.
+The rteval script is a utility for measuring various aspects of
+realtime behavior on a system under load. The script unpacks the
+hackbench and kernel source, builds hackbench and then goes into a
+loop, running hackbench and compiling a kernel tree. During that loop
+the cyclictest program is run to measure event response time. After
+the run time completes, a statistical analysis of the event response
+times is done and printed to the screen.
%prep
%setup -q
@@ -46,12 +47,12 @@ install %{SOURCE2} $RPM_BUILD_ROOT/usr/share/%{name}-%{version}/loadsource
rm -rf $RPM_BUILD_ROOT
%post
-rm -f /usr/bin/prevert
-ln -s %{python_sitelib}/prevert/prevert.py /usr/bin/prevert
+rm -f /usr/bin/rteval
+ln -s %{python_sitelib}/rteval/rteval.py /usr/bin/rteval
%files
%defattr(-,root,root,-)
-%attr(0755, root, root) %{python_sitelib}/prevert
+%attr(0755, root, root) %{python_sitelib}/rteval
%doc
/usr/share/%{name}-%{version}/*
%if "%{python_ver}" >= "2.5"
diff --git a/prevert/__init__.py b/rteval/__init__.py
index ce0242b..ce0242b 100644
--- a/prevert/__init__.py
+++ b/rteval/__init__.py
diff --git a/prevert/cyclictest.py b/rteval/cyclictest.py
index 774052d..774052d 100644
--- a/prevert/cyclictest.py
+++ b/rteval/cyclictest.py
diff --git a/prevert/hackbench.py b/rteval/hackbench.py
index 437ed69..437ed69 100644
--- a/prevert/hackbench.py
+++ b/rteval/hackbench.py
diff --git a/prevert/kcompile.py b/rteval/kcompile.py
index 52ffafb..52ffafb 100644
--- a/prevert/kcompile.py
+++ b/rteval/kcompile.py
diff --git a/prevert/load.py b/rteval/load.py
index 4178ffc..4178ffc 100644
--- a/prevert/load.py
+++ b/rteval/load.py
diff --git a/prevert/prevert.py b/rteval/rteval.py
index 0458257..ebe0554 100644
--- a/prevert/prevert.py
+++ b/rteval/rteval.py
@@ -1,6 +1,7 @@
#!/usr/bin/python -tt
-# PreVeRT - Pre-Verification for Real Time
+# rteval - script for evaluating platform suitability for RT Linux
+#
# This program is used to determine the suitability of
# a system for use in a Real Time Linux environment.
# It starts up various system loads and measures event
@@ -28,14 +29,14 @@ load_modules = (hackbench, kcompile)
defbuilddirs = ('/tmp', '/var/tmp', '/usr/tmp')
-loaddir = "/usr/share/prevert-%s/loadsource" % version
+loaddir = "/usr/share/rteval-%s/loadsource" % version
builddir = None
keepdata = False
verbose = False
duration = 60.0
interrupted = False
sysreport = False
-reportfile = 'prevert.rpt'
+reportfile = 'rteval.rpt'
def get_num_cores():
f = open('/proc/cpuinfo')
@@ -77,7 +78,7 @@ def parse_options():
action="store_true", default=False,
help='run sysreport to collect system data')
parser.add_option("-r", "--report", dest="reportfile",
- type="string", default="prevert.rpt")
+ type="string", default="rteval.rpt")
(options, args) = parser.parse_args()
if options.duration:
mult = 1.0
@@ -103,14 +104,27 @@ def setup_builddir(dir):
if dir == None:
for d in defbuilddirs:
if os.path.exists(d):
- dir = os.path.join(d, 'prevert-builddir')
+ dir = os.path.join(d, 'rteval-builddir')
if not os.path.exists(dir): os.mkdir(dir)
break
debug("build dir: %s" % dir)
return dir
-def prevert():
- global loaddir, verbose, duration, keepdata, builddir
+def do_sysreport():
+ if os.path.exists('/usr/sbin/sosreport'):
+ exe = '/usr/sbin/sosreport'
+ elif os.path.exists('/usr/sbin/sysreport'):
+ exe = '/usr/sbin/sysreport'
+ else:
+ raise RuntimeError, "Can't find sosreport/sysreport"
+
+ options = ['-k', 'rpm.rpmvma=off']
+
+ print "Generating SOS report"
+ subprocess.call([exe] + options)
+
+def rteval():
+ global loaddir, verbose, duration, keepdata, builddir, sysreport
(opts, args) = parse_options()
@@ -119,6 +133,19 @@ def prevert():
duration = opts.duration
keepdata = opts.keepdata
reportfile = opts.reportfile
+ sysreport = opts.sysreport
+
+ debug('''rteval options:
+ loaddir: %s
+ verbose: %s
+ duration: %f
+ keepdata: %s
+ reportfile: %s
+ sysreport: %s''' % (loaddir, verbose, duration,
+ keepdata, builddir, sysreport))
+
+ if sysreport and os.getuid() != 0:
+ raise RuntimeError, "Must be root to get a sysreport"
builddir = setup_builddir(opts.builddir)
@@ -205,7 +232,7 @@ def prevert():
(sys, node, release, ver, machine) = os.uname()
r = open(reportfile, "w")
r.write('%s\n' % ('-' * 72))
- r.write(' Prevert version %s\n' % version)
+ r.write(' rteval version %s\n' % version)
r.write(' Node: %s\n' % node)
r.write(' Kernel: %s\n' % release)
r.write(' Arch: %s\n' % machine)
@@ -229,4 +256,4 @@ def prevert():
subprocess.call(['/usr/sbin/sysreport', '-dmidecode'])
if __name__ == '__main__':
- prevert()
+ rteval()
diff --git a/setup.py b/setup.py
index 72bca5e..1033fda 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ import os
# Get PYTHONLIB with no prefix so --prefix installs work.
PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages')
-setup(name="prevert",
+setup(name="rteval",
version = "0.1",
description = "PRE VErification for Real Time",
author = "Clark Williams",
@@ -16,9 +16,9 @@ setup(name="prevert",
license = "GPLv2",
long_description =
"""\
-The prevert (PRE Verification for Real Time) script is used to judge the
-behavior of a hardware platform while running a Realtime Linux kernel
-under a moderate to heavy load.
+The rteval script is used to judge the behavior of a hardware
+platform while running a Realtime Linux kernel under a moderate
+to heavy load.
Provides control logic for starting a system load and then running a
response time measurement utility (cyclictest) for a specified amount
@@ -26,5 +26,5 @@ of time. When the run is finished, the sample data from cyclictest is
analyzed for standard statistical measurements (i.e mode, median, range,
mean, variance and standard deviation) and a report is generated.
""",
- packages = ["prevert"],
+ packages = ["rteval"],
)