Documentation/block/stat.txt

 

Chinese translated version of Documentation/filesystems/ecryptfs.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: 谢尚敬 <1479201451@qq.com>

---------------------------------------------------------------------

Documentation/block/stat.txt的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文

交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻

译存在问题,请联系中文版维护者。

中文版维护者: 谢尚敬 <1479201451@qq.com>

中文版翻译者: 谢尚敬 <1479201451@qq.com>

中文版校译者: 谢尚敬 <1479201451@qq.com>

以下为正文

---------------------------------------------------------------------

 

Block layer statistics in /sys/block/<dev>/stat

在 /sys/block/<dev>/stat的块层统计

===============================================

  

This file documents the contents of the /sys/block/<dev>/stat file.

此文件纪录了 /sys/block/<dev>/stat 文件中的内容。

 

The stat file provides several statistics about the state of block device <dev>.

Stat 文件提供了几个有关块设备 <dev>状态的统计信息。

 

Q. Why are there multiple statistics in a single file?  Doesn't sysfs normally contain a single value per file?

Q:为什么在单个文件中有多个统计数字?Sysfs 通常不包含每个文件的单个值吗?

 

A. By having a single file, the kernel can guarantee that the statistics represent a consistent snapshot of the state of the device.  If the  statistics were exported as multiple files containing one statistic each, it would be impossible to guarantee that a set of readings represent a single point in time.

A:通过单个文件,内核可以保证,一个同样设备的短时状态的统计数字。如果统计被导出,每个都包含一个统计数字的多个文件,那么就不可能保证,它这一套的读数,能够表示单个点的时间。

 

The stat file consists of a single line of text containing 11 decimal values separated by whitespace.  The fields are summarized in the following table, and described in more detail below.

Stat 文件包括了,含有空格分隔的 11 十进制值的单行文本。字段在下面的表中总结了,然后下面还有更详细的描述。

 

  Name            units         description

  ----            -----         -----------

  read I/Os       requests      number of read I/Os processed

  read merges     requests      number of read I/Os merged with in-queue I/O

  read sectors    sectors       number of sectors read

  read ticks      milliseconds  total wait time for read requests

  write I/Os      requests      number of write I/Os processed

  write merges    requests      number of write I/Os merged with in-queue I/O

  write sectors   sectors       number of sectors written

  write ticks     milliseconds  total wait time for write requests

  in_flight       requests      number of I/Os currently in flight

  io_ticks        milliseconds  total time this block device has been active

  time_in_queue   milliseconds  total wait time for all requests

 

  read I/Os, write I/Os

读取 I/Os,写入 I/Os

  =====================

 

  These values increment when an I/O request completes.

  这些值在完成一个 I/O 请求时递增。

 

  read merges, write merges

合并读取、 写入合并

  =========================

 

  These values increment when an I/O request is merged with an already-queued I/O request.

  这些值在一个 I/O 请求合并一个已排队的 I/O 请求时递增。

 

  read sectors, write sectors

读取扇区、 写入扇区

  ===========================

 

  These values count the number of sectors read from or written to this block device.  The "sectors" in question are the standard UNIX 512-byte sectors, not any device- or filesystem-specific block size.  The counters are incremented when the I/O completes.

这些值对读取或写入到此块设备的扇区,进行计数。问题"扇区"是标准的 UNIX 512 字节扇区,没有任何特定的设备或文件系统块的容量。当在 I/O 完成时,计数器递增。

 

  read ticks, write ticks

读取刻度、 写入刻度

  =======================

 

These values count the number of milliseconds that I/O requests have waited on this block device.  If there are multiple I/O requests waiting, these values will increase at a rate greater than 1000/second; for example, if 60 read requests wait for an average of 30 ms, the read_ticks field will increase by 60*30 = 1800.

     这些值纪录了在此块设备上已经等待了的I/O 请求的毫秒数。如果有多个 I/O 请求等待,那么这些值速度的增加将大于 1000年/秒 ;例如,如果 60读请求的平均等待时间为 30 ms,read_ticks 字段将增加 60 * 30 = 1800。

 

in_flight

=========

 

This value counts the number of I/O requests that have been issued to the device driver but have not yet completed.  It does not include I/O requests that are in the queue but not yet issued to the device driver.

      此值统计了,已经发给设备驱动程序,但尚未完成的 I/O 请求的数量。它不包括 I/O 请求在队列中,但尚未发出的设备驱动程序。

 

 

 

  io_ticks

  ========

 

  This value counts the number of milliseconds during which the device has had I/O requests queued.

  该设备统计了I/O 请求排队期间的毫秒数。

 

  time_in_queue

  =============

 

This value counts the number of milliseconds that I/O requests have waited on this block device.  If there are multiple I/O requests waiting, this value will increase as the product of the number of milliseconds times the number of requests waiting (see "read ticks" above for an example).

此值统计了已经在此块设备上,等待的I/O 请求的毫秒数。如果有多个 I/O 请求等待,那么此值将增加,并且记作该产品以毫秒为单位的请求等待的次数(见"read ticks"的例子)。

 

原文地址: http://lxr.linux.no/#linux+v3.11.6/Documentation/block/stat.txt
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值