€•茌sphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ'/translations/zh_CN/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/zh_TW/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/it_IT/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ja_JP/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ko_KR/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/pt_BR/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/sp_SP/admin-guide/iostats”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒI/O statistics fields”h]”hŒI/O statistics fields”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒA/var/lib/git/docbuild/linux/Documentation/admin-guide/iostats.rst”h´KubhŒ paragraph”“”)�”}”(hŒ§The kernel exposes disk statistics via ``/proc/diskstats`` and ``/sys/block//stat``. These stats are usually accessed via tools such as ``sar`` and ``iostat``.”h]”(hŒ'The kernel exposes disk statistics via ”…”�”}”(hhÍh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``/proc/diskstats``”h]”hŒ/proc/diskstats”…”�”}”(hh×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÍubhŒ and ”…”�”}”(hhÍh²hh³Nh´NubhÖ)�”}”(hŒ``/sys/block//stat``”h]”hŒ/sys/block//stat”…”�”}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÍubhŒ5. These stats are usually accessed via tools such as ”…”�”}”(hhÍh²hh³Nh´NubhÖ)�”}”(hŒ``sar``”h]”hŒsar”…”�”}”(hhûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÍubhŒ and ”…”�”}”(hhÍh²hh³Nh´NubhÖ)�”}”(hŒ ``iostat``”h]”hŒiostat”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÍubhŒ.”…”�”}”(hhÍh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒ4Here are examples using a disk with two partitions::”h]”hŒ3Here are examples using a disk with two partitions:”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hh·h²hubhŒ literal_block”“”)�”}”(hX/proc/diskstats: 259 0 nvme0n1 255999 814 12369153 47919 996852 81 36123024 425995 0 301795 580470 0 0 0 0 60602 106555 259 1 nvme0n1p1 492 813 17572 96 848 81 108288 210 0 76 307 0 0 0 0 0 0 259 2 nvme0n1p2 255401 1 12343477 47799 996004 0 36014736 425784 0 344336 473584 0 0 0 0 0 0 /sys/block/nvme0n1/stat: 255999 814 12369153 47919 996858 81 36123056 426009 0 301809 580491 0 0 0 0 60605 106562 /sys/block/nvme0n1/nvme0n1p1/stat: 492 813 17572 96 848 81 108288 210 0 76 307 0 0 0 0 0 0”h]”hX/proc/diskstats: 259 0 nvme0n1 255999 814 12369153 47919 996852 81 36123024 425995 0 301795 580470 0 0 0 0 60602 106555 259 1 nvme0n1p1 492 813 17572 96 848 81 108288 210 0 76 307 0 0 0 0 0 0 259 2 nvme0n1p2 255401 1 12343477 47799 996004 0 36014736 425784 0 344336 473584 0 0 0 0 0 0 /sys/block/nvme0n1/stat: 255999 814 12369153 47919 996858 81 36123056 426009 0 301809 580491 0 0 0 0 60605 106562 /sys/block/nvme0n1/nvme0n1p1/stat: 492 813 17572 96 848 81 108288 210 0 76 307 0 0 0 0 0 0”…”�”}”hj5sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j3h³hÊh´K hh·h²hubhÌ)�”}”(hX-Both files contain the same 17 statistics. ``/sys/block//stat`` contains the fields for ````. In ``/proc/diskstats`` the fields are prefixed with the major and minor device numbers and the device name. In the example above, the first stat value for ``nvme0n1`` is 255999 in both files.”h]”(hŒ+Both files contain the same 17 statistics. ”…”�”}”(hjEh²hh³Nh´NubhÖ)�”}”(hŒ``/sys/block//stat``”h]”hŒ/sys/block//stat”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjEubhŒ contains the fields for ”…”�”}”(hjEh²hh³Nh´NubhÖ)�”}”(hŒ ````”h]”hŒ”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjEubhŒ. In ”…”�”}”(hjEh²hh³Nh´NubhÖ)�”}”(hŒ``/proc/diskstats``”h]”hŒ/proc/diskstats”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjEubhŒ… the fields are prefixed with the major and minor device numbers and the device name. In the example above, the first stat value for ”…”�”}”(hjEh²hh³Nh´NubhÖ)�”}”(hŒ ``nvme0n1``”h]”hŒnvme0n1”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjEubhŒ is 255999 in both files.”…”�”}”(hjEh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hXThe sysfs ``stat`` file is efficient for monitoring a small, known set of disks. If you're tracking a large number of devices, ``/proc/diskstats`` is often the better choice since it avoids the overhead of opening and closing multiple files for each snapshot.”h]”(hŒ The sysfs ”…”�”}”(hj›h²hh³Nh´NubhÖ)�”}”(hŒ``stat``”h]”hŒstat”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj›ubhŒo file is efficient for monitoring a small, known set of disks. If you’re tracking a large number of devices, ”…”�”}”(hj›h²hh³Nh´NubhÖ)�”}”(hŒ``/proc/diskstats``”h]”hŒ/proc/diskstats”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj›ubhŒq is often the better choice since it avoids the overhead of opening and closing multiple files for each snapshot.”…”�”}”(hj›h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hXFAll fields are cumulative, monotonic counters, except for field 9, which resets to zero as I/Os complete. The remaining fields reset at boot, on device reattachment or reinitialization, or when the underlying counter overflows. Applications reading these counters should detect and handle resets when comparing stat snapshots.”h]”hXFAll fields are cumulative, monotonic counters, except for field 9, which resets to zero as I/Os complete. The remaining fields reset at boot, on device reattachment or reinitialization, or when the underlying counter overflows. Applications reading these counters should detect and handle resets when comparing stat snapshots.”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K!hh·h²hubhÌ)�”}”(hŒŽEach set of stats only applies to the indicated device; if you want system-wide stats you'll have to find all the devices and sum them all up.”h]”hŒ�Each set of stats only applies to the indicated device; if you want system-wide stats you’ll have to find all the devices and sum them all up.”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hh·h²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒkField 1 -- # of reads completed (unsigned long) This is the total number of reads completed successfully. ”h]”(hŒterm”“”)�”}”(hŒ0Field 1 -- # of reads completed (unsigned long)”h]”hŒ0Field 1 -- # of reads completed (unsigned long)”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´K+hjðubhŒ definition”“”)�”}”(hhh]”hÌ)�”}”(hŒ9This is the total number of reads completed successfully.”h]”hŒ9This is the total number of reads completed successfully.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K+hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjðubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K+hjëubjï)�”}”(hX^Field 2 -- # of reads merged, field 6 -- # of writes merged (unsigned long) Reads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done. ”h]”(jõ)�”}”(hŒLField 2 -- # of reads merged, field 6 -- # of writes merged (unsigned long)”h]”hŒLField 2 -- # of reads merged, field 6 -- # of writes merged (unsigned long)”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´K1hj#ubj)�”}”(hhh]”hÌ)�”}”(hXReads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done.”h]”hXReads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done.”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K.hj5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj#ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K1hjëh²hubjï)�”}”(hŒeField 3 -- # of sectors read (unsigned long) This is the total number of sectors read successfully. ”h]”(jõ)�”}”(hŒ-Field 3 -- # of sectors read (unsigned long)”h]”hŒ-Field 3 -- # of sectors read (unsigned long)”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´K4hjRubj)�”}”(hhh]”hÌ)�”}”(hŒ6This is the total number of sectors read successfully.”h]”hŒ6This is the total number of sectors read successfully.”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjRubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K4hjëh²hubjï)�”}”(hŒ¼Field 4 -- # of milliseconds spent reading (unsigned int) This is the total number of milliseconds spent by all reads (as measured from blk_mq_alloc_request() to __blk_mq_end_request()). ”h]”(jõ)�”}”(hŒ:Field 4 -- # of milliseconds spent reading (unsigned int)”h]”hŒ:Field 4 -- # of milliseconds spent reading (unsigned int)”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´K8hj�ubj)�”}”(hhh]”hÌ)�”}”(hŒ€This is the total number of milliseconds spent by all reads (as measured from blk_mq_alloc_request() to __blk_mq_end_request()).”h]”hŒ€This is the total number of milliseconds spent by all reads (as measured from blk_mq_alloc_request() to __blk_mq_end_request()).”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K7hj“ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K8hjëh²hubjï)�”}”(hŒmField 5 -- # of writes completed (unsigned long) This is the total number of writes completed successfully. ”h]”(jõ)�”}”(hŒ1Field 5 -- # of writes completed (unsigned long)”h]”hŒ1Field 5 -- # of writes completed (unsigned long)”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´K;hj°ubj)�”}”(hhh]”hÌ)�”}”(hŒ:This is the total number of writes completed successfully.”h]”hŒ:This is the total number of writes completed successfully.”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K;hjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj°ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K;hjëh²hubjï)�”}”(hŒPField 6 -- # of writes merged (unsigned long) See the description of field 2. ”h]”(jõ)�”}”(hŒ/Field 6 -- # of writes merged (unsigned long)”h]”hŒ/Field 6 -- # of writes merged (unsigned long)”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´K>hjßubj)�”}”(hhh]”hÌ)�”}”(hŒSee the description of field 2.”h]”hŒSee the description of field 2.”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K>hjñubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjßubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´K>hjëh²hubjï)�”}”(hŒkField 7 -- # of sectors written (unsigned long) This is the total number of sectors written successfully. ”h]”(jõ)�”}”(hŒ0Field 7 -- # of sectors written (unsigned long)”h]”hŒ0Field 7 -- # of sectors written (unsigned long)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´KAhjubj)�”}”(hhh]”hÌ)�”}”(hŒ9This is the total number of sectors written successfully.”h]”hŒ9This is the total number of sectors written successfully.”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KAhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´KAhjëh²hubjï)�”}”(hŒ½Field 8 -- # of milliseconds spent writing (unsigned int) This is the total number of milliseconds spent by all writes (as measured from blk_mq_alloc_request() to __blk_mq_end_request()). ”h]”(jõ)�”}”(hŒ:Field 8 -- # of milliseconds spent writing (unsigned int)”h]”hŒ:Field 8 -- # of milliseconds spent writing (unsigned int)”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´KEhj=ubj)�”}”(hhh]”hÌ)�”}”(hŒ�This is the total number of milliseconds spent by all writes (as measured from blk_mq_alloc_request() to __blk_mq_end_request()).”h]”hŒ�This is the total number of milliseconds spent by all writes (as measured from blk_mq_alloc_request() to __blk_mq_end_request()).”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KDhjOubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´KEhjëh²hubjï)�”}”(hŒÈField 9 -- # of I/Os currently in progress (unsigned int) The only field that should go to zero. Incremented as requests are given to appropriate struct request_queue and decremented as they finish. ”h]”(jõ)�”}”(hŒ:Field 9 -- # of I/Os currently in progress (unsigned int)”h]”hŒ:Field 9 -- # of I/Os currently in progress (unsigned int)”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´KIhjlubj)�”}”(hhh]”hÌ)�”}”(hŒŒThe only field that should go to zero. Incremented as requests are given to appropriate struct request_queue and decremented as they finish.”h]”hŒŒThe only field that should go to zero. Incremented as requests are given to appropriate struct request_queue and decremented as they finish.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KHhj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjlubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´KIhjëh²hubjï)�”}”(hX9Field 10 -- # of milliseconds spent doing I/Os (unsigned int) This field increases so long as field 9 is nonzero. Since 5.0 this field counts jiffies when at least one request was started or completed. If request runs more than 2 jiffies then some I/O time might be not accounted in case of concurrent requests. ”h]”(jõ)�”}”(hŒ=Field 10 -- # of milliseconds spent doing I/Os (unsigned int)”h]”hŒ=Field 10 -- # of milliseconds spent doing I/Os (unsigned int)”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´KPhj›ubj)�”}”(hhh]”(hÌ)�”}”(hŒ3This field increases so long as field 9 is nonzero.”h]”hŒ3This field increases so long as field 9 is nonzero.”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhj­ubhÌ)�”}”(hŒÅSince 5.0 this field counts jiffies when at least one request was started or completed. If request runs more than 2 jiffies then some I/O time might be not accounted in case of concurrent requests.”h]”hŒÅSince 5.0 this field counts jiffies when at least one request was started or completed. If request runs more than 2 jiffies then some I/O time might be not accounted in case of concurrent requests.”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KNhj­ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj›ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´KPhjëh²hubjï)�”}”(hX�Field 11 -- weighted # of milliseconds spent doing I/Os (unsigned int) This field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress (field 9) times the number of milliseconds spent doing I/O since the last update of this field. This can provide an easy measure of both I/O completion time and the backlog that may be accumulating. ”h]”(jõ)�”}”(hŒFField 11 -- weighted # of milliseconds spent doing I/Os (unsigned int)”h]”hŒFField 11 -- weighted # of milliseconds spent doing I/Os (unsigned int)”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´KWhjØubj)�”}”(hhh]”hÌ)�”}”(hXHThis field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress (field 9) times the number of milliseconds spent doing I/O since the last update of this field. This can provide an easy measure of both I/O completion time and the backlog that may be accumulating.”h]”hXHThis field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress (field 9) times the number of milliseconds spent doing I/O since the last update of this field. This can provide an easy measure of both I/O completion time and the backlog that may be accumulating.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KShjêubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjØubeh}”(h]”h ]”h"]”h$]”h&]”uh1jîh³hÊh´KWhjëh²hubjï)�”}”(hŒqField 12 -- # of discards completed (unsigned long) This is the total number of discards completed successfully. ”h]”(jõ)�”}”(hŒ3Field 12 -- # of discards completed (unsigned long)”h]”hŒ3Field 12 -- # of discards completed (unsigned long)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jôh³hÊh´KZhjubj)�”}”(hhh]”hÌ)�”}”(hŒ