diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2011-03-23 15:44:18 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-03-23 15:44:18 -0400 |
commit | 9d2e157d970a73b3f270b631828e03eb452d525e (patch) | |
tree | 0e89c518be654e39abc3867ac6c77044f36c774a /Documentation/iostats.txt | |
parent | c4ade94fc00f8b34589719d8a347f658b6d3951e (diff) |
Documentation/iostats.txt: bit-size reference etc.
- correction that disk stats values are native-word-sized
32-bit or 64-bit values, not always 32-bi values
- drop "Last modified" entry; use git for that
- fix a few typos
- change "cpu" to "CPU"
Reported-by: Linda Walsh <lkml@tlinx.org>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'Documentation/iostats.txt')
-rw-r--r-- | Documentation/iostats.txt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt index f6dece5b7014..c76c21d87e85 100644 --- a/Documentation/iostats.txt +++ b/Documentation/iostats.txt | |||
@@ -1,8 +1,6 @@ | |||
1 | I/O statistics fields | 1 | I/O statistics fields |
2 | --------------- | 2 | --------------- |
3 | 3 | ||
4 | Last modified Sep 30, 2003 | ||
5 | |||
6 | Since 2.4.20 (and some versions before, with patches), and 2.5.45, | 4 | Since 2.4.20 (and some versions before, with patches), and 2.5.45, |
7 | more extensive disk statistics have been introduced to help measure disk | 5 | more extensive disk statistics have been introduced to help measure disk |
8 | activity. Tools such as sar and iostat typically interpret these and do | 6 | activity. Tools such as sar and iostat typically interpret these and do |
@@ -46,11 +44,12 @@ the above example, the first field of statistics would be 446216. | |||
46 | By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll | 44 | By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll |
47 | find just the eleven fields, beginning with 446216. If you look at | 45 | find just the eleven fields, beginning with 446216. If you look at |
48 | /proc/diskstats, the eleven fields will be preceded by the major and | 46 | /proc/diskstats, the eleven fields will be preceded by the major and |
49 | minor device numbers, and device name. Each of these formats provide | 47 | minor device numbers, and device name. Each of these formats provides |
50 | eleven fields of statistics, each meaning exactly the same things. | 48 | eleven fields of statistics, each meaning exactly the same things. |
51 | All fields except field 9 are cumulative since boot. Field 9 should | 49 | All fields except field 9 are cumulative since boot. Field 9 should |
52 | go to zero as I/Os complete; all others only increase. Yes, these are | 50 | go to zero as I/Os complete; all others only increase (unless they |
53 | 32 bit unsigned numbers, and on a very busy or long-lived system they | 51 | overflow and wrap). Yes, these are (32-bit or 64-bit) unsigned long |
52 | (native word size) numbers, and on a very busy or long-lived system they | ||
54 | may wrap. Applications should be prepared to deal with that; unless | 53 | may wrap. Applications should be prepared to deal with that; unless |
55 | your observations are measured in large numbers of minutes or hours, | 54 | your observations are measured in large numbers of minutes or hours, |
56 | they should not wrap twice before you notice them. | 55 | they should not wrap twice before you notice them. |
@@ -96,11 +95,11 @@ introduced when changes collide, so (for instance) adding up all the | |||
96 | read I/Os issued per partition should equal those made to the disks ... | 95 | read I/Os issued per partition should equal those made to the disks ... |
97 | but due to the lack of locking it may only be very close. | 96 | but due to the lack of locking it may only be very close. |
98 | 97 | ||
99 | In 2.6, there are counters for each cpu, which made the lack of locking | 98 | In 2.6, there are counters for each CPU, which make the lack of locking |
100 | almost a non-issue. When the statistics are read, the per-cpu counters | 99 | almost a non-issue. When the statistics are read, the per-CPU counters |
101 | are summed (possibly overflowing the unsigned 32-bit variable they are | 100 | are summed (possibly overflowing the unsigned long variable they are |
102 | summed to) and the result given to the user. There is no convenient | 101 | summed to) and the result given to the user. There is no convenient |
103 | user interface for accessing the per-cpu counters themselves. | 102 | user interface for accessing the per-CPU counters themselves. |
104 | 103 | ||
105 | Disks vs Partitions | 104 | Disks vs Partitions |
106 | ------------------- | 105 | ------------------- |