Chinese translated version of Documentation\stat.txt
If you have any comment or update to the content, please contact theoriginal document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese
maintainer forhelp. Contact the Chinese maintainer if this translation is outdatedor if there is a problem with the translation.
Chinese maintainer: 朱锋志 605509916@qq.com
---------------------------------------------------------------------
Documentation\driver-model\drives的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者:朱锋志 605509916@qq.com
中文版翻译者: 朱锋志 605509916@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>.
属性文件提供了一些关于块设备<dev>的统计信息。
Q. Why are there multiple statistics in a single file? Doesn't sysfs
normally contain a single value per file?
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.
问:为什么在一个文件中有多个统计?而不是sysfs每个文件中通常包含通常包含一个值?
答:有一个单一的文件,内核可以保证统计数据表示设备状态的一致。如果统计数据导出
为多个文件,其中包含每一个统计,就不可能保证一组读数表示单个时间点。
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.
统计文件由单行文本中包含由空格隔开的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 需求 读取I / O处理的数
read merges 需求 读合并在I/O队列的I/O的数
read sectors 扇区 读取的扇区数
read ticks 毫秒 总的读请求的等待时间
write I/Os 需求 写入I / O处理的数
write merges 需求 写合并在I/O队列的I/O的数
write sectors 扇区 写入的扇区数
write ticks 毫秒 总的写请求的等待时间
in_flight 需求 当前在飞行状态的I/O数
io_ticks 毫秒 块设备一直活跃的总时间
time_in_queue 毫秒 总的所有请求的等待时间
read I/Os, write I/Os
读取I / O,写入I / O
=====================
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.
这些值计数读取或写入到块设备的扇区数量。“sectors”的问题是标准的UNIX512字
节扇区,没有任何设备或文件系统特定的块大小。I / O完成时,计数器递增。
read ticks, write ticks
读ticks,写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毫秒,
read_ticks领域将增加60 * 30=1800。
in_flight
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
io_ticks
========
This value counts the number of milliseconds during which the device has
had I/O requests queued.
此值计算在此期间该设备已排队的I/O请求的毫秒数。
time_in_queue
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”上述的一个例子)