1
From: Paul Wise <pabs3@bonedaddy.net>
2
Date: Mon, 31 May 2010 16:42:06 +0800
3
Subject: Document the requirement for CONFIG_VM_EVENT_COUNTERS and check for it on startup.
4
Bug-Debian: http://bugs.debian.org/574346
5
Forwarded: Guillaume Chazarain <guichaz@gmail.com>
9
Iotop is a Python program with a top like UI used to show of behalf of which
10
process is the I/O going on. It requires Python >= 2.5 (or Python >= 2.4 with
11
-the ctypes module) and a Linux kernel >= 2.6.20 with the TASK_DELAY_ACCT and
12
-TASK_IO_ACCOUNTING options enabled.
13
+the ctypes module) and a Linux kernel >= 2.6.20 with the TASK_DELAY_ACCT
14
+CONFIG_TASKSTATS, TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on.
17
To run a local version of iotop:
22
iotop watches I/O usage information output by the Linux kernel (requires
23
2.6.20 or later) and displays a table of current I/O usage by processes
24
-or threads on the system. At least the CONFIG_TASK_DELAY_ACCT and
25
-CONFIG_TASK_IO_ACCOUNTING options need to be enabled in your Linux kernel
26
-build configuration, these options depend on CONFIG_TASKSTATS.
27
+or threads on the system. At least the CONFIG_TASK_DELAY_ACCT,
28
+CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CONFIG_VM_EVENT_COUNTERS
29
+options need to be enabled in your Linux kernel build configuration.
31
iotop displays columns for the I/O bandwidth read and written by each
32
process/thread during the sampling period. It also displays the percentage
38
# Check for requirements:
39
-# o Linux >= 2.6.20 with I/O accounting
40
+# o Linux >= 2.6.20 with I/O accounting and VM event counters
41
# o Python >= 2.5 or Python 2.4 + ctypes
49
+ from iotop.vmstat import VmStat
52
+ vm_event_counters = False
54
+ vm_event_counters = True
56
-if not ioaccounting or not has_ctypes:
57
+if not ioaccounting or not has_ctypes or not vm_event_counters:
58
print 'Could not run iotop as some of the requirements are not met:'
59
- if not ioaccounting:
60
- print '- Linux >= 2.6.20 with I/O accounting support ' \
61
+ if not ioaccounting or not vm_event_counters:
62
+ print '- Linux >= 2.6.20 with'
63
+ if not ioaccounting:
64
+ print ' - I/O accounting support ' \
65
'(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \
66
'CONFIG_TASK_IO_ACCOUNTING)'
67
+ if not vm_event_counters:
68
+ print ' - VM event counters (CONFIG_VM_EVENT_COUNTERS)'
70
print '- Python >= 2.5 or Python 2.4 with the ctypes module'