~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/block/stat.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/block/stat.rst (Version linux-6.11.5) and /Documentation/block/stat.rst (Version linux-5.3.18)


  1 ==============================================      1 ===============================================
  2 Block layer statistics in /sys/block/<dev>/sta      2 Block layer statistics in /sys/block/<dev>/stat
  3 ==============================================      3 ===============================================
  4                                                     4 
  5 This file documents the contents of the /sys/b      5 This file documents the contents of the /sys/block/<dev>/stat file.
  6                                                     6 
  7 The stat file provides several statistics abou      7 The stat file provides several statistics about the state of block
  8 device <dev>.                                       8 device <dev>.
  9                                                     9 
 10 Q.                                                 10 Q.
 11    Why are there multiple statistics in a sing     11    Why are there multiple statistics in a single file?  Doesn't sysfs
 12    normally contain a single value per file?       12    normally contain a single value per file?
 13                                                    13 
 14 A.                                                 14 A.
 15    By having a single file, the kernel can gua     15    By having a single file, the kernel can guarantee that the statistics
 16    represent a consistent snapshot of the stat     16    represent a consistent snapshot of the state of the device.  If the
 17    statistics were exported as multiple files      17    statistics were exported as multiple files containing one statistic
 18    each, it would be impossible to guarantee t     18    each, it would be impossible to guarantee that a set of readings
 19    represent a single point in time.               19    represent a single point in time.
 20                                                    20 
 21 The stat file consists of a single line of tex !!  21 The stat file consists of a single line of text containing 11 decimal
 22 values separated by whitespace.  The fields ar     22 values separated by whitespace.  The fields are summarized in the
 23 following table, and described in more detail      23 following table, and described in more detail below.
 24                                                    24 
 25                                                    25 
 26 =============== ============= ================     26 =============== ============= =================================================
 27 Name            units         description          27 Name            units         description
 28 =============== ============= ================     28 =============== ============= =================================================
 29 read I/Os       requests      number of read I     29 read I/Os       requests      number of read I/Os processed
 30 read merges     requests      number of read I     30 read merges     requests      number of read I/Os merged with in-queue I/O
 31 read sectors    sectors       number of sector     31 read sectors    sectors       number of sectors read
 32 read ticks      milliseconds  total wait time      32 read ticks      milliseconds  total wait time for read requests
 33 write I/Os      requests      number of write      33 write I/Os      requests      number of write I/Os processed
 34 write merges    requests      number of write      34 write merges    requests      number of write I/Os merged with in-queue I/O
 35 write sectors   sectors       number of sector     35 write sectors   sectors       number of sectors written
 36 write ticks     milliseconds  total wait time      36 write ticks     milliseconds  total wait time for write requests
 37 in_flight       requests      number of I/Os c     37 in_flight       requests      number of I/Os currently in flight
 38 io_ticks        milliseconds  total time this      38 io_ticks        milliseconds  total time this block device has been active
 39 time_in_queue   milliseconds  total wait time      39 time_in_queue   milliseconds  total wait time for all requests
 40 discard I/Os    requests      number of discar     40 discard I/Os    requests      number of discard I/Os processed
 41 discard merges  requests      number of discar     41 discard merges  requests      number of discard I/Os merged with in-queue I/O
 42 discard sectors sectors       number of sector     42 discard sectors sectors       number of sectors discarded
 43 discard ticks   milliseconds  total wait time      43 discard ticks   milliseconds  total wait time for discard requests
 44 flush I/Os      requests      number of flush  << 
 45 flush ticks     milliseconds  total wait time  << 
 46 =============== ============= ================     44 =============== ============= =================================================
 47                                                    45 
 48 read I/Os, write I/Os, discard I/0s                46 read I/Os, write I/Os, discard I/0s
 49 ===================================                47 ===================================
 50                                                    48 
 51 These values increment when an I/O request com     49 These values increment when an I/O request completes.
 52                                                    50 
 53 flush I/Os                                     << 
 54 ==========                                     << 
 55                                                << 
 56 These values increment when an flush I/O reque << 
 57                                                << 
 58 Block layer combines flush requests and execut << 
 59 This counts flush requests executed by disk. N << 
 60                                                << 
 61 read merges, write merges, discard merges          51 read merges, write merges, discard merges
 62 =========================================          52 =========================================
 63                                                    53 
 64 These values increment when an I/O request is      54 These values increment when an I/O request is merged with an
 65 already-queued I/O request.                        55 already-queued I/O request.
 66                                                    56 
 67 read sectors, write sectors, discard_sectors       57 read sectors, write sectors, discard_sectors
 68 ============================================       58 ============================================
 69                                                    59 
 70 These values count the number of sectors read      60 These values count the number of sectors read from, written to, or
 71 discarded from this block device.  The "sector     61 discarded from this block device.  The "sectors" in question are the
 72 standard UNIX 512-byte sectors, not any device     62 standard UNIX 512-byte sectors, not any device- or filesystem-specific
 73 block size.  The counters are incremented when     63 block size.  The counters are incremented when the I/O completes.
 74                                                    64 
 75 read ticks, write ticks, discard ticks, flush  !!  65 read ticks, write ticks, discard ticks
 76 ============================================== !!  66 ======================================
 77                                                    67 
 78 These values count the number of milliseconds      68 These values count the number of milliseconds that I/O requests have
 79 waited on this block device.  If there are mul     69 waited on this block device.  If there are multiple I/O requests waiting,
 80 these values will increase at a rate greater t     70 these values will increase at a rate greater than 1000/second; for
 81 example, if 60 read requests wait for an avera     71 example, if 60 read requests wait for an average of 30 ms, the read_ticks
 82 field will increase by 60*30 = 1800.               72 field will increase by 60*30 = 1800.
 83                                                    73 
 84 in_flight                                          74 in_flight
 85 =========                                          75 =========
 86                                                    76 
 87 This value counts the number of I/O requests t     77 This value counts the number of I/O requests that have been issued to
 88 the device driver but have not yet completed.      78 the device driver but have not yet completed.  It does not include I/O
 89 requests that are in the queue but not yet iss     79 requests that are in the queue but not yet issued to the device driver.
 90                                                    80 
 91 io_ticks                                           81 io_ticks
 92 ========                                           82 ========
 93                                                    83 
 94 This value counts the number of milliseconds d     84 This value counts the number of milliseconds during which the device has
 95 had I/O requests queued.                           85 had I/O requests queued.
 96                                                    86 
 97 time_in_queue                                      87 time_in_queue
 98 =============                                      88 =============
 99                                                    89 
100 This value counts the number of milliseconds t     90 This value counts the number of milliseconds that I/O requests have waited
101 on this block device.  If there are multiple I     91 on this block device.  If there are multiple I/O requests waiting, this
102 value will increase as the product of the numb     92 value will increase as the product of the number of milliseconds times the
103 number of requests waiting (see "read ticks" a     93 number of requests waiting (see "read ticks" above for an example).
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php