Documentation/block/stat

Chinese translated version of Documentation/block/stat

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:Hu Feijun <935620544@qq.com>
---------------------------------------------------------------------
Documentation/block/stat 的中文翻译

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

中文版维护者: 胡飞军  Hu Feijun <935620544@qq.com>
中文版翻译者: 胡飞军  Hu Feijun <935620544@qq.com>
中文版校译者: 胡飞军  Hu Feijun <935620544@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.
问题.为什么在一个文件中有多个统计信息?正常来说不是一个文件包含
一个值吗?  
答案。如果只用一个文件,内核就能保证块设备统计信息所代表的块状态的
快照是一致的。如果这些统计上信息是作为多个文件输出,每个文件包含一
个统计信息,那么就无法保证这些文件所代表的即时信息完全一致。

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
名称               单位         说明
读I/Os              请求        已经处理的读I/Os个数
读合并             请求        和在队列中的I/O合并的读I/Os的个数
读扇区             扇区        已读扇区个数
读时钟              毫秒        读请求的总等待时间
写I/Os             请求         已经处理的写I/Os 的个数
写合并            请求         和在队列中的I/O合并的写I/Os的个数
写扇区            扇区         已读扇区个数
写时钟             毫秒         读请求的总等待时间
in_flight          请求         正处于in flight的I/Os 数量
io_ticks           毫秒         此块设备处于有效状态的总时间
time_in_queue      毫秒         用于等待所有请求的总时间

read I/Os, write I/Os
=====================

These values increment when an I/O request completes.

读I/Os ,写I/Os
=====================
当完成一个I/Os请求,这些值增加1。

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请求合并时这些值增加1。

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-byte扇区,而不是特定的设备或文件系统的块大小。当I/O请求
完成是这些值减1.


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/s大得多的速度增长;例如,如果有60个读请求正在等
待,而正在处理请求的平均时间是30ms,那么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.

in_flight
=========
这个值记录正在被设备驱动器处理但是还没有完成的I/O 请求的个数,不包含
已经在队列中但是还没有被设备驱动器处理的I/O 请求。

io_ticks
========

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

io_ticks
========
这个值记录块设备有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).

time_in_queue
=============
这个值记录所有的 I/O 请求等待块设备响应的总时间。如果有多个 I/O 请求正在等待,
这个值就会以 处理请求时间*请求个数 的速度增加(可参考"read ticks"所举例子)。

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值