【发布时间】:2015-02-26 20:18:55
【问题描述】:
由于我无法在iostat -dx 1 上使用watch 来获取当前的磁盘负载,我想知道是否有其他方法可以做到这一点,例如,使用@987654323 中包含的值进行计算@ 和/或其他一些文件。
【问题讨论】:
标签: bash io watch disk-io iostat
由于我无法在iostat -dx 1 上使用watch 来获取当前的磁盘负载,我想知道是否有其他方法可以做到这一点,例如,使用@987654323 中包含的值进行计算@ 和/或其他一些文件。
【问题讨论】:
标签: bash io watch disk-io iostat
根据 kernel.org,映射为:
The /proc/diskstats file displays the I/O statistics
of block devices. Each line contains the following 14
fields:
1 - major number
2 - minor mumber
3 - device name
4 - reads completed successfully
5 - reads merged
6 - sectors read
7 - time spent reading (ms)
8 - writes completed
9 - writes merged
10 - sectors written
11 - time spent writing (ms)
12 - I/Os currently in progress
13 - time spent doing I/Os (ms)
14 - weighted time spent doing I/Os (ms)
For more details refer to Documentation/iostats.txt
你也可以使用或阅读Sys::Statistics::Linux::DiskStats
【讨论】: