Linux /proc/diskstats各字段(域)解释

Linux /proc/diskstats各字段(域)解释

#cat /proc/diskstats 
   1       0 ram0 0 0 0 0 0 0 0 0 0 0 0
   1       1 ram1 0 0 0 0 0 0 0 0 0 0 0
   1       2 ram2 0 0 0 0 0 0 0 0 0 0 0
   1       3 ram3 0 0 0 0 0 0 0 0 0 0 0
   1       4 ram4 0 0 0 0 0 0 0 0 0 0 0
   1       5 ram5 0 0 0 0 0 0 0 0 0 0 0
   1       6 ram6 0 0 0 0 0 0 0 0 0 0 0
   1       7 ram7 0 0 0 0 0 0 0 0 0 0 0
   1       8 ram8 0 0 0 0 0 0 0 0 0 0 0
   1       9 ram9 0 0 0 0 0 0 0 0 0 0 0
   1      10 ram10 0 0 0 0 0 0 0 0 0 0 0
   1      11 ram11 0 0 0 0 0 0 0 0 0 0 0
   1      12 ram12 0 0 0 0 0 0 0 0 0 0 0
   1      13 ram13 0 0 0 0 0 0 0 0 0 0 0
   1      14 ram14 0 0 0 0 0 0 0 0 0 0 0
   1      15 ram15 0 0 0 0 0 0 0 0 0 0 0
   7       0 loop0 0 0 0 0 0 0 0 0 0 0 0
   7       1 loop1 0 0 0 0 0 0 0 0 0 0 0
   7       2 loop2 0 0 0 0 0 0 0 0 0 0 0
   7       3 loop3 0 0 0 0 0 0 0 0 0 0 0
   7       4 loop4 0 0 0 0 0 0 0 0 0 0 0
   7       5 loop5 0 0 0 0 0 0 0 0 0 0 0
   7       6 loop6 0 0 0 0 0 0 0 0 0 0 0
   7       7 loop7 0 0 0 0 0 0 0 0 0 0 0
  43       0 nbd0 0 0 0 0 0 0 0 0 0 0 0
  43       1 nbd1 0 0 0 0 0 0 0 0 0 0 0
  43       2 nbd2 0 0 0 0 0 0 0 0 0 0 0
  43       3 nbd3 0 0 0 0 0 0 0 0 0 0 0
  43       4 nbd4 0 0 0 0 0 0 0 0 0 0 0
  43       5 nbd5 0 0 0 0 0 0 0 0 0 0 0
  43       6 nbd6 0 0 0 0 0 0 0 0 0 0 0
  43       7 nbd7 0 0 0 0 0 0 0 0 0 0 0
  43       8 nbd8 0 0 0 0 0 0 0 0 0 0 0
  43       9 nbd9 0 0 0 0 0 0 0 0 0 0 0
  43      10 nbd10 0 0 0 0 0 0 0 0 0 0 0
  43      11 nbd11 0 0 0 0 0 0 0 0 0 0 0
  43      12 nbd12 0 0 0 0 0 0 0 0 0 0 0
  43      13 nbd13 0 0 0 0 0 0 0 0 0 0 0
  43      14 nbd14 0 0 0 0 0 0 0 0 0 0 0
  43      15 nbd15 0 0 0 0 0 0 0 0 0 0 0
   8       0 sda 549777 35839 48655290 353296 285852531 270674454 23598501184 1627484664 0 35769216 1628477016
   8       1 sda1 188365 244 7092790 70348 48436542 57709146 893944848 98063104 0 16487156 98122164
   8       2 sda2 5660 34875 324760 2928 9037 884966 7152024 1441584 0 68656 1444500
   8       3 sda3 53869 384 13757434 101320 98631196 90482658 1704096320 210100604 0 18696088 210181884
   8       4 sda4 301824 281 27479394 178684 138775364 121597684 20993307992 1317879344 0 32255376 1318053612
   8     112 sdh 135004606 5309 12555786665 727680684 1657804396 1723755 89268220564 859784176 0 1177096060 1586544372
   8      32 sdc 276384325 41005 24054697153 1868389280 3975079060 13766917 130719096760 2162598356 0 2842833844 4028890228
   8      48 sdd 150689363 12941 12856635480 762229996 1860172430 6899928 91755732500 942488756 0 1274839764 1703683672
   8     128 sdi 155832262 13419 12884534888 771389896 1614662965 6479233 88068295060 890997808 0 1220473140 1661462316
   8      64 sde 142592693 7558 12733632114 775885688 2423235788 3055715 94961128334 1121828244 0 1434338104 1896387192
   8      96 sdg 132844902 4020 12368639539 747884668 2554758577 1732941 101274281449 1155957652 0 1415725308 1902494804
   8     192 sdm 145313122 19019 12750896103 773882524 1557634593 8133968 88013815953 886389772 0 1217428792 1659366236
   8     176 sdl 176685929 19485 14322230672 1013800448 1569741016 10645496 91889424736 906823596 0 1410525896 1919701224
   8      16 sdb 400107112 3276 14294648903 802173628 1682264105 1320301 93990798189 931435912 0 1261271880 1732609808
   8      80 sdf 130992747 4477 12138665802 697099096 1831245556 2053050 94700535525 983005076 0 1211624700 1679067700
   8     144 sdj 135684800 9026 12662717221 757347396 2725939977 3239499 98807251551 1191356404 0 1467935940 1947336080
   8     160 sdk 152477809 14319 13496248797 854720988 2017927038 10023519 94533563073 990602344 1 1383165252 1844222404
   9       0 md0 0 0 0 0 0 0 0 0 0 0 0

