The iotop command is a dedicated command for displaying hard disk I/O. The interface style is similar to the top command. This command is available only in kernelv2.6.20 and later versions. 1. install yum directly. The rh6 disc contains a package. Yuminstalliotop2, command parameter introduction-o, -- onlyOnlyshowprocessesorthreadsactuallydoingI/O, ins
The iotop command is a dedicated command for displaying hard disk I/O. The interface style is similar to the top command. This command is available only in kernelv2.6.20 and later versions.
1. install yum directly. The rh6 disc contains a package.
Yum install iotop
2. Introduction to command parameters
-O, -- only
Only show processes or threadsactually doing I/O, instead of showing all processes or threads. This can be dynamically toggled by pressing o.
-B, -- batch
Turn on non-interactive mode. Useful for logging I/O usage over time.
-N NUM, -- iter = NUM
Set the number of iterations beforequitting (never quit by default). This is most useful innon-interactive mode.
-D SEC, -- delay = SEC
Set the delay between iterations inseconds (1 second by default). Accepts non-integer valuessuch as 1.1 seconds.
-P PID, -- pid = PID
A list of processes/threads tomonitor (all by default ).
-U USER, -- user = USER
A list of users to monitor (all bydefault)
-P, -- processes
Only show processes. Normally iotopshows all threads.
-A, -- accumulated
Show accumulated I/O instead ofbandwidth. In this mode, iotop shows the amount of I/O processeshave done since iotop started.
-K, -- kilobytes
Use kilobytes instead of ahuman friendly unit. This mode is useful when scripting the batchmode of iotop. Instead of choosing the most appropriate unit iotopwill dis?
Play all sizes in kilobytes.
-T, -- time
Add a timestamp on each line (implies -- batch). Each line will be prefixed by the current time.
-Q, -- quiet
Suppress some lines of header (implies -- batch). This option can be specified up to three timesto remove header lines.
-Q column names areonly printed on the first iteration,
-Qq column names arenever printed,
-Qqq the I/O summary is neverprinted.
3. use
[Root @ localhost tmp] # iotop-o
Keyboard shortcut for iotop command:
1. the left and right arrows change the sorting method. the default value is IO sorting.
2. the r key is in reverse order.
3. the o key only displays processes with IO output.
4. q exits.