forked from Tomas-M/iotop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiotop.8
250 lines (248 loc) · 8.63 KB
/
iotop.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
.TH IOTOP "8" "January 28, 2021"
.SH NAME
iotop \- simple top\-like I/O monitor
.SH SYNOPSIS
.B iotop
[\fIOPTIONS\fR]
.SH DESCRIPTION
\fBiotop\fR watches I/O usage information available in 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.
.PP
Running \fBiotop\fR as non-root user is possible by adding the NET_ADMIN capability.
This can be done by e.g.:
.RS
.B
$ sudo setcap 'cap_net_admin+eip' <path-to>/iotop
.RE
Be warned that this will also allow other users to run it and get access to
information that normally should not be available to them.
.PP
\fBiotop\fR displays columns for the I/O bandwidth read and written by each
process/thread during the sampling period. It also displays the percentage
of time the thread/process spent while swapping in and while waiting on I/O. For each process, its I/O priority (class/level) is shown.
.PP
In addition, the total I/O bandwidth read and written during the sampling
period are displayed at the top of the interface.
\fBTotal DISK READ\fR and \fBTotal DISK WRITE\fR values represent total read
and write bandwidth between processes and kernel threads on one side and
kernel block device subsystem on the other. While \fBCurrent DISK READ\fR and
\fBCurrent DISK WRITE\fR values represent corresponding bandwidths for current
disk I/O between the kernel block device subsystem and the underlying hardware (HDD, SSD, etc.).
Thus \fBTotal\fR and \fBCurrent\fR values may not be equal at any given moment of time
due to data caching and I/O operations reordering that take place inside the Linux kernel.
.PP
Use the \fBleft\fR and \fBright\fR arrows to select the sort column, \fBr\fR or \fBspace\fR to reverse the
sorting order, \fBo\fR to toggle the \fB\-\-only\fR option (this uses the visible values from the \fBGRAPH\fR column
or the \fBIO\fR column in case the \fBGRAPH\fR column is hidden), \fBp\fR to toggle the \fB\-\-processes\fR option, \fBa\fR
to toggle the \fB\-\-accumulated\fR option, \fBi\fR to change the priority of a thread or a
process's thread, \fBf\fR to change filtering by \fBUID\fR/\fBPID\fR (\fB\-\-user\fR and \fB\-\-pid\fR options),
\fB1-9\fR to toggle the visibility of the respective column, \fB0\fR to show all columns, \fBup\fR/\fBdown\fR arrows,
\fBpage-up\fR/\fBpage-down\fR/\fBhome\fR/\fBend\fR keys to scroll and \fBq\fR to quit.
Any unrecognized key will be ignored.
.PP
All processes or threads that have exited are displayed grayed for the same time as is visible in the \fBGRAPH\fR column or 3 seconds
when it is hidden. The invalid data points in the \fBGRAPHS\fR column are displayed inverse or with letter \fBx\fR
(see option \fB\-\-dead\-x\fR and \fBx\fR shortcut). When using unicode characters each position contains two datapoints
and only the positions with two invalid data points are reversed.
.PP
It is possible for threads of a process to have different priority from their main process. This is shown with \fB!\fR in the
\fBPRIO\fR column of the main process as e.g. \fB!be/4\fR.
.PP
Threads activity is always aggregated with and shown inside the main process.
.PP
When showing threads, they always appear below their main process and are sorted in the same way as the processes.
.PP
There are two ways to change the IO priority of a process or thread - press \fBi\fR and use arrows to select the
process or thread from the visible ones on screen or press \fBi\fR and type its TID (PID and TID have the same value
for the main process).
Then use \fBtab\fR and arrows to change the priority value and confirm with \fBenter\fR.
Shortcuts \fBesc\fR or \fBq\fR will cancel this mode.
.PP
To change the UID and PID filters, press \fBf\fR and use \fBtab\fR to select the
UID or PID field, then type the numerical id or \fBn\fR to remove the filter and confirm with \fBenter\fR.
Filtering is always done by \fBTID\fR because it is unique. Note that for the main process PID is the same
as TID.
Shortcuts \fBesc\fR or \fBq\fR will cancel this mode.
.SH OPTIONS
.TP
\fB\-v\fR, \fB\-\-version\fR
Show the version number and exit
.TP
\fB\-h\fR, \fB\-\-help\fR
Show usage information and exit
.TP
\fB\-o\fR, \fB\-\-only\fR
Only show processes or threads actually doing I/O, instead of showing all processes or threads.
This can be dynamically toggled by pressing \fBo\fR
.TP
\fB\-b\fR, \fB\-\-batch\fR
Turn on non\-interactive mode.
Useful for logging I/O usage over time
.TP
\fB\-n\fR NUM, \fB\-\-iter\fR=\fINUM\fR
Set the number of iterations before quitting (never quit by default).
This is most useful in non\-interactive mode
.TP
\fB\-d\fR SEC, \fB\-\-delay\fR=\fISEC\fR
Set the delay between iterations in seconds (1 second by default).
Accepts non-integer values such as 1.1 seconds
.TP
\fB\-p\fR PID, \fB\-\-pid\fR=\fIPID\fR
A process/thread id to monitor (all by default)
.TP
\fB\-u\fR USER, \fB\-\-user\fR=\fIUSER\fR
A user id to monitor (all by default).
The value will always be resolved first unless it is prefixed by \fB+\fR in which case it is threated as numeric only.
Values that do not resolve but appear to be numeric are used as numeric
.TP
\fB\-P\fR, \fB\-\-processes\fR
Only show processes. Normally \fBiotop\fR shows processes and all threads
.TP
\fB\-a\fR, \fB\-\-accumulated\fR
Show accumulated I/O instead of bandwidth.
In this mode, \fBiotop\fR shows the amount of I/O processes have done since \fBiotop\fR started
.TP
\fB\-k\fR, \fB\-\-kilobytes\fR
Use kilobytes instead of a human friendly unit.
This mode is useful when scripting the batch mode of \fBiotop\fR.
Instead of choosing the most appropriate unit \fBiotop\fR will display all sizes in kilobytes
.TP
\fB\-t\fR, \fB\-\-time\fR
Add a timestamp on each line (implies \-\-batch). Each line will be prefixed by the current time
.TP
\fB\-c\fR, \fB\-\-fullcmdline\fR
Show processes' full file path and parameters
.TP
\fB\-1\fR, \fB\-\-hide-pid\fR
Hide PID/TID column
.TP
\fB\-2\fR, \fB\-\-hide-prio\fR
Hide PRIO column
.TP
\fB\-3\fR, \fB\-\-hide-user\fR
Hide USER column
.TP
\fB\-4\fR, \fB\-\-hide-read\fR
Hide DISK READ column
.TP
\fB\-5\fR, \fB\-\-hide-write\fR
Hide DISK WRITE column
.TP
\fB\-6\fR, \fB\-\-hide-swapin\fR
Hide SWAPIN column
.TP
\fB\-7\fR, \fB\-\-hide-io\fR
Hide IO column
.TP
\fB\-8\fR, \fB\-\-hide-graph\fR
Hide GRAPH column
.TP
\fB\-9\fR, \fB\-\-hide-command\fR
Hide COMMAND column
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Suppress some lines of header (implies \-\-batch). This option can be specified up to three times to remove header lines
.RS
.PD 0
.TP
.B \-q
column names are only printed on the first iteration,
.TP
.B \-qq
column names are never printed,
.TP
.B \-qqq
the I/O summary is never printed
.RE
.PD 1
.TP
\fB\-x\fR, \fB\-\-dead\-x\fR
Show dead processes/threads with letter x instead of inverse background
.PD 1
.SH KEYBOARD SHORTCUTS
.TP
\fBq\fR, \fBQ\fR
Exit
.TP
\fB<space>\fR, \fBr\fR, \fBR\fR
Toggle sort order
.TP
\fB<home>\fR
Scroll to the top of the list
.TP
\fB<end>\fR
Scroll to the bottom of the list
.TP
\fB<page-up>\fR
Scroll one screen up
.TP
\fB<page-down>\fR
Scroll one screen down
.TP
\fB<up>\fR
Scroll one line up
.TP
\fB<down>\fR
Scroll one line down
.TP
\fB<right>\fR
Sort by next column
.TP
\fB<left>\fR
Sort by previous column
.TP
\fB<esc>\fR
Cancel ionice or filter selection. In case only the help window is open then close it
.TP
\fBo\fR, \fBO\fR
Toggle showing only processes with IO activity
.TP
\fBp\fR, \fBP\fR
Toggle showing processes/threads
.TP
\fBa\fR, \fBA\fR
Toggle showing accumulated/current values
.TP
\fB?\fR, \fBh\fR, \fBH\fR
Toggle showing shortcut help
.TP
\fBc\fR, \fBC\fR
Toggle showing full command line
.TP
\fB1\fR, \fB2\fR, \fB3\fR, \fB4\fR, \fB5\fR, \fB6\fR, \fB7\fR, \fB8\fR, \fB9\fR
Toggle showing the column (column number corresponds to the shortcut)
.TP
\fB0\fR
Show all columns
.TP
\fBi\fR, \fBI\fR
IOnice a process/thread (depends on process/thread display mode)
.TP
\fBf\fR, \fBF\fR
Change UID and PID filters
.TP
\fBu\fR, \fBU\fR
Toggle using Unicode/ASCII characters for pseudo graph
.TP
\fBx\fR, \fBX\fR
Toggle the display mode of exited processes/threads between letter x and inverse background
.TP
\fBs\fR, \fBS\fR
Toggle freeze of data collection
.SH SEE ALSO
.BR ionice (1),
.BR top (1),
.BR vmstat (1),
.BR atop (1),
.BR htop (1)
.SH AUTHOR
The original Python iotop implementation was written by Guillaume Chazarain.
This rewrite in C was started in 2014 by Vyacheslav Trushkin and
reworked to include all missing features from the original Python code and
several new ones in 2020 and 2021 by Boian Bonev.
.PP
This manual page was started by Paul Wise for the
Debian project and is placed in the public domain.