iotop/0017-Document-the-new-kernel.task_delayacct-sysctl-requir.patch

79 lines
3.0 KiB
Diff

From dd4fcc71b1184264bed25fbc0ce7e2d758d8c396 Mon Sep 17 00:00:00 2001
From: Paul Wise <pabs3@bonedaddy.net>
Date: Fri, 1 Oct 2021 07:32:49 +0800
Subject: [PATCH] Document the new kernel.task_delayacct sysctl requirement in
Linux 5.14
Fixes: https://github.com/Tomas-M/iotop/issues/21
Reported-by: @ManuLinares
Forwarded-by: Boian Bonev <bbonev@ipacct.com>
Conflict: Adapt patch context
Reference: https://repo.or.cz/iotop.git/commit/dd4fcc71b1184264bed25fbc0ce7e2d758d8c396
---
README | 3 ++-
iotop.8 | 3 ++-
iotop/data.py | 2 +-
iotop/ui.py | 4 +++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/README b/README
index cf9e050..3f490ab 100644
--- a/README
+++ b/README
@@ -1,7 +1,8 @@
Iotop is a Python program with a top like UI used to show of behalf of which
process is the I/O going on. It requires Python >= 2.7 and a Linux kernel >=
2.6.20 with the CONFIG_TASK_DELAY_ACCT CONFIG_TASKSTATS,
-CONFIG_TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on.
+CONFIG_TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS build options on
+and for Linux kernels since 5.14, the kernel.task_delayacct sysctl enabled.
To run a local version of iotop:
diff --git a/iotop.8 b/iotop.8
index e34fd6a..867871f 100644
--- a/iotop.8
+++ b/iotop.8
@@ -10,7 +10,8 @@ iotop watches I/O usage information output by the Linux kernel (requires
2.6.20 or later) and displays a table of current I/O usage by processes
or threads on the system. At least the CONFIG_TASK_DELAY_ACCT,
CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CONFIG_VM_EVENT_COUNTERS
-options need to be enabled in your Linux kernel build configuration.
+options need to be enabled in your Linux kernel build configuration and
+since Linux kernel 5.14, the kernel.task_delayacct sysctl enabled.
.PP
iotop displays columns for the I/O bandwidth read and written by each
process/thread during the sampling period. It also displays the percentage
diff --git a/iotop/data.py b/iotop/data.py
index befa9c7..606376f 100644
--- a/iotop/data.py
+++ b/iotop/data.py
@@ -49,7 +49,7 @@ if not ioaccounting or not vm_event_counters:
if not ioaccounting:
print(' - I/O accounting support ' \
'(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \
- 'CONFIG_TASK_IO_ACCOUNTING)')
+ 'CONFIG_TASK_IO_ACCOUNTING, kernel.task_delayacct sysctl)')
if not vm_event_counters:
print(' - VM event counters (CONFIG_VM_EVENT_COUNTERS)')
sys.exit(1)
diff --git a/iotop/ui.py b/iotop/ui.py
index 8d10721..5ab8fd4 100644
--- a/iotop/ui.py
+++ b/iotop/ui.py
@@ -456,7 +456,9 @@ class IOTopUI(object):
if Stats.has_blkio_delay_total:
status_msg = None
else:
- status_msg = ('CONFIG_TASK_DELAY_ACCT not enabled in kernel, '
+ status_msg = ('CONFIG_TASK_DELAY_ACCT '
+ 'and kernel.task_delayacct sysctl '
+ 'not enabled in kernel, '
'cannot determine SWAPIN and IO %')
help_lines = []
--
2.33.0