Blame SOURCES/man-pages-3.53-proc.patch

172c20
diff -up man-pages-3.53/man5/proc.5.orig man-pages-3.53/man5/proc.5
172c20
--- man-pages-3.53/man5/proc.5.orig	2013-07-31 08:45:56.000000000 +0200
172c20
+++ man-pages-3.53/man5/proc.5	2013-08-02 13:00:55.062278000 +0200
172c20
@@ -59,7 +59,7 @@
172c20
 .\" to see what information could be imported from that file
172c20
 .\" into this file.
172c20
 .\"
172c20
-.TH PROC 5 2013-06-27 "Linux" "Linux Programmer's Manual"
172c20
+.TH PROC 5 2013-08-01 "Linux" "Linux Programmer's Manual"
172c20
 .SH NAME
172c20
 proc \- process information pseudo-file system
172c20
 .SH DESCRIPTION
172c20
@@ -350,9 +350,88 @@ file access mode and file status flags (
172c20
 .BR open (2)).
172c20
 
172c20
 The files in this directory are readable only by the owner of the process.
172c20
-.\" FIXME document /proc/[pid]/io
172c20
-.\" .TP
172c20
-.\" .IR /proc/[pid]/io " (since kernel 2.6.20)"
172c20
+.TP
172c20
+.IR /proc/[pid]/io " (since kernel 2.6.20)"
172c20
+.\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2
172c20
+This file contains I/O statistics for the process, for example:
172c20
+.in +4n
172c20
+.nf
172c20
+
172c20
+.RB "#" " cat /proc/3828/io"
172c20
+rchar: 323934931
172c20
+wchar: 323929600
172c20
+syscr: 632687
172c20
+syscw: 632675
172c20
+read_bytes: 0
172c20
+write_bytes: 323932160
172c20
+cancelled_write_bytes: 0
172c20
+.fi
172c20
+.in
172c20
+
172c20
+The fields are as follows:
172c20
+.RS
172c20
+.TP
172c20
+.IR rchar ": characters read"
172c20
+The number of bytes which this task has caused to be read from storage.
172c20
+This is simply the sum of bytes which this process passed to
172c20
+.BR read (2)
172c20
+and similar system calls.
172c20
+It includes things such as terminal I/O and 
172c20
+is unaffected by whether or not actual
172c20
+physical disk I/O was required (the read might have been satisfied from
172c20
+pagecache).
172c20
+.TP
172c20
+.IR wchar ": characters written"
172c20
+The number of bytes which this task has caused, or shall cause to be written
172c20
+to disk.
172c20
+Similar caveats apply here as with
172c20
+.IR rchar .
172c20
+.TP
172c20
+.IR syscr ": read syscalls"
172c20
+Attempt to count the number of read I/O operations\(emthat is,
172c20
+system calls such as
172c20
+.BR read (2)
172c20
+and
172c20
+.BR pread (2).
172c20
+.TP
172c20
+.IR syscw ": write syscalls"
172c20
+Attempt to count the number of write I/O operations\(emthat is,
172c20
+system calls such as
172c20
+.BR write (2)
172c20
+and
172c20
+.BR pwrite (2).
172c20
+.TP
172c20
+.IR read_bytes ": bytes read"
172c20
+Attempt to count the number of bytes which this process really did cause to
172c20
+be fetched from the storage layer.
172c20
+This is accurate for block-backed filesystems.
172c20
+.TP
172c20
+.IR write_bytes ": bytes written"
172c20
+Attempt to count the number of bytes which this process caused to be sent to
172c20
+the storage layer.
172c20
+.TP
172c20
+.IR cancelled_write_bytes :
172c20
+The big inaccuracy here is truncate.
172c20
+If a process writes 1MB to a file and then deletes the file,
172c20
+it will in fact perform no writeout.
172c20
+But it will have been accounted as having caused 1MB of write.
172c20
+In other words: this field represents the number of bytes which this process
172c20
+caused to not happen, by truncating pagecache.
172c20
+A task can cause "negative" I/O too.
172c20
+If this task truncates some dirty pagecache,
172c20
+some I/O which another task has been accounted for
172c20
+(in its
172c20
+.IR write_bytes )
172c20
+will not be happening.
172c20
+.RE
172c20
+.IP
172c20
+.IR Note :
172c20
+In the current implementation, things are a bit racy on 32-bit systems:
172c20
+if process A reads process B's
172c20
+.I /proc/[pid]/io
172c20
+while process B is updating one of these 64-bit counters,
172c20
+process A could see an intermediate result.
172c20
+.RE
172c20
 .TP
172c20
 .IR /proc/[pid]/limits " (since kernel 2.6.24)"
172c20
 This file displays the soft limit, hard limit, and units of measurement