Introduce

Linux Under the IO Statistical tools such as iostat, nmon Most of them can only count per Reading and writing of the device , If you want to know how each process works IO It's more troublesome .

iotop It is used to monitor the disk I/O In use top Class tools .iotop Have and top alike UI, These include PID、 user 、I/O、 Process and other relevant information .

 

example

Just run it directly

iotop

Output is as follows

 

Total DISK READ:       6.01 M/s | Total DISK WRITE:       3.85 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND                                                                                                          
20074 be/4 hadoop      6.01 M/s    0.00 B/s  0.00 %  4.54 % java -Dproc_datanode -Xmx8192m -server  org.apache.hadoop.hdfs.server.datanode.DataNode
 6371 be/4 hadoop      0.00 B/s    3.25 M/s  0.00 %  0.00 % java -Dproc_datanode -Xmx8192m -server  org.apache.hadoop.hdfs.server.datanode.DataNode
 8497 be/4 hadoop      0.00 B/s    3.67 M/s  0.00 %  0.00 % java -Dproc_datanode -Xmx8192m -server  org.apache.hadoop.hdfs.server.datanode.DataNode
    1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init
    2 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kthreadd]

 

By output , We can clearly know what program is reading and writing disk , Speed and command line ,pid Etc .