[PATCH 1/3] procfs: Don't call strip() on process' cmdline
by Ondřej Lysoněk
Don't call strip() on process' cmdline. It shouldn't be necessary
and it alters the cmdline if e.g. argv[0] begins with whitespace.
Signed-off-by: Ondřej Lysoněk <olysonek(a)redhat.com>
---
procfs/procfs.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/procfs/procfs.py b/procfs/procfs.py
index f97668c..61f802f 100755
--- a/procfs/procfs.py
+++ b/procfs/procfs.py
@@ -32,7 +32,7 @@ def process_cmdline(pid_info):
not available, falls back to using the comm (short process name) in its pidstat key.
"""
if pid_info["cmdline"]:
- return reduce(lambda a, b: a + " %s" % b, pid_info["cmdline"]).strip()
+ return reduce(lambda a, b: a + " %s" % b, pid_info["cmdline"])
return pid_info["stat"]["comm"]
@@ -325,7 +325,7 @@ class process:
def load_cmdline(self):
f = open("/proc/%d/cmdline" % self.pid)
- self.cmdline = f.readline().strip().split('\0')[:-1]
+ self.cmdline = f.readline().split('\0')[:-1]
f.close()
def load_threads(self):
--
2.14.3
5 years, 6 months
[PATCH 0/2] New version
by John Kacur
I had to fix up more inconsistent spacing problems and create a new
tag and version for building purposes
These changes are available via git
Repo: git://git.kernel.org/pub/scm/linux/kernel/git/jkacur/tuna.git
Branch: devel/tuna-py3
Tag: v0.13.3
John Kacur (2):
tuna: Fix more inconsistent spacing problems in cpuview and
oscilloscope
tuna: Create tag v0.13.3
rpm/SPECS/tuna.spec | 2 +-
setup.py | 2 +-
tuna-cmd.py | 2 +-
tuna/gui/cpuview.py | 660 +++++++++++++++++++++---------------------
tuna/oscilloscope.py | 796 +++++++++++++++++++++++++--------------------------
5 files changed, 731 insertions(+), 731 deletions(-)
--
2.14.3
5 years, 7 months
[PATCH 0/9] tuna changes for python3
by John Kacur
This set of changes are mostly to get tuna working properly for python3
More work needs to be done for oscilloscope to work properly
These changes are available via git
Repo: git://git.kernel.org/pub/scm/linux/kernel/git/jkacur/tuna.git
Branch: devel/tuna-py3
Tag: v0.13.2
John Kacur (9):
tuna: Use errno codes instead of numbers
tuna: isolate_cpus - exit with a message instead of a traceback
tuna: explicitly use python3
tuna: String exceptions are no longer allowed in python3
tuna: 2to3 conversions
tuna: Fix inconsistent indentation problems
tuna: Fix TypeError: 'type' object is not iterable
tuna: Use open instead of file for python3
tuna: Change the version number to 0.13.2
oscilloscope-cmd.py | 10 +-
rpm/SPECS/tuna.spec | 2 +-
setup.py | 4 +-
tuna-cmd.py | 1239 +++++++++++++++++++++++++-------------------------
tuna/config.py | 50 +-
tuna/gui/__init__.py | 2 +-
tuna/gui/cpuview.py | 21 +-
tuna/gui/irqview.py | 13 +-
tuna/gui/procview.py | 38 +-
tuna/gui/util.py | 8 +-
tuna/oscilloscope.py | 14 +-
tuna/sysfs.py | 16 +-
tuna/tuna.py | 1194 ++++++++++++++++++++++++------------------------
tuna/tuna_gui.py | 12 +-
14 files changed, 1320 insertions(+), 1303 deletions(-)
--
2.14.3
5 years, 7 months