这个文件用于显示磁盘、分区和统计信息:如sda为整个硬盘的统计信息,sda1为第一个分区的统计信息,sda2为第二个分区的统计信息,ramdisk设备为通过软件将RAM当做硬盘来使用的一项技术。

各域含义

/proc/diskstats文件比/sys/block/sda/stat文件多3个域,从左至右分别对应主设备号,次设备号和设备名称。后续的11个域在这两个文件里是相同的,它们的函义将在下面解释。除了第9个域,所有的域都是从启动时的累积值。

第1个域:读完成次数 ----- 读磁盘的次数,成功完成读的总次数。

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

第2个域:合并读完成次数, 第6个域:合并写完成次数。为了效率可能会合并相邻的读和写。从而两次4K的读在它最终被处理到磁盘上之前可能会变成一次8K的读,才被计数(和排队),因此只有一次I/O操作。这个域使你知道这样的操作有多频繁。

(number of reads merged)

第3个域:读扇区的次数,成功读过的扇区总次数。

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

第4个域:读花费的毫秒数,这是所有读操作所花费的毫秒数(用__make_request()到end_that_request_last()测量)。
(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()).)

第5个域:写完成次数 ----写完成的次数,成功写完成的总次数。

(number of writes completed. This is the total number of writes completed successfully.)

第6个域:合并写完成次数 -----合并写次数。

(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.)

第7个域:写扇区次数 ---- 写扇区的次数,成功写扇区总次数。

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

第8个域:写操作花费的毫秒数 — 写花费的毫秒数,这是所有写操作所花费的毫秒数(用__make_request()到end_that_request_last()测量)。

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

第9个域:正在处理的输入/输出请求数 – -I/O的当前进度,只有这个域应该是0。当请求被交给适当的request_queue_t时增加和请求完成时减小。

(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.)

第10个域:输入/输出操作花费的毫秒数 ----花在I/O操作上的毫秒数,这个域会增长只要field 9不为0。

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

第11个域:输入/输出操作花费的加权毫秒数 ----- 加权, 花在I/O操作上的毫秒数,在每次I/O开始,I/O结束,I/O合并时这个域都会增加。这可以给I/O完成时间和存储那些可以累积的提供一个便利的测量标准。

(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.)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值