44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
diff --git a/iotop/data.py b/iotop/data.py
|
|
index f5496d0..665397c 100644
|
|
--- a/iotop/data.py
|
|
+++ b/iotop/data.py
|
|
@@ -43,7 +43,6 @@ except (ImportError, RuntimeError):
|
|
# Check for requirements:
|
|
# o Linux >= 2.6.20 with I/O accounting and VM event counters
|
|
#
|
|
-
|
|
ioaccounting = os.path.exists('/proc/self/io')
|
|
|
|
try:
|
|
@@ -90,7 +89,7 @@ class Stats(DumpableObject):
|
|
('cancelled_write_bytes', 264)
|
|
]
|
|
|
|
- has_blkio_delay_total = False
|
|
+ has_blkio_delay_total = None
|
|
|
|
def __init__(self, task_stats_buffer):
|
|
sd = self.__dict__
|
|
@@ -101,7 +100,7 @@ class Stats(DumpableObject):
|
|
# This is a heuristic to detect if CONFIG_TASK_DELAY_ACCT is enabled in
|
|
# the kernel.
|
|
if not Stats.has_blkio_delay_total:
|
|
- Stats.has_blkio_delay_total = self.blkio_delay_total != 0
|
|
+ Stats.has_blkio_delay_total = sysctl_task_delayacct()
|
|
|
|
def accumulate(self, other_stats, destination, coeff=1):
|
|
"""Update destination from operator(self, other_stats)"""
|
|
diff --git a/iotop/ui.py b/iotop/ui.py
|
|
index 77f82c7..d9dc044 100644
|
|
--- a/iotop/ui.py
|
|
+++ b/iotop/ui.py
|
|
@@ -514,7 +514,7 @@ class IOTopUI(object):
|
|
else:
|
|
self.win.erase()
|
|
|
|
- if self.has_swapin_io:
|
|
+ if self.has_swapin_io is not False:
|
|
status_msg = None
|
|
else:
|
|
status_msg = ('CONFIG_TASK_DELAY_ACCT '
|