I am working on a new IO scheduler for the Linux Kernel. I am trying to see if anyone knows of a tool that prints out total number of outstanding IO requests (Disk IO queue) in Linux?
我正在为Linux内核开发一个新的IO调度器。我想知道是否有人知道在Linux中打印未完成IO请求(磁盘IO队列)的工具?
I would be working from a terminal.
我会在终点站工作。
Thank you!
谢谢你!
2 个解决方案
#1
21
Forgive the massive necro here. You actually want iostat -x
which will display the extended stats for the device in question since last iostat was run. If you wish to monitor the queue in realtime you want iostat -xt 1
(or iostat -xmt 1
to show details in megabytes).
原谅这里的死灵。实际上,您需要iostat -x,它将显示自上次iostat运行以来所使用的设备的扩展属性。如果希望实时监视队列,则需要iostat -xt 1(或iostat -xmt 1以兆字节显示详细信息)。
You can see the average queue size in the avgqu-sz
column.
您可以在avgquq -sz列中看到平均队列大小。
Consider the following example output from iostat -xmt 1
which shows a full IO queue (max queue length is 128 for this device) and a saturated disk during a benchmark.
考虑下面来自iostat -xmt 1的输出示例,它显示了一个完整的IO队列(此设备的最大队列长度为128)和一个基准测试期间的饱和磁盘。
18/05/15 00:41:05
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.00 6.02 0.00 93.98
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
xvda 0.00 0.00 1.00 1308.00 0.00 163.50 255.81 133.30 101.15 0.76 100.00
#2
1
dmitry@pro:~$ iostat
disk0 cpu load average
KB/t tps MB/s us sy id 1m 5m 15m
50.70 34 1.70 4 3 93 1.83 1.65 1.70
dmitry@pro:~$
DESCRIPTION Iostat displays kernel I/O statistics on terminal, device and cpu opera- tions. The first statistics that are printed are averaged over the sys- tem uptime. To get information about the current activity, a suitable wait time should be specified, so that the subsequent sets of printed statistics will be averaged over that time.
描述Iostat在终端、设备和cpu opera上显示内核I/O统计信息。打印出来的第一个统计数据是在系统运行时求平均值。为了获得关于当前活动的信息,应该指定一个合适的等待时间,以便在此期间对后续打印的统计数据集进行平均。
#1
21
Forgive the massive necro here. You actually want iostat -x
which will display the extended stats for the device in question since last iostat was run. If you wish to monitor the queue in realtime you want iostat -xt 1
(or iostat -xmt 1
to show details in megabytes).
原谅这里的死灵。实际上,您需要iostat -x,它将显示自上次iostat运行以来所使用的设备的扩展属性。如果希望实时监视队列,则需要iostat -xt 1(或iostat -xmt 1以兆字节显示详细信息)。
You can see the average queue size in the avgqu-sz
column.
您可以在avgquq -sz列中看到平均队列大小。
Consider the following example output from iostat -xmt 1
which shows a full IO queue (max queue length is 128 for this device) and a saturated disk during a benchmark.
考虑下面来自iostat -xmt 1的输出示例,它显示了一个完整的IO队列(此设备的最大队列长度为128)和一个基准测试期间的饱和磁盘。
18/05/15 00:41:05
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.00 6.02 0.00 93.98
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
xvda 0.00 0.00 1.00 1308.00 0.00 163.50 255.81 133.30 101.15 0.76 100.00
#2
1
dmitry@pro:~$ iostat
disk0 cpu load average
KB/t tps MB/s us sy id 1m 5m 15m
50.70 34 1.70 4 3 93 1.83 1.65 1.70
dmitry@pro:~$
DESCRIPTION Iostat displays kernel I/O statistics on terminal, device and cpu opera- tions. The first statistics that are printed are averaged over the sys- tem uptime. To get information about the current activity, a suitable wait time should be specified, so that the subsequent sets of printed statistics will be averaged over that time.
描述Iostat在终端、设备和cpu opera上显示内核I/O统计信息。打印出来的第一个统计数据是在系统运行时求平均值。为了获得关于当前活动的信息,应该指定一个合适的等待时间,以便在此期间对后续打印的统计数据集进行平均。