How to display current I / O queue length on Linux?

I am working on a new I / O scheduler for the Linux kernel. I'm trying to find out if anyone knows about a tool that prints the total number of outstanding I / O requests (queue on an IO disk) on Linux?

I would work with the terminal.

Thanks!

+7
source share
2 answers

Goodbye massive necro here. You really want iostat -x , which will display advanced statistics for the device in question since the last iostat was launched. If you want to control the queue in real time, you need iostat -xt 1 (or iostat -xmt 1 show details in megabytes).

The average queue size can be seen in the avgqu-sz column.

Consider the following example output from iostat -xmt 1 , which shows a full I / O queue (the maximum queue length is 128 for this device) and a saturated disk during the test.

 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/sr/sw/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 
+20
source
 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 the terminal, device, and processor operator of the FIC. The first statistics averaged over sys are uptime. To obtain information on current activities, a waiting time should be indicated, so that subsequent sets of printed statistics will be averaged over this time.

+1
source

All Articles