Hi,
iotop is broken with the latest Slackware kernel. I've included the
maintainer here, but also posting the note and a patch for the iotop
SlackBuild to the list for further review.
A few comments regarding the issue and patch: Recent kernels, including
Slackware's 4.4.144 kernel, have introduced at least one blank line in
/proc//status which breaks the parse_proc_pid_status() function in
iotop/data.py. The added patch fix-proc-status-read.patch updates this
function to skip empty lines.
Additional reports of this issue can be found here:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1584612
[2]
https://unix.stackexchange.com/questions/446624/error-with-command-iotop-on-centos
[3] https://bugs.launchpad.net/pkg-website/+bug/1773383
The fix is based on the report in [2].
Best,
Jason
--
>From 27b7cdba96278d2bc67b60d7b8bb53114f7fcfc0 Mon Sep 17 00:00:00 2001
From: Jason Graham
Date: Sat, 18 Aug 2018 23:33:11 -0400
Subject: [PATCH] Fix for iotop issue with 4.4.144 kernel
Recent kernels, including Slackware's 4.4.144 kernel, have introduced
at least one blank line in /proc//status which breaks the
parse_proc_pid_status() function in iotop/data.py. The patch
fix-proc-status-read.patch updates this function to skip empty lines.
Additional reports of this issue can be found here:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1584612
[2] https://unix.stackexchange.com/questions/446624/error-with-command-iotop-on-centos
[3] https://bugs.launchpad.net/pkg-website/+bug/1773383
The fix is based on the report in [2].
---
system/iotop/fix-proc-status-read.patch | 10 ++
system/iotop/iotop.SlackBuild | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 system/iotop/fix-proc-status-read.patch
diff --git a/system/iotop/fix-proc-status-read.patch b/system/iotop/fix-proc-status-read.patch
new file mode 100644
index 00..b88d8b274f
--- /dev/null
+++ b/system/iotop/fix-proc-status-read.patch
@@ -0,0 +1,10 @@
+--- iotop-0.6.orig/iotop/data.py 2013-05-26 18:44:18.0 -0400
iotop-0.6/iotop/data.py 2018-08-18 23:21:03.528110821 -0400
+@@ -193,6 +193,7 @@
+ result_dict = {}
+ try:
+ for line in open('/proc/%d/status' % pid):
++if not line.strip(): continue
+ key, value = line.split(':\t', 1)
+ result_dict[key] = value.strip()
+ except IOError:
diff --git a/system/iotop/iotop.SlackBuild b/system/iotop/iotop.SlackBuild
index 2516bf1d43..e2c8327557 100644
--- a/system/iotop/iotop.SlackBuild
+++ b/system/iotop/iotop.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=iotop
VERSION=${VERSION:-0.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -55,6 +55,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/fix-proc-status-read.patch
+
sed -i 's|share/man/man8|man/man8|' setup.py
python setup.py install --root=$PKG
--
2.14.4
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/