I noticed that statm's "shared" field doesn't match the sum of
all the "shared" entries in smaps [1].
The kernel docs explain that statm's "shared" field is "number of
pages that are shared (i.e. backed by a file)" [2]. smaps appears
to call a page shared if it's mapped by at least two processes,
which explains this discrepancy.
I'm not a kernel hacker, but it appears to me they do mean "i.e."
and not "e.g." in the statm description: In
fs/proc/task_mmu.c::task_statm, I see
*shared = get_mm_counter(mm, MM_FILEPAGES);
Here's a patch which updates the man page to match the (hopefully
correct) kernel docs.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=807181
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/filesystems/proc.txt;h=a1793d670cd01bd374eddf54ffdfc768504291ff;hb=HEAD
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This patch isolates the since/version related fixes as requested.
This change introduces the following delta:
* The page states it was added in 2.6.32 but it is only added
2.6.33 (ref: http://kernelnewbies.org/Linux_2_6_33)
* The MSG_WAITFORONE flag was in turn only added in 2.6.34
(ref: http://kernelnewbies.org/Linux_2_6_34)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The return error EDQUOT is not documented in open(2), write(2),
symlink(2) etc..
Whether inodes or disk blocks are required for each function
is something I based on received wisdom and BSD documentation,
rather than tracing the code to the kernel. For symlink(2)
this certainly depends on the file system type.
This patch was previously sent to the linux-man mailing list
as an RFC in September 2010.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Back in 2006, some text came in via Debian patches that seems
crufty. Remove it.
See https://bugzilla.kernel.org/show_bug.cgi?id=46731
Reported-by: Michal Gorny <mgorny@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Text taken directly from Documentation/filesystems/proc.txt,
with some light editing.
See https://bugzilla.kernel.org/show_bug.cgi?id=50421
Reported-by: Peter Lekeynstein <lekensteyn@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Glibc 2.0.6 is now so ld that the discussion of details
of that version can be deemphasized placing just under
NOTES.
See https://bugzilla.kernel.org/show_bug.cgi?id=51811
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
In IPv4,IP_MTU is only supported by getsockopt.
In IPv6, we can use IPV6_MTU to set socket's MTU,
but the return value of getsockopt() is the path MTU.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>