系统io统计

时间:2019-10-16 18:31:16   收藏:0   阅读:73
 
$ cat /proc/diskstats
   8       0 sda 61956814 17784 10611545630 25247251 81500542 90293241 18537974922 158892176 0 19476563 183932800
   8       1 sda1 36834 0 711618 8857 1066794 1088773 4311554 5979 0 10784 14759
   8       2 sda2 61919793 17784 10610832348 25238366 80433748 89204468 18533663368 158886197 0 19467225 183912764
 253       0 gg-0 5623688 0 126996682 1287038 20634674 0 185895864 1189423 0 1248510 2481206
 253       1 gg-1 128 0 2136 15 0 0 0 0 0 15 15
 253       2 gg-2 56342914 0 10483832346 23884963 149036514 0 18347767504 183502049 0 18282017 207482318 主号    次号  名称 成功读 合并读      扇区读    读时间

 

 

每一列的含义分别为:

(number of issued reads. This is the total number of reads completed successfully.)

(number of reads merged)

(number of sectors read. This is the total number of sectors read successfully.)

(number of milliseconds spent reading. This is the total number of milliseconds spent by all reads (as measured from __make_request() to end_that_request_last()).)

(number of writes merged Reads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done.)

number of I/Os currently in progress. The only field that should go to zero. Incremented as requests are given to appropriate request_queue_t and decremented as they finish.)

(number of milliseconds spent doing I/Os. This field is increased so long as field 9 is nonzero.)

(number of milliseconds spent doing I/Os. This field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress (field 9) times the number of milliseconds spent doing I/O since the last update of this field. This can provide an easy measure of both I/O completion time and the backlog that may be accumulating.)

可以参考:

  The /proc/diskstats file displays the I/O statistics
    of block devices. Each line contains the following 14
    fields:
     1 - major number
     2 - minor mumber
     3 - device name
     4 - reads completed successfully
     5 - reads merged
     6 - sectors read
     7 - time spent reading (ms)
     8 - writes completed
     9 - writes merged
    10 - sectors written
    11 - time spent writing (ms)
    12 - I/Os currently in progress
    13 - time spent doing I/Os (ms)
    14 - weighted time spent doing I/Os (ms)

/sys/block/device_name/stat的输出和上面各个字段是一样的。

原文:https://www.cnblogs.com/igoodful/p/11686564.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!