diff options
-rw-r--r-- | Documentation/ABI/testing/procfs-diskstats | 22 | ||||
-rw-r--r-- | Documentation/ABI/testing/sysfs-block | 28 | ||||
-rw-r--r-- | Documentation/iostats.txt | 15 |
3 files changed, 64 insertions, 1 deletions
diff --git a/Documentation/ABI/testing/procfs-diskstats b/Documentation/ABI/testing/procfs-diskstats new file mode 100644 index 000000000000..99233902e09e --- /dev/null +++ b/Documentation/ABI/testing/procfs-diskstats | |||
@@ -0,0 +1,22 @@ | |||
1 | What: /proc/diskstats | ||
2 | Date: February 2008 | ||
3 | Contact: Jerome Marchand <jmarchan@redhat.com> | ||
4 | Description: | ||
5 | The /proc/diskstats file displays the I/O statistics | ||
6 | of block devices. Each line contains the following 14 | ||
7 | fields: | ||
8 | 1 - major number | ||
9 | 2 - minor mumber | ||
10 | 3 - device name | ||
11 | 4 - reads completed succesfully | ||
12 | 5 - reads merged | ||
13 | 6 - sectors read | ||
14 | 7 - time spent reading (ms) | ||
15 | 8 - writes completed | ||
16 | 9 - writes merged | ||
17 | 10 - sectors written | ||
18 | 11 - time spent writing (ms) | ||
19 | 12 - I/Os currently in progress | ||
20 | 13 - time spent doing I/Os (ms) | ||
21 | 14 - weighted time spent doing I/Os (ms) | ||
22 | For more details refer to Documentation/iostats.txt | ||
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block new file mode 100644 index 000000000000..4bd9ea539129 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block | |||
@@ -0,0 +1,28 @@ | |||
1 | What: /sys/block/<disk>/stat | ||
2 | Date: February 2008 | ||
3 | Contact: Jerome Marchand <jmarchan@redhat.com> | ||
4 | Description: | ||
5 | The /sys/block/<disk>/stat files displays the I/O | ||
6 | statistics of disk <disk>. They contain 11 fields: | ||
7 | 1 - reads completed succesfully | ||
8 | 2 - reads merged | ||
9 | 3 - sectors read | ||
10 | 4 - time spent reading (ms) | ||
11 | 5 - writes completed | ||
12 | 6 - writes merged | ||
13 | 7 - sectors written | ||
14 | 8 - time spent writing (ms) | ||
15 | 9 - I/Os currently in progress | ||
16 | 10 - time spent doing I/Os (ms) | ||
17 | 11 - weighted time spent doing I/Os (ms) | ||
18 | For more details refer Documentation/iostats.txt | ||
19 | |||
20 | |||
21 | What: /sys/block/<disk>/<part>/stat | ||
22 | Date: February 2008 | ||
23 | Contact: Jerome Marchand <jmarchan@redhat.com> | ||
24 | Description: | ||
25 | The /sys/block/<disk>/<part>/stat files display the | ||
26 | I/O statistics of partition <part>. The format is the | ||
27 | same as the above-written /sys/block/<disk>/stat | ||
28 | format. | ||
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt index b963c3b4afa5..5925c3cd030d 100644 --- a/Documentation/iostats.txt +++ b/Documentation/iostats.txt | |||
@@ -58,7 +58,7 @@ they should not wrap twice before you notice them. | |||
58 | Each set of stats only applies to the indicated device; if you want | 58 | Each set of stats only applies to the indicated device; if you want |
59 | system-wide stats you'll have to find all the devices and sum them all up. | 59 | system-wide stats you'll have to find all the devices and sum them all up. |
60 | 60 | ||
61 | Field 1 -- # of reads issued | 61 | Field 1 -- # of reads completed |
62 | This is the total number of reads completed successfully. | 62 | This is the total number of reads completed successfully. |
63 | Field 2 -- # of reads merged, field 6 -- # of writes merged | 63 | Field 2 -- # of reads merged, field 6 -- # of writes merged |
64 | Reads and writes which are adjacent to each other may be merged for | 64 | Reads and writes which are adjacent to each other may be merged for |
@@ -132,6 +132,19 @@ words, the number of reads for partitions is counted slightly before time | |||
132 | of queuing for partitions, and at completion for whole disks. This is | 132 | of queuing for partitions, and at completion for whole disks. This is |
133 | a subtle distinction that is probably uninteresting for most cases. | 133 | a subtle distinction that is probably uninteresting for most cases. |
134 | 134 | ||
135 | More significant is the error induced by counting the numbers of | ||
136 | reads/writes before merges for partitions and after for disks. Since a | ||
137 | typical workload usually contains a lot of successive and adjacent requests, | ||
138 | the number of reads/writes issued can be several times higher than the | ||
139 | number of reads/writes completed. | ||
140 | |||
141 | In 2.6.25, the full statistic set is again available for partitions and | ||
142 | disk and partition statistics are consistent again. Since we still don't | ||
143 | keep record of the partition-relative address, an operation is attributed to | ||
144 | the partition which contains the first sector of the request after the | ||
145 | eventual merges. As requests can be merged across partition, this could lead | ||
146 | to some (probably insignificant) innacuracy. | ||
147 | |||
135 | Additional notes | 148 | Additional notes |
136 | ---------------- | 149 | ---------------- |
137 | 150 | ||