Documentation/Block/Start.txt Chinese Translation

本文详细介绍在/sys/block/<dev>/stat文件中所记录的块设备统计信息,包括读写I/O次数、合并次数、读写扇区数量、等待时间等关键指标,并解释了这些指标的具体含义及统计原理。

Chinese translated version of Documentation/Block/Start.txt

If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.

Chinese maintainer: 406574655@qq.com
---------------------------------------------------------------------
Documentation/Block/Start.txt 的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者: 王超  406574655@qq.com
中文版翻译者: 王超  406574655@qq.com
中文版校译者: 王超  406574655@qq.com

 


Block layer statistics in /sys/block/<dev>/stat  
  在/sys/block/<dev>/stat中的块层统计
   2===============================================
   3
   4This file documents the contents of the /sys/block/<dev>/stat file.
       此文件记录/ SYS/块/<dev>/统计文件的内容。
   6  The stat file provides several statistics about the state of block
   7 device <dev>.
       统计文件提供几个状态块设备<dev>的统计信息。
   8
   9  Q.Why are there multiple statistics in a single file?  Doesn't sysfs
  10   normally contain a single value per file?
         为什么在一个单一的文件中会有多个统计量?是不是sysfs中每个文件通常包含一个单一的值?
  11A. By having a single file, the kernel can guarantee that the statistics
  12   represent a consistent snapshot of the state of the device.  If the
  13   statistics were exported as multiple files containing one statistic
  14   each, it would be impossible to guarantee that a set of readings
  15   represent a single point in time.
  有一个单一的文件,内核可以保证统计数据表示设备的状态一致的快照。如果统计数据导出为多个文件,
  其中包含每一个统计,这将是不可能,保证读数一组代表一个单一的时间点。
  16
  17 The stat file consists of a single line of text containing 11 decimal
  18 values separated by whitespace.  The fields are summarized in the
  19 following table, and described in more detail below.
  20     统计文件由单行文本中包含由空格隔开的11个十进制值数。下表中的字段的汇总,并在下面更详细描述。
  21Name            units         description
  22----            -----         -----------
  23read I/Os       requests      number of read I/Os processed
  24read merges     requests      number of read I/Os merged with in-queue I/O
  25read sectors    sectors       number of sectors read
  26read ticks      milliseconds  total wait time for read requests
  27write I/Os      requests      number of write I/Os processed
  28write merges    requests      number of write I/Os merged with in-queue I/O
  29write sectors   sectors       number of sectors written
  30write ticks     milliseconds  total wait time for write requests
  31in_flight       requests      number of I/Os currently in flight
  32io_ticks        milliseconds  total time this block device has been active
  33time_in_queue   milliseconds  total wait time for all requests
  34
  35read I/Os, write I/Os
  36=====================
  37
  38 These values increment when an I/O request completes.
  39     这些值将会在I/O请求完成后自动增加。
  40 read merges, write merges
  读合并,写合并
  41=========================
  42
  43 These values increment when an I/O request is merged with an
  44 already-queued I/O request.
  这些值在I / O请求并且被合并已排队的I / O请求后将会递增。
  45
  46 read sectors, write sectors  读取的扇区,写扇区。
  47===========================
  48
  49 These values count the number of sectors read from or written to this
  50 block device.  The "sectors" in question are the standard UNIX 512-byte
  51 sectors, not any device- or filesystem-specific block size.  The
  52 counters are incremented when the I/O completes.
  53     计数这些值读取或写入到这个块设备行业。“扇区”的问题是标准的UNIX512字节扇区,
  没有任何设备或文件系统特定的块大小。I / O完成时,计数器递增。
  54 read ticks, write ticks
  55=======================
  56
  57 These values count the number of milliseconds that I/O requests have
  58 waited on this block device.  If there are multiple I/O requests waiting,
  59 these values will increase at a rate greater than 1000/second; for
  60 example, if 60 read requests wait for an average of 30 ms, the read_ticks
  61 field will increase by 60*30 = 1800.
        这些值计算的毫秒数已经等候在此块设备I / O请求。如果有多个I / O请求等待,
  这些值将大于每秒1000次的速度增加,例如,如果60的读取请求的平均等待30毫秒,
  read_ticks领域将增加60 * 30=1800。
  62
  63 in_flight
  64=========
  65
  66 This value counts the number of I/O requests that have been issued to
  67 the device driver but have not yet completed.  It does not include I/O
  68 requests that are in the queue but not yet issued to the device driver.
        此值计算已颁布的设备驱动程序,但尚未完成的I / O请求的数量。它不包括I / O请求都在排队,
  但尚未发行的设备驱动程序。
  69
  70io_ticks
  71========
  72
  73 This value counts the number of milliseconds during which the device has
  74 had I/O requests queued.
        当设备获得I/O队列请求,这个值就会以毫秒为单位计时。
  75
  76 time_in_queue  队列时间
  77=============
  78
  79 This value counts the number of milliseconds that I/O requests have waited
  80 on this block device.  If there are multiple I/O requests waiting, this
  81 value will increase as the product of the number of milliseconds times the
  82 number of requests waiting (see "read ticks" above for an example).
  在等待这个块设备上的I / O请求时该值以毫秒数计数,如果有多个I / O请求等待,
  这个值将增加的毫秒数乘以等待请求的数目(见“读取蜱”上述的一个例子)作为输出。
  83

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值