From: Punit Agrawal <punitagrawal@gmail.com>
To: jkacur@redhat.com
Cc: Punit Agrawal <punitagrawal@gmail.com>,
linux-rt-users@vger.kernel.org, punit1.agrawal@toshiba.co.jp,
Venkata.Pyla@toshiba-tsip.com, dinesh.kumar@toshiba-tsip.com
Subject: [PATCH 1/3] rteval: cyclictest.py Enable logging cyclictest output
Date: Thu, 2 Sep 2021 18:24:50 +0900 [thread overview]
Message-ID: <20210902092452.726905-2-punitagrawal@gmail.com> (raw)
In-Reply-To: <20210902092452.726905-1-punitagrawal@gmail.com>
From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
The cyclictest.py module uses a temporary file to store the output
from "cyclictest" which is deleted at the end of the run. As the
collected log contains more information than what is being reported by
rteval it would make sense to persist the logs. It can also be useful
to sanity check the results reported by rteval.
With this goal, create a persistent file named
"cyclictest.stdout" (instead of a tempfile) to capture the cyclictest
logs. The file is stored in the same location as the logs from the
other modules.
Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
---
rteval/modules/measurement/cyclictest.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
index b1755d4f4421..0037c3ad07bd 100644
--- a/rteval/modules/measurement/cyclictest.py
+++ b/rteval/modules/measurement/cyclictest.py
@@ -197,6 +197,7 @@ class Cyclictest(rtevalModulePrototype):
self.__numanodes = int(self.__cfg.setdefault('numanodes', 0))
self.__priority = int(self.__cfg.setdefault('priority', 95))
self.__buckets = int(self.__cfg.setdefault('buckets', 2000))
+ self.__reportdir = self.__cfg.setdefault('reportdir', os.getcwd())
self.__numcores = 0
self.__cpus = []
self.__cyclicdata = {}
@@ -255,6 +256,8 @@ class Cyclictest(rtevalModulePrototype):
mounts.close()
return ret
+ def _open_logfile(self, name):
+ return open(os.path.join(self.__reportdir, "logs", name), 'w+b')
def _WorkloadSetup(self):
self.__cyclicprocess = None
@@ -288,7 +291,7 @@ class Cyclictest(rtevalModulePrototype):
self.__cmd.append("--tracemark")
# Buffer for cyclictest data written to stdout
- self.__cyclicoutput = tempfile.SpooledTemporaryFile(mode='w+b')
+ self.__cyclicoutput = self._open_logfile('cyclictest.stdout')
def _WorkloadTask(self):
--
2.32.0
next prev parent reply other threads:[~2021-09-02 9:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 9:24 [PATCH 0/3] rteval: Fix issues with cyclictest.py module Punit Agrawal
2021-09-02 9:24 ` Punit Agrawal [this message]
2021-09-12 15:03 ` [PATCH 1/3] rteval: cyclictest.py Enable logging cyclictest output John Kacur
2021-09-02 9:24 ` [PATCH 2/3] rteval: cyclictest.py Parse max latencies from cyclictest ouput Punit Agrawal
2021-09-02 9:24 ` [PATCH 3/3] rteval: misc.py: Sort the list of cpus returned by online_cpus() Punit Agrawal
2021-09-12 15:39 ` John Kacur
2021-09-08 14:19 ` [PATCH 0/3] rteval: Fix issues with cyclictest.py module Punit Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210902092452.726905-2-punitagrawal@gmail.com \
--to=punitagrawal@gmail.com \
--cc=Venkata.Pyla@toshiba-tsip.com \
--cc=dinesh.kumar@toshiba-tsip.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=punit1.agrawal@toshiba.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).