Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 279672
Collapse All | Expand All

(-)a/README (-2 / +2 lines)
Lines 1-7 Link Here
1
Iotop is a Python program with a top like UI used to show of behalf of which
1
Iotop is a Python program with a top like UI used to show of behalf of which
2
process is the I/O going on. It requires Python >= 2.5 (or Python >= 2.4 with
2
process is the I/O going on. It requires Python >= 2.5 (or Python >= 2.4 with
3
the ctypes module) and a Linux kernel >= 2.6.20 with the TASK_DELAY_ACCT and
3
the ctypes module) and a Linux kernel >= 2.6.20 with the TASK_DELAY_ACCT
4
TASK_IO_ACCOUNTING options enabled.
4
CONFIG_TASKSTATS, TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on.
5
5
6
6
7
To run a local version of iotop:
7
To run a local version of iotop:
(-)a/iotop.1 (-3 / +3 lines)
Lines 8-16 iotop \- simple top\-like I/O monitor Link Here
8
.SH DESCRIPTION
8
.SH DESCRIPTION
9
iotop watches I/O usage information output by the Linux kernel (requires
9
iotop watches I/O usage information output by the Linux kernel (requires
10
2.6.20 or later) and displays a table of current I/O usage by processes
10
2.6.20 or later) and displays a table of current I/O usage by processes
11
or threads on the system. At least the CONFIG_TASK_DELAY_ACCT and
11
or threads on the system. At least the CONFIG_TASK_DELAY_ACCT,
12
CONFIG_TASK_IO_ACCOUNTING options need to be enabled in your Linux kernel
12
CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CONFIG_VM_EVENT_COUNTERS
13
build configuration, these options depend on CONFIG_TASKSTATS.
13
options need to be enabled in your Linux kernel build configuration.
14
.PP
14
.PP
15
iotop displays columns for the I/O bandwidth read and written by each
15
iotop displays columns for the I/O bandwidth read and written by each
16
process/thread during the sampling period. It also displays the percentage
16
process/thread during the sampling period. It also displays the percentage
(-)a/iotop/data.py (-10 / +19 lines)
Lines 11-17 import time Link Here
11
11
12
#
12
#
13
# Check for requirements:
13
# Check for requirements:
14
#   o Linux >= 2.6.20 with I/O accounting
14
#   o Linux >= 2.6.20 with I/O accounting and VM event counters
15
#   o Python >= 2.5 or Python 2.4 + ctypes
15
#   o Python >= 2.5 or Python 2.4 + ctypes
16
#
16
#
17
17
Lines 22-37 except ImportError: Link Here
22
    has_ctypes = False
22
    has_ctypes = False
23
else:
23
else:
24
    has_ctypes = True
24
    has_ctypes = True
25
try:
26
    from iotop.vmstat import VmStat
27
    vmstat_f = VmStat()
28
except:
29
    vm_event_counters = False
30
else:
31
    vm_event_counters = True
25
32
26
if not ioaccounting or not has_ctypes:
33
if not ioaccounting or not has_ctypes or not vm_event_counters:
27
    def boolean2string(boolean):
28
        return boolean and 'Found' or 'Not found'
29
    print 'Could not run iotop as some of the requirements are not met:'
34
    print 'Could not run iotop as some of the requirements are not met:'
30
    print '- Linux >= 2.6.20 with I/O accounting support ' \
35
    if not ioaccounting or not vm_event_counters:
31
             '(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \
36
        print '- Linux >= 2.6.20 with'
32
             'CONFIG_TASK_IO_ACCOUNTING):', boolean2string(ioaccounting)
37
	if not ioaccounting:
33
    print '- Python >= 2.5 or Python 2.4 with the ctypes module:', \
38
            print '  - I/O accounting support ' \
34
        boolean2string(has_ctypes)
39
              '(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \
40
              'CONFIG_TASK_IO_ACCOUNTING)'
41
        if not vm_event_counters:
42
            print '  - VM event counters (CONFIG_VM_EVENT_COUNTERS)'
43
    if not has_ctypes:
44
        print '- Python >= 2.5 or Python 2.4 with the ctypes module'
35
45
36
    sys.exit(1)
46
    sys.exit(1)
37
47
38
- 

Return to bug 279672