8171 lines
213 KiB
HTML
8171 lines
213 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PROC</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PROC</H1>
|
|
Section: Linux Programmer's Manual (5)<BR>Updated: 2019-11-19<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
proc - process information pseudo-filesystem
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B>proc</B>
|
|
|
|
filesystem is a pseudo-filesystem which provides an interface to
|
|
kernel data structures.
|
|
It is commonly mounted at
|
|
<I>/proc</I>.
|
|
|
|
Typically, it is mounted automatically by the system,
|
|
but it can also be mounted manually using a command such as:
|
|
<P>
|
|
|
|
|
|
|
|
mount -t proc proc /proc
|
|
|
|
|
|
<P>
|
|
|
|
Most of the files in the
|
|
<B>proc</B>
|
|
|
|
filesystem are read-only,
|
|
but some files are writable, allowing kernel variables to be changed.
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H3>Mount options</H3>
|
|
|
|
The
|
|
<B>proc</B>
|
|
|
|
filesystem supports the following mount options:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>hidepid</B>=<I>n</I> (since Linux 3.3)
|
|
|
|
<DD>
|
|
|
|
This option controls who can access the information in
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories.
|
|
The argument,
|
|
<I>n</I>,
|
|
|
|
is one of the following values:
|
|
<DL COMPACT><DT id="2"><DD>
|
|
<DL COMPACT>
|
|
<DT id="3">0<DD>
|
|
Everybody may access all
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories.
|
|
This is the traditional behavior,
|
|
and the default if this mount option is not specified.
|
|
<DT id="4">1<DD>
|
|
Users may not access files and subdirectories inside any
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories but their own (the
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories themselves remain visible).
|
|
Sensitive files such as
|
|
<I>/proc/[pid]/cmdline</I>
|
|
|
|
and
|
|
<I>/proc/[pid]/status</I>
|
|
|
|
are now protected against other users.
|
|
This makes it impossible to learn whether any user is running a
|
|
specific program
|
|
(so long as the program doesn't otherwise reveal itself by its behavior).
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="5">2<DD>
|
|
As for mode 1, but in addition the
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories belonging to other users become invisible.
|
|
This means that
|
|
<I>/proc/[pid]</I>
|
|
|
|
entries can no longer be used to discover the PIDs on the system.
|
|
This doesn't hide the fact that a process with a specific PID value exists
|
|
(it can be learned by other means, for example, by "kill -0 $PID"),
|
|
but it hides a process's UID and GID,
|
|
which could otherwise be learned by employing
|
|
<B><A HREF="/cgi-bin/man/man2html?2+stat">stat</A></B>(2)
|
|
|
|
on a
|
|
<I>/proc/[pid]</I>
|
|
|
|
directory.
|
|
This greatly complicates an attacker's task of gathering
|
|
information about running processes (e.g., discovering whether
|
|
some daemon is running with elevated privileges,
|
|
whether another user is running some sensitive program,
|
|
whether other users are running any program at all, and so on).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="6"><B>gid</B>=<I>gid</I> (since Linux 3.3)
|
|
|
|
<DD>
|
|
|
|
Specifies the ID of a group whose members are authorized to
|
|
learn process information otherwise prohibited by
|
|
<B>hidepid</B>
|
|
|
|
(i.e., users in this group behave as though
|
|
<I>/proc</I>
|
|
|
|
was mounted with
|
|
<I>hidepid=0</I>).
|
|
|
|
This group should be used instead of approaches such as putting
|
|
nonroot users into the
|
|
<B><A HREF="/cgi-bin/man/man2html?5+sudoers">sudoers</A></B>(5)
|
|
|
|
file.
|
|
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Overview</H3>
|
|
|
|
Underneath
|
|
<I>/proc</I>,
|
|
|
|
there are the following general groups of files and subdirectories:
|
|
<DL COMPACT>
|
|
<DT id="7"><I>/proc/[pid]</I> subdirectories
|
|
|
|
<DD>
|
|
Each one of these subdirectories contains files and subdirectories
|
|
exposing information about the process with the corresponding process ID.
|
|
<DT id="8"><DD>
|
|
Underneath each of the
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories, a
|
|
<I>task</I>
|
|
|
|
subdirectory contains subdirectories of the form
|
|
<I>task/[tid]</I>,
|
|
|
|
which contain corresponding information about each of the threads
|
|
in the process, where
|
|
<I>tid</I>
|
|
|
|
is the kernel thread ID of the thread.
|
|
<DT id="9"><DD>
|
|
The
|
|
<I>/proc/[pid]</I>
|
|
|
|
subdirectories are visible when iterating through
|
|
<I>/proc</I>
|
|
|
|
with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getdents">getdents</A></B>(2)
|
|
|
|
(and thus are visible when one uses
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ls">ls</A></B>(1)
|
|
|
|
to view the contents of
|
|
<I>/proc</I>).
|
|
|
|
<DT id="10"><I>/proc/[tid]</I> subdirectories
|
|
|
|
<DD>
|
|
Each one of these subdirectories contains files and subdirectories
|
|
exposing information about the thread with the corresponding thread ID.
|
|
The contents of these directories are the same as the corresponding
|
|
<I>/proc/[pid]/task/[tid]</I>
|
|
|
|
directories.
|
|
<DT id="11"><DD>
|
|
The
|
|
<I>/proc/[tid]</I>
|
|
|
|
subdirectories are
|
|
<I>not</I>
|
|
|
|
visible when iterating through
|
|
<I>/proc</I>
|
|
|
|
with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getdents">getdents</A></B>(2)
|
|
|
|
(and thus are
|
|
<I>not</I>
|
|
|
|
visible when one uses
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ls">ls</A></B>(1)
|
|
|
|
to view the contents of
|
|
<I>/proc</I>).
|
|
|
|
<DT id="12"><I>/proc/self</I>
|
|
|
|
<DD>
|
|
When a process accesses this magic symbolic link,
|
|
it resolves to the process's own
|
|
<I>/proc/[pid]</I>
|
|
|
|
directory.
|
|
<DT id="13"><I>/proc/thread-self</I>
|
|
|
|
<DD>
|
|
When a thread accesses this magic symbolic link,
|
|
it resolves to the process's own
|
|
<I>/proc/self/task/[tid]</I>
|
|
|
|
directory.
|
|
<DT id="14"><I>/proc/[a-z]*</I>
|
|
|
|
<DD>
|
|
Various other files and subdirectories under
|
|
<I>/proc</I>
|
|
|
|
expose system-wide information.
|
|
</DL>
|
|
<P>
|
|
|
|
All of the above are described in more detail below.
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Files and directories</H3>
|
|
|
|
The following list provides details of many of the files and directories
|
|
under the
|
|
<I>/proc</I>
|
|
|
|
hierarchy.
|
|
<DL COMPACT>
|
|
<DT id="15"><I>/proc/[pid]</I>
|
|
|
|
<DD>
|
|
There is a numerical subdirectory for each running process; the
|
|
subdirectory is named by the process ID.
|
|
Each
|
|
<I>/proc/[pid]</I>
|
|
|
|
subdirectory contains the pseudo-files and directories described below.
|
|
<DT id="16"><DD>
|
|
The files inside each
|
|
<I>/proc/[pid]</I>
|
|
|
|
directory are normally owned by the effective user and
|
|
effective group ID of the process.
|
|
However, as a security measure, the ownership is made
|
|
<I>root:root</I>
|
|
|
|
if the process's "dumpable" attribute is set to a value other than 1.
|
|
<DT id="17"><DD>
|
|
Before Linux 4.11,
|
|
|
|
<I>root:root</I>
|
|
|
|
meant the "global" root user ID and group ID
|
|
(i.e., UID 0 and GID 0 in the initial user namespace).
|
|
Since Linux 4.11,
|
|
if the process is in a noninitial user namespace that has a
|
|
valid mapping for user (group) ID 0 inside the namespace, then
|
|
the user (group) ownership of the files under
|
|
<I>/proc/[pid]</I>
|
|
|
|
is instead made the same as the root user (group) ID of the namespace.
|
|
This means that inside a container,
|
|
things work as expected for the container "root" user.
|
|
<DT id="18"><DD>
|
|
The process's "dumpable" attribute may change for the following reasons:
|
|
<DL COMPACT><DT id="19"><DD>
|
|
<DL COMPACT>
|
|
<DT id="20">*<DD>
|
|
The attribute was explicitly set via the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)
|
|
|
|
<B>PR_SET_DUMPABLE</B>
|
|
|
|
operation.
|
|
<DT id="21">*<DD>
|
|
The attribute was reset to the value in the file
|
|
<I>/proc/sys/fs/suid_dumpable</I>
|
|
|
|
(described below), for the reasons described in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2).
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="22"><DD>
|
|
Resetting the "dumpable" attribute to 1 reverts the ownership of the
|
|
<I>/proc/[pid]/*</I>
|
|
|
|
files to the process's effective UID and GID.
|
|
<DT id="23"><I>/proc/[pid]/attr</I>
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The files in this directory provide an API for security modules.
|
|
The contents of this directory are files that can be read and written
|
|
in order to set security-related attributes.
|
|
This directory was added to support SELinux,
|
|
but the intention was that the API be general enough to support
|
|
other security modules.
|
|
For the purpose of explanation,
|
|
examples of how SELinux uses these files are provided below.
|
|
<DT id="24"><DD>
|
|
This directory is present only if the kernel was configured with
|
|
<B>CONFIG_SECURITY</B>.
|
|
|
|
<DT id="25"><I>/proc/[pid]/attr/current</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
The contents of this file represent the current
|
|
security attributes of the process.
|
|
<DT id="26"><DD>
|
|
In SELinux, this file is used to get the security context of a process.
|
|
Prior to Linux 2.6.11, this file could not be used to set the security
|
|
context (a write was always denied), since SELinux limited process security
|
|
transitions to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2)
|
|
|
|
(see the description of
|
|
<I>/proc/[pid]/attr/exec</I>,
|
|
|
|
below).
|
|
Since Linux 2.6.11, SELinux lifted this restriction and began supporting
|
|
"set" operations via writes to this node if authorized by policy,
|
|
although use of this operation is only suitable for applications that are
|
|
trusted to maintain any desired separation between the old and new security
|
|
contexts.
|
|
<DT id="27"><DD>
|
|
Prior to Linux 2.6.28, SELinux did not allow threads within a
|
|
multi-threaded process to set their security context via this node
|
|
as it would yield an inconsistency among the security contexts of the
|
|
threads sharing the same memory space.
|
|
Since Linux 2.6.28, SELinux lifted
|
|
this restriction and began supporting "set" operations for threads within
|
|
a multithreaded process if the new security context is bounded by the old
|
|
security context, where the bounded relation is defined in policy and
|
|
guarantees that the new security context has a subset of the permissions
|
|
of the old security context.
|
|
<DT id="28"><DD>
|
|
Other security modules may choose to support "set" operations via
|
|
writes to this node.
|
|
<DT id="29"><I>/proc/[pid]/attr/exec</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
This file represents the attributes to assign to the
|
|
process upon a subsequent
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2).
|
|
|
|
<DT id="30"><DD>
|
|
In SELinux,
|
|
this is needed to support role/domain transitions, and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2)
|
|
|
|
is the preferred point to make such transitions because it offers better
|
|
control over the initialization of the process in the new security label
|
|
and the inheritance of state.
|
|
In SELinux, this attribute is reset on
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2)
|
|
|
|
so that the new program reverts to the default behavior for any
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2)
|
|
|
|
calls that it may make.
|
|
In SELinux, a process can set
|
|
only its own
|
|
<I>/proc/[pid]/attr/exec</I>
|
|
|
|
attribute.
|
|
<DT id="31"><I>/proc/[pid]/attr/fscreate</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
This file represents the attributes to assign to files
|
|
created by subsequent calls to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+open">open</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mkdir">mkdir</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+symlink">symlink</A></B>(2),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mknod">mknod</A></B>(2)
|
|
|
|
<DT id="32"><DD>
|
|
SELinux employs this file to support creation of a file
|
|
(using the aforementioned system calls)
|
|
in a secure state,
|
|
so that there is no risk of inappropriate access being obtained
|
|
between the time of creation and the time that attributes are set.
|
|
In SELinux, this attribute is reset on
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2),
|
|
|
|
so that the new program reverts to the default behavior for
|
|
any file creation calls it may make, but the attribute will persist
|
|
across multiple file creation calls within a program unless it is
|
|
explicitly reset.
|
|
In SELinux, a process can set only its own
|
|
<I>/proc/[pid]/attr/fscreate</I>
|
|
|
|
attribute.
|
|
<DT id="33"><I>/proc/[pid]/attr/keycreate</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
If a process writes a security context into this file,
|
|
all subsequently created keys
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+add_key">add_key</A></B>(2))
|
|
|
|
will be labeled with this context.
|
|
For further information, see the kernel source file
|
|
<I>Documentation/security/keys/core.rst</I>
|
|
|
|
(or file
|
|
|
|
<I>Documentation/security/keys.txt</I>
|
|
|
|
on Linux between 3.0 and 4.13, or
|
|
|
|
<I>Documentation/keys.txt</I>
|
|
|
|
before Linux 3.0).
|
|
<DT id="34"><I>/proc/[pid]/attr/prev</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
This file contains the security context of the process before the last
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2);
|
|
|
|
that is, the previous value of
|
|
<I>/proc/[pid]/attr/current</I>.
|
|
|
|
<DT id="35"><I>/proc/[pid]/attr/socketcreate</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
If a process writes a security context into this file,
|
|
all subsequently created sockets will be labeled with this context.
|
|
<DT id="36"><I>/proc/[pid]/autogroup</I> (since Linux 2.6.38)
|
|
|
|
<DD>
|
|
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+sched">sched</A></B>(7).
|
|
|
|
<DT id="37"><I>/proc/[pid]/auxv</I> (since 2.6.0)
|
|
|
|
<DD>
|
|
|
|
This contains the contents of the ELF interpreter information passed
|
|
to the process at exec time.
|
|
The format is one <I>unsigned long</I> ID
|
|
plus one <I>unsigned long</I> value for each entry.
|
|
The last entry contains two zeros.
|
|
See also
|
|
<B><A HREF="/cgi-bin/man/man2html?3+getauxval">getauxval</A></B>(3).
|
|
|
|
<DT id="38"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="39"><I>/proc/[pid]/cgroup</I> (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cgroups">cgroups</A></B>(7).
|
|
|
|
<DT id="40"><I>/proc/[pid]/clear_refs</I> (since Linux 2.6.22)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="41"><DD>
|
|
This is a write-only file, writable only by owner of the process.
|
|
<DT id="42"><DD>
|
|
The following values may be written to the file:
|
|
<DL COMPACT><DT id="43"><DD>
|
|
<DL COMPACT>
|
|
<DT id="44">1 (since Linux 2.6.22)<DD>
|
|
|
|
Reset the PG_Referenced and ACCESSED/YOUNG
|
|
bits for all the pages associated with the process.
|
|
(Before kernel 2.6.32, writing any nonzero value to this file
|
|
had this effect.)
|
|
<DT id="45">2 (since Linux 2.6.32)<DD>
|
|
|
|
Reset the PG_Referenced and ACCESSED/YOUNG
|
|
bits for all anonymous pages associated with the process.
|
|
<DT id="46">3 (since Linux 2.6.32)<DD>
|
|
|
|
Reset the PG_Referenced and ACCESSED/YOUNG
|
|
bits for all file-mapped pages associated with the process.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="47"><DD>
|
|
Clearing the PG_Referenced and ACCESSED/YOUNG bits provides a method
|
|
to measure approximately how much memory a process is using.
|
|
One first inspects the values in the "Referenced" fields
|
|
for the VMAs shown in
|
|
<I>/proc/[pid]/smaps</I>
|
|
|
|
to get an idea of the memory footprint of the
|
|
process.
|
|
One then clears the PG_Referenced and ACCESSED/YOUNG bits
|
|
and, after some measured time interval,
|
|
once again inspects the values in the "Referenced" fields
|
|
to get an idea of the change in memory footprint of the
|
|
process during the measured interval.
|
|
If one is interested only in inspecting the selected mapping types,
|
|
then the value 2 or 3 can be used instead of 1.
|
|
<DT id="48"><DD>
|
|
Further values can be written to affect different properties:
|
|
<DL COMPACT><DT id="49"><DD>
|
|
<DL COMPACT>
|
|
<DT id="50">4 (since Linux 3.11)<DD>
|
|
Clear the soft-dirty bit for all the pages associated with the process.
|
|
|
|
This is used (in conjunction with
|
|
<I>/proc/[pid]/pagemap</I>)
|
|
|
|
by the check-point restore system to discover which pages of a process
|
|
have been dirtied since the file
|
|
<I>/proc/[pid]/clear_refs</I>
|
|
|
|
was written to.
|
|
<DT id="51">5 (since Linux 4.0)<DD>
|
|
|
|
Reset the peak resident set size ("high water mark") to the process's
|
|
current resident set size value.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="52"><DD>
|
|
Writing any value to
|
|
<I>/proc/[pid]/clear_refs</I>
|
|
|
|
other than those listed above has no effect.
|
|
<DT id="53"><DD>
|
|
The
|
|
<I>/proc/[pid]/clear_refs</I>
|
|
|
|
file is present only if the
|
|
<B>CONFIG_PROC_PAGE_MONITOR</B>
|
|
|
|
kernel configuration option is enabled.
|
|
<DT id="54"><I>/proc/[pid]/cmdline</I>
|
|
|
|
<DD>
|
|
This read-only file holds the complete command line for the process,
|
|
unless the process is a zombie.
|
|
|
|
In the latter case, there is nothing in this file:
|
|
that is, a read on this file will return 0 characters.
|
|
The command-line arguments appear in this file as a set of
|
|
strings separated by null bytes ('\0'),
|
|
with a further null byte after the last string.
|
|
<DT id="55"><I>/proc/[pid]/comm</I> (since Linux 2.6.33)
|
|
|
|
<DD>
|
|
|
|
This file exposes the process's
|
|
<I>comm</I>
|
|
|
|
value---that is, the command name associated with the process.
|
|
Different threads in the same process may have different
|
|
<I>comm</I>
|
|
|
|
values, accessible via
|
|
<I>/proc/[pid]/task/[tid]/comm</I>.
|
|
|
|
A thread may modify its
|
|
<I>comm</I>
|
|
|
|
value, or that of any of other thread in the same thread group (see
|
|
the discussion of
|
|
<B>CLONE_THREAD</B>
|
|
|
|
in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)),
|
|
|
|
by writing to the file
|
|
<I>/proc/self/task/[tid]/comm</I>.
|
|
|
|
Strings longer than
|
|
<B>TASK_COMM_LEN</B>
|
|
|
|
(16) characters are silently truncated.
|
|
<DT id="56"><DD>
|
|
This file provides a superset of the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)
|
|
|
|
<B>PR_SET_NAME</B>
|
|
|
|
and
|
|
<B>PR_GET_NAME</B>
|
|
|
|
operations, and is employed by
|
|
<B><A HREF="/cgi-bin/man/man2html?3+pthread_setname_np">pthread_setname_np</A></B>(3)
|
|
|
|
when used to rename threads other than the caller.
|
|
<DT id="57"><I>/proc/[pid]/coredump_filter</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+core">core</A></B>(5).
|
|
|
|
<DT id="58"><I>/proc/[pid]/cpuset</I> (since Linux 2.6.12)
|
|
|
|
<DD>
|
|
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7).
|
|
|
|
<DT id="59"><I>/proc/[pid]/cwd</I>
|
|
|
|
<DD>
|
|
This is a symbolic link to the current working directory of the process.
|
|
To find out the current working directory of process 20,
|
|
for instance, you can do this:
|
|
<DT id="60"><DD>
|
|
|
|
|
|
$<B> cd /proc/20/cwd; /bin/pwd</B>
|
|
|
|
|
|
|
|
<DT id="61"><DD>
|
|
Note that the
|
|
<I>pwd</I>
|
|
|
|
command is often a shell built-in, and might
|
|
not work properly.
|
|
In
|
|
<B><A HREF="/cgi-bin/man/man2html?1+bash">bash</A></B>(1),
|
|
|
|
you may use
|
|
<I>pwd -P</I>.
|
|
|
|
<DT id="62"><DD>
|
|
|
|
In a multithreaded process, the contents of this symbolic link
|
|
are not available if the main thread has already terminated
|
|
(typically by calling
|
|
<B><A HREF="/cgi-bin/man/man2html?3+pthread_exit">pthread_exit</A></B>(3)).
|
|
|
|
<DT id="63"><DD>
|
|
Permission to dereference or read
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2))
|
|
|
|
this symbolic link is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="64"><I>/proc/[pid]/environ</I>
|
|
|
|
<DD>
|
|
This file contains the initial environment that was set
|
|
when the currently executing program was started via
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2).
|
|
|
|
The entries are separated by null bytes ('\0'),
|
|
and there may be a null byte at the end.
|
|
Thus, to print out the environment of process 1, you would do:
|
|
<DT id="65"><DD>
|
|
|
|
|
|
$<B> cat /proc/1/environ | tr '\000' '\n'</B>
|
|
|
|
|
|
|
|
<DT id="66"><DD>
|
|
If, after an
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2),
|
|
|
|
the process modifies its environment
|
|
(e.g., by calling functions such as
|
|
<B><A HREF="/cgi-bin/man/man2html?3+putenv">putenv</A></B>(3)
|
|
|
|
or modifying the
|
|
<B><A HREF="/cgi-bin/man/man2html?7+environ">environ</A></B>(7)
|
|
|
|
variable directly),
|
|
this file will
|
|
<I>not</I>
|
|
|
|
reflect those changes.
|
|
<DT id="67"><DD>
|
|
Furthermore, a process may change the memory location that this file refers via
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)
|
|
|
|
operations such as
|
|
<B>PR_SET_MM_ENV_START</B>.
|
|
|
|
<DT id="68"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="69"><I>/proc/[pid]/exe</I>
|
|
|
|
<DD>
|
|
Under Linux 2.2 and later, this file is a symbolic link
|
|
containing the actual pathname of the executed command.
|
|
This symbolic link can be dereferenced normally; attempting to open
|
|
it will open the executable.
|
|
You can even type
|
|
<I>/proc/[pid]/exe</I>
|
|
|
|
to run another copy of the same executable that is being run by
|
|
process [pid].
|
|
If the pathname has been unlinked, the symbolic link will contain the
|
|
string '(deleted)' appended to the original pathname.
|
|
|
|
In a multithreaded process, the contents of this symbolic link
|
|
are not available if the main thread has already terminated
|
|
(typically by calling
|
|
<B><A HREF="/cgi-bin/man/man2html?3+pthread_exit">pthread_exit</A></B>(3)).
|
|
|
|
<DT id="70"><DD>
|
|
Permission to dereference or read
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2))
|
|
|
|
this symbolic link is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="71"><DD>
|
|
Under Linux 2.0 and earlier,
|
|
<I>/proc/[pid]/exe</I>
|
|
|
|
is a pointer to the binary which was executed,
|
|
and appears as a symbolic link.
|
|
A
|
|
<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2)
|
|
|
|
call on this file under Linux 2.0 returns a string in the format:
|
|
<DT id="72"><DD>
|
|
<BR> [device]:inode
|
|
<DT id="73"><DD>
|
|
For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
|
|
MFM, etc. drives) minor 01 (first partition on the first drive).
|
|
<DT id="74"><DD>
|
|
<B><A HREF="/cgi-bin/man/man2html?1+find">find</A></B>(1)
|
|
|
|
with the
|
|
<I>-inum</I>
|
|
|
|
option can be used to locate the file.
|
|
<DT id="75"><I>/proc/[pid]/fd/</I>
|
|
|
|
<DD>
|
|
This is a subdirectory containing one entry for each file which the
|
|
process has open, named by its file descriptor, and which is a
|
|
symbolic link to the actual file.
|
|
Thus, 0 is standard input, 1 standard output, 2 standard error, and so on.
|
|
<DT id="76"><DD>
|
|
For file descriptors for pipes and sockets,
|
|
the entries will be symbolic links whose content is the
|
|
file type with the inode.
|
|
A
|
|
<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2)
|
|
|
|
call on this file returns a string in the format:
|
|
<DT id="77"><DD>
|
|
<BR> type:[inode]
|
|
<DT id="78"><DD>
|
|
For example,
|
|
<I>socket:[2248868]</I>
|
|
|
|
will be a socket and its inode is 2248868.
|
|
For sockets, that inode can be used to find more information
|
|
in one of the files under
|
|
<I>/proc/net/</I>.
|
|
|
|
<DT id="79"><DD>
|
|
For file descriptors that have no corresponding inode
|
|
(e.g., file descriptors produced by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+bpf">bpf</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+epoll_create">epoll_create</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+eventfd">eventfd</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+inotify_init">inotify_init</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+perf_event_open">perf_event_open</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+signalfd">signalfd</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+timerfd_create">timerfd_create</A></B>(2),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+userfaultfd">userfaultfd</A></B>(2)),
|
|
|
|
the entry will be a symbolic link with contents of the form
|
|
<DT id="80"><DD>
|
|
<BR> anon_inode:<file-type>
|
|
<DT id="81"><DD>
|
|
In many cases (but not all), the
|
|
<I>file-type</I>
|
|
|
|
is surrounded by square brackets.
|
|
<DT id="82"><DD>
|
|
For example, an epoll file descriptor will have a symbolic link
|
|
whose content is the string
|
|
<I>anon_inode:[eventpoll]</I>.
|
|
|
|
<DT id="83"><DD>
|
|
|
|
In a multithreaded process, the contents of this directory
|
|
are not available if the main thread has already terminated
|
|
(typically by calling
|
|
<B><A HREF="/cgi-bin/man/man2html?3+pthread_exit">pthread_exit</A></B>(3)).
|
|
|
|
<DT id="84"><DD>
|
|
Programs that take a filename as a command-line argument,
|
|
but don't take input from standard input if no argument is supplied,
|
|
and programs that write to a file named as a command-line argument,
|
|
but don't send their output to standard output
|
|
if no argument is supplied, can nevertheless be made to use
|
|
standard input or standard output by using
|
|
<I>/proc/[pid]/fd</I>
|
|
|
|
files as command-line arguments.
|
|
For example, assuming that
|
|
<I>-i</I>
|
|
|
|
is the flag designating an input file and
|
|
<I>-o</I>
|
|
|
|
is the flag designating an output file:
|
|
<DT id="85"><DD>
|
|
|
|
|
|
$<B> foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...</B>
|
|
|
|
|
|
|
|
<DT id="86"><DD>
|
|
and you have a working filter.
|
|
|
|
|
|
|
|
|
|
<DT id="87"><DD>
|
|
<I>/proc/self/fd/N</I>
|
|
|
|
is approximately the same as
|
|
<I>/dev/fd/N</I>
|
|
|
|
in some UNIX and UNIX-like systems.
|
|
Most Linux MAKEDEV scripts symbolically link
|
|
<I>/dev/fd</I>
|
|
|
|
to
|
|
<I>/proc/self/fd</I>,
|
|
|
|
in fact.
|
|
<DT id="88"><DD>
|
|
Most systems provide symbolic links
|
|
<I>/dev/stdin</I>,
|
|
|
|
<I>/dev/stdout</I>,
|
|
|
|
and
|
|
<I>/dev/stderr</I>,
|
|
|
|
which respectively link to the files
|
|
<I>0</I>,
|
|
|
|
<I>1</I>,
|
|
|
|
and
|
|
<I>2</I>
|
|
|
|
in
|
|
<I>/proc/self/fd</I>.
|
|
|
|
Thus the example command above could be written as:
|
|
<DT id="89"><DD>
|
|
|
|
|
|
$<B> foobar -i /dev/stdin -o /dev/stdout ...</B>
|
|
|
|
|
|
|
|
<DT id="90"><DD>
|
|
Permission to dereference or read
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2))
|
|
|
|
the symbolic links in this directory is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="91"><DD>
|
|
Note that for file descriptors referring to inodes (pipes and sockets, see above),
|
|
those inodes still have permission bits and ownership information
|
|
distinct from those of the
|
|
<I>/proc/[pid]/fd</I>
|
|
|
|
entry,
|
|
and that the owner may differ from the user and group IDs of the process.
|
|
An unprivileged process may lack permissions to open them, as in this example:
|
|
<DT id="92"><DD>
|
|
|
|
|
|
$<B> echo test | sudo -u nobody cat</B>
|
|
|
|
test
|
|
$<B> echo test | sudo -u nobody cat /proc/self/fd/0</B>
|
|
|
|
cat: /proc/self/fd/0: Permission denied
|
|
|
|
|
|
<DT id="93"><DD>
|
|
File descriptor 0 refers to the pipe created by the shell
|
|
and owned by that shell's user, which is not
|
|
<I>nobody</I>,
|
|
|
|
so
|
|
<B>cat</B>
|
|
|
|
does not have permission to create a new file descriptor to read from that inode,
|
|
even though it can still read from its existing file descriptor 0.
|
|
<DT id="94"><I>/proc/[pid]/fdinfo/</I> (since Linux 2.6.22)
|
|
|
|
<DD>
|
|
This is a subdirectory containing one entry for each file which the
|
|
process has open, named by its file descriptor.
|
|
The files in this directory are readable only by the owner of the process.
|
|
The contents of each file can be read to obtain information
|
|
about the corresponding file descriptor.
|
|
The content depends on the type of file referred to by the
|
|
corresponding file descriptor.
|
|
<DT id="95"><DD>
|
|
For regular files and directories, we see something like:
|
|
<DT id="96"><DD>
|
|
|
|
|
|
$<B> cat /proc/12015/fdinfo/4</B>
|
|
|
|
pos: 1000
|
|
flags: 01002002
|
|
mnt_id: 21
|
|
|
|
|
|
<DT id="97"><DD>
|
|
The fields are as follows:
|
|
<DL COMPACT><DT id="98"><DD>
|
|
<DL COMPACT>
|
|
<DT id="99"><I>pos</I>
|
|
|
|
<DD>
|
|
This is a decimal number showing the file offset.
|
|
<DT id="100"><I>flags</I>
|
|
|
|
<DD>
|
|
This is an octal number that displays the
|
|
file access mode and file status flags (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+open">open</A></B>(2)).
|
|
|
|
If the close-on-exec file descriptor flag is set, then
|
|
<I>flags</I>
|
|
|
|
will also include the value
|
|
<B>O_CLOEXEC</B>.
|
|
|
|
<DT id="101"><DD>
|
|
Before Linux 3.1,
|
|
|
|
this field incorrectly displayed the setting of
|
|
<B>O_CLOEXEC</B>
|
|
|
|
at the time the file was opened,
|
|
rather than the current setting of the close-on-exec flag.
|
|
<DT id="102"><I>mnt_id</I>
|
|
|
|
|
|
|
|
<DD>
|
|
This field, present since Linux 3.15,
|
|
|
|
is the ID of the mount point containing this file.
|
|
See the description of
|
|
<I>/proc/[pid]/mountinfo</I>.
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="103"><DD>
|
|
For eventfd file descriptors (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+eventfd">eventfd</A></B>(2)),
|
|
|
|
we see (since Linux 3.8)
|
|
|
|
the following fields:
|
|
<DT id="104"><DD>
|
|
|
|
|
|
pos:<TT> </TT>0<BR>
|
|
flags:<TT> </TT>02<BR>
|
|
mnt_id:<TT> </TT>10<BR>
|
|
eventfd-count: 40
|
|
|
|
|
|
<DT id="105"><DD>
|
|
<I>eventfd-count</I>
|
|
|
|
is the current value of the eventfd counter, in hexadecimal.
|
|
<DT id="106"><DD>
|
|
For epoll file descriptors (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+epoll">epoll</A></B>(7)),
|
|
|
|
we see (since Linux 3.8)
|
|
|
|
the following fields:
|
|
<DT id="107"><DD>
|
|
|
|
|
|
pos:<TT> </TT>0<BR>
|
|
flags:<TT> </TT>02<BR>
|
|
mnt_id:<TT> </TT>10<BR>
|
|
tfd: 9 events: 19 data: 74253d2500000009
|
|
tfd: 7 events: 19 data: 74253d2500000007
|
|
|
|
|
|
<DT id="108"><DD>
|
|
Each of the lines beginning
|
|
<I>tfd</I>
|
|
|
|
describes one of the file descriptors being monitored via
|
|
the epoll file descriptor (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+epoll_ctl">epoll_ctl</A></B>(2)
|
|
|
|
for some details).
|
|
The
|
|
<I>tfd</I>
|
|
|
|
field is the number of the file descriptor.
|
|
The
|
|
<I>events</I>
|
|
|
|
field is a hexadecimal mask of the events being monitored for this file
|
|
descriptor.
|
|
The
|
|
<I>data</I>
|
|
|
|
field is the data value associated with this file descriptor.
|
|
<DT id="109"><DD>
|
|
For signalfd file descriptors (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+signalfd">signalfd</A></B>(2)),
|
|
|
|
we see (since Linux 3.8)
|
|
|
|
the following fields:
|
|
<DT id="110"><DD>
|
|
|
|
|
|
pos:<TT> </TT>0<BR>
|
|
flags:<TT> </TT>02<BR>
|
|
mnt_id:<TT> </TT>10<BR>
|
|
sigmask:<TT> </TT>0000000000000006<BR>
|
|
|
|
|
|
<DT id="111"><DD>
|
|
<I>sigmask</I>
|
|
|
|
is the hexadecimal mask of signals that are accepted via this
|
|
signalfd file descriptor.
|
|
(In this example, bits 2 and 3 are set, corresponding to the signals
|
|
<B>SIGINT</B>
|
|
|
|
and
|
|
<B>SIGQUIT</B>;
|
|
|
|
see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+signal">signal</A></B>(7).)
|
|
|
|
<DT id="112"><DD>
|
|
For inotify file descriptors (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+inotify">inotify</A></B>(7)),
|
|
|
|
we see (since Linux 3.8)
|
|
the following fields:
|
|
<DT id="113"><DD>
|
|
|
|
|
|
pos:<TT> </TT>0<BR>
|
|
flags:<TT> </TT>00<BR>
|
|
mnt_id:<TT> </TT>11<BR>
|
|
inotify wd:2 ino:7ef82a sdev:800001 mask:800afff ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:2af87e00220ffd73
|
|
inotify wd:1 ino:192627 sdev:800001 mask:800afff ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:27261900802dfd73
|
|
|
|
|
|
<DT id="114"><DD>
|
|
Each of the lines beginning with "inotify" displays information about
|
|
one file or directory that is being monitored.
|
|
The fields in this line are as follows:
|
|
<DL COMPACT><DT id="115"><DD>
|
|
<DL COMPACT>
|
|
<DT id="116"><I>wd</I>
|
|
|
|
<DD>
|
|
A watch descriptor number (in decimal).
|
|
<DT id="117"><I>ino</I>
|
|
|
|
<DD>
|
|
The inode number of the target file (in hexadecimal).
|
|
<DT id="118"><I>sdev</I>
|
|
|
|
<DD>
|
|
The ID of the device where the target file resides (in hexadecimal).
|
|
<DT id="119"><I>mask</I>
|
|
|
|
<DD>
|
|
The mask of events being monitored for the target file (in hexadecimal).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="120"><DD>
|
|
If the kernel was built with exportfs support, the path to the target
|
|
file is exposed as a file handle, via three hexadecimal fields:
|
|
<I>fhandle-bytes</I>,
|
|
|
|
<I>fhandle-type</I>,
|
|
|
|
and
|
|
<I>f_handle</I>.
|
|
|
|
<DT id="121"><DD>
|
|
For fanotify file descriptors (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+fanotify">fanotify</A></B>(7)),
|
|
|
|
we see (since Linux 3.8)
|
|
the following fields:
|
|
<DT id="122"><DD>
|
|
|
|
|
|
pos:<TT> </TT>0<BR>
|
|
flags:<TT> </TT>02<BR>
|
|
mnt_id:<TT> </TT>11<BR>
|
|
fanotify flags:0 event-flags:88002
|
|
fanotify ino:19264f sdev:800001 mflags:0 mask:1 ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:4f261900a82dfd73
|
|
|
|
|
|
<DT id="123"><DD>
|
|
The fourth line displays information defined when the fanotify group
|
|
was created via
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fanotify_init">fanotify_init</A></B>(2):
|
|
|
|
<DL COMPACT><DT id="124"><DD>
|
|
<DL COMPACT>
|
|
<DT id="125"><I>flags</I>
|
|
|
|
<DD>
|
|
The
|
|
<I>flags</I>
|
|
|
|
argument given to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fanotify_init">fanotify_init</A></B>(2)
|
|
|
|
(expressed in hexadecimal).
|
|
<DT id="126"><I>event-flags</I>
|
|
|
|
<DD>
|
|
The
|
|
<I>event_f_flags</I>
|
|
|
|
argument given to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fanotify_init">fanotify_init</A></B>(2)
|
|
|
|
(expressed in hexadecimal).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="127"><DD>
|
|
Each additional line shown in the file contains information
|
|
about one of the marks in the fanotify group.
|
|
Most of these fields are as for inotify, except:
|
|
<DL COMPACT><DT id="128"><DD>
|
|
<DL COMPACT>
|
|
<DT id="129"><I>mflags</I>
|
|
|
|
<DD>
|
|
The flags associated with the mark
|
|
(expressed in hexadecimal).
|
|
<DT id="130"><I>mask</I>
|
|
|
|
<DD>
|
|
The events mask for this mark
|
|
(expressed in hexadecimal).
|
|
<DT id="131"><I>ignored_mask</I>
|
|
|
|
<DD>
|
|
The mask of events that are ignored for this mark
|
|
(expressed in hexadecimal).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="132"><DD>
|
|
For details on these fields, see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fanotify_mark">fanotify_mark</A></B>(2).
|
|
|
|
<DT id="133"><DD>
|
|
For timerfd file descriptors (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+timerfd">timerfd</A></B>(2)),
|
|
|
|
we see (since Linux 3.17)
|
|
|
|
the following fields:
|
|
<DT id="134"><DD>
|
|
|
|
|
|
pos: 0
|
|
flags: 02004002
|
|
mnt_id: 13
|
|
clockid: 0
|
|
ticks: 0
|
|
settime flags: 03
|
|
it_value: (7695568592, 640020877)
|
|
it_interval: (0, 0)
|
|
|
|
|
|
<DL COMPACT><DT id="135"><DD>
|
|
<DL COMPACT>
|
|
<DT id="136"><I>clockid</I>
|
|
|
|
<DD>
|
|
This is the numeric value of the clock ID
|
|
(corresponding to one of the
|
|
<B>CLOCK_*</B>
|
|
|
|
constants defined via
|
|
<I><<A HREF="file:///usr/include/time.h">time.h</A>></I>)
|
|
|
|
that is used to mark the progress of the timer (in this example, 0 is
|
|
<B>CLOCK_REALTIME</B>).
|
|
|
|
<DT id="137"><I>ticks</I>
|
|
|
|
<DD>
|
|
This is the number of timer expirations that have occurred,
|
|
(i.e., the value that
|
|
<B><A HREF="/cgi-bin/man/man2html?2+read">read</A></B>(2)
|
|
|
|
on it would return).
|
|
<DT id="138"><I>settime flags</I>
|
|
|
|
<DD>
|
|
This field lists the flags with which the timerfd was last armed (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+timerfd_settime">timerfd_settime</A></B>(2)),
|
|
|
|
in octal
|
|
(in this example, both
|
|
<B>TFD_TIMER_ABSTIME</B>
|
|
|
|
and
|
|
<B>TFD_TIMER_CANCEL_ON_SET</B>
|
|
|
|
are set).
|
|
<DT id="139"><I>it_value</I>
|
|
|
|
<DD>
|
|
This field contains the amount of time until the timer will next expire,
|
|
expressed in seconds and nanoseconds.
|
|
This is always expressed as a relative value,
|
|
regardless of whether the timer was created using the
|
|
<B>TFD_TIMER_ABSTIME</B>
|
|
|
|
flag.
|
|
<DT id="140"><I>it_interval</I>
|
|
|
|
<DD>
|
|
This field contains the interval of the timer,
|
|
in seconds and nanoseconds.
|
|
(The
|
|
<I>it_value</I>
|
|
|
|
and
|
|
<I>it_interval</I>
|
|
|
|
fields contain the values that
|
|
<B><A HREF="/cgi-bin/man/man2html?2+timerfd_gettime">timerfd_gettime</A></B>(2)
|
|
|
|
on this file descriptor would return.)
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="141"><I>/proc/[pid]/gid_map</I> (since Linux 3.5)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user_namespaces">user_namespaces</A></B>(7).
|
|
|
|
<DT id="142"><I>/proc/[pid]/io</I> (since kernel 2.6.20)
|
|
|
|
<DD>
|
|
|
|
This file contains I/O statistics for the process, for example:
|
|
<DT id="143"><DD>
|
|
|
|
|
|
#<B> cat /proc/3828/io</B>
|
|
|
|
rchar: 323934931
|
|
wchar: 323929600
|
|
syscr: 632687
|
|
syscw: 632675
|
|
read_bytes: 0
|
|
write_bytes: 323932160
|
|
cancelled_write_bytes: 0
|
|
|
|
|
|
<DT id="144"><DD>
|
|
The fields are as follows:
|
|
<DL COMPACT><DT id="145"><DD>
|
|
<DL COMPACT>
|
|
<DT id="146"><I>rchar</I>: characters read
|
|
|
|
<DD>
|
|
The number of bytes which this task has caused to be read from storage.
|
|
This is simply the sum of bytes which this process passed to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+read">read</A></B>(2)
|
|
|
|
and similar system calls.
|
|
It includes things such as terminal I/O and
|
|
is unaffected by whether or not actual
|
|
physical disk I/O was required (the read might have been satisfied from
|
|
pagecache).
|
|
<DT id="147"><I>wchar</I>: characters written
|
|
|
|
<DD>
|
|
The number of bytes which this task has caused, or shall cause to be written
|
|
to disk.
|
|
Similar caveats apply here as with
|
|
<I>rchar</I>.
|
|
|
|
<DT id="148"><I>syscr</I>: read syscalls
|
|
|
|
<DD>
|
|
Attempt to count the number of read I/O operations---that is,
|
|
system calls such as
|
|
<B><A HREF="/cgi-bin/man/man2html?2+read">read</A></B>(2)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+pread">pread</A></B>(2).
|
|
|
|
<DT id="149"><I>syscw</I>: write syscalls
|
|
|
|
<DD>
|
|
Attempt to count the number of write I/O operations---that is,
|
|
system calls such as
|
|
<B><A HREF="/cgi-bin/man/man2html?2+write">write</A></B>(2)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+pwrite">pwrite</A></B>(2).
|
|
|
|
<DT id="150"><I>read_bytes</I>: bytes read
|
|
|
|
<DD>
|
|
Attempt to count the number of bytes which this process really did cause to
|
|
be fetched from the storage layer.
|
|
This is accurate for block-backed filesystems.
|
|
<DT id="151"><I>write_bytes</I>: bytes written
|
|
|
|
<DD>
|
|
Attempt to count the number of bytes which this process caused to be sent to
|
|
the storage layer.
|
|
<DT id="152"><I>cancelled_write_bytes</I>:
|
|
|
|
<DD>
|
|
The big inaccuracy here is truncate.
|
|
If a process writes 1MB to a file and then deletes the file,
|
|
it will in fact perform no writeout.
|
|
But it will have been accounted as having caused 1MB of write.
|
|
In other words: this field represents the number of bytes which this process
|
|
caused to not happen, by truncating pagecache.
|
|
A task can cause "negative" I/O too.
|
|
If this task truncates some dirty pagecache,
|
|
some I/O which another task has been accounted for
|
|
(in its
|
|
<I>write_bytes</I>)
|
|
|
|
will not be happening.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="153"><DD>
|
|
<I>Note</I>:
|
|
|
|
In the current implementation, things are a bit racy on 32-bit systems:
|
|
if process A reads process B's
|
|
<I>/proc/[pid]/io</I>
|
|
|
|
while process B is updating one of these 64-bit counters,
|
|
process A could see an intermediate result.
|
|
<DT id="154"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="155"><I>/proc/[pid]/limits</I> (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
This file displays the soft limit, hard limit, and units of measurement
|
|
for each of the process's resource limits (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getrlimit">getrlimit</A></B>(2)).
|
|
|
|
Up to and including Linux 2.6.35,
|
|
this file is protected to allow reading only by the real UID of the process.
|
|
Since Linux 2.6.36,
|
|
|
|
this file is readable by all users on the system.
|
|
|
|
|
|
|
|
<DT id="156"><I>/proc/[pid]/map_files/</I> (since kernel 3.3)
|
|
|
|
<DD>
|
|
|
|
This subdirectory contains entries corresponding to memory-mapped
|
|
files (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2)).
|
|
|
|
Entries are named by memory region start and end
|
|
address pair (expressed as hexadecimal numbers),
|
|
and are symbolic links to the mapped files themselves.
|
|
Here is an example, with the output wrapped and reformatted to fit on an 80-column display:
|
|
<DT id="157"><DD>
|
|
|
|
|
|
#<B> ls -l /proc/self/map_files/</B>
|
|
|
|
lr--------. 1 root root 64 Apr 16 21:31
|
|
<BR> 3252e00000-3252e20000 -> /usr/lib64/ld-2.15.so
|
|
...
|
|
|
|
|
|
<DT id="158"><DD>
|
|
Although these entries are present for memory regions that were
|
|
mapped with the
|
|
<B>MAP_FILE</B>
|
|
|
|
flag, the way anonymous shared memory (regions created with the
|
|
<B>MAP_ANON | MAP_SHARED</B>
|
|
|
|
flags)
|
|
is implemented in Linux
|
|
means that such regions also appear on this directory.
|
|
Here is an example where the target file is the deleted
|
|
<I>/dev/zero</I>
|
|
|
|
one:
|
|
<DT id="159"><DD>
|
|
|
|
|
|
lrw-------. 1 root root 64 Apr 16 21:33
|
|
<BR> 7fc075d2f000-7fc075e6f000 -> /dev/zero (deleted)
|
|
|
|
|
|
<DT id="160"><DD>
|
|
This directory appears only if the
|
|
<B>CONFIG_CHECKPOINT_RESTORE</B>
|
|
|
|
kernel configuration option is enabled.
|
|
Privilege
|
|
(<B>CAP_SYS_ADMIN</B>)
|
|
|
|
|
|
|
|
|
|
|
|
is required to view the contents of this directory.
|
|
<DT id="161"><I>/proc/[pid]/maps</I>
|
|
|
|
<DD>
|
|
A file containing the currently mapped memory regions and their access
|
|
permissions.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2)
|
|
|
|
for some further information about memory mappings.
|
|
<DT id="162"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="163"><DD>
|
|
The format of the file is:
|
|
<DT id="164"><DD>
|
|
|
|
|
|
<I>address perms offset dev inode pathname</I>
|
|
|
|
00400000-00452000 r-xp 00000000 08:02 173521 /usr/bin/dbus-daemon
|
|
00651000-00652000 r--p 00051000 08:02 173521 /usr/bin/dbus-daemon
|
|
00652000-00655000 rw-p 00052000 08:02 173521 /usr/bin/dbus-daemon
|
|
00e03000-00e24000 rw-p 00000000 00:00 0 [heap]
|
|
00e24000-011f7000 rw-p 00000000 00:00 0 [heap]
|
|
...
|
|
35b1800000-35b1820000 r-xp 00000000 08:02 135522 /usr/lib64/ld-2.15.so
|
|
35b1a1f000-35b1a20000 r--p 0001f000 08:02 135522 /usr/lib64/ld-2.15.so
|
|
35b1a20000-35b1a21000 rw-p 00020000 08:02 135522 /usr/lib64/ld-2.15.so
|
|
35b1a21000-35b1a22000 rw-p 00000000 00:00 0
|
|
35b1c00000-35b1dac000 r-xp 00000000 08:02 135870 /usr/lib64/libc-2.15.so
|
|
35b1dac000-35b1fac000 ---p 001ac000 08:02 135870 /usr/lib64/libc-2.15.so
|
|
35b1fac000-35b1fb0000 r--p 001ac000 08:02 135870 /usr/lib64/libc-2.15.so
|
|
35b1fb0000-35b1fb2000 rw-p 001b0000 08:02 135870 /usr/lib64/libc-2.15.so
|
|
...
|
|
f2c6ff8c000-7f2c7078c000 rw-p 00000000 00:00 0 [stack:986]
|
|
...
|
|
7fffb2c0d000-7fffb2c2e000 rw-p 00000000 00:00 0 [stack]
|
|
7fffb2d48000-7fffb2d49000 r-xp 00000000 00:00 0 [vdso]
|
|
|
|
|
|
<DT id="165"><DD>
|
|
The
|
|
<I>address</I>
|
|
|
|
field is the address space in the process that the mapping occupies.
|
|
The
|
|
<I>perms</I>
|
|
|
|
field is a set of permissions:
|
|
<DT id="166"><DD>
|
|
|
|
|
|
r = read
|
|
w = write
|
|
x = execute
|
|
s = shared
|
|
p = private (copy on write)
|
|
|
|
|
|
<DT id="167"><DD>
|
|
The
|
|
<I>offset</I>
|
|
|
|
field is the offset into the file/whatever;
|
|
<I>dev</I>
|
|
|
|
is the device
|
|
(major:minor);
|
|
<I>inode</I>
|
|
|
|
is the inode on that device.
|
|
0 indicates that no inode is associated with the memory region,
|
|
as would be the case with BSS (uninitialized data).
|
|
<DT id="168"><DD>
|
|
The
|
|
<I>pathname</I>
|
|
|
|
field will usually be the file that is backing the mapping.
|
|
For ELF files,
|
|
you can easily coordinate with the
|
|
<I>offset</I>
|
|
|
|
field by looking at the
|
|
Offset field in the ELF program headers
|
|
(<I>readelf -l</I>).
|
|
|
|
<DT id="169"><DD>
|
|
There are additional helpful pseudo-paths:
|
|
<DL COMPACT><DT id="170"><DD>
|
|
<DL COMPACT>
|
|
<DT id="171"><I>[stack]</I>
|
|
|
|
<DD>
|
|
The initial process's (also known as the main thread's) stack.
|
|
<DT id="172"><I>[stack:<tid>]</I> (from Linux 3.4 to 4.4)
|
|
|
|
<DD>
|
|
|
|
|
|
A thread's stack (where the
|
|
<I><tid></I>
|
|
|
|
is a thread ID).
|
|
It corresponds to the
|
|
<I>/proc/[pid]/task/[tid]/</I>
|
|
|
|
path.
|
|
This field was removed in Linux 4.5, since providing this information
|
|
for a process with large numbers of threads is expensive.
|
|
<DT id="173"><I>[vdso]</I>
|
|
|
|
<DD>
|
|
The virtual dynamically linked shared object.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+vdso">vdso</A></B>(7).
|
|
|
|
<DT id="174"><I>[heap]</I>
|
|
|
|
<DD>
|
|
The process's heap.
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="175"><DD>
|
|
If the
|
|
<I>pathname</I>
|
|
|
|
field is blank,
|
|
this is an anonymous mapping as obtained via
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2).
|
|
|
|
There is no easy way to coordinate this back to a process's source,
|
|
short of running it through
|
|
<B><A HREF="/cgi-bin/man/man2html?1+gdb">gdb</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+strace">strace</A></B>(1),
|
|
|
|
or similar.
|
|
<DT id="176"><DD>
|
|
<I>pathname</I>
|
|
|
|
is shown unescaped except for newline characters, which are replaced
|
|
with an octal escape sequence.
|
|
As a result, it is not possible to determine whether the original
|
|
pathname contained a newline character or the literal
|
|
<I>\e012</I>
|
|
|
|
character sequence.
|
|
<DT id="177"><DD>
|
|
If the mapping is file-backed and the file has been deleted, the string
|
|
" (deleted)" is appended to the pathname.
|
|
Note that this is ambiguous too.
|
|
<DT id="178"><DD>
|
|
Under Linux 2.0, there is no field giving pathname.
|
|
<DT id="179"><I>/proc/[pid]/mem</I>
|
|
|
|
<DD>
|
|
This file can be used to access the pages of a process's memory through
|
|
<B><A HREF="/cgi-bin/man/man2html?2+open">open</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+read">read</A></B>(2),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+lseek">lseek</A></B>(2).
|
|
|
|
<DT id="180"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_ATTACH_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="181"><I>/proc/[pid]/mountinfo</I> (since Linux 2.6.26)
|
|
|
|
<DD>
|
|
|
|
|
|
This file contains information about mount points
|
|
in the process's mount namespace (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mount_namespaces">mount_namespaces</A></B>(7)).
|
|
|
|
It supplies various information
|
|
(e.g., propagation state, root of mount for bind mounts,
|
|
identifier for each mount and its parent) that is missing from the (older)
|
|
<I>/proc/[pid]/mounts</I>
|
|
|
|
file, and fixes various other problems with that file
|
|
(e.g., nonextensibility,
|
|
failure to distinguish per-mount versus per-superblock options).
|
|
<DT id="182"><DD>
|
|
The file contains lines of the form:
|
|
<DT id="183"><DD>
|
|
|
|
|
|
36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
|
|
(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
|
|
|
|
|
|
<DT id="184"><DD>
|
|
The numbers in parentheses are labels for the descriptions below:
|
|
<DL COMPACT><DT id="185"><DD>
|
|
<DL COMPACT>
|
|
<DT id="186">(1)<DD>
|
|
mount ID: a unique ID for the mount (may be reused after
|
|
<B><A HREF="/cgi-bin/man/man2html?2+umount">umount</A></B>(2)).
|
|
|
|
<DT id="187">(2)<DD>
|
|
parent ID: the ID of the parent mount
|
|
(or of self for the root of this mount namespace's mount tree).
|
|
<DT id="188"><DD>
|
|
If a new mount is stacked on top of a previous existing mount
|
|
(so that it hides the existing mount) at pathname P,
|
|
then the parent of the new mount is the previous mount at that location.
|
|
Thus, when looking at all the mounts stacked at a particular location,
|
|
the top-most mount is the one that is not the parent
|
|
of any other mount at the same location.
|
|
(Note, however, that this top-most mount will be accessible only if
|
|
the longest path subprefix of P that is a mount point
|
|
is not itself hidden by a stacked mount.)
|
|
<DT id="189"><DD>
|
|
If the parent mount point lies outside the process's root directory (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+chroot">chroot</A></B>(2)),
|
|
|
|
the ID shown here won't have a corresponding record in
|
|
<I>mountinfo</I>
|
|
|
|
whose mount ID (field 1) matches this parent mount ID
|
|
(because mount points that lie outside the process's root directory
|
|
are not shown in
|
|
<I>mountinfo</I>).
|
|
|
|
As a special case of this point,
|
|
the process's root mount point may have a parent mount
|
|
(for the initramfs filesystem) that lies
|
|
|
|
|
|
outside the process's root directory,
|
|
and an entry for that mount point will not appear in
|
|
<I>mountinfo</I>.
|
|
|
|
<DT id="190">(3)<DD>
|
|
major:minor: the value of
|
|
<I>st_dev</I>
|
|
|
|
for files on this filesystem (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+stat">stat</A></B>(2)).
|
|
|
|
<DT id="191">(4)<DD>
|
|
root: the pathname of the directory in the filesystem
|
|
which forms the root of this mount.
|
|
<DT id="192">(5)<DD>
|
|
mount point: the pathname of the mount point relative
|
|
to the process's root directory.
|
|
<DT id="193">(6)<DD>
|
|
mount options: per-mount options (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2)).
|
|
|
|
<DT id="194">(7)<DD>
|
|
optional fields: zero or more fields of the form "tag[:value]"; see below.
|
|
<DT id="195">(8)<DD>
|
|
separator: the end of the optional fields is marked by a single hyphen.
|
|
<DT id="196">(9)<DD>
|
|
filesystem type: the filesystem type in the form "type[.subtype]".
|
|
<DT id="197">(10)<DD>
|
|
mount source: filesystem-specific information or "none".
|
|
<DT id="198">(11)<DD>
|
|
super options: per-superblock options (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mount">mount</A></B>(2)).
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="199"><DD>
|
|
Currently, the possible optional fields are
|
|
<I>shared</I>,
|
|
|
|
<I>master</I>,
|
|
|
|
<I>propagate_from</I>,
|
|
|
|
and
|
|
<I>unbindable</I>.
|
|
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mount_namespaces">mount_namespaces</A></B>(7)
|
|
|
|
for a description of these fields.
|
|
Parsers should ignore all unrecognized optional fields.
|
|
<DT id="200"><DD>
|
|
For more information on mount propagation see:
|
|
<I>Documentation/filesystems/sharedsubtree.txt</I>
|
|
|
|
in the Linux kernel source tree.
|
|
<DT id="201"><I>/proc/[pid]/mounts</I> (since Linux 2.4.19)
|
|
|
|
<DD>
|
|
This file lists all the filesystems currently mounted in the
|
|
process's mount namespace (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mount_namespaces">mount_namespaces</A></B>(7)).
|
|
|
|
The format of this file is documented in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5).
|
|
|
|
<DT id="202"><DD>
|
|
Since kernel version 2.6.15, this file is pollable:
|
|
after opening the file for reading, a change in this file
|
|
(i.e., a filesystem mount or unmount) causes
|
|
<B><A HREF="/cgi-bin/man/man2html?2+select">select</A></B>(2)
|
|
|
|
to mark the file descriptor as having an exceptional condition, and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+poll">poll</A></B>(2)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+epoll_wait">epoll_wait</A></B>(2)
|
|
|
|
mark the file as having a priority event
|
|
(<B>POLLPRI</B>).
|
|
|
|
(Before Linux 2.6.30,
|
|
a change in this file was indicated by the file descriptor
|
|
being marked as readable for
|
|
<B><A HREF="/cgi-bin/man/man2html?2+select">select</A></B>(2),
|
|
|
|
and being marked as having an error condition for
|
|
<B><A HREF="/cgi-bin/man/man2html?2+poll">poll</A></B>(2)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+epoll_wait">epoll_wait</A></B>(2).)
|
|
|
|
<DT id="203"><I>/proc/[pid]/mountstats</I> (since Linux 2.6.17)
|
|
|
|
<DD>
|
|
This file exports information (statistics, configuration information)
|
|
about the mount points in the process's mount namespace (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mount_namespaces">mount_namespaces</A></B>(7)).
|
|
|
|
Lines in this file have the form:
|
|
<DT id="204"><DD>
|
|
|
|
|
|
device /dev/sda7 mounted on /home with fstype ext3 [statistics]
|
|
( 1 ) ( 2 ) (3 ) (4)
|
|
|
|
|
|
<DT id="205"><DD>
|
|
The fields in each line are:
|
|
<DL COMPACT><DT id="206"><DD>
|
|
<DL COMPACT>
|
|
<DT id="207">(1)<DD>
|
|
The name of the mounted device
|
|
(or "nodevice" if there is no corresponding device).
|
|
<DT id="208">(2)<DD>
|
|
The mount point within the filesystem tree.
|
|
<DT id="209">(3)<DD>
|
|
The filesystem type.
|
|
<DT id="210">(4)<DD>
|
|
Optional statistics and configuration information.
|
|
Currently (as at Linux 2.6.26), only NFS filesystems export
|
|
information via this field.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="211"><DD>
|
|
This file is readable only by the owner of the process.
|
|
<DT id="212"><I>/proc/[pid]/net</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
See the description of
|
|
<I>/proc/net</I>.
|
|
|
|
<DT id="213"><I>/proc/[pid]/ns/</I> (since Linux 3.0)
|
|
|
|
<DD>
|
|
|
|
This is a subdirectory containing one entry for each namespace that
|
|
supports being manipulated by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setns">setns</A></B>(2).
|
|
|
|
For more information, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+namespaces">namespaces</A></B>(7).
|
|
|
|
<DT id="214"><I>/proc/[pid]/numa_maps</I> (since Linux 2.6.14)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+numa">numa</A></B>(7).
|
|
|
|
<DT id="215"><I>/proc/[pid]/oom_adj</I> (since Linux 2.6.11)
|
|
|
|
<DD>
|
|
This file can be used to adjust the score used to select which process
|
|
should be killed in an out-of-memory (OOM) situation.
|
|
The kernel uses this value for a bit-shift operation of the process's
|
|
<I>oom_score</I>
|
|
|
|
value:
|
|
valid values are in the range -16 to +15,
|
|
plus the special value -17,
|
|
which disables OOM-killing altogether for this process.
|
|
A positive score increases the likelihood of this
|
|
process being killed by the OOM-killer;
|
|
a negative score decreases the likelihood.
|
|
<DT id="216"><DD>
|
|
The default value for this file is 0;
|
|
a new process inherits its parent's
|
|
<I>oom_adj</I>
|
|
|
|
setting.
|
|
A process must be privileged
|
|
(<B>CAP_SYS_RESOURCE</B>)
|
|
|
|
to update this file.
|
|
<DT id="217"><DD>
|
|
Since Linux 2.6.36, use of this file is deprecated in favor of
|
|
<I>/proc/[pid]/oom_score_adj</I>.
|
|
|
|
<DT id="218"><I>/proc/[pid]/oom_score</I> (since Linux 2.6.11)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
This file displays the current score that the kernel gives to
|
|
this process for the purpose of selecting a process
|
|
for the OOM-killer.
|
|
A higher score means that the process is more likely to be
|
|
selected by the OOM-killer.
|
|
The basis for this score is the amount of memory used by the process,
|
|
with increases (+) or decreases (-) for factors including:
|
|
|
|
|
|
|
|
<DL COMPACT><DT id="219"><DD>
|
|
<DL COMPACT>
|
|
<DT id="220">*<DD>
|
|
whether the process is privileged (-).
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="221"><DD>
|
|
Before kernel 2.6.36 the following factors were also used in the calculation of oom_score:
|
|
<DL COMPACT><DT id="222"><DD>
|
|
<DL COMPACT>
|
|
<DT id="223">*<DD>
|
|
whether the process creates a lot of children using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fork">fork</A></B>(2)
|
|
|
|
(+);
|
|
<DT id="224">*<DD>
|
|
whether the process has been running a long time,
|
|
or has used a lot of CPU time (-);
|
|
<DT id="225">*<DD>
|
|
whether the process has a low nice value (i.e., > 0) (+); and
|
|
<DT id="226">*<DD>
|
|
whether the process is making direct hardware access (-).
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="227"><DD>
|
|
The
|
|
<I>oom_score</I>
|
|
|
|
also reflects the adjustment specified by the
|
|
<I>oom_score_adj</I>
|
|
|
|
or
|
|
<I>oom_adj</I>
|
|
|
|
setting for the process.
|
|
<DT id="228"><I>/proc/[pid]/oom_score_adj</I> (since Linux 2.6.36)
|
|
|
|
<DD>
|
|
|
|
This file can be used to adjust the badness heuristic used to select which
|
|
process gets killed in out-of-memory conditions.
|
|
<DT id="229"><DD>
|
|
The badness heuristic assigns a value to each candidate task ranging from 0
|
|
(never kill) to 1000 (always kill) to determine which process is targeted.
|
|
The units are roughly a proportion along that range of
|
|
allowed memory the process may allocate from,
|
|
based on an estimation of its current memory and swap use.
|
|
For example, if a task is using all allowed memory,
|
|
its badness score will be 1000.
|
|
If it is using half of its allowed memory, its score will be 500.
|
|
<DT id="230"><DD>
|
|
There is an additional factor included in the badness score: root
|
|
processes are given 3% extra memory over other tasks.
|
|
<DT id="231"><DD>
|
|
The amount of "allowed" memory depends on the context
|
|
in which the OOM-killer was called.
|
|
If it is due to the memory assigned to the allocating task's cpuset
|
|
being exhausted,
|
|
the allowed memory represents the set of mems assigned to that
|
|
cpuset (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7)).
|
|
|
|
If it is due to a mempolicy's node(s) being exhausted,
|
|
the allowed memory represents the set of mempolicy nodes.
|
|
If it is due to a memory limit (or swap limit) being reached,
|
|
the allowed memory is that configured limit.
|
|
Finally, if it is due to the entire system being out of memory, the
|
|
allowed memory represents all allocatable resources.
|
|
<DT id="232"><DD>
|
|
The value of
|
|
<I>oom_score_adj</I>
|
|
|
|
is added to the badness score before it
|
|
is used to determine which task to kill.
|
|
Acceptable values range from -1000
|
|
(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).
|
|
This allows user space to control the preference for OOM-killing,
|
|
ranging from always preferring a certain
|
|
task or completely disabling it from OOM killing.
|
|
The lowest possible value, -1000, is
|
|
equivalent to disabling OOM-killing entirely for that task,
|
|
since it will always report a badness score of 0.
|
|
<DT id="233"><DD>
|
|
Consequently, it is very simple for user space to define
|
|
the amount of memory to consider for each task.
|
|
Setting an
|
|
<I>oom_score_adj</I>
|
|
|
|
value of +500, for example,
|
|
is roughly equivalent to allowing the remainder of tasks sharing the
|
|
same system, cpuset, mempolicy, or memory controller resources
|
|
to use at least 50% more memory.
|
|
A value of -500, on the other hand, would be roughly
|
|
equivalent to discounting 50% of the task's
|
|
allowed memory from being considered as scoring against the task.
|
|
<DT id="234"><DD>
|
|
For backward compatibility with previous kernels,
|
|
<I>/proc/[pid]/oom_adj</I>
|
|
|
|
can still be used to tune the badness score.
|
|
Its value is
|
|
scaled linearly with
|
|
<I>oom_score_adj</I>.
|
|
|
|
<DT id="235"><DD>
|
|
Writing to
|
|
<I>/proc/[pid]/oom_score_adj</I>
|
|
|
|
or
|
|
<I>/proc/[pid]/oom_adj</I>
|
|
|
|
will change the other with its scaled value.
|
|
<DT id="236"><DD>
|
|
The
|
|
<B><A HREF="/cgi-bin/man/man2html?1+choom">choom</A></B>(1)
|
|
|
|
program provides a command-line interface for adjusting the
|
|
<I>oom_score_adj</I>
|
|
|
|
value of a running process or a newly executed command.
|
|
<DT id="237"><I>/proc/[pid]/pagemap</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
This file shows the mapping of each of the process's virtual pages
|
|
into physical page frames or swap area.
|
|
It contains one 64-bit value for each virtual page,
|
|
with the bits set as follows:
|
|
<DL COMPACT><DT id="238"><DD>
|
|
<DL COMPACT>
|
|
<DT id="239">63<DD>
|
|
If set, the page is present in RAM.
|
|
<DT id="240">62<DD>
|
|
If set, the page is in swap space
|
|
<DT id="241">61 (since Linux 3.5)<DD>
|
|
The page is a file-mapped page or a shared anonymous page.
|
|
<DT id="242">60-57 (since Linux 3.11)<DD>
|
|
Zero
|
|
|
|
<DT id="243">56 (since Linux 4.2)<DD>
|
|
|
|
|
|
The page is exclusively mapped.
|
|
<DT id="244">55 (since Linux 3.11)<DD>
|
|
PTE is soft-dirty
|
|
(see the kernel source file
|
|
<I>Documentation/admin-guide/mm/soft-dirty.rst</I>).
|
|
|
|
<DT id="245">54-0<DD>
|
|
If the page is present in RAM (bit 63), then these bits
|
|
provide the page frame number, which can be used to index
|
|
<I>/proc/kpageflags</I>
|
|
|
|
and
|
|
<I>/proc/kpagecount</I>.
|
|
|
|
If the page is present in swap (bit 62),
|
|
then bits 4-0 give the swap type, and bits 54-5 encode the swap offset.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="246"><DD>
|
|
Before Linux 3.11, bits 60-55 were
|
|
used to encode the base-2 log of the page size.
|
|
<DT id="247"><DD>
|
|
To employ
|
|
<I>/proc/[pid]/pagemap</I>
|
|
|
|
efficiently, use
|
|
<I>/proc/[pid]/maps</I>
|
|
|
|
to determine which areas of memory are actually mapped and seek
|
|
to skip over unmapped regions.
|
|
<DT id="248"><DD>
|
|
The
|
|
<I>/proc/[pid]/pagemap</I>
|
|
|
|
file is present only if the
|
|
<B>CONFIG_PROC_PAGE_MONITOR</B>
|
|
|
|
kernel configuration option is enabled.
|
|
<DT id="249"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="250"><I>/proc/[pid]/personality</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
This read-only file exposes the process's execution domain, as set by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+personality">personality</A></B>(2).
|
|
|
|
The value is displayed in hexadecimal notation.
|
|
<DT id="251"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_ATTACH_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="252"><I>/proc/[pid]/root</I>
|
|
|
|
<DD>
|
|
UNIX and Linux support the idea of a per-process root of the
|
|
filesystem, set by the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+chroot">chroot</A></B>(2)
|
|
|
|
system call.
|
|
This file is a symbolic link that points to the process's
|
|
root directory, and behaves in the same way as
|
|
<I>exe</I>,
|
|
|
|
and
|
|
<I>fd/*</I>.
|
|
|
|
<DT id="253"><DD>
|
|
Note however that this file is not merely a symbolic link.
|
|
It provides the same view of the filesystem (including namespaces and the
|
|
set of per-process mounts) as the process itself.
|
|
An example illustrates this point.
|
|
In one terminal, we start a shell in new user and mount namespaces,
|
|
and in that shell we create some new mount points:
|
|
<DT id="254"><DD>
|
|
|
|
|
|
$ <B>PS1='sh1# ' unshare -Urnm</B>
|
|
sh1# <B>mount -t tmpfs tmpfs /etc</B> # Mount empty tmpfs at /etc
|
|
sh1# <B>mount --bind /usr /dev</B> # Mount /usr at /dev
|
|
sh1# <B>echo $$</B>
|
|
27123
|
|
|
|
|
|
<DT id="255"><DD>
|
|
In a second terminal window, in the initial mount namespace,
|
|
we look at the contents of the corresponding mounts in
|
|
the initial and new namespaces:
|
|
<DT id="256"><DD>
|
|
|
|
|
|
$ <B>PS1='sh2# ' sudo sh</B>
|
|
sh2# <B>ls /etc | wc -l</B> # In initial NS
|
|
309
|
|
sh2# <B>ls /proc/27123/root/etc | wc -l</B> # /etc in other NS
|
|
0 # The empty tmpfs dir
|
|
sh2# <B>ls /dev | wc -l</B> # In initial NS
|
|
205
|
|
sh2# <B>ls /proc/27123/root/dev | wc -l</B> # /dev in other NS
|
|
11 # Actually bind
|
|
<BR> # mounted to /usr
|
|
sh2# <B>ls /usr | wc -l</B> # /usr in initial NS
|
|
11
|
|
|
|
|
|
<DT id="257"><DD>
|
|
|
|
In a multithreaded process, the contents of the
|
|
<I>/proc/[pid]/root</I>
|
|
|
|
symbolic link are not available if the main thread has already terminated
|
|
(typically by calling
|
|
<B><A HREF="/cgi-bin/man/man2html?3+pthread_exit">pthread_exit</A></B>(3)).
|
|
|
|
<DT id="258"><DD>
|
|
Permission to dereference or read
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2))
|
|
|
|
this symbolic link is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
|
|
|
|
|
|
<DT id="259"><I>/proc/[pid]/seccomp</I> (Linux 2.6.12 to 2.6.22)
|
|
|
|
<DD>
|
|
This file can be used to read and change the process's
|
|
secure computing (seccomp) mode setting.
|
|
It contains the value 0 if the process is not in seccomp mode,
|
|
and 1 if the process is in strict seccomp mode (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+seccomp">seccomp</A></B>(2)).
|
|
|
|
Writing 1 to this file places the process irreversibly in strict seccomp mode.
|
|
(Further attempts to write to the file fail with the
|
|
<B>EPERM</B>
|
|
|
|
error.)
|
|
<DT id="260"><DD>
|
|
In Linux 2.6.23,
|
|
this file went away, to be replaced by the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)
|
|
|
|
<B>PR_GET_SECCOMP</B>
|
|
|
|
and
|
|
<B>PR_SET_SECCOMP</B>
|
|
|
|
operations (and later by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+seccomp">seccomp</A></B>(2)
|
|
|
|
and the
|
|
<I>Seccomp</I>
|
|
|
|
field in
|
|
<I>/proc/[pid]/status</I>).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="261"><I>/proc/[pid]/setgroups</I> (since Linux 3.19)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user_namespaces">user_namespaces</A></B>(7).
|
|
|
|
<DT id="262"><I>/proc/[pid]/smaps</I> (since Linux 2.6.14)
|
|
|
|
<DD>
|
|
This file shows memory consumption for each of the process's mappings.
|
|
(The
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pmap">pmap</A></B>(1)
|
|
|
|
command displays similar information,
|
|
in a form that may be easier for parsing.)
|
|
For each mapping there is a series of lines such as the following:
|
|
<DT id="263"><DD>
|
|
|
|
|
|
00400000-0048a000 r-xp 00000000 fd:03 960637 /bin/bash
|
|
Size: 552 kB
|
|
Rss: 460 kB
|
|
Pss: 100 kB
|
|
Shared_Clean: 452 kB
|
|
Shared_Dirty: 0 kB
|
|
Private_Clean: 8 kB
|
|
Private_Dirty: 0 kB
|
|
Referenced: 460 kB
|
|
Anonymous: 0 kB
|
|
AnonHugePages: 0 kB
|
|
ShmemHugePages: 0 kB
|
|
ShmemPmdMapped: 0 kB
|
|
Swap: 0 kB
|
|
KernelPageSize: 4 kB
|
|
MMUPageSize: 4 kB
|
|
KernelPageSize: 4 kB
|
|
MMUPageSize: 4 kB
|
|
Locked: 0 kB
|
|
ProtectionKey: 0
|
|
VmFlags: rd ex mr mw me dw
|
|
|
|
|
|
<DT id="264"><DD>
|
|
The first of these lines shows the same information as is displayed
|
|
for the mapping in
|
|
<I>/proc/[pid]/maps</I>.
|
|
|
|
The following lines show the size of the mapping,
|
|
the amount of the mapping that is currently resident in RAM ("Rss"),
|
|
the process's proportional share of this mapping ("Pss"),
|
|
the number of clean and dirty shared pages in the mapping,
|
|
and the number of clean and dirty private pages in the mapping.
|
|
"Referenced" indicates the amount of memory currently marked as
|
|
referenced or accessed.
|
|
"Anonymous" shows the amount of memory
|
|
that does not belong to any file.
|
|
"Swap" shows how much
|
|
would-be-anonymous memory is also used, but out on swap.
|
|
<DT id="265"><DD>
|
|
The "KernelPageSize" line (available since Linux 2.6.29)
|
|
is the page size used by the kernel to back the virtual memory area.
|
|
This matches the size used by the MMU in the majority of cases.
|
|
However, one counter-example occurs on PPC64 kernels
|
|
whereby a kernel using 64kB as a base page size may still use 4kB
|
|
pages for the MMU on older processors.
|
|
To distinguish the two attributes, the "MMUPageSize" line
|
|
(also available since Linux 2.6.29)
|
|
reports the page size used by the MMU.
|
|
<DT id="266"><DD>
|
|
The "Locked" indicates whether the mapping is locked in memory
|
|
or not.
|
|
<DT id="267"><DD>
|
|
The "ProtectionKey" line (available since Linux 4.9, on x86 only)
|
|
contains the memory protection key (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pkeys">pkeys</A></B>(7))
|
|
|
|
associated with the virtual memory area.
|
|
This entry is present only if the kernel was built with the
|
|
<B>CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS</B>
|
|
|
|
configuration option.
|
|
<DT id="268"><DD>
|
|
The "VmFlags" line (available since Linux 3.8)
|
|
represents the kernel flags associated with the virtual memory area,
|
|
encoded using the following two-letter codes:
|
|
<DT id="269"><DD>
|
|
<BR> rd - readable
|
|
<BR> wr - writable
|
|
<BR> ex - executable
|
|
<BR> sh - shared
|
|
<BR> mr - may read
|
|
<BR> mw - may write
|
|
<BR> me - may execute
|
|
<BR> ms - may share
|
|
<BR> gd - stack segment grows down
|
|
<BR> pf - pure PFN range
|
|
<BR> dw - disabled write to the mapped file
|
|
<BR> lo - pages are locked in memory
|
|
<BR> io - memory mapped I/O area
|
|
<BR> sr - sequential read advise provided
|
|
<BR> rr - random read advise provided
|
|
<BR> dc - do not copy area on fork
|
|
<BR> de - do not expand area on remapping
|
|
<BR> ac - area is accountable
|
|
<BR> nr - swap space is not reserved for the area
|
|
<BR> ht - area uses huge tlb pages
|
|
<BR> nl - non-linear mapping
|
|
<BR> ar - architecture specific flag
|
|
<BR> dd - do not include area into core dump
|
|
<BR> sd - soft-dirty flag
|
|
<BR> mm - mixed map area
|
|
<BR> hg - huge page advise flag
|
|
<BR> nh - no-huge page advise flag
|
|
<BR> mg - mergeable advise flag
|
|
<DT id="270"><DD>
|
|
"ProtectionKey" field contains the memory protection key (see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+pkeys">pkeys</A></B>(5))
|
|
|
|
associated with the virtual memory area.
|
|
Present only if the kernel was built with the
|
|
<B>CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS</B>
|
|
|
|
configuration option. (since Linux 4.6)
|
|
<DT id="271"><DD>
|
|
The
|
|
<I>/proc/[pid]/smaps</I>
|
|
|
|
file is present only if the
|
|
<B>CONFIG_PROC_PAGE_MONITOR</B>
|
|
|
|
kernel configuration option is enabled.
|
|
<DT id="272"><I>/proc/[pid]/stack</I> (since Linux 2.6.29)
|
|
|
|
<DD>
|
|
|
|
This file provides a symbolic trace of the function calls in this
|
|
process's kernel stack.
|
|
This file is provided only if the kernel was built with the
|
|
<B>CONFIG_STACKTRACE</B>
|
|
|
|
configuration option.
|
|
<DT id="273"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_ATTACH_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="274"><I>/proc/[pid]/stat</I>
|
|
|
|
<DD>
|
|
Status information about the process.
|
|
This is used by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ps">ps</A></B>(1).
|
|
|
|
It is defined in the kernel source file
|
|
<I>fs/proc/array.c</I>.
|
|
|
|
<DT id="275"><DD>
|
|
The fields, in order, with their proper
|
|
<B><A HREF="/cgi-bin/man/man2html?3+scanf">scanf</A></B>(3)
|
|
|
|
format specifiers, are listed below.
|
|
Whether or not certain of these fields display valid information is governed by
|
|
a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B> | <B>PTRACE_MODE_NOAUDIT</B>
|
|
|
|
check (refer to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2)).
|
|
|
|
If the check denies access, then the field value is displayed as 0.
|
|
The affected fields are indicated with the marking [PT].
|
|
<DT id="276"><DD>
|
|
<DL COMPACT><DT id="277"><DD>
|
|
<DL COMPACT>
|
|
<DT id="278">(1) <I>pid</I> %d<DD>
|
|
<BR>
|
|
|
|
The process ID.
|
|
<DT id="279">(2) <I>comm</I> %s<DD>
|
|
The filename of the executable, in parentheses.
|
|
This is visible whether or not the executable is swapped out.
|
|
<DT id="280">(3) <I>state</I> %c<DD>
|
|
One of the following characters, indicating process state:
|
|
<DL COMPACT><DT id="281"><DD>
|
|
<DL COMPACT>
|
|
<DT id="282">R<DD>
|
|
Running
|
|
<DT id="283">S<DD>
|
|
Sleeping in an interruptible wait
|
|
<DT id="284">D<DD>
|
|
Waiting in uninterruptible
|
|
disk sleep
|
|
<DT id="285">Z<DD>
|
|
Zombie
|
|
<DT id="286">T<DD>
|
|
Stopped (on a signal) or (before Linux 2.6.33) trace stopped
|
|
<DT id="287">t<DD>
|
|
|
|
Tracing stop (Linux 2.6.33 onward)
|
|
<DT id="288">W<DD>
|
|
Paging (only before Linux 2.6.0)
|
|
<DT id="289">X<DD>
|
|
Dead (from Linux 2.6.0 onward)
|
|
<DT id="290">x<DD>
|
|
|
|
Dead (Linux 2.6.33 to
|
|
|
|
3.13 only)
|
|
<DT id="291">K<DD>
|
|
|
|
Wakekill (Linux 2.6.33 to
|
|
|
|
3.13 only)
|
|
<DT id="292">W<DD>
|
|
|
|
Waking (Linux 2.6.33 to
|
|
|
|
3.13 only)
|
|
<DT id="293">P<DD>
|
|
|
|
Parked (Linux 3.9 to
|
|
|
|
3.13 only)
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="294">(4) <I>ppid</I> %d<DD>
|
|
The PID of the parent of this process.
|
|
<DT id="295">(5) <I>pgrp</I> %d<DD>
|
|
The process group ID of the process.
|
|
<DT id="296">(6) <I>session</I> %d<DD>
|
|
The session ID of the process.
|
|
<DT id="297">(7) <I>tty_nr</I> %d<DD>
|
|
The controlling terminal of the process.
|
|
(The minor device number is contained in the combination of bits
|
|
31 to 20 and 7 to 0;
|
|
the major device number is in bits 15 to 8.)
|
|
<DT id="298">(8) <I>tpgid</I> %d<DD>
|
|
|
|
The ID of the foreground process group of the controlling
|
|
terminal of the process.
|
|
<DT id="299">(9) <I>flags</I> %u<DD>
|
|
The kernel flags word of the process.
|
|
For bit meanings,
|
|
see the PF_* defines in the Linux kernel source file
|
|
<I>include/linux/sched.h</I>.
|
|
|
|
Details depend on the kernel version.
|
|
<DT id="300"><DD>
|
|
The format for this field was %lu before Linux 2.6.
|
|
<DT id="301">(10) <I>minflt</I> %lu<DD>
|
|
The number of minor faults the process has made which have not
|
|
required loading a memory page from disk.
|
|
<DT id="302">(11) <I>cminflt</I> %lu<DD>
|
|
The number of minor faults that the process's
|
|
waited-for children have made.
|
|
<DT id="303">(12) <I>majflt</I> %lu<DD>
|
|
The number of major faults the process has made which have
|
|
required loading a memory page from disk.
|
|
<DT id="304">(13) <I>cmajflt</I> %lu<DD>
|
|
The number of major faults that the process's
|
|
waited-for children have made.
|
|
<DT id="305">(14) <I>utime</I> %lu<DD>
|
|
Amount of time that this process has been scheduled in user mode,
|
|
measured in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
This includes guest time, <I>guest_time</I>
|
|
(time spent running a virtual CPU, see below),
|
|
so that applications that are not aware of the guest time field
|
|
do not lose that time from their calculations.
|
|
<DT id="306">(15) <I>stime</I> %lu<DD>
|
|
Amount of time that this process has been scheduled in kernel mode,
|
|
measured in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
<DT id="307">(16) <I>cutime</I> %ld<DD>
|
|
Amount of time that this process's
|
|
waited-for children have been scheduled in user mode,
|
|
measured in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
(See also
|
|
<B><A HREF="/cgi-bin/man/man2html?2+times">times</A></B>(2).)
|
|
|
|
This includes guest time, <I>cguest_time</I>
|
|
(time spent running a virtual CPU, see below).
|
|
<DT id="308">(17) <I>cstime</I> %ld<DD>
|
|
Amount of time that this process's
|
|
waited-for children have been scheduled in kernel mode,
|
|
measured in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
<DT id="309">(18) <I>priority</I> %ld<DD>
|
|
(Explanation for Linux 2.6)
|
|
For processes running a real-time scheduling policy
|
|
(<I>policy</I>
|
|
|
|
below; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sched_setscheduler">sched_setscheduler</A></B>(2)),
|
|
|
|
this is the negated scheduling priority, minus one;
|
|
that is, a number in the range -2 to -100,
|
|
corresponding to real-time priorities 1 to 99.
|
|
For processes running under a non-real-time scheduling policy,
|
|
this is the raw nice value
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+setpriority">setpriority</A></B>(2))
|
|
|
|
as represented in the kernel.
|
|
The kernel stores nice values as numbers
|
|
in the range 0 (high) to 39 (low),
|
|
corresponding to the user-visible nice range of -20 to 19.
|
|
<DT id="310"><DD>
|
|
Before Linux 2.6, this was a scaled value based on
|
|
the scheduler weighting given to this process.
|
|
|
|
<DT id="311">(19) <I>nice</I> %ld<DD>
|
|
The nice value (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setpriority">setpriority</A></B>(2)),
|
|
|
|
a value in the range 19 (low priority) to -20 (high priority).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="312">(20) <I>num_threads</I> %ld<DD>
|
|
Number of threads in this process (since Linux 2.6).
|
|
Before kernel 2.6, this field was hard coded to 0 as a placeholder
|
|
for an earlier removed field.
|
|
<DT id="313">(21) <I>itrealvalue</I> %ld<DD>
|
|
The time in jiffies before the next
|
|
<B>SIGALRM</B>
|
|
|
|
is sent to the process due to an interval timer.
|
|
Since kernel 2.6.17, this field is no longer maintained,
|
|
and is hard coded as 0.
|
|
<DT id="314">(22) <I>starttime</I> %llu<DD>
|
|
The time the process started after system boot.
|
|
In kernels before Linux 2.6, this value was expressed in jiffies.
|
|
Since Linux 2.6, the value is expressed in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
<DT id="315"><DD>
|
|
The format for this field was %lu before Linux 2.6.
|
|
<DT id="316">(23) <I>vsize</I> %lu<DD>
|
|
Virtual memory size in bytes.
|
|
<DT id="317">(24) <I>rss</I> %ld<DD>
|
|
Resident Set Size: number of pages the process has in real memory.
|
|
This is just the pages which
|
|
count toward text, data, or stack space.
|
|
This does not include pages
|
|
which have not been demand-loaded in, or which are swapped out.
|
|
<DT id="318">(25) <I>rsslim</I> %lu<DD>
|
|
Current soft limit in bytes on the rss of the process;
|
|
see the description of
|
|
<B>RLIMIT_RSS</B>
|
|
|
|
in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getrlimit">getrlimit</A></B>(2).
|
|
|
|
<DT id="319">(26) <I>startcode</I> %lu [PT]<DD>
|
|
The address above which program text can run.
|
|
<DT id="320">(27) <I>endcode</I> %lu [PT]<DD>
|
|
The address below which program text can run.
|
|
<DT id="321">(28) <I>startstack</I> %lu [PT]<DD>
|
|
The address of the start (i.e., bottom) of the stack.
|
|
<DT id="322">(29) <I>kstkesp</I> %lu [PT]<DD>
|
|
The current value of ESP (stack pointer), as found in the
|
|
kernel stack page for the process.
|
|
<DT id="323">(30) <I>kstkeip</I> %lu [PT]<DD>
|
|
The current EIP (instruction pointer).
|
|
<DT id="324">(31) <I>signal</I> %lu<DD>
|
|
The bitmap of pending signals, displayed as a decimal number.
|
|
Obsolete, because it does not provide information on real-time signals; use
|
|
<I>/proc/[pid]/status</I>
|
|
|
|
instead.
|
|
<DT id="325">(32) <I>blocked</I> %lu<DD>
|
|
The bitmap of blocked signals, displayed as a decimal number.
|
|
Obsolete, because it does not provide information on real-time signals; use
|
|
<I>/proc/[pid]/status</I>
|
|
|
|
instead.
|
|
<DT id="326">(33) <I>sigignore</I> %lu<DD>
|
|
The bitmap of ignored signals, displayed as a decimal number.
|
|
Obsolete, because it does not provide information on real-time signals; use
|
|
<I>/proc/[pid]/status</I>
|
|
|
|
instead.
|
|
<DT id="327">(34) <I>sigcatch</I> %lu<DD>
|
|
The bitmap of caught signals, displayed as a decimal number.
|
|
Obsolete, because it does not provide information on real-time signals; use
|
|
<I>/proc/[pid]/status</I>
|
|
|
|
instead.
|
|
<DT id="328">(35) <I>wchan</I> %lu [PT]<DD>
|
|
This is the "channel" in which the process is waiting.
|
|
It is the address of a location in the kernel where the process is sleeping.
|
|
The corresponding symbolic name can be found in
|
|
<I>/proc/[pid]/wchan</I>.
|
|
|
|
<DT id="329">(36) <I>nswap</I> %lu<DD>
|
|
|
|
Number of pages swapped (not maintained).
|
|
<DT id="330">(37) <I>cnswap</I> %lu<DD>
|
|
|
|
Cumulative <I>nswap</I> for child processes (not maintained).
|
|
<DT id="331">(38) <I>exit_signal</I> %d (since Linux 2.1.22)<DD>
|
|
Signal to be sent to parent when we die.
|
|
<DT id="332">(39) <I>processor</I> %d (since Linux 2.2.8)<DD>
|
|
CPU number last executed on.
|
|
<DT id="333">(40) <I>rt_priority</I> %u (since Linux 2.5.19)<DD>
|
|
Real-time scheduling priority, a number in the range 1 to 99 for
|
|
processes scheduled under a real-time policy,
|
|
or 0, for non-real-time processes (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sched_setscheduler">sched_setscheduler</A></B>(2)).
|
|
|
|
<DT id="334">(41) <I>policy</I> %u (since Linux 2.5.19)<DD>
|
|
Scheduling policy (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sched_setscheduler">sched_setscheduler</A></B>(2)).
|
|
|
|
Decode using the SCHED_* constants in
|
|
<I>linux/sched.h</I>.
|
|
|
|
<DT id="335"><DD>
|
|
The format for this field was %lu before Linux 2.6.22.
|
|
<DT id="336">(42) <I>delayacct_blkio_ticks</I> %llu (since Linux 2.6.18)<DD>
|
|
Aggregated block I/O delays, measured in clock ticks (centiseconds).
|
|
<DT id="337">(43) <I>guest_time</I> %lu (since Linux 2.6.24)<DD>
|
|
Guest time of the process (time spent running a virtual CPU
|
|
for a guest operating system), measured in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
<DT id="338">(44) <I>cguest_time</I> %ld (since Linux 2.6.24)<DD>
|
|
Guest time of the process's children, measured in clock ticks (divide by
|
|
<I>sysconf(_SC_CLK_TCK)</I>).
|
|
|
|
<DT id="339">(45) <I>start_data</I> %lu (since Linux 3.3) [PT]<DD>
|
|
|
|
Address above which program initialized and
|
|
uninitialized (BSS) data are placed.
|
|
<DT id="340">(46) <I>end_data</I> %lu (since Linux 3.3) [PT]<DD>
|
|
|
|
Address below which program initialized and
|
|
uninitialized (BSS) data are placed.
|
|
<DT id="341">(47) <I>start_brk</I> %lu (since Linux 3.3) [PT]<DD>
|
|
|
|
Address above which program heap can be expanded with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+brk">brk</A></B>(2).
|
|
|
|
<DT id="342">(48) <I>arg_start</I> %lu (since Linux 3.5) [PT]<DD>
|
|
|
|
Address above which program command-line arguments
|
|
(<I>argv</I>)
|
|
|
|
are placed.
|
|
<DT id="343">(49) <I>arg_end</I> %lu (since Linux 3.5) [PT]<DD>
|
|
|
|
Address below program command-line arguments
|
|
(<I>argv</I>)
|
|
|
|
are placed.
|
|
<DT id="344">(50) <I>env_start</I> %lu (since Linux 3.5) [PT]<DD>
|
|
|
|
Address above which program environment is placed.
|
|
<DT id="345">(51) <I>env_end</I> %lu (since Linux 3.5) [PT]<DD>
|
|
|
|
Address below which program environment is placed.
|
|
<DT id="346">(52) <I>exit_code</I> %d (since Linux 3.5) [PT]<DD>
|
|
|
|
The thread's exit status in the form reported by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+waitpid">waitpid</A></B>(2).
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="347"><I>/proc/[pid]/statm</I>
|
|
|
|
<DD>
|
|
Provides information about memory usage, measured in pages.
|
|
The columns are:
|
|
<DT id="348"><DD>
|
|
|
|
|
|
size (1) total program size
|
|
<BR> (same as VmSize in <I>/proc/[pid]/status</I>)
|
|
resident (2) resident set size
|
|
<BR> (same as VmRSS in <I>/proc/[pid]/status</I>)
|
|
shared (3) number of resident shared pages (i.e., backed by a file)
|
|
<BR> (same as RssFile+RssShmem in <I>/proc/[pid]/status</I>)
|
|
text (4) text (code)
|
|
|
|
lib (5) library (unused since Linux 2.6; always 0)
|
|
data (6) data + stack
|
|
|
|
dt (7) dirty pages (unused since Linux 2.6; always 0)
|
|
|
|
|
|
<DT id="349"><I>/proc/[pid]/status</I>
|
|
|
|
<DD>
|
|
Provides much of the information in
|
|
<I>/proc/[pid]/stat</I>
|
|
|
|
and
|
|
<I>/proc/[pid]/statm</I>
|
|
|
|
in a format that's easier for humans to parse.
|
|
Here's an example:
|
|
<DT id="350"><DD>
|
|
|
|
|
|
$<B> cat /proc/$$/status</B>
|
|
|
|
Name: bash
|
|
Umask: 0022
|
|
State: S (sleeping)
|
|
Tgid: 17248
|
|
Ngid: 0
|
|
Pid: 17248
|
|
PPid: 17200
|
|
TracerPid: 0
|
|
Uid: 1000 1000 1000 1000
|
|
Gid: 100 100 100 100
|
|
FDSize: 256
|
|
Groups: 16 33 100
|
|
NStgid: 17248
|
|
NSpid: 17248
|
|
NSpgid: 17248
|
|
NSsid: 17200
|
|
VmPeak:<TT> </TT> 131168 kB<BR>
|
|
VmSize:<TT> </TT> 131168 kB<BR>
|
|
VmLck:<TT> </TT> 0 kB<BR>
|
|
VmPin:<TT> </TT> 0 kB<BR>
|
|
VmHWM:<TT> </TT> 13484 kB<BR>
|
|
VmRSS:<TT> </TT> 13484 kB<BR>
|
|
RssAnon:<TT> </TT> 10264 kB<BR>
|
|
RssFile:<TT> </TT> 3220 kB<BR>
|
|
RssShmem:<TT> </TT> 0 kB<BR>
|
|
VmData:<TT> </TT> 10332 kB<BR>
|
|
VmStk:<TT> </TT> 136 kB<BR>
|
|
VmExe:<TT> </TT> 992 kB<BR>
|
|
VmLib:<TT> </TT> 2104 kB<BR>
|
|
VmPTE:<TT> </TT> 76 kB<BR>
|
|
VmPMD:<TT> </TT> 12 kB<BR>
|
|
VmSwap:<TT> </TT> 0 kB<BR>
|
|
HugetlbPages: 0 kB<TT> </TT><TT> </TT># 4.4<BR>
|
|
CoreDumping:<TT> </TT>0 # 4.15<BR>
|
|
Threads: 1
|
|
SigQ: 0/3067
|
|
SigPnd: 0000000000000000
|
|
ShdPnd: 0000000000000000
|
|
SigBlk: 0000000000010000
|
|
SigIgn: 0000000000384004
|
|
SigCgt: 000000004b813efb
|
|
CapInh: 0000000000000000
|
|
CapPrm: 0000000000000000
|
|
CapEff: 0000000000000000
|
|
CapBnd: ffffffffffffffff
|
|
CapAmb:<TT> </TT>0000000000000000<BR>
|
|
NoNewPrivs: 0
|
|
Seccomp: 0
|
|
Speculation_Store_Bypass: vulnerable
|
|
Cpus_allowed: 00000001
|
|
Cpus_allowed_list: 0
|
|
Mems_allowed: 1
|
|
Mems_allowed_list: 0
|
|
voluntary_ctxt_switches: 150
|
|
nonvoluntary_ctxt_switches: 545
|
|
|
|
|
|
<DT id="351"><DD>
|
|
The fields are as follows:
|
|
<DL COMPACT><DT id="352"><DD>
|
|
<DL COMPACT>
|
|
<DT id="353">*<DD>
|
|
<I>Name</I>:
|
|
|
|
Command run by this process.
|
|
<DT id="354">*<DD>
|
|
<I>Umask</I>:
|
|
|
|
Process umask, expressed in octal with a leading zero; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+umask">umask</A></B>(2).
|
|
|
|
(Since Linux 4.7.)
|
|
<DT id="355">*<DD>
|
|
<I>State</I>:
|
|
|
|
Current state of the process.
|
|
One of
|
|
"R (running)",
|
|
"S (sleeping)",
|
|
"D (disk sleep)",
|
|
"T (stopped)",
|
|
"T (tracing stop)",
|
|
"Z (zombie)",
|
|
or
|
|
"X (dead)".
|
|
<DT id="356">*<DD>
|
|
<I>Tgid</I>:
|
|
|
|
Thread group ID (i.e., Process ID).
|
|
<DT id="357">*<DD>
|
|
<I>Ngid</I>:
|
|
|
|
NUMA group ID (0 if none; since Linux 3.13).
|
|
<DT id="358">*<DD>
|
|
<I>Pid</I>:
|
|
|
|
Thread ID (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+gettid">gettid</A></B>(2)).
|
|
|
|
<DT id="359">*<DD>
|
|
<I>PPid</I>:
|
|
|
|
PID of parent process.
|
|
<DT id="360">*<DD>
|
|
<I>TracerPid</I>:
|
|
|
|
PID of process tracing this process (0 if not being traced).
|
|
<DT id="361">*<DD>
|
|
<I>Uid</I>, <I>Gid</I>:
|
|
|
|
Real, effective, saved set, and filesystem UIDs (GIDs).
|
|
<DT id="362">*<DD>
|
|
<I>FDSize</I>:
|
|
|
|
Number of file descriptor slots currently allocated.
|
|
<DT id="363">*<DD>
|
|
<I>Groups</I>:
|
|
|
|
Supplementary group list.
|
|
<DT id="364">*<DD>
|
|
<I>NStgid</I>:
|
|
|
|
Thread group ID (i.e., PID) in each of the PID namespaces of which
|
|
<I>[pid]</I>
|
|
|
|
is a member.
|
|
The leftmost entry shows the value with respect to the PID namespace
|
|
of the process that mounted this procfs (or the root namespace
|
|
if mounted by the kernel),
|
|
followed by the value in successively nested inner namespaces.
|
|
|
|
(Since Linux 4.1.)
|
|
<DT id="365">*<DD>
|
|
<I>NSpid</I>:
|
|
|
|
Thread ID in each of the PID namespaces of which
|
|
<I>[pid]</I>
|
|
|
|
is a member.
|
|
The fields are ordered as for
|
|
<I>NStgid</I>.
|
|
|
|
(Since Linux 4.1.)
|
|
<DT id="366">*<DD>
|
|
<I>NSpgid</I>:
|
|
|
|
Process group ID in each of the PID namespaces of which
|
|
<I>[pid]</I>
|
|
|
|
is a member.
|
|
The fields are ordered as for
|
|
<I>NStgid</I>.
|
|
|
|
(Since Linux 4.1.)
|
|
<DT id="367">*<DD>
|
|
<I>NSsid</I>:
|
|
|
|
descendant namespace session ID hierarchy
|
|
Session ID in each of the PID namespaces of which
|
|
<I>[pid]</I>
|
|
|
|
is a member.
|
|
The fields are ordered as for
|
|
<I>NStgid</I>.
|
|
|
|
(Since Linux 4.1.)
|
|
<DT id="368">*<DD>
|
|
<I>VmPeak</I>:
|
|
|
|
Peak virtual memory size.
|
|
<DT id="369">*<DD>
|
|
<I>VmSize</I>:
|
|
|
|
Virtual memory size.
|
|
<DT id="370">*<DD>
|
|
<I>VmLck</I>:
|
|
|
|
Locked memory size (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mlock">mlock</A></B>(2)).
|
|
|
|
<DT id="371">*<DD>
|
|
<I>VmPin</I>:
|
|
|
|
Pinned memory size
|
|
|
|
(since Linux 3.2).
|
|
These are pages that can't be moved because something needs to
|
|
directly access physical memory.
|
|
<DT id="372">*<DD>
|
|
<I>VmHWM</I>:
|
|
|
|
Peak resident set size ("high water mark").
|
|
<DT id="373">*<DD>
|
|
<I>VmRSS</I>:
|
|
|
|
Resident set size.
|
|
Note that the value here is the sum of
|
|
<I>RssAnon</I>,
|
|
|
|
<I>RssFile</I>,
|
|
|
|
and
|
|
<I>RssShmem</I>.
|
|
|
|
<DT id="374">*<DD>
|
|
<I>RssAnon</I>:
|
|
|
|
Size of resident anonymous memory.
|
|
|
|
(since Linux 4.5).
|
|
<DT id="375">*<DD>
|
|
<I>RssFile</I>:
|
|
|
|
Size of resident file mappings.
|
|
|
|
(since Linux 4.5).
|
|
<DT id="376">*<DD>
|
|
<I>RssShmem</I>:
|
|
|
|
Size of resident shared memory (includes System V shared memory,
|
|
mappings from
|
|
<B><A HREF="/cgi-bin/man/man2html?5+tmpfs">tmpfs</A></B>(5),
|
|
|
|
and shared anonymous mappings).
|
|
|
|
(since Linux 4.5).
|
|
<DT id="377">*<DD>
|
|
<I>VmData</I>, <I>VmStk</I>, <I>VmExe</I>:
|
|
|
|
Size of data, stack, and text segments.
|
|
<DT id="378">*<DD>
|
|
<I>VmLib</I>:
|
|
|
|
Shared library code size.
|
|
<DT id="379">*<DD>
|
|
<I>VmPTE</I>:
|
|
|
|
Page table entries size (since Linux 2.6.10).
|
|
<DT id="380">*<DD>
|
|
<I>VmPMD</I>:
|
|
|
|
|
|
Size of second-level page tables (added in Linux 4.0; removed in Linux 4.15).
|
|
<DT id="381">*<DD>
|
|
<I>VmSwap</I>:
|
|
|
|
|
|
Swapped-out virtual memory size by anonymous private pages;
|
|
shmem swap usage is not included (since Linux 2.6.34).
|
|
<DT id="382">*<DD>
|
|
<I>HugetlbPages</I>:
|
|
|
|
Size of hugetlb memory portions
|
|
|
|
(since Linux 4.4).
|
|
<DT id="383">*<DD>
|
|
<I>CoreDumping</I>:
|
|
|
|
Contains the value 1 if the process is currently dumping core,
|
|
and 0 if it is not
|
|
|
|
(since Linux 4.15).
|
|
This information can be used by a monitoring process to avoid killing
|
|
a process that is currently dumping core,
|
|
which could result in a corrupted core dump file.
|
|
<DT id="384">*<DD>
|
|
<I>Threads</I>:
|
|
|
|
Number of threads in process containing this thread.
|
|
<DT id="385">*<DD>
|
|
<I>SigQ</I>:
|
|
|
|
This field contains two slash-separated numbers that relate to
|
|
queued signals for the real user ID of this process.
|
|
The first of these is the number of currently queued
|
|
signals for this real user ID, and the second is the
|
|
resource limit on the number of queued signals for this process
|
|
(see the description of
|
|
<B>RLIMIT_SIGPENDING</B>
|
|
|
|
in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getrlimit">getrlimit</A></B>(2)).
|
|
|
|
<DT id="386">*<DD>
|
|
<I>SigPnd</I>, <I>ShdPnd</I>:
|
|
|
|
Mask (expressed in hexadecimal)
|
|
of signals pending for thread and for process as a whole (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pthreads">pthreads</A></B>(7)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?7+signal">signal</A></B>(7)).
|
|
|
|
<DT id="387">*<DD>
|
|
<I>SigBlk</I>, <I>SigIgn</I>, <I>SigCgt</I>:
|
|
|
|
Masks (expressed in hexadecimal)
|
|
indicating signals being blocked, ignored, and caught (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+signal">signal</A></B>(7)).
|
|
|
|
<DT id="388">*<DD>
|
|
<I>CapInh</I>, <I>CapPrm</I>, <I>CapEff</I>:
|
|
|
|
Masks (expressed in hexadecimal)
|
|
of capabilities enabled in inheritable, permitted, and effective sets
|
|
(see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+capabilities">capabilities</A></B>(7)).
|
|
|
|
<DT id="389">*<DD>
|
|
<I>CapBnd</I>:
|
|
|
|
Capability bounding set, expressed in hexadecimal
|
|
(since Linux 2.6.26, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+capabilities">capabilities</A></B>(7)).
|
|
|
|
<DT id="390">*<DD>
|
|
<I>CapAmb</I>:
|
|
|
|
Ambient capability set, expressed in hexadecimal
|
|
(since Linux 4.3, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+capabilities">capabilities</A></B>(7)).
|
|
|
|
<DT id="391">*<DD>
|
|
<I>NoNewPrivs</I>:
|
|
|
|
|
|
Value of the
|
|
<I>no_new_privs</I>
|
|
|
|
bit
|
|
(since Linux 4.10, see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)).
|
|
|
|
<DT id="392">*<DD>
|
|
<I>Seccomp</I>:
|
|
|
|
|
|
Seccomp mode of the process
|
|
(since Linux 3.8, see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+seccomp">seccomp</A></B>(2)).
|
|
|
|
0 means
|
|
<B>SECCOMP_MODE_DISABLED</B>;
|
|
|
|
1 means
|
|
<B>SECCOMP_MODE_STRICT</B>;
|
|
|
|
2 means
|
|
<B>SECCOMP_MODE_FILTER</B>.
|
|
|
|
This field is provided only if the kernel was built with the
|
|
<B>CONFIG_SECCOMP</B>
|
|
|
|
kernel configuration option enabled.
|
|
<DT id="393">*<DD>
|
|
<I>Speculation_Store_Bypass</I>:
|
|
|
|
|
|
Speculation flaw mitigation state
|
|
(since Linux 4.17, see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)).
|
|
|
|
<DT id="394">*<DD>
|
|
<I>Cpus_allowed</I>:
|
|
|
|
Hexadecimal mask of CPUs on which this process may run
|
|
(since Linux 2.6.24, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7)).
|
|
|
|
<DT id="395">*<DD>
|
|
<I>Cpus_allowed_list</I>:
|
|
|
|
Same as previous, but in "list format"
|
|
(since Linux 2.6.26, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7)).
|
|
|
|
<DT id="396">*<DD>
|
|
<I>Mems_allowed</I>:
|
|
|
|
Mask of memory nodes allowed to this process
|
|
(since Linux 2.6.24, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7)).
|
|
|
|
<DT id="397">*<DD>
|
|
<I>Mems_allowed_list</I>:
|
|
|
|
Same as previous, but in "list format"
|
|
(since Linux 2.6.26, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7)).
|
|
|
|
<DT id="398">*<DD>
|
|
<I>voluntary_ctxt_switches</I>, <I>nonvoluntary_ctxt_switches</I>:
|
|
|
|
Number of voluntary and involuntary context switches (since Linux 2.6.23).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="399"><I>/proc/[pid]/syscall</I> (since Linux 2.6.27)
|
|
|
|
<DD>
|
|
|
|
This file exposes the system call number and argument registers for the
|
|
system call currently being executed by the process,
|
|
followed by the values of the stack pointer and program counter registers.
|
|
The values of all six argument registers are exposed,
|
|
although most system calls use fewer registers.
|
|
<DT id="400"><DD>
|
|
If the process is blocked, but not in a system call,
|
|
then the file displays -1 in place of the system call number,
|
|
followed by just the values of the stack pointer and program counter.
|
|
If process is not blocked, then the file contains just the string "running".
|
|
<DT id="401"><DD>
|
|
This file is present only if the kernel was configured with
|
|
<B>CONFIG_HAVE_ARCH_TRACEHOOK</B>.
|
|
|
|
<DT id="402"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_ATTACH_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="403"><I>/proc/[pid]/task</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
This is a directory that contains one subdirectory
|
|
for each thread in the process.
|
|
The name of each subdirectory is the numerical thread ID
|
|
(<I>[tid]</I>)
|
|
|
|
of the thread (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+gettid">gettid</A></B>(2)).
|
|
|
|
<DT id="404"><DD>
|
|
Within each of these subdirectories, there is a set of
|
|
files with the same names and contents as under the
|
|
<I>/proc/[pid]</I>
|
|
|
|
directories.
|
|
For attributes that are shared by all threads, the contents for
|
|
each of the files under the
|
|
<I>task/[tid]</I>
|
|
|
|
subdirectories will be the same as in the corresponding
|
|
file in the parent
|
|
<I>/proc/[pid]</I>
|
|
|
|
directory
|
|
(e.g., in a multithreaded process, all of the
|
|
<I>task/[tid]/cwd</I>
|
|
|
|
files will have the same value as the
|
|
<I>/proc/[pid]/cwd</I>
|
|
|
|
file in the parent directory, since all of the threads in a process
|
|
share a working directory).
|
|
For attributes that are distinct for each thread,
|
|
the corresponding files under
|
|
<I>task/[tid]</I>
|
|
|
|
may have different values (e.g., various fields in each of the
|
|
<I>task/[tid]/status</I>
|
|
|
|
files may be different for each thread),
|
|
|
|
or they might not exist in
|
|
<I>/proc/[pid]</I>
|
|
|
|
at all.
|
|
<DT id="405"><DD>
|
|
|
|
In a multithreaded process, the contents of the
|
|
<I>/proc/[pid]/task</I>
|
|
|
|
directory are not available if the main thread has already terminated
|
|
(typically by calling
|
|
<B><A HREF="/cgi-bin/man/man2html?3+pthread_exit">pthread_exit</A></B>(3)).
|
|
|
|
<DT id="406"><DD>
|
|
<DT id="407"><I>/proc/[pid]/task/[tid]/children</I> (since Linux 3.5)
|
|
|
|
<DD>
|
|
|
|
A space-separated list of child tasks of this task.
|
|
Each child task is represented by its TID.
|
|
<DT id="408"><DD>
|
|
|
|
This option is intended for use by the checkpoint-restore (CRIU) system,
|
|
and reliably provides a list of children only if all of the child processes
|
|
are stopped or frozen.
|
|
It does not work properly if children of the target task exit while
|
|
the file is being read!
|
|
Exiting children may cause non-exiting children to be omitted from the list.
|
|
This makes this interface even more unreliable than classic PID-based
|
|
approaches if the inspected task and its children aren't frozen,
|
|
and most code should probably not use this interface.
|
|
<DT id="409"><DD>
|
|
Until Linux 4.2, the presence of this file was governed by the
|
|
<B>CONFIG_CHECKPOINT_RESTORE</B>
|
|
|
|
kernel configuration option.
|
|
Since Linux 4.2,
|
|
|
|
it is governed by the
|
|
<B>CONFIG_PROC_CHILDREN</B>
|
|
|
|
option.
|
|
<DT id="410"><I>/proc/[pid]/timers</I> (since Linux 3.10)
|
|
|
|
<DD>
|
|
|
|
|
|
A list of the POSIX timers for this process.
|
|
Each timer is listed with a line that starts with the string "ID:".
|
|
For example:
|
|
<DT id="411"><DD>
|
|
|
|
|
|
ID: 1
|
|
signal: 60/00007fff86e452a8
|
|
notify: signal/pid.2634
|
|
ClockID: 0
|
|
ID: 0
|
|
signal: 60/00007fff86e452a8
|
|
notify: signal/pid.2634
|
|
ClockID: 1
|
|
|
|
|
|
<DT id="412"><DD>
|
|
The lines shown for each timer have the following meanings:
|
|
<DL COMPACT><DT id="413"><DD>
|
|
<DL COMPACT>
|
|
<DT id="414"><I>ID</I>
|
|
|
|
<DD>
|
|
The ID for this timer.
|
|
This is not the same as the timer ID returned by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+timer_create">timer_create</A></B>(2);
|
|
|
|
rather, it is the same kernel-internal ID that is available via the
|
|
<I>si_timerid</I>
|
|
|
|
field of the
|
|
<I>siginfo_t</I>
|
|
|
|
structure (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sigaction">sigaction</A></B>(2)).
|
|
|
|
<DT id="415"><I>signal</I>
|
|
|
|
<DD>
|
|
This is the signal number that this timer uses to deliver notifications
|
|
followed by a slash, and then the
|
|
<I>sigev_value</I>
|
|
|
|
value supplied to the signal handler.
|
|
Valid only for timers that notify via a signal.
|
|
<DT id="416"><I>notify</I>
|
|
|
|
<DD>
|
|
The part before the slash specifies the mechanism
|
|
that this timer uses to deliver notifications,
|
|
and is one of "thread", "signal", or "none".
|
|
Immediately following the slash is either the string "tid" for timers
|
|
with
|
|
<B>SIGEV_THREAD_ID</B>
|
|
|
|
notification, or "pid" for timers that notify by other mechanisms.
|
|
Following the "." is the PID of the process
|
|
(or the kernel thread ID of the thread) that will be delivered
|
|
a signal if the timer delivers notifications via a signal.
|
|
<DT id="417"><I>ClockID</I>
|
|
|
|
<DD>
|
|
This field identifies the clock that the timer uses for measuring time.
|
|
For most clocks, this is a number that matches one of the user-space
|
|
<B>CLOCK_*</B>
|
|
|
|
constants exposed via
|
|
<I><<A HREF="file:///usr/include/time.h">time.h</A>></I>.
|
|
|
|
<B>CLOCK_PROCESS_CPUTIME_ID</B>
|
|
|
|
timers display with a value of -6
|
|
in this field.
|
|
<B>CLOCK_THREAD_CPUTIME_ID</B>
|
|
|
|
timers display with a value of -2
|
|
in this field.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="418"><DD>
|
|
This file is available only when the kernel was configured with
|
|
<B>CONFIG_CHECKPOINT_RESTORE</B>.
|
|
|
|
<DT id="419"><I>/proc/[pid]/timerslack_ns</I> (since Linux 4.6)
|
|
|
|
<DD>
|
|
|
|
|
|
This file exposes the process's "current" timer slack value,
|
|
expressed in nanoseconds.
|
|
The file is writable,
|
|
allowing the process's timer slack value to be changed.
|
|
Writing 0 to this file resets the "current" timer slack to the
|
|
"default" timer slack value.
|
|
For further details, see the discussion of
|
|
<B>PR_SET_TIMERSLACK</B>
|
|
|
|
in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2).
|
|
|
|
<DT id="420"><DD>
|
|
Initially,
|
|
permission to access this file was governed by a ptrace access mode
|
|
<B>PTRACE_MODE_ATTACH_FSCREDS</B>
|
|
|
|
check (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2)).
|
|
|
|
However, this was subsequently deemed too strict a requirement
|
|
(and had the side effect that requiring a process to have the
|
|
<B>CAP_SYS_PTRACE</B>
|
|
|
|
capability would also allow it to view and change any process's memory).
|
|
Therefore, since Linux 4.9,
|
|
|
|
only the (weaker)
|
|
<B>CAP_SYS_NICE</B>
|
|
|
|
capability is required to access this file.
|
|
<DT id="421"><I>/proc/[pid]/uid_map</I>, <I>/proc/[pid]/gid_map</I> (since Linux 3.5)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user_namespaces">user_namespaces</A></B>(7).
|
|
|
|
<DT id="422"><I>/proc/[pid]/wchan</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
The symbolic name corresponding to the location
|
|
in the kernel where the process is sleeping.
|
|
<DT id="423"><DD>
|
|
Permission to access this file is governed by a ptrace access mode
|
|
<B>PTRACE_MODE_READ_FSCREDS</B>
|
|
|
|
check; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="424"><I>/proc/[tid]</I>
|
|
|
|
<DD>
|
|
There is a numerical subdirectory for each running thread
|
|
that is not a thread group leader
|
|
(i.e., a thread whose thread ID is not the same as its process ID);
|
|
the subdirectory is named by the thread ID.
|
|
Each one of these subdirectories contains files and subdirectories
|
|
exposing information about the thread with the thread ID
|
|
<I>tid</I>.
|
|
|
|
The contents of these directories are the same as the corresponding
|
|
<I>/proc/[pid]/task/[tid]</I>
|
|
|
|
directories.
|
|
<DT id="425"><DD>
|
|
The
|
|
<I>/proc/[tid]</I>
|
|
|
|
subdirectories are
|
|
<I>not</I>
|
|
|
|
visible when iterating through
|
|
<I>/proc</I>
|
|
|
|
with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getdents">getdents</A></B>(2)
|
|
|
|
(and thus are
|
|
<I>not</I>
|
|
|
|
visible when one uses
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ls">ls</A></B>(1)
|
|
|
|
to view the contents of
|
|
<I>/proc</I>).
|
|
|
|
However, the pathnames of these directories are visible to
|
|
(i.e., usable as arguments in)
|
|
system calls that operate on pathnames.
|
|
<DT id="426"><I>/proc/apm</I>
|
|
|
|
<DD>
|
|
Advanced power management version and battery information when
|
|
<B>CONFIG_APM</B>
|
|
|
|
is defined at kernel compilation time.
|
|
<DT id="427"><I>/proc/buddyinfo</I>
|
|
|
|
<DD>
|
|
This file contains information which is used for diagnosing memory
|
|
fragmentation issues.
|
|
Each line starts with the identification of the node and the name
|
|
of the zone which together identify a memory region
|
|
This is then
|
|
followed by the count of available chunks of a certain order in
|
|
which these zones are split.
|
|
The size in bytes of a certain order is given by the formula:
|
|
<DT id="428"><DD>
|
|
<BR> (2^order) * PAGE_SIZE
|
|
<DT id="429"><DD>
|
|
The binary buddy allocator algorithm inside the kernel will split
|
|
one chunk into two chunks of a smaller order (thus with half the
|
|
size) or combine two contiguous chunks into one larger chunk of
|
|
a higher order (thus with double the size) to satisfy allocation
|
|
requests and to counter memory fragmentation.
|
|
The order matches the column number, when starting to count at zero.
|
|
<DT id="430"><DD>
|
|
For example on an x86-64 system:
|
|
<DT id="431"><DD>
|
|
|
|
|
|
Node 0, zone DMA 1 1 1 0 2 1 1 0 1 1 3
|
|
Node 0, zone DMA32 65 47 4 81 52 28 13 10 5 1 404
|
|
Node 0, zone Normal 216 55 189 101 84 38 37 27 5 3 587
|
|
|
|
|
|
<DT id="432"><DD>
|
|
In this example, there is one node containing three zones and there
|
|
are 11 different chunk sizes.
|
|
If the page size is 4 kilobytes, then the first zone called
|
|
<I>DMA</I>
|
|
|
|
(on x86 the first 16 megabyte of memory) has 1 chunk of 4 kilobytes
|
|
(order 0) available and has 3 chunks of 4 megabytes (order 10) available.
|
|
<DT id="433"><DD>
|
|
If the memory is heavily fragmented, the counters for higher
|
|
order chunks will be zero and allocation of large contiguous areas
|
|
will fail.
|
|
<DT id="434"><DD>
|
|
Further information about the zones can be found in
|
|
<I>/proc/zoneinfo</I>.
|
|
|
|
<DT id="435"><I>/proc/bus</I>
|
|
|
|
<DD>
|
|
Contains subdirectories for installed busses.
|
|
<DT id="436"><I>/proc/bus/pccard</I>
|
|
|
|
<DD>
|
|
Subdirectory for PCMCIA devices when
|
|
<B>CONFIG_PCMCIA</B>
|
|
|
|
is set at kernel compilation time.
|
|
<DT id="437"><I>/proc/bus/pccard/drivers</I>
|
|
|
|
<DD>
|
|
<DT id="438"><I>/proc/bus/pci</I>
|
|
|
|
<DD>
|
|
Contains various bus subdirectories and pseudo-files containing
|
|
information about PCI busses, installed devices, and device
|
|
drivers.
|
|
Some of these files are not ASCII.
|
|
<DT id="439"><I>/proc/bus/pci/devices</I>
|
|
|
|
<DD>
|
|
Information about PCI devices.
|
|
They may be accessed through
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lspci">lspci</A></B>(8)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?8+setpci">setpci</A></B>(8).
|
|
|
|
<DT id="440"><I>/proc/cgroups</I> (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+cgroups">cgroups</A></B>(7).
|
|
|
|
<DT id="441"><I>/proc/cmdline</I>
|
|
|
|
<DD>
|
|
Arguments passed to the Linux kernel at boot time.
|
|
Often done via a boot manager such as
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lilo">lilo</A></B>(8)
|
|
|
|
or
|
|
<B><A HREF="/cgi-bin/man/man2html?8+grub">grub</A></B>(8).
|
|
|
|
<DT id="442"><I>/proc/config.gz</I> (since Linux 2.6)
|
|
|
|
<DD>
|
|
This file exposes the configuration options that were used
|
|
to build the currently running kernel,
|
|
in the same format as they would be shown in the
|
|
<I>.config</I>
|
|
|
|
file that resulted when configuring the kernel (using
|
|
<I>make xconfig</I>,
|
|
|
|
<I>make config</I>,
|
|
|
|
or similar).
|
|
The file contents are compressed; view or search them using
|
|
<B><A HREF="/cgi-bin/man/man2html?1+zcat">zcat</A></B>(1)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?1+zgrep">zgrep</A></B>(1).
|
|
|
|
As long as no changes have been made to the following file,
|
|
the contents of
|
|
<I>/proc/config.gz</I>
|
|
|
|
are the same as those provided by:
|
|
<DT id="443"><DD>
|
|
|
|
|
|
cat /lib/modules/$(uname -r)/build/.config
|
|
|
|
|
|
<DT id="444"><DD>
|
|
<I>/proc/config.gz</I>
|
|
|
|
is provided only if the kernel is configured with
|
|
<B>CONFIG_IKCONFIG_PROC</B>.
|
|
|
|
<DT id="445"><I>/proc/crypto</I>
|
|
|
|
<DD>
|
|
A list of the ciphers provided by the kernel crypto API.
|
|
For details, see the kernel
|
|
<I>Linux Kernel Crypto API</I>
|
|
|
|
documentation available under the kernel source directory
|
|
<I>Documentation/crypto/</I>
|
|
|
|
|
|
(or
|
|
<I>Documentation/DocBook</I>
|
|
|
|
before 4.10;
|
|
the documentation can be built using a command such as
|
|
<I>make htmldocs</I>
|
|
|
|
in the root directory of the kernel source tree).
|
|
<DT id="446"><I>/proc/cpuinfo</I>
|
|
|
|
<DD>
|
|
This is a collection of CPU and system architecture dependent items,
|
|
for each supported architecture a different list.
|
|
Two common entries are <I>processor</I> which gives CPU number and
|
|
<I>bogomips</I>; a system constant that is calculated
|
|
during kernel initialization.
|
|
SMP machines have information for
|
|
each CPU.
|
|
The
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lscpu">lscpu</A></B>(1)
|
|
|
|
command gathers its information from this file.
|
|
<DT id="447"><I>/proc/devices</I>
|
|
|
|
<DD>
|
|
Text listing of major numbers and device groups.
|
|
This can be used by MAKEDEV scripts for consistency with the kernel.
|
|
<DT id="448"><I>/proc/diskstats</I> (since Linux 2.5.69)
|
|
|
|
<DD>
|
|
This file contains disk I/O statistics for each disk device.
|
|
See the Linux kernel source file
|
|
<I>Documentation/iostats.txt</I>
|
|
|
|
for further information.
|
|
<DT id="449"><I>/proc/dma</I>
|
|
|
|
<DD>
|
|
This is a list of the registered <I>ISA</I> DMA (direct memory access)
|
|
channels in use.
|
|
<DT id="450"><I>/proc/driver</I>
|
|
|
|
<DD>
|
|
Empty subdirectory.
|
|
<DT id="451"><I>/proc/execdomains</I>
|
|
|
|
<DD>
|
|
List of the execution domains (ABI personalities).
|
|
<DT id="452"><I>/proc/fb</I>
|
|
|
|
<DD>
|
|
Frame buffer information when
|
|
<B>CONFIG_FB</B>
|
|
|
|
is defined during kernel compilation.
|
|
<DT id="453"><I>/proc/filesystems</I>
|
|
|
|
<DD>
|
|
A text listing of the filesystems which are supported by the kernel,
|
|
namely filesystems which were compiled into the kernel or whose kernel
|
|
modules are currently loaded.
|
|
(See also
|
|
<B><A HREF="/cgi-bin/man/man2html?5+filesystems">filesystems</A></B>(5).)
|
|
|
|
If a filesystem is marked with "nodev",
|
|
this means that it does not require a block device to be mounted
|
|
(e.g., virtual filesystem, network filesystem).
|
|
<DT id="454"><DD>
|
|
Incidentally, this file may be used by
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
|
|
|
|
when no filesystem is specified and it didn't manage to determine the
|
|
filesystem type.
|
|
Then filesystems contained in this file are tried
|
|
(excepted those that are marked with "nodev").
|
|
<DT id="455"><I>/proc/fs</I>
|
|
|
|
<DD>
|
|
|
|
|
|
Contains subdirectories that in turn contain files
|
|
with information about (certain) mounted filesystems.
|
|
<DT id="456"><I>/proc/ide</I>
|
|
|
|
<DD>
|
|
This directory
|
|
exists on systems with the IDE bus.
|
|
There are directories for each IDE channel and attached device.
|
|
Files include:
|
|
<DT id="457"><DD>
|
|
|
|
|
|
cache buffer size in KB
|
|
capacity number of sectors
|
|
driver driver version
|
|
geometry physical and logical geometry
|
|
identify in hexadecimal
|
|
media media type
|
|
model manufacturer's model number
|
|
settings drive settings
|
|
smart_thresholds in hexadecimal
|
|
smart_values in hexadecimal
|
|
|
|
|
|
<DT id="458"><DD>
|
|
The
|
|
<B><A HREF="/cgi-bin/man/man2html?8+hdparm">hdparm</A></B>(8)
|
|
|
|
utility provides access to this information in a friendly format.
|
|
<DT id="459"><I>/proc/interrupts</I>
|
|
|
|
<DD>
|
|
This is used to record the number of interrupts per CPU per IO device.
|
|
Since Linux 2.6.24,
|
|
for the i386 and x86-64 architectures, at least, this also includes
|
|
interrupts internal to the system (that is, not associated with a device
|
|
as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt),
|
|
and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling
|
|
interrupt), CAL (remote function call interrupt), and possibly others.
|
|
Very easy to read formatting, done in ASCII.
|
|
<DT id="460"><I>/proc/iomem</I>
|
|
|
|
<DD>
|
|
I/O memory map in Linux 2.4.
|
|
<DT id="461"><I>/proc/ioports</I>
|
|
|
|
<DD>
|
|
This is a list of currently registered Input-Output port regions that
|
|
are in use.
|
|
<DT id="462"><I>/proc/kallsyms</I> (since Linux 2.5.71)
|
|
|
|
<DD>
|
|
This holds the kernel exported symbol definitions used by the
|
|
<B>modules</B>(X)
|
|
|
|
tools to dynamically link and bind loadable modules.
|
|
In Linux 2.5.47 and earlier, a similar file with slightly different syntax
|
|
was named
|
|
<I>ksyms</I>.
|
|
|
|
<DT id="463"><I>/proc/kcore</I>
|
|
|
|
<DD>
|
|
This file represents the physical memory of the system and is stored
|
|
in the ELF core file format.
|
|
With this pseudo-file, and an unstripped
|
|
kernel
|
|
(<I>/usr/src/linux/vmlinux</I>)
|
|
|
|
binary, GDB can be used to
|
|
examine the current state of any kernel data structures.
|
|
<DT id="464"><DD>
|
|
The total length of the file is the size of physical memory (RAM) plus
|
|
4 KiB.
|
|
<DT id="465"><I>/proc/keys</I> (since Linux 2.6.10)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+keyrings">keyrings</A></B>(7).
|
|
|
|
<DT id="466"><I>/proc/key-users</I> (since Linux 2.6.10)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+keyrings">keyrings</A></B>(7).
|
|
|
|
<DT id="467"><I>/proc/kmsg</I>
|
|
|
|
<DD>
|
|
This file can be used instead of the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+syslog">syslog</A></B>(2)
|
|
|
|
system call to read kernel messages.
|
|
A process must have superuser
|
|
privileges to read this file, and only one process should read this
|
|
file.
|
|
This file should not be read if a syslog process is running
|
|
which uses the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+syslog">syslog</A></B>(2)
|
|
|
|
system call facility to log kernel messages.
|
|
<DT id="468"><DD>
|
|
Information in this file is retrieved with the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dmesg">dmesg</A></B>(1)
|
|
|
|
program.
|
|
<DT id="469"><I>/proc/kpagecgroup</I> (since Linux 4.3)
|
|
|
|
<DD>
|
|
|
|
This file contains a 64-bit inode number of
|
|
the memory cgroup each page is charged to,
|
|
indexed by page frame number (see the discussion of
|
|
<I>/proc/[pid]/pagemap</I>).
|
|
|
|
<DT id="470"><DD>
|
|
The
|
|
<I>/proc/kpagecgroup</I>
|
|
|
|
file is present only if the
|
|
<B>CONFIG_MEMCG</B>
|
|
|
|
kernel configuration option is enabled.
|
|
<DT id="471"><I>/proc/kpagecount</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
This file contains a 64-bit count of the number of
|
|
times each physical page frame is mapped,
|
|
indexed by page frame number (see the discussion of
|
|
<I>/proc/[pid]/pagemap</I>).
|
|
|
|
<DT id="472"><DD>
|
|
The
|
|
<I>/proc/kpagecount</I>
|
|
|
|
file is present only if the
|
|
<B>CONFIG_PROC_PAGE_MONITOR</B>
|
|
|
|
kernel configuration option is enabled.
|
|
<DT id="473"><I>/proc/kpageflags</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
This file contains 64-bit masks corresponding to each physical page frame;
|
|
it is indexed by page frame number (see the discussion of
|
|
<I>/proc/[pid]/pagemap</I>).
|
|
|
|
The bits are as follows:
|
|
<DT id="474"><DD>
|
|
<BR> 0 - KPF_LOCKED
|
|
<BR> 1 - KPF_ERROR
|
|
<BR> 2 - KPF_REFERENCED
|
|
<BR> 3 - KPF_UPTODATE
|
|
<BR> 4 - KPF_DIRTY
|
|
<BR> 5 - KPF_LRU
|
|
<BR> 6 - KPF_ACTIVE
|
|
<BR> 7 - KPF_SLAB
|
|
<BR> 8 - KPF_WRITEBACK
|
|
<BR> 9 - KPF_RECLAIM
|
|
<BR> 10 - KPF_BUDDY
|
|
<BR> 11 - KPF_MMAP (since Linux 2.6.31)
|
|
<BR> 12 - KPF_ANON (since Linux 2.6.31)
|
|
<BR> 13 - KPF_SWAPCACHE (since Linux 2.6.31)
|
|
<BR> 14 - KPF_SWAPBACKED (since Linux 2.6.31)
|
|
<BR> 15 - KPF_COMPOUND_HEAD (since Linux 2.6.31)
|
|
<BR> 16 - KPF_COMPOUND_TAIL (since Linux 2.6.31)
|
|
<BR> 17 - KPF_HUGE (since Linux 2.6.31)
|
|
<BR> 18 - KPF_UNEVICTABLE (since Linux 2.6.31)
|
|
<BR> 19 - KPF_HWPOISON (since Linux 2.6.31)
|
|
<BR> 20 - KPF_NOPAGE (since Linux 2.6.31)
|
|
<BR> 21 - KPF_KSM (since Linux 2.6.32)
|
|
<BR> 22 - KPF_THP (since Linux 3.4)
|
|
<BR> 23 - KPF_BALLOON (since Linux 3.18)
|
|
|
|
<BR> 24 - KPF_ZERO_PAGE (since Linux 4.0)
|
|
|
|
<BR> 25 - KPF_IDLE (since Linux 4.3)
|
|
|
|
<DT id="475"><DD>
|
|
For further details on the meanings of these bits,
|
|
see the kernel source file
|
|
<I>Documentation/admin-guide/mm/pagemap.rst</I>.
|
|
|
|
Before kernel 2.6.29,
|
|
|
|
|
|
<B>KPF_WRITEBACK</B>,
|
|
|
|
<B>KPF_RECLAIM</B>,
|
|
|
|
<B>KPF_BUDDY</B>,
|
|
|
|
and
|
|
<B>KPF_LOCKED</B>
|
|
|
|
did not report correctly.
|
|
<DT id="476"><DD>
|
|
The
|
|
<I>/proc/kpageflags</I>
|
|
|
|
file is present only if the
|
|
<B>CONFIG_PROC_PAGE_MONITOR</B>
|
|
|
|
kernel configuration option is enabled.
|
|
<DT id="477"><I>/proc/ksyms</I> (Linux 1.1.23-2.5.47)
|
|
|
|
<DD>
|
|
See
|
|
<I>/proc/kallsyms</I>.
|
|
|
|
<DT id="478"><I>/proc/loadavg</I>
|
|
|
|
<DD>
|
|
The first three fields in this file are load average figures
|
|
giving the number of jobs in the run queue (state R)
|
|
or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
|
|
They are the same as the load average numbers given by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+uptime">uptime</A></B>(1)
|
|
|
|
and other programs.
|
|
The fourth field consists of two numbers separated by a slash (/).
|
|
The first of these is the number of currently runnable kernel
|
|
scheduling entities (processes, threads).
|
|
The value after the slash is the number of kernel scheduling entities
|
|
that currently exist on the system.
|
|
The fifth field is the PID of the process that was most
|
|
recently created on the system.
|
|
<DT id="479"><I>/proc/locks</I>
|
|
|
|
<DD>
|
|
This file shows current file locks
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+flock">flock</A></B>(2) and <B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2))
|
|
|
|
and leases
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2)).
|
|
|
|
<DT id="480"><DD>
|
|
An example of the content shown in this file is the following:
|
|
<DT id="481"><DD>
|
|
|
|
|
|
1: POSIX ADVISORY READ 5433 08:01:7864448 128 128
|
|
2: FLOCK ADVISORY WRITE 2001 08:01:7864554 0 EOF
|
|
3: FLOCK ADVISORY WRITE 1568 00:2f:32388 0 EOF
|
|
4: POSIX ADVISORY WRITE 699 00:16:28457 0 EOF
|
|
5: POSIX ADVISORY WRITE 764 00:16:21448 0 0
|
|
6: POSIX ADVISORY READ 3548 08:01:7867240 1 1
|
|
7: POSIX ADVISORY READ 3548 08:01:7865567 1826 2335
|
|
8: OFDLCK ADVISORY WRITE -1 08:01:8713209 128 191
|
|
|
|
|
|
<DT id="482"><DD>
|
|
The fields shown in each line are as follows:
|
|
<DL COMPACT><DT id="483"><DD>
|
|
<DL COMPACT>
|
|
<DT id="484">(1)<DD>
|
|
The ordinal position of the lock in the list.
|
|
<DT id="485">(2)<DD>
|
|
The lock type.
|
|
Values that may appear here include:
|
|
<DL COMPACT><DT id="486"><DD>
|
|
<DL COMPACT>
|
|
<DT id="487"><B>FLOCK</B>
|
|
|
|
<DD>
|
|
This is a BSD file lock created using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+flock">flock</A></B>(2).
|
|
|
|
<DT id="488"><B>OFDLCK</B>
|
|
|
|
<DD>
|
|
This is an open file description (OFD) lock created using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2).
|
|
|
|
<DT id="489"><B>POSIX</B>
|
|
|
|
<DD>
|
|
This is a POSIX byte-range lock created using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2).
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="490">(3)<DD>
|
|
Among the strings that can appear here are the following:
|
|
<DL COMPACT><DT id="491"><DD>
|
|
<DL COMPACT>
|
|
<DT id="492"><B>ADVISORY</B>
|
|
|
|
<DD>
|
|
This is an advisory lock.
|
|
<DT id="493"><B>MANDATORY</B>
|
|
|
|
<DD>
|
|
This is a mandatory lock.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="494">(4)<DD>
|
|
The type of lock.
|
|
Values that can appear here are:
|
|
<DL COMPACT><DT id="495"><DD>
|
|
<DL COMPACT>
|
|
<DT id="496"><B>READ</B>
|
|
|
|
<DD>
|
|
This is a POSIX or OFD read lock, or a BSD shared lock.
|
|
<DT id="497"><B>WRITE</B>
|
|
|
|
<DD>
|
|
This is a POSIX or OFD write lock, or a BSD exclusive lock.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="498">(5)<DD>
|
|
The PID of the process that owns the lock.
|
|
<DT id="499"><DD>
|
|
Because OFD locks are not owned by a single process
|
|
(since multiple processes may have file descriptors that
|
|
refer to the same open file description),
|
|
the value -1 is displayed in this field for OFD locks.
|
|
(Before kernel 4.14,
|
|
|
|
a bug meant that the PID of the process that
|
|
initially acquired the lock was displayed instead of the value -1.)
|
|
<DT id="500">(6)<DD>
|
|
Three colon-separated subfields that identify the major and minor device
|
|
ID of the device containing the filesystem where the locked file resides,
|
|
followed by the inode number of the locked file.
|
|
<DT id="501">(7)<DD>
|
|
The byte offset of the first byte of the lock.
|
|
For BSD locks, this value is always 0.
|
|
<DT id="502">(8)<DD>
|
|
The byte offset of the last byte of the lock.
|
|
<B>EOF</B>
|
|
|
|
in this field means that the lock extends to the end of the file.
|
|
For BSD locks, the value shown is always
|
|
<I>EOF</I>.
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="503"><DD>
|
|
Since Linux 4.9,
|
|
|
|
the list of locks shown in
|
|
<I>/proc/locks</I>
|
|
|
|
is filtered to show just the locks for the processes in the PID
|
|
namespace (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pid_namespaces">pid_namespaces</A></B>(7))
|
|
|
|
for which the
|
|
<I>/proc</I>
|
|
|
|
filesystem was mounted.
|
|
(In the initial PID namespace,
|
|
there is no filtering of the records shown in this file.)
|
|
<DT id="504"><DD>
|
|
The
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lslocks">lslocks</A></B>(8)
|
|
|
|
command provides a bit more information about each lock.
|
|
<DT id="505"><I>/proc/malloc</I> (only up to and including Linux 2.2)
|
|
|
|
<DD>
|
|
|
|
This file is present only if
|
|
<B>CONFIG_DEBUG_MALLOC</B>
|
|
|
|
was defined during compilation.
|
|
<DT id="506"><I>/proc/meminfo</I>
|
|
|
|
<DD>
|
|
This file reports statistics about memory usage on the system.
|
|
It is used by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+free">free</A></B>(1)
|
|
|
|
to report the amount of free and used memory (both physical and swap)
|
|
on the system as well as the shared memory and buffers used by the
|
|
kernel.
|
|
Each line of the file consists of a parameter name, followed by a colon,
|
|
the value of the parameter, and an option unit of measurement (e.g., "kB").
|
|
The list below describes the parameter names and
|
|
the format specifier required to read the field value.
|
|
Except as noted below,
|
|
all of the fields have been present since at least Linux 2.6.0.
|
|
Some fields are displayed only if the kernel was configured
|
|
with various options; those dependencies are noted in the list.
|
|
<DL COMPACT><DT id="507"><DD>
|
|
<DL COMPACT>
|
|
<DT id="508"><I>MemTotal</I> %lu
|
|
|
|
<DD>
|
|
Total usable RAM (i.e., physical RAM minus a few reserved
|
|
bits and the kernel binary code).
|
|
<DT id="509"><I>MemFree</I> %lu
|
|
|
|
<DD>
|
|
The sum of
|
|
<I>LowFree</I>+<I>HighFree</I>.
|
|
|
|
<DT id="510"><I>MemAvailable</I> %lu (since Linux 3.14)
|
|
|
|
<DD>
|
|
An estimate of how much memory is available for starting new
|
|
applications, without swapping.
|
|
<DT id="511"><I>Buffers</I> %lu
|
|
|
|
<DD>
|
|
Relatively temporary storage for raw disk blocks that
|
|
shouldn't get tremendously large (20MB or so).
|
|
<DT id="512"><I>Cached</I> %lu
|
|
|
|
<DD>
|
|
In-memory cache for files read from the disk (the page cache).
|
|
Doesn't include
|
|
<I>SwapCached</I>.
|
|
|
|
<DT id="513"><I>SwapCached</I> %lu
|
|
|
|
<DD>
|
|
Memory that once was swapped out, is swapped back in but
|
|
still also is in the swap file.
|
|
(If memory pressure is high, these pages
|
|
don't need to be swapped out again because they are already
|
|
in the swap file.
|
|
This saves I/O.)
|
|
<DT id="514"><I>Active</I> %lu
|
|
|
|
<DD>
|
|
Memory that has been used more recently and usually not
|
|
reclaimed unless absolutely necessary.
|
|
<DT id="515"><I>Inactive</I> %lu
|
|
|
|
<DD>
|
|
Memory which has been less recently used.
|
|
It is more eligible to be reclaimed for other purposes.
|
|
<DT id="516"><I>Active(anon)</I> %lu (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
[To be documented.]
|
|
<DT id="517"><I>Inactive(anon)</I> %lu (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
[To be documented.]
|
|
<DT id="518"><I>Active(file)</I> %lu (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
[To be documented.]
|
|
<DT id="519"><I>Inactive(file)</I> %lu (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
[To be documented.]
|
|
<DT id="520"><I>Unevictable</I> %lu (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
(From Linux 2.6.28 to 2.6.30,
|
|
<B>CONFIG_UNEVICTABLE_LRU</B> was required.)
|
|
[To be documented.]
|
|
<DT id="521"><I>Mlocked</I> %lu (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
(From Linux 2.6.28 to 2.6.30,
|
|
<B>CONFIG_UNEVICTABLE_LRU</B> was required.)
|
|
[To be documented.]
|
|
<DT id="522"><I>HighTotal</I> %lu
|
|
|
|
<DD>
|
|
(Starting with Linux 2.6.19, <B>CONFIG_HIGHMEM</B> is required.)
|
|
Total amount of highmem.
|
|
Highmem is all memory above ~860MB of physical memory.
|
|
Highmem areas are for use by user-space programs,
|
|
or for the page cache.
|
|
The kernel must use tricks to access
|
|
this memory, making it slower to access than lowmem.
|
|
<DT id="523"><I>HighFree</I> %lu
|
|
|
|
<DD>
|
|
(Starting with Linux 2.6.19, <B>CONFIG_HIGHMEM</B> is required.)
|
|
Amount of free highmem.
|
|
<DT id="524"><I>LowTotal</I> %lu
|
|
|
|
<DD>
|
|
(Starting with Linux 2.6.19, <B>CONFIG_HIGHMEM</B> is required.)
|
|
Total amount of lowmem.
|
|
Lowmem is memory which can be used for everything that
|
|
highmem can be used for, but it is also available for the
|
|
kernel's use for its own data structures.
|
|
Among many other things,
|
|
it is where everything from
|
|
<I>Slab</I>
|
|
|
|
is allocated.
|
|
Bad things happen when you're out of lowmem.
|
|
<DT id="525"><I>LowFree</I> %lu
|
|
|
|
<DD>
|
|
(Starting with Linux 2.6.19, <B>CONFIG_HIGHMEM</B> is required.)
|
|
Amount of free lowmem.
|
|
<DT id="526"><I>MmapCopy</I> %lu (since Linux 2.6.29)
|
|
|
|
<DD>
|
|
(<B>CONFIG_MMU</B>
|
|
|
|
is required.)
|
|
[To be documented.]
|
|
<DT id="527"><I>SwapTotal</I> %lu
|
|
|
|
<DD>
|
|
Total amount of swap space available.
|
|
<DT id="528"><I>SwapFree</I> %lu
|
|
|
|
<DD>
|
|
Amount of swap space that is currently unused.
|
|
<DT id="529"><I>Dirty</I> %lu
|
|
|
|
<DD>
|
|
Memory which is waiting to get written back to the disk.
|
|
<DT id="530"><I>Writeback</I> %lu
|
|
|
|
<DD>
|
|
Memory which is actively being written back to the disk.
|
|
<DT id="531"><I>AnonPages</I> %lu (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
Non-file backed pages mapped into user-space page tables.
|
|
<DT id="532"><I>Mapped</I> %lu
|
|
|
|
<DD>
|
|
Files which have been mapped into memory (with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2)),
|
|
|
|
such as libraries.
|
|
<DT id="533"><I>Shmem</I> %lu (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
Amount of memory consumed in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+tmpfs">tmpfs</A></B>(5)
|
|
|
|
filesystems.
|
|
<DT id="534"><I>KReclaimable</I> %lu (since Linux 4.20)
|
|
|
|
<DD>
|
|
Kernel allocations that the kernel will attempt to reclaim
|
|
under memory pressure.
|
|
Includes
|
|
<I>SReclaimable</I>
|
|
|
|
(below), and other direct allocations with a shrinker.
|
|
<DT id="535"><I>Slab</I> %lu
|
|
|
|
<DD>
|
|
In-kernel data structures cache.
|
|
(See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+slabinfo">slabinfo</A></B>(5).)
|
|
|
|
<DT id="536"><I>SReclaimable</I> %lu (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
Part of
|
|
<I>Slab</I>,
|
|
|
|
that might be reclaimed, such as caches.
|
|
<DT id="537"><I>SUnreclaim</I> %lu (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
Part of
|
|
<I>Slab</I>,
|
|
|
|
that cannot be reclaimed on memory pressure.
|
|
<DT id="538"><I>KernelStack</I> %lu (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
Amount of memory allocated to kernel stacks.
|
|
<DT id="539"><I>PageTables</I> %lu (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
Amount of memory dedicated to the lowest level of page tables.
|
|
<DT id="540"><I>Quicklists</I> %lu (since Linux 2.6.27)
|
|
|
|
<DD>
|
|
(<B>CONFIG_QUICKLIST</B> is required.)
|
|
[To be documented.]
|
|
<DT id="541"><I>NFS_Unstable</I> %lu (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
NFS pages sent to the server, but not yet committed to stable storage.
|
|
<DT id="542"><I>Bounce</I> %lu (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
Memory used for block device "bounce buffers".
|
|
<DT id="543"><I>WritebackTmp</I> %lu (since Linux 2.6.26)
|
|
|
|
<DD>
|
|
Memory used by FUSE for temporary writeback buffers.
|
|
<DT id="544"><I>CommitLimit</I> %lu (since Linux 2.6.10)
|
|
|
|
<DD>
|
|
This is the total amount of memory currently available to
|
|
be allocated on the system, expressed in kilobytes.
|
|
This limit is adhered to
|
|
only if strict overcommit accounting is enabled (mode 2 in
|
|
<I>/proc/sys/vm/overcommit_memory</I>).
|
|
|
|
The limit is calculated according to the formula described under
|
|
<I>/proc/sys/vm/overcommit_memory</I>.
|
|
|
|
For further details, see the kernel source file
|
|
<I>Documentation/vm/overcommit-accounting.rst</I>.
|
|
|
|
<DT id="545"><I>Committed_AS</I> %lu
|
|
|
|
<DD>
|
|
The amount of memory presently allocated on the system.
|
|
The committed memory is a sum of all of the memory which
|
|
has been allocated by processes, even if it has not been
|
|
"used" by them as of yet.
|
|
A process which allocates 1GB of memory (using
|
|
<B><A HREF="/cgi-bin/man/man2html?3+malloc">malloc</A></B>(3)
|
|
|
|
or similar), but touches only 300MB of that memory will show up
|
|
as using only 300MB of memory even if it has the address space
|
|
allocated for the entire 1GB.
|
|
<DT id="546"><DD>
|
|
This 1GB is memory which has been "committed" to by the VM
|
|
and can be used at any time by the allocating application.
|
|
With strict overcommit enabled on the system (mode 2 in
|
|
<I>/proc/sys/vm/overcommit_memory</I>),
|
|
|
|
allocations which would exceed the
|
|
<I>CommitLimit</I>
|
|
|
|
will not be permitted.
|
|
This is useful if one needs to guarantee that processes will not
|
|
fail due to lack of memory once that memory has been successfully allocated.
|
|
<DT id="547"><I>VmallocTotal</I> %lu
|
|
|
|
<DD>
|
|
Total size of vmalloc memory area.
|
|
<DT id="548"><I>VmallocUsed</I> %lu
|
|
|
|
<DD>
|
|
Amount of vmalloc area which is used.
|
|
Since Linux 4.4,
|
|
|
|
this field is no longer calculated, and is hard coded as 0.
|
|
See
|
|
<I>/proc/vmallocinfo</I>.
|
|
|
|
<DT id="549"><I>VmallocChunk</I> %lu
|
|
|
|
<DD>
|
|
Largest contiguous block of vmalloc area which is free.
|
|
Since Linux 4.4,
|
|
|
|
this field is no longer calculated and is hard coded as 0.
|
|
See
|
|
<I>/proc/vmallocinfo</I>.
|
|
|
|
<DT id="550"><I>HardwareCorrupted</I> %lu (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
(<B>CONFIG_MEMORY_FAILURE</B> is required.)
|
|
[To be documented.]
|
|
<DT id="551"><I>LazyFree</I> %lu (since Linux 4.12)
|
|
|
|
<DD>
|
|
Shows the amount of memory marked by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+madvise">madvise</A></B>(2)
|
|
|
|
<B>MADV_FREE</B>.
|
|
|
|
<DT id="552"><I>AnonHugePages</I> %lu (since Linux 2.6.38)
|
|
|
|
<DD>
|
|
(<B>CONFIG_TRANSPARENT_HUGEPAGE</B> is required.)
|
|
Non-file backed huge pages mapped into user-space page tables.
|
|
<DT id="553"><I>ShmemHugePages</I> %lu (since Linux 4.8)
|
|
|
|
<DD>
|
|
(<B>CONFIG_TRANSPARENT_HUGEPAGE</B> is required.)
|
|
Memory used by shared memory (shmem) and
|
|
<B><A HREF="/cgi-bin/man/man2html?5+tmpfs">tmpfs</A></B>(5)
|
|
|
|
allocated with huge pages
|
|
<DT id="554"><I>ShmemPmdMapped</I> %lu (since Linux 4.8)
|
|
|
|
<DD>
|
|
(<B>CONFIG_TRANSPARENT_HUGEPAGE</B> is required.)
|
|
Shared memory mapped into user space with huge pages.
|
|
<DT id="555"><I>CmaTotal</I> %lu (since Linux 3.1)
|
|
|
|
<DD>
|
|
Total CMA (Contiguous Memory Allocator) pages.
|
|
(<B>CONFIG_CMA</B> is required.)
|
|
<DT id="556"><I>CmaFree</I> %lu (since Linux 3.1)
|
|
|
|
<DD>
|
|
Free CMA (Contiguous Memory Allocator) pages.
|
|
(<B>CONFIG_CMA</B> is required.)
|
|
<DT id="557"><I>HugePages_Total</I> %lu
|
|
|
|
<DD>
|
|
(<B>CONFIG_HUGETLB_PAGE</B> is required.)
|
|
The size of the pool of huge pages.
|
|
<DT id="558"><I>HugePages_Free</I> %lu
|
|
|
|
<DD>
|
|
(<B>CONFIG_HUGETLB_PAGE</B> is required.)
|
|
The number of huge pages in the pool that are not yet allocated.
|
|
<DT id="559"><I>HugePages_Rsvd</I> %lu (since Linux 2.6.17)
|
|
|
|
<DD>
|
|
(<B>CONFIG_HUGETLB_PAGE</B> is required.)
|
|
This is the number of huge pages for
|
|
which a commitment to allocate from the pool has been made,
|
|
but no allocation has yet been made.
|
|
These reserved huge pages
|
|
guarantee that an application will be able to allocate a
|
|
huge page from the pool of huge pages at fault time.
|
|
<DT id="560"><I>HugePages_Surp</I> %lu (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
(<B>CONFIG_HUGETLB_PAGE</B> is required.)
|
|
This is the number of huge pages in
|
|
the pool above the value in
|
|
<I>/proc/sys/vm/nr_hugepages</I>.
|
|
|
|
The maximum number of surplus huge pages is controlled by
|
|
<I>/proc/sys/vm/nr_overcommit_hugepages</I>.
|
|
|
|
<DT id="561"><I>Hugepagesize</I> %lu
|
|
|
|
<DD>
|
|
(<B>CONFIG_HUGETLB_PAGE</B> is required.)
|
|
The size of huge pages.
|
|
<DT id="562"><I>DirectMap4k</I> %lu (since Linux 2.6.27)
|
|
|
|
<DD>
|
|
Number of bytes of RAM linearly mapped by kernel in 4kB pages.
|
|
(x86.)
|
|
<DT id="563"><I>DirectMap4M</I> %lu (since Linux 2.6.27)
|
|
|
|
<DD>
|
|
Number of bytes of RAM linearly mapped by kernel in 4MB pages.
|
|
(x86 with
|
|
<B>CONFIG_X86_64</B>
|
|
|
|
or
|
|
<B>CONFIG_X86_PAE</B>
|
|
|
|
enabled.)
|
|
<DT id="564"><I>DirectMap2M</I> %lu (since Linux 2.6.27)
|
|
|
|
<DD>
|
|
Number of bytes of RAM linearly mapped by kernel in 2MB pages.
|
|
(x86 with neither
|
|
<B>CONFIG_X86_64</B>
|
|
|
|
nor
|
|
<B>CONFIG_X86_PAE</B>
|
|
|
|
enabled.)
|
|
<DT id="565"><I>DirectMap1G</I> %lu (since Linux 2.6.27)
|
|
|
|
<DD>
|
|
(x86 with
|
|
<B>CONFIG_X86_64</B>
|
|
|
|
and
|
|
<B>CONFIG_X86_DIRECT_GBPAGES</B>
|
|
|
|
enabled.)
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="566"><I>/proc/modules</I>
|
|
|
|
<DD>
|
|
A text list of the modules that have been loaded by the system.
|
|
See also
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lsmod">lsmod</A></B>(8).
|
|
|
|
<DT id="567"><I>/proc/mounts</I>
|
|
|
|
<DD>
|
|
Before kernel 2.4.19, this file was a list
|
|
of all the filesystems currently mounted on the system.
|
|
With the introduction of per-process mount namespaces in Linux 2.4.19 (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mount_namespaces">mount_namespaces</A></B>(7)),
|
|
|
|
this file became a link to
|
|
<I>/proc/self/mounts</I>,
|
|
|
|
which lists the mount points of the process's own mount namespace.
|
|
The format of this file is documented in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5).
|
|
|
|
<DT id="568"><I>/proc/mtrr</I>
|
|
|
|
<DD>
|
|
Memory Type Range Registers.
|
|
See the Linux kernel source file
|
|
<I>Documentation/x86/mtrr.txt</I>
|
|
|
|
|
|
(or
|
|
<I>Documentation/mtrr.txt</I>
|
|
|
|
before Linux 2.6.28)
|
|
for details.
|
|
<DT id="569"><I>/proc/net</I>
|
|
|
|
<DD>
|
|
This directory contains various files and subdirectories containing
|
|
information about the networking layer.
|
|
The files contain ASCII structures and are,
|
|
therefore, readable with
|
|
<B><A HREF="/cgi-bin/man/man2html?1+cat">cat</A></B>(1).
|
|
|
|
However, the standard
|
|
<B><A HREF="/cgi-bin/man/man2html?8+netstat">netstat</A></B>(8)
|
|
|
|
suite provides much cleaner access to these files.
|
|
<DT id="570"><DD>
|
|
With the advent of network namespaces,
|
|
various information relating to the network stack is virtualized (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+network_namespaces">network_namespaces</A></B>(7)).
|
|
|
|
Thus, since Linux 2.6.25,
|
|
|
|
<I>/proc/net</I>
|
|
|
|
is a symbolic link to the directory
|
|
<I>/proc/self/net</I>,
|
|
|
|
which contains the same files and directories as listed below.
|
|
However, these files and directories now expose information
|
|
for the network namespace of which the process is a member.
|
|
<DT id="571"><I>/proc/net/arp</I>
|
|
|
|
<DD>
|
|
This holds an ASCII readable dump of the kernel ARP table used for
|
|
address resolutions.
|
|
It will show both dynamically learned and preprogrammed ARP entries.
|
|
The format is:
|
|
<DT id="572"><DD>
|
|
|
|
|
|
IP address HW type Flags HW address Mask Device
|
|
192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
|
|
192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
|
|
|
|
|
|
<DT id="573"><DD>
|
|
Here "IP address" is the IPv4 address of the machine and the "HW type"
|
|
is the hardware type of the address from RFC 826.
|
|
The flags are the internal
|
|
flags of the ARP structure (as defined in
|
|
<I>/usr/include/linux/if_arp.h</I>)
|
|
|
|
and
|
|
the "HW address" is the data link layer mapping for that IP address if
|
|
it is known.
|
|
<DT id="574"><I>/proc/net/dev</I>
|
|
|
|
<DD>
|
|
The dev pseudo-file contains network device status information.
|
|
This gives
|
|
the number of received and sent packets, the number of errors and
|
|
collisions
|
|
and other basic statistics.
|
|
These are used by the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+ifconfig">ifconfig</A></B>(8)
|
|
|
|
program to report device status.
|
|
The format is:
|
|
<DT id="575"><DD>
|
|
|
|
|
|
Inter-| Receive | Transmit
|
|
<BR> face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
|
|
<BR> lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
|
|
<BR> eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
|
|
<BR> ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
|
|
<BR> tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="576"><I>/proc/net/dev_mcast</I>
|
|
|
|
<DD>
|
|
Defined in
|
|
<I>/usr/src/linux/net/core/dev_mcast.c</I>:
|
|
|
|
<DT id="577"><DD>
|
|
|
|
|
|
indx interface_name dmi_u dmi_g dmi_address
|
|
2 eth0 1 0 01005e000001
|
|
3 eth1 1 0 01005e000001
|
|
4 eth2 1 0 01005e000001
|
|
|
|
|
|
<DT id="578"><I>/proc/net/igmp</I>
|
|
|
|
<DD>
|
|
Internet Group Management Protocol.
|
|
Defined in
|
|
<I>/usr/src/linux/net/core/igmp.c</I>.
|
|
|
|
<DT id="579"><I>/proc/net/rarp</I>
|
|
|
|
<DD>
|
|
This file uses the same format as the
|
|
<I>arp</I>
|
|
|
|
file and contains the current reverse mapping database used to provide
|
|
<B><A HREF="/cgi-bin/man/man2html?8+rarp">rarp</A></B>(8)
|
|
|
|
reverse address lookup services.
|
|
If RARP is not configured into the
|
|
kernel,
|
|
this file will not be present.
|
|
<DT id="580"><I>/proc/net/raw</I>
|
|
|
|
<DD>
|
|
Holds a dump of the RAW socket table.
|
|
Much of the information is not of
|
|
use
|
|
apart from debugging.
|
|
The "sl" value is the kernel hash slot for the
|
|
socket,
|
|
the "local_address" is the local address and protocol number pair.
|
|
"St" is
|
|
the internal status of the socket.
|
|
The "tx_queue" and "rx_queue" are the
|
|
outgoing and incoming data queue in terms of kernel memory usage.
|
|
The "tr", "tm->when", and "rexmits" fields are not used by RAW.
|
|
The "uid"
|
|
field holds the effective UID of the creator of the socket.
|
|
|
|
|
|
|
|
|
|
<DT id="581"><I>/proc/net/snmp</I>
|
|
|
|
<DD>
|
|
This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
|
|
management
|
|
information bases for an SNMP agent.
|
|
<DT id="582"><I>/proc/net/tcp</I>
|
|
|
|
<DD>
|
|
Holds a dump of the TCP socket table.
|
|
Much of the information is not
|
|
of use apart from debugging.
|
|
The "sl" value is the kernel hash slot
|
|
for the socket, the "local_address" is the local address and port number pair.
|
|
The "rem_address" is the remote address and port number pair
|
|
(if connected).
|
|
"St" is the internal status of the socket.
|
|
The "tx_queue" and "rx_queue" are the
|
|
outgoing and incoming data queue in terms of kernel memory usage.
|
|
The "tr", "tm->when", and "rexmits" fields hold internal information of
|
|
the kernel socket state and are useful only for debugging.
|
|
The "uid"
|
|
field holds the effective UID of the creator of the socket.
|
|
<DT id="583"><I>/proc/net/udp</I>
|
|
|
|
<DD>
|
|
Holds a dump of the UDP socket table.
|
|
Much of the information is not of
|
|
use apart from debugging.
|
|
The "sl" value is the kernel hash slot for the
|
|
socket, the "local_address" is the local address and port number pair.
|
|
The "rem_address" is the remote address and port number pair
|
|
(if connected).
|
|
"St" is the internal status of the socket.
|
|
The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
|
|
in terms of kernel memory usage.
|
|
The "tr", "tm->when", and "rexmits" fields
|
|
are not used by UDP.
|
|
The "uid"
|
|
field holds the effective UID of the creator of the socket.
|
|
The format is:
|
|
<DT id="584"><DD>
|
|
|
|
|
|
sl local_address rem_address st tx_queue rx_queue tr rexmits tm->when uid
|
|
<BR> 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
|
|
<BR> 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
|
|
<BR> 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
|
|
|
|
|
|
<DT id="585"><DD>
|
|
<DT id="586"><I>/proc/net/unix</I>
|
|
|
|
<DD>
|
|
Lists the UNIX domain sockets present within the system and their
|
|
status.
|
|
The format is:
|
|
<DT id="587"><DD>
|
|
|
|
|
|
Num RefCount Protocol Flags Type St Inode Path
|
|
<BR> 0: 00000002 00000000 00000000 0001 03 42
|
|
<BR> 1: 00000001 00000000 00010000 0001 01 1948 /dev/printer
|
|
|
|
|
|
<DT id="588"><DD>
|
|
The fields are as follows:
|
|
<DL COMPACT><DT id="589"><DD>
|
|
<DL COMPACT>
|
|
<DT id="590"><I>Num</I>:
|
|
|
|
<DD>
|
|
the kernel table slot number.
|
|
<DT id="591"><I>RefCount</I>:
|
|
|
|
<DD>
|
|
the number of users of the socket.
|
|
<DT id="592"><I>Protocol</I>:
|
|
|
|
<DD>
|
|
currently always 0.
|
|
<DT id="593"><I>Flags</I>:
|
|
|
|
<DD>
|
|
the internal kernel flags holding the status of the socket.
|
|
<DT id="594"><I>Type</I>:
|
|
|
|
<DD>
|
|
the socket type.
|
|
For
|
|
<B>SOCK_STREAM</B>
|
|
|
|
sockets, this is 0001; for
|
|
<B>SOCK_DGRAM</B>
|
|
|
|
sockets, it is 0002; and for
|
|
<B>SOCK_SEQPACKET</B>
|
|
|
|
sockets, it is 0005.
|
|
<DT id="595"><I>St</I>:
|
|
|
|
<DD>
|
|
the internal state of the socket.
|
|
<DT id="596"><I>Inode</I>:
|
|
|
|
<DD>
|
|
the inode number of the socket.
|
|
<DT id="597"><I>Path</I>:
|
|
|
|
<DD>
|
|
the bound pathname (if any) of the socket.
|
|
Sockets in the abstract namespace are included in the list,
|
|
and are shown with a
|
|
<I>Path</I>
|
|
|
|
that commences with the character '@'.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="598"><I>/proc/net/netfilter/nfnetlink_queue</I>
|
|
|
|
<DD>
|
|
This file contains information about netfilter user-space queueing, if used.
|
|
Each line represents a queue.
|
|
Queues that have not been subscribed to
|
|
by user space are not shown.
|
|
<DT id="599"><DD>
|
|
|
|
|
|
<BR> 1 4207 0 2 65535 0 0 0 1
|
|
<BR> (1) (2) (3)(4) (5) (6) (7) (8)
|
|
|
|
|
|
<DT id="600"><DD>
|
|
The fields in each line are:
|
|
<DL COMPACT><DT id="601"><DD>
|
|
<DL COMPACT>
|
|
<DT id="602">(1)<DD>
|
|
The ID of the queue.
|
|
This matches what is specified in the
|
|
<B>--queue-num</B>
|
|
|
|
or
|
|
<B>--queue-balance</B>
|
|
|
|
options to the
|
|
<B><A HREF="/cgi-bin/man/man2html?8+iptables">iptables</A></B>(8)
|
|
|
|
NFQUEUE target.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?8+iptables-extensions">iptables-extensions</A></B>(8)
|
|
|
|
for more information.
|
|
<DT id="603">(2)<DD>
|
|
The netlink port ID subscribed to the queue.
|
|
<DT id="604">(3)<DD>
|
|
The number of packets currently queued and waiting to be processed by
|
|
the application.
|
|
<DT id="605">(4)<DD>
|
|
The copy mode of the queue.
|
|
It is either 1 (metadata only) or 2
|
|
(also copy payload data to user space).
|
|
<DT id="606">(5)<DD>
|
|
Copy range; that is, how many bytes of packet payload should be copied to
|
|
user space at most.
|
|
<DT id="607">(6)<DD>
|
|
queue dropped.
|
|
Number of packets that had to be dropped by the kernel because
|
|
too many packets are already waiting for user space to send back the mandatory
|
|
accept/drop verdicts.
|
|
<DT id="608">(7)<DD>
|
|
queue user dropped.
|
|
Number of packets that were dropped within the netlink
|
|
subsystem.
|
|
Such drops usually happen when the corresponding socket buffer is
|
|
full; that is, user space is not able to read messages fast enough.
|
|
<DT id="609">(8)<DD>
|
|
sequence number.
|
|
Every queued packet is associated with a (32-bit)
|
|
monotonically-increasing sequence number.
|
|
This shows the ID of the most recent packet queued.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="610"><DD>
|
|
The last number exists only for compatibility reasons and is always 1.
|
|
<DT id="611"><I>/proc/partitions</I>
|
|
|
|
<DD>
|
|
Contains the major and minor numbers of each partition as well as the number
|
|
of 1024-byte blocks and the partition name.
|
|
<DT id="612"><I>/proc/pci</I>
|
|
|
|
<DD>
|
|
This is a listing of all PCI devices found during kernel initialization
|
|
and their configuration.
|
|
<DT id="613"><DD>
|
|
This file has been deprecated in favor of a new
|
|
<I>/proc</I>
|
|
|
|
interface for PCI
|
|
(<I>/proc/bus/pci</I>).
|
|
|
|
It became optional in Linux 2.2 (available with
|
|
<B>CONFIG_PCI_OLD_PROC</B>
|
|
|
|
set at kernel compilation).
|
|
It became once more nonoptionally enabled in Linux 2.4.
|
|
Next, it was deprecated in Linux 2.6 (still available with
|
|
<B>CONFIG_PCI_LEGACY_PROC</B>
|
|
|
|
set), and finally removed altogether since Linux 2.6.17.
|
|
|
|
|
|
<DT id="614"><I>/proc/profile</I> (since Linux 2.4)
|
|
|
|
<DD>
|
|
This file is present only if the kernel was booted with the
|
|
<I>profile=1</I>
|
|
|
|
command-line option.
|
|
It exposes kernel profiling information in a binary format for use by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+readprofile">readprofile</A></B>(1).
|
|
|
|
Writing (e.g., an empty string) to this file resets the profiling counters;
|
|
on some architectures,
|
|
writing a binary integer "profiling multiplier" of size
|
|
<I>sizeof(int)</I>
|
|
|
|
sets the profiling interrupt frequency.
|
|
<DT id="615"><I>/proc/scsi</I>
|
|
|
|
<DD>
|
|
A directory with the
|
|
<I>scsi</I>
|
|
|
|
mid-level pseudo-file and various SCSI low-level
|
|
driver directories,
|
|
which contain a file for each SCSI host in this system, all of
|
|
which give the status of some part of the SCSI IO subsystem.
|
|
These files contain ASCII structures and are, therefore, readable with
|
|
<B><A HREF="/cgi-bin/man/man2html?1+cat">cat</A></B>(1).
|
|
|
|
<DT id="616"><DD>
|
|
You can also write to some of the files to reconfigure the subsystem or
|
|
switch certain features on or off.
|
|
<DT id="617"><I>/proc/scsi/scsi</I>
|
|
|
|
<DD>
|
|
This is a listing of all SCSI devices known to the kernel.
|
|
The listing is similar to the one seen during bootup.
|
|
scsi currently supports only the <I>add-single-device</I> command which
|
|
allows root to add a hotplugged device to the list of known devices.
|
|
<DT id="618"><DD>
|
|
The command
|
|
<DT id="619"><DD>
|
|
|
|
|
|
echo 'scsi add-single-device 1 0 5 0' > /proc/scsi/scsi
|
|
|
|
|
|
<DT id="620"><DD>
|
|
will cause
|
|
host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
|
|
If there
|
|
is already a device known on this address or the address is invalid, an
|
|
error will be returned.
|
|
<DT id="621"><I>/proc/scsi/[drivername]</I>
|
|
|
|
<DD>
|
|
<I>[drivername]</I> can currently be NCR53c7xx, aha152x, aha1542, aha1740,
|
|
aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
|
|
scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
|
|
These directories show up for all drivers that registered at least one
|
|
SCSI HBA.
|
|
Every directory contains one file per registered host.
|
|
Every host-file is named after the number the host was assigned during
|
|
initialization.
|
|
<DT id="622"><DD>
|
|
Reading these files will usually show driver and host configuration,
|
|
statistics, and so on.
|
|
<DT id="623"><DD>
|
|
Writing to these files allows different things on different hosts.
|
|
For example, with the <I>latency</I> and <I>nolatency</I> commands,
|
|
root can switch on and off command latency measurement code in the
|
|
eata_dma driver.
|
|
With the <I>lockup</I> and <I>unlock</I> commands,
|
|
root can control bus lockups simulated by the scsi_debug driver.
|
|
<DT id="624"><I>/proc/self</I>
|
|
|
|
<DD>
|
|
This directory refers to the process accessing the
|
|
<I>/proc</I>
|
|
|
|
filesystem,
|
|
and is identical to the
|
|
<I>/proc</I>
|
|
|
|
directory named by the process ID of the same process.
|
|
<DT id="625"><I>/proc/slabinfo</I>
|
|
|
|
<DD>
|
|
Information about kernel caches.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+slabinfo">slabinfo</A></B>(5)
|
|
|
|
for details.
|
|
<DT id="626"><I>/proc/stat</I>
|
|
|
|
<DD>
|
|
kernel/system statistics.
|
|
Varies with architecture.
|
|
Common
|
|
entries include:
|
|
<DL COMPACT><DT id="627"><DD>
|
|
<DL COMPACT>
|
|
<DT id="628"><I>cpu 10132153 290696 3084719 46828483 16683 0 25195 0 175628 0</I>
|
|
|
|
<DD>
|
|
|
|
<I>cpu0 1393280 32966 572056 13343292 6130 0 17875 0 23933 0</I>
|
|
|
|
The amount of time, measured in units of
|
|
USER_HZ (1/100ths of a second on most architectures, use
|
|
<I>sysconf(_SC_CLK_TCK)</I>
|
|
|
|
to obtain the right value),
|
|
|
|
that the system ("cpu" line) or the specific CPU ("cpu<I>N</I>" line)
|
|
spent in various states:
|
|
<DL COMPACT><DT id="629"><DD>
|
|
<DL COMPACT>
|
|
<DT id="630"><I>user</I>
|
|
|
|
<DD>
|
|
(1) Time spent in user mode.
|
|
<DT id="631"><I>nice</I>
|
|
|
|
<DD>
|
|
(2) Time spent in user mode with low priority (nice).
|
|
<DT id="632"><I>system</I>
|
|
|
|
<DD>
|
|
(3) Time spent in system mode.
|
|
<DT id="633"><I>idle</I>
|
|
|
|
<DD>
|
|
(4) Time spent in the idle task.
|
|
|
|
|
|
|
|
This value should be USER_HZ times the
|
|
second entry in the
|
|
<I>/proc/uptime</I>
|
|
|
|
pseudo-file.
|
|
<DT id="634"><I>iowait</I> (since Linux 2.5.41)
|
|
|
|
<DD>
|
|
(5) Time waiting for I/O to complete.
|
|
This value is not reliable, for the following reasons:
|
|
|
|
<DL COMPACT><DT id="635"><DD>
|
|
<DL COMPACT>
|
|
<DT id="636">1.<DD>
|
|
The CPU will not wait for I/O to complete;
|
|
iowait is the time that a task is waiting for I/O to complete.
|
|
When a CPU goes into idle state for outstanding task I/O,
|
|
another task will be scheduled on this CPU.
|
|
<DT id="637">2.<DD>
|
|
On a multi-core CPU,
|
|
the task waiting for I/O to complete is not running on any CPU,
|
|
so the iowait of each CPU is difficult to calculate.
|
|
<DT id="638">3.<DD>
|
|
The value in this field may
|
|
<I>decrease</I>
|
|
|
|
in certain conditions.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="639"><I>irq</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
(6) Time servicing interrupts.
|
|
<DT id="640"><I>softirq</I> (since Linux 2.6.0
|
|
|
|
<DD>
|
|
|
|
(7) Time servicing softirqs.
|
|
<DT id="641"><I>steal</I> (since Linux 2.6.11)
|
|
|
|
<DD>
|
|
(8) Stolen time, which is the time spent in other operating systems when
|
|
running in a virtualized environment
|
|
<DT id="642"><I>guest</I> (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
(9) Time spent running a virtual CPU for guest
|
|
operating systems under the control of the Linux kernel.
|
|
|
|
<DT id="643"><I>guest_nice</I> (since Linux 2.6.33)
|
|
|
|
<DD>
|
|
|
|
(10) Time spent running a niced guest (virtual CPU for guest
|
|
operating systems under the control of the Linux kernel).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="644"><I>page 5741 1808</I><DD>
|
|
The number of pages the system paged in and the number that were paged
|
|
out (from disk).
|
|
<DT id="645"><I>swap 1 0</I><DD>
|
|
The number of swap pages that have been brought in and out.
|
|
<DT id="646">
|
|
<DD>
|
|
|
|
<I>intr 1462898</I>
|
|
This line shows counts of interrupts serviced since boot time,
|
|
for each of the possible system interrupts.
|
|
The first column is the total of all interrupts serviced
|
|
including unnumbered architecture specific interrupts;
|
|
each subsequent column is the total for that particular numbered interrupt.
|
|
Unnumbered interrupts are not shown, only summed into the total.
|
|
<DT id="647"><I>disk_io: (2,0):(31,30,5764,1,2) (3,0):</I>...<DD>
|
|
(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
|
|
<BR>
|
|
|
|
(Linux 2.4 only)
|
|
<DT id="648"><I>ctxt 115315</I><DD>
|
|
The number of context switches that the system underwent.
|
|
<DT id="649"><I>btime 769041601</I><DD>
|
|
boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
|
|
<DT id="650"><I>processes 86031</I><DD>
|
|
Number of forks since boot.
|
|
<DT id="651"><I>procs_running 6</I><DD>
|
|
Number of processes in runnable state.
|
|
(Linux 2.5.45 onward.)
|
|
<DT id="652"><I>procs_blocked 2</I><DD>
|
|
Number of processes blocked waiting for I/O to complete.
|
|
(Linux 2.5.45 onward.)
|
|
<DT id="653"><I>softirq 229245889 94 60001584 13619 5175704 2471304 28 51212741 59130143 0 51240672</I>
|
|
|
|
<DD>
|
|
|
|
This line shows the number of softirq for all CPUs.
|
|
The first column is the total of all softirqs and
|
|
each subsequent column is the total for particular softirq.
|
|
(Linux 2.6.31 onward.)
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="654"><I>/proc/swaps</I>
|
|
|
|
<DD>
|
|
Swap areas in use.
|
|
See also
|
|
<B><A HREF="/cgi-bin/man/man2html?8+swapon">swapon</A></B>(8).
|
|
|
|
<DT id="655"><I>/proc/sys</I>
|
|
|
|
<DD>
|
|
This directory (present since 1.3.57) contains a number of files
|
|
and subdirectories corresponding to kernel variables.
|
|
These variables can be read and sometimes modified using
|
|
the <I>/proc</I> filesystem, and the (deprecated)
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sysctl">sysctl</A></B>(2)
|
|
|
|
system call.
|
|
<DT id="656"><DD>
|
|
String values may be terminated by either '\0' or '\n'.
|
|
<DT id="657"><DD>
|
|
Integer and long values may be written either in decimal or in
|
|
hexadecimal notation (e.g. 0x3FFF).
|
|
When writing multiple integer or long values, these may be separated
|
|
by any of the following whitespace characters:
|
|
' ', '\t', or '\n'.
|
|
Using other separators leads to the error
|
|
<B>EINVAL</B>.
|
|
|
|
<DT id="658"><I>/proc/sys/abi</I> (since Linux 2.4.10)
|
|
|
|
<DD>
|
|
This directory may contain files with application binary information.
|
|
|
|
See the Linux kernel source file
|
|
<I>Documentation/sysctl/abi.txt</I>
|
|
|
|
for more information.
|
|
<DT id="659"><I>/proc/sys/debug</I>
|
|
|
|
<DD>
|
|
This directory may be empty.
|
|
<DT id="660"><I>/proc/sys/dev</I>
|
|
|
|
<DD>
|
|
This directory contains device-specific information (e.g.,
|
|
<I>dev/cdrom/info</I>).
|
|
|
|
On
|
|
some systems, it may be empty.
|
|
<DT id="661"><I>/proc/sys/fs</I>
|
|
|
|
<DD>
|
|
This directory contains the files and subdirectories for kernel variables
|
|
related to filesystems.
|
|
<DT id="662"><I>/proc/sys/fs/binfmt_misc</I>
|
|
|
|
<DD>
|
|
Documentation for files in this directory can be found
|
|
in the Linux kernel source in the file
|
|
<I>Documentation/admin-guide/binfmt-misc.rst</I>
|
|
|
|
(or in
|
|
<I>Documentation/binfmt_misc.txt</I>
|
|
|
|
on older kernels).
|
|
<DT id="663"><I>/proc/sys/fs/dentry-state</I> (since Linux 2.2)
|
|
|
|
<DD>
|
|
This file contains information about the status of the
|
|
directory cache (dcache).
|
|
The file contains six numbers,
|
|
<I>nr_dentry</I>, <I>nr_unused</I>, <I>age_limit</I> (age in seconds),
|
|
|
|
<I>want_pages</I>
|
|
|
|
(pages requested by system) and two dummy values.
|
|
<DL COMPACT><DT id="664"><DD>
|
|
<DL COMPACT>
|
|
<DT id="665">*<DD>
|
|
<I>nr_dentry</I>
|
|
|
|
is the number of allocated dentries (dcache entries).
|
|
This field is unused in Linux 2.2.
|
|
<DT id="666">*<DD>
|
|
<I>nr_unused</I>
|
|
|
|
is the number of unused dentries.
|
|
<DT id="667">*<DD>
|
|
<I>age_limit</I>
|
|
|
|
|
|
is the age in seconds after which dcache entries
|
|
can be reclaimed when memory is short.
|
|
<DT id="668">*<DD>
|
|
<I>want_pages</I>
|
|
|
|
|
|
is nonzero when the kernel has called shrink_dcache_pages() and the
|
|
dcache isn't pruned yet.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="669"><I>/proc/sys/fs/dir-notify-enable</I>
|
|
|
|
<DD>
|
|
This file can be used to disable or enable the
|
|
<I>dnotify</I>
|
|
|
|
interface described in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2)
|
|
|
|
on a system-wide basis.
|
|
A value of 0 in this file disables the interface,
|
|
and a value of 1 enables it.
|
|
<DT id="670"><I>/proc/sys/fs/dquot-max</I>
|
|
|
|
<DD>
|
|
This file shows the maximum number of cached disk quota entries.
|
|
On some (2.4) systems, it is not present.
|
|
If the number of free cached disk quota entries is very low and
|
|
you have some awesome number of simultaneous system users,
|
|
you might want to raise the limit.
|
|
<DT id="671"><I>/proc/sys/fs/dquot-nr</I>
|
|
|
|
<DD>
|
|
This file shows the number of allocated disk quota
|
|
entries and the number of free disk quota entries.
|
|
<DT id="672"><I>/proc/sys/fs/epoll</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
This directory contains the file
|
|
<I>max_user_watches</I>,
|
|
|
|
which can be used to limit the amount of kernel memory consumed by the
|
|
<I>epoll</I>
|
|
|
|
interface.
|
|
For further details, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+epoll">epoll</A></B>(7).
|
|
|
|
<DT id="673"><I>/proc/sys/fs/file-max</I>
|
|
|
|
<DD>
|
|
This file defines
|
|
a system-wide limit on the number of open files for all processes.
|
|
System calls that fail when encountering this limit fail with the error
|
|
<B>ENFILE</B>.
|
|
|
|
(See also
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setrlimit">setrlimit</A></B>(2),
|
|
|
|
which can be used by a process to set the per-process limit,
|
|
<B>RLIMIT_NOFILE</B>,
|
|
|
|
on the number of files it may open.)
|
|
If you get lots
|
|
of error messages in the kernel log about running out of file handles
|
|
(look for "VFS: file-max limit <number> reached"),
|
|
try increasing this value:
|
|
<DT id="674"><DD>
|
|
|
|
|
|
echo 100000 > /proc/sys/fs/file-max
|
|
|
|
|
|
<DT id="675"><DD>
|
|
Privileged processes
|
|
(<B>CAP_SYS_ADMIN</B>)
|
|
|
|
can override the
|
|
<I>file-max</I>
|
|
|
|
limit.
|
|
<DT id="676"><I>/proc/sys/fs/file-nr</I>
|
|
|
|
<DD>
|
|
This (read-only) file contains three numbers:
|
|
the number of allocated file handles
|
|
(i.e., the number of files presently opened);
|
|
the number of free file handles;
|
|
and the maximum number of file handles (i.e., the same value as
|
|
<I>/proc/sys/fs/file-max</I>).
|
|
|
|
If the number of allocated file handles is close to the
|
|
maximum, you should consider increasing the maximum.
|
|
Before Linux 2.6,
|
|
the kernel allocated file handles dynamically,
|
|
but it didn't free them again.
|
|
Instead the free file handles were kept in a list for reallocation;
|
|
the "free file handles" value indicates the size of that list.
|
|
A large number of free file handles indicates that there was
|
|
a past peak in the usage of open file handles.
|
|
Since Linux 2.6, the kernel does deallocate freed file handles,
|
|
and the "free file handles" value is always zero.
|
|
<DT id="677"><I>/proc/sys/fs/inode-max</I> (only present until Linux 2.2)
|
|
|
|
<DD>
|
|
This file contains the maximum number of in-memory inodes.
|
|
This value should be 3-4 times larger
|
|
than the value in
|
|
<I>file-max</I>,
|
|
|
|
since <I>stdin</I>, <I>stdout</I>
|
|
and network sockets also need an inode to handle them.
|
|
When you regularly run out of inodes, you need to increase this value.
|
|
<DT id="678"><DD>
|
|
Starting with Linux 2.4,
|
|
there is no longer a static limit on the number of inodes,
|
|
and this file is removed.
|
|
<DT id="679"><I>/proc/sys/fs/inode-nr</I>
|
|
|
|
<DD>
|
|
This file contains the first two values from
|
|
<I>inode-state</I>.
|
|
|
|
<DT id="680"><I>/proc/sys/fs/inode-state</I>
|
|
|
|
<DD>
|
|
This file
|
|
contains seven numbers:
|
|
<I>nr_inodes</I>,
|
|
|
|
<I>nr_free_inodes</I>,
|
|
|
|
<I>preshrink</I>,
|
|
|
|
and four dummy values (always zero).
|
|
<DT id="681"><DD>
|
|
<I>nr_inodes</I>
|
|
|
|
is the number of inodes the system has allocated.
|
|
|
|
|
|
|
|
<I>nr_free_inodes</I>
|
|
|
|
represents the number of free inodes.
|
|
<DT id="682"><DD>
|
|
<I>preshrink</I>
|
|
|
|
is nonzero when the
|
|
<I>nr_inodes</I>
|
|
|
|
>
|
|
<I>inode-max</I>
|
|
|
|
and the system needs to prune the inode list instead of allocating more;
|
|
since Linux 2.4, this field is a dummy value (always zero).
|
|
<DT id="683"><I>/proc/sys/fs/inotify</I> (since Linux 2.6.13)
|
|
|
|
<DD>
|
|
This directory contains files
|
|
<I>max_queued_events</I>, <I>max_user_instances</I>, and <I>max_user_watches</I>,
|
|
|
|
that can be used to limit the amount of kernel memory consumed by the
|
|
<I>inotify</I>
|
|
|
|
interface.
|
|
For further details, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+inotify">inotify</A></B>(7).
|
|
|
|
<DT id="684"><I>/proc/sys/fs/lease-break-time</I>
|
|
|
|
<DD>
|
|
This file specifies the grace period that the kernel grants to a process
|
|
holding a file lease
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2))
|
|
|
|
after it has sent a signal to that process notifying it
|
|
that another process is waiting to open the file.
|
|
If the lease holder does not remove or downgrade the lease within
|
|
this grace period, the kernel forcibly breaks the lease.
|
|
<DT id="685"><I>/proc/sys/fs/leases-enable</I>
|
|
|
|
<DD>
|
|
This file can be used to enable or disable file leases
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2))
|
|
|
|
on a system-wide basis.
|
|
If this file contains the value 0, leases are disabled.
|
|
A nonzero value enables leases.
|
|
<DT id="686"><I>/proc/sys/fs/mount-max</I> (since Linux 4.9)
|
|
|
|
<DD>
|
|
|
|
The value in this file specifies the maximum number of mounts that may exist
|
|
in a mount namespace.
|
|
The default value in this file is 100,000.
|
|
<DT id="687"><I>/proc/sys/fs/mqueue</I> (since Linux 2.6.6)
|
|
|
|
<DD>
|
|
This directory contains files
|
|
<I>msg_max</I>, <I>msgsize_max</I>, and <I>queues_max</I>,
|
|
|
|
controlling the resources used by POSIX message queues.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mq_overview">mq_overview</A></B>(7)
|
|
|
|
for details.
|
|
<DT id="688"><I>/proc/sys/fs/nr_open</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
|
|
This file imposes ceiling on the value to which the
|
|
<B>RLIMIT_NOFILE</B>
|
|
|
|
resource limit can be raised (see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getrlimit">getrlimit</A></B>(2)).
|
|
|
|
This ceiling is enforced for both unprivileged and privileged process.
|
|
The default value in this file is 1048576.
|
|
(Before Linux 2.6.25, the ceiling for
|
|
<B>RLIMIT_NOFILE</B>
|
|
|
|
was hard-coded to the same value.)
|
|
<DT id="689"><I>/proc/sys/fs/overflowgid</I> and <I>/proc/sys/fs/overflowuid</I>
|
|
|
|
<DD>
|
|
These files
|
|
allow you to change the value of the fixed UID and GID.
|
|
The default is 65534.
|
|
Some filesystems support only 16-bit UIDs and GIDs, although in Linux
|
|
UIDs and GIDs are 32 bits.
|
|
When one of these filesystems is mounted
|
|
with writes enabled, any UID or GID that would exceed 65535 is translated
|
|
to the overflow value before being written to disk.
|
|
<DT id="690"><I>/proc/sys/fs/pipe-max-size</I> (since Linux 2.6.35)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pipe">pipe</A></B>(7).
|
|
|
|
<DT id="691"><I>/proc/sys/fs/pipe-user-pages-hard</I> (since Linux 4.5)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pipe">pipe</A></B>(7).
|
|
|
|
<DT id="692"><I>/proc/sys/fs/pipe-user-pages-soft</I> (since Linux 4.5)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pipe">pipe</A></B>(7).
|
|
|
|
<DT id="693"><I>/proc/sys/fs/protected_hardlinks</I> (since Linux 3.6)
|
|
|
|
<DD>
|
|
|
|
When the value in this file is 0,
|
|
no restrictions are placed on the creation of hard links
|
|
(i.e., this is the historical behavior before Linux 3.6).
|
|
When the value in this file is 1,
|
|
a hard link can be created to a target file
|
|
only if one of the following conditions is true:
|
|
<DL COMPACT><DT id="694"><DD>
|
|
<DL COMPACT>
|
|
<DT id="695">*<DD>
|
|
The calling process has the
|
|
<B>CAP_FOWNER</B>
|
|
|
|
capability in its user namespace
|
|
and the file UID has a mapping in the namespace.
|
|
<DT id="696">*<DD>
|
|
The filesystem UID of the process creating the link matches
|
|
the owner (UID) of the target file
|
|
(as described in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+credentials">credentials</A></B>(7),
|
|
|
|
a process's filesystem UID is normally the same as its effective UID).
|
|
<DT id="697">*<DD>
|
|
All of the following conditions are true:
|
|
<DL COMPACT><DT id="698"><DD>
|
|
<DL COMPACT>
|
|
<DT id="699">•<DD>
|
|
the target is a regular file;
|
|
<DT id="700">•<DD>
|
|
the target file does not have its set-user-ID mode bit enabled;
|
|
<DT id="701">•<DD>
|
|
the target file does not have both its set-group-ID and
|
|
group-executable mode bits enabled; and
|
|
<DT id="702">•<DD>
|
|
the caller has permission to read and write the target file
|
|
(either via the file's permissions mask or because it has
|
|
suitable capabilities).
|
|
</DL>
|
|
</DL>
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="703"><DD>
|
|
The default value in this file is 0.
|
|
Setting the value to 1
|
|
prevents a longstanding class of security issues caused by
|
|
hard-link-based time-of-check, time-of-use races,
|
|
most commonly seen in world-writable directories such as
|
|
<I>/tmp</I>.
|
|
|
|
The common method of exploiting this flaw
|
|
is to cross privilege boundaries when following a given hard link
|
|
(i.e., a root process follows a hard link created by another user).
|
|
Additionally, on systems without separated partitions,
|
|
this stops unauthorized users from "pinning" vulnerable set-user-ID and
|
|
set-group-ID files against being upgraded by
|
|
the administrator, or linking to special files.
|
|
<DT id="704"><I>/proc/sys/fs/protected_symlinks</I> (since Linux 3.6)
|
|
|
|
<DD>
|
|
|
|
When the value in this file is 0,
|
|
no restrictions are placed on following symbolic links
|
|
(i.e., this is the historical behavior before Linux 3.6).
|
|
When the value in this file is 1, symbolic links are followed only
|
|
in the following circumstances:
|
|
<DL COMPACT><DT id="705"><DD>
|
|
<DL COMPACT>
|
|
<DT id="706">*<DD>
|
|
the filesystem UID of the process following the link matches
|
|
the owner (UID) of the symbolic link
|
|
(as described in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+credentials">credentials</A></B>(7),
|
|
|
|
a process's filesystem UID is normally the same as its effective UID);
|
|
<DT id="707">*<DD>
|
|
the link is not in a sticky world-writable directory; or
|
|
<DT id="708">*<DD>
|
|
the symbolic link and its parent directory have the same owner (UID)
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="709"><DD>
|
|
A system call that fails to follow a symbolic link
|
|
because of the above restrictions returns the error
|
|
<B>EACCES</B>
|
|
|
|
in
|
|
<I>errno</I>.
|
|
|
|
<DT id="710"><DD>
|
|
The default value in this file is 0.
|
|
Setting the value to 1 avoids a longstanding class of security issues
|
|
based on time-of-check, time-of-use races when accessing symbolic links.
|
|
<DT id="711"><I>/proc/sys/fs/suid_dumpable</I> (since Linux 2.6.13)
|
|
|
|
<DD>
|
|
|
|
The value in this file is assigned to a process's "dumpable" flag
|
|
in the circumstances described in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2).
|
|
|
|
In effect,
|
|
the value in this file determines whether core dump files are
|
|
produced for set-user-ID or otherwise protected/tainted binaries.
|
|
The "dumpable" setting also affects the ownership of files in a process's
|
|
<I>/proc/[pid]</I>
|
|
|
|
directory, as described above.
|
|
<DT id="712"><DD>
|
|
Three different integer values can be specified:
|
|
<DL COMPACT><DT id="713"><DD>
|
|
<DL COMPACT>
|
|
<DT id="714"><I>0 (default)</I><DD>
|
|
|
|
This provides the traditional (pre-Linux 2.6.13) behavior.
|
|
A core dump will not be produced for a process which has
|
|
changed credentials (by calling
|
|
<B><A HREF="/cgi-bin/man/man2html?2+seteuid">seteuid</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setgid">setgid</A></B>(2),
|
|
|
|
or similar, or by executing a set-user-ID or set-group-ID program)
|
|
or whose binary does not have read permission enabled.
|
|
<DT id="715"><I>1 ("debug")</I><DD>
|
|
|
|
All processes dump core when possible.
|
|
(Reasons why a process might nevertheless not dump core are described in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+core">core</A></B>(5).)
|
|
|
|
The core dump is owned by the filesystem user ID of the dumping process
|
|
and no security is applied.
|
|
This is intended for system debugging situations only:
|
|
this mode is insecure because it allows unprivileged users to
|
|
examine the memory contents of privileged processes.
|
|
<DT id="716"><I>2 ("suidsafe")</I><DD>
|
|
|
|
Any binary which normally would not be dumped (see "0" above)
|
|
is dumped readable by root only.
|
|
This allows the user to remove the core dump file but not to read it.
|
|
For security reasons core dumps in this mode will not overwrite one
|
|
another or other files.
|
|
This mode is appropriate when administrators are
|
|
attempting to debug problems in a normal environment.
|
|
<DT id="717"><DD>
|
|
Additionally, since Linux 3.6,
|
|
|
|
<I>/proc/sys/kernel/core_pattern</I>
|
|
|
|
must either be an absolute pathname
|
|
or a pipe command, as detailed in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+core">core</A></B>(5).
|
|
|
|
Warnings will be written to the kernel log if
|
|
<I>core_pattern</I>
|
|
|
|
does not follow these rules, and no core dump will be produced.
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="718"><DD>
|
|
For details of the effect of a process's "dumpable" setting
|
|
on ptrace access mode checking, see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="719"><I>/proc/sys/fs/super-max</I>
|
|
|
|
<DD>
|
|
This file
|
|
controls the maximum number of superblocks, and
|
|
thus the maximum number of mounted filesystems the kernel
|
|
can have.
|
|
You need increase only
|
|
<I>super-max</I>
|
|
|
|
if you need to mount more filesystems than the current value in
|
|
<I>super-max</I>
|
|
|
|
allows you to.
|
|
<DT id="720"><I>/proc/sys/fs/super-nr</I>
|
|
|
|
<DD>
|
|
This file
|
|
contains the number of filesystems currently mounted.
|
|
<DT id="721"><I>/proc/sys/kernel</I>
|
|
|
|
<DD>
|
|
This directory contains files controlling a range of kernel parameters,
|
|
as described below.
|
|
<DT id="722"><I>/proc/sys/kernel/acct</I>
|
|
|
|
<DD>
|
|
This file
|
|
contains three numbers:
|
|
<I>highwater</I>,
|
|
|
|
<I>lowwater</I>,
|
|
|
|
and
|
|
<I>frequency</I>.
|
|
|
|
If BSD-style process accounting is enabled, these values control
|
|
its behavior.
|
|
If free space on filesystem where the log lives goes below
|
|
<I>lowwater</I>
|
|
|
|
percent, accounting suspends.
|
|
If free space gets above
|
|
<I>highwater</I>
|
|
|
|
percent, accounting resumes.
|
|
<I>frequency</I>
|
|
|
|
determines
|
|
how often the kernel checks the amount of free space (value is in
|
|
seconds).
|
|
Default values are 4, 2 and 30.
|
|
That is, suspend accounting if 2% or less space is free; resume it
|
|
if 4% or more space is free; consider information about amount of free space
|
|
valid for 30 seconds.
|
|
<DT id="723"><I>/proc/sys/kernel/auto_msgmni</I> (Linux 2.6.27 to 3.18)
|
|
|
|
<DD>
|
|
|
|
|
|
From Linux 2.6.27 to 3.18,
|
|
this file was used to control recomputing of the value in
|
|
<I>/proc/sys/kernel/msgmni</I>
|
|
|
|
upon the addition or removal of memory or upon IPC namespace creation/removal.
|
|
Echoing "1" into this file enabled
|
|
<I>msgmni</I>
|
|
|
|
automatic recomputing (and triggered a recomputation of
|
|
<I>msgmni</I>
|
|
|
|
based on the current amount of available memory and number of IPC namespaces).
|
|
Echoing "0" disabled automatic recomputing.
|
|
(Automatic recomputing was also disabled if a value was explicitly assigned to
|
|
<I>/proc/sys/kernel/msgmni</I>.)
|
|
|
|
The default value in
|
|
<I>auto_msgmni</I>
|
|
|
|
was 1.
|
|
<DT id="724"><DD>
|
|
Since Linux 3.19, the content of this file has no effect (because
|
|
<I>msgmni</I>
|
|
|
|
|
|
defaults to near the maximum value possible),
|
|
and reads from this file always return the value "0".
|
|
<DT id="725"><I>/proc/sys/kernel/cap_last_cap</I> (since Linux 3.2)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+capabilities">capabilities</A></B>(7).
|
|
|
|
<DT id="726"><I>/proc/sys/kernel/cap-bound</I> (from Linux 2.2 to 2.6.24)
|
|
|
|
<DD>
|
|
This file holds the value of the kernel
|
|
<I>capability bounding set</I>
|
|
|
|
(expressed as a signed decimal number).
|
|
This set is ANDed against the capabilities permitted to a process
|
|
during
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2).
|
|
|
|
Starting with Linux 2.6.25,
|
|
the system-wide capability bounding set disappeared,
|
|
and was replaced by a per-thread bounding set; see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+capabilities">capabilities</A></B>(7).
|
|
|
|
<DT id="727"><I>/proc/sys/kernel/core_pattern</I>
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+core">core</A></B>(5).
|
|
|
|
<DT id="728"><I>/proc/sys/kernel/core_pipe_limit</I>
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+core">core</A></B>(5).
|
|
|
|
<DT id="729"><I>/proc/sys/kernel/core_uses_pid</I>
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+core">core</A></B>(5).
|
|
|
|
<DT id="730"><I>/proc/sys/kernel/ctrl-alt-del</I>
|
|
|
|
<DD>
|
|
This file
|
|
controls the handling of Ctrl-Alt-Del from the keyboard.
|
|
When the value in this file is 0, Ctrl-Alt-Del is trapped and
|
|
sent to the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+init">init</A></B>(1)
|
|
|
|
program to handle a graceful restart.
|
|
When the value is greater than zero, Linux's reaction to a Vulcan
|
|
Nerve Pinch (tm) will be an immediate reboot, without even
|
|
syncing its dirty buffers.
|
|
Note: when a program (like dosemu) has the keyboard in "raw"
|
|
mode, the ctrl-alt-del is intercepted by the program before it
|
|
ever reaches the kernel tty layer, and it's up to the program
|
|
to decide what to do with it.
|
|
<DT id="731"><I>/proc/sys/kernel/dmesg_restrict</I> (since Linux 2.6.37)
|
|
|
|
<DD>
|
|
The value in this file determines who can see kernel syslog contents.
|
|
A value of 0 in this file imposes no restrictions.
|
|
If the value is 1, only privileged users can read the kernel syslog.
|
|
(See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+syslog">syslog</A></B>(2)
|
|
|
|
for more details.)
|
|
Since Linux 3.4,
|
|
|
|
only users with the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability may change the value in this file.
|
|
<DT id="732"><I>/proc/sys/kernel/domainname</I> and <I>/proc/sys/kernel/hostname</I>
|
|
|
|
<DD>
|
|
can be used to set the NIS/YP domainname and the
|
|
hostname of your box in exactly the same way as the commands
|
|
<B><A HREF="/cgi-bin/man/man2html?1+domainname">domainname</A></B>(1)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?1+hostname">hostname</A></B>(1),
|
|
|
|
that is:
|
|
<DT id="733"><DD>
|
|
|
|
|
|
#<B> echo 'darkstar' > /proc/sys/kernel/hostname</B>
|
|
|
|
#<B> echo 'mydomain' > /proc/sys/kernel/domainname</B>
|
|
|
|
|
|
|
|
<DT id="734"><DD>
|
|
has the same effect as
|
|
<DT id="735"><DD>
|
|
|
|
|
|
#<B> hostname 'darkstar'</B>
|
|
|
|
#<B> domainname 'mydomain'</B>
|
|
|
|
|
|
|
|
<DT id="736"><DD>
|
|
Note, however, that the classic darkstar.frop.org has the
|
|
hostname "darkstar" and DNS (Internet Domain Name Server)
|
|
domainname "frop.org", not to be confused with the NIS (Network
|
|
Information Service) or YP (Yellow Pages) domainname.
|
|
These two
|
|
domain names are in general different.
|
|
For a detailed discussion
|
|
see the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+hostname">hostname</A></B>(1)
|
|
|
|
man page.
|
|
<DT id="737"><I>/proc/sys/kernel/hotplug</I>
|
|
|
|
<DD>
|
|
This file
|
|
contains the pathname for the hotplug policy agent.
|
|
The default value in this file is
|
|
<I>/sbin/hotplug</I>.
|
|
|
|
<DT id="738">
|
|
<DD>
|
|
<I>/proc/sys/kernel/htab-reclaim</I> (before Linux 2.4.9.2)
|
|
|
|
(PowerPC only) If this file is set to a nonzero value,
|
|
the PowerPC htab
|
|
|
|
(see kernel file
|
|
<I>Documentation/powerpc/ppc_htab.txt</I>)
|
|
|
|
is pruned
|
|
each time the system hits the idle loop.
|
|
<DT id="739"><I>/proc/sys/kernel/keys/*</I>
|
|
|
|
<DD>
|
|
This directory contains various files that define parameters and limits
|
|
for the key-management facility.
|
|
These files are described in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+keyrings">keyrings</A></B>(7).
|
|
|
|
<DT id="740"><I>/proc/sys/kernel/kptr_restrict</I> (since Linux 2.6.38)
|
|
|
|
<DD>
|
|
|
|
The value in this file determines whether kernel addresses are exposed via
|
|
<I>/proc</I>
|
|
|
|
files and other interfaces.
|
|
A value of 0 in this file imposes no restrictions.
|
|
If the value is 1, kernel pointers printed using the
|
|
<I>%pK</I>
|
|
|
|
format specifier will be replaced with zeros unless the user has the
|
|
<B>CAP_SYSLOG</B>
|
|
|
|
capability.
|
|
If the value is 2, kernel pointers printed using the
|
|
<I>%pK</I>
|
|
|
|
format specifier will be replaced with zeros regardless
|
|
of the user's capabilities.
|
|
The initial default value for this file was 1,
|
|
but the default was changed
|
|
|
|
to 0 in Linux 2.6.39.
|
|
Since Linux 3.4,
|
|
|
|
only users with the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability can change the value in this file.
|
|
<DT id="741"><I>/proc/sys/kernel/l2cr</I>
|
|
|
|
<DD>
|
|
(PowerPC only) This file
|
|
contains a flag that controls the L2 cache of G3 processor
|
|
boards.
|
|
If 0, the cache is disabled.
|
|
Enabled if nonzero.
|
|
<DT id="742"><I>/proc/sys/kernel/modprobe</I>
|
|
|
|
<DD>
|
|
This file contains the pathname for the kernel module loader.
|
|
The default value is
|
|
<I>/sbin/modprobe</I>.
|
|
|
|
The file is present only if the kernel is built with the
|
|
<B>CONFIG_MODULES</B>
|
|
|
|
(<B>CONFIG_KMOD</B>
|
|
|
|
in Linux 2.6.26 and earlier)
|
|
option enabled.
|
|
It is described by the Linux kernel source file
|
|
<I>Documentation/kmod.txt</I>
|
|
|
|
(present only in kernel 2.4 and earlier).
|
|
<DT id="743"><I>/proc/sys/kernel/modules_disabled</I> (since Linux 2.6.31)
|
|
|
|
<DD>
|
|
|
|
|
|
A toggle value indicating if modules are allowed to be loaded
|
|
in an otherwise modular kernel.
|
|
This toggle defaults to off (0), but can be set true (1).
|
|
Once true, modules can be neither loaded nor unloaded,
|
|
and the toggle cannot be set back to false.
|
|
The file is present only if the kernel is built with the
|
|
<B>CONFIG_MODULES</B>
|
|
|
|
option enabled.
|
|
<DT id="744"><I>/proc/sys/kernel/msgmax</I> (since Linux 2.2)
|
|
|
|
<DD>
|
|
This file defines
|
|
a system-wide limit specifying the maximum number of bytes in
|
|
a single message written on a System V message queue.
|
|
<DT id="745"><I>/proc/sys/kernel/msgmni</I> (since Linux 2.4)
|
|
|
|
<DD>
|
|
This file defines the system-wide limit on the number of
|
|
message queue identifiers.
|
|
See also
|
|
<I>/proc/sys/kernel/auto_msgmni</I>.
|
|
|
|
<DT id="746"><I>/proc/sys/kernel/msgmnb</I> (since Linux 2.2)
|
|
|
|
<DD>
|
|
This file defines a system-wide parameter used to initialize the
|
|
<I>msg_qbytes</I>
|
|
|
|
setting for subsequently created message queues.
|
|
The
|
|
<I>msg_qbytes</I>
|
|
|
|
setting specifies the maximum number of bytes that may be written to the
|
|
message queue.
|
|
<DT id="747"><I>/proc/sys/kernel/ngroups_max</I> (since Linux 2.6.4)
|
|
|
|
<DD>
|
|
This is a read-only file that displays the upper limit on the
|
|
number of a process's group memberships.
|
|
<DT id="748"><I>/proc/sys/kernel/ns_last_pid</I> (since Linux 3.3)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pid_namespaces">pid_namespaces</A></B>(7).
|
|
|
|
<DT id="749"><I>/proc/sys/kernel/ostype</I> and <I>/proc/sys/kernel/osrelease</I>
|
|
|
|
<DD>
|
|
These files
|
|
give substrings of
|
|
<I>/proc/version</I>.
|
|
|
|
<DT id="750"><I>/proc/sys/kernel/overflowgid</I> and <I>/proc/sys/kernel/overflowuid</I>
|
|
|
|
<DD>
|
|
These files duplicate the files
|
|
<I>/proc/sys/fs/overflowgid</I>
|
|
|
|
and
|
|
<I>/proc/sys/fs/overflowuid</I>.
|
|
|
|
<DT id="751"><I>/proc/sys/kernel/panic</I>
|
|
|
|
<DD>
|
|
This file gives read/write access to the kernel variable
|
|
<I>panic_timeout</I>.
|
|
|
|
If this is zero, the kernel will loop on a panic; if nonzero,
|
|
it indicates that the kernel should autoreboot after this number
|
|
of seconds.
|
|
When you use the
|
|
software watchdog device driver, the recommended setting is 60.
|
|
<DT id="752"><I>/proc/sys/kernel/panic_on_oops</I> (since Linux 2.5.68)
|
|
|
|
<DD>
|
|
This file controls the kernel's behavior when an oops
|
|
or BUG is encountered.
|
|
If this file contains 0, then the system
|
|
tries to continue operation.
|
|
If it contains 1, then the system
|
|
delays a few seconds (to give klogd time to record the oops output)
|
|
and then panics.
|
|
If the
|
|
<I>/proc/sys/kernel/panic</I>
|
|
|
|
file is also nonzero, then the machine will be rebooted.
|
|
<DT id="753"><I>/proc/sys/kernel/pid_max</I> (since Linux 2.5.34)
|
|
|
|
<DD>
|
|
This file specifies the value at which PIDs wrap around
|
|
(i.e., the value in this file is one greater than the maximum PID).
|
|
PIDs greater than this value are not allocated;
|
|
thus, the value in this file also acts as a system-wide limit
|
|
on the total number of processes and threads.
|
|
The default value for this file, 32768,
|
|
results in the same range of PIDs as on earlier kernels.
|
|
On 32-bit platforms, 32768 is the maximum value for
|
|
<I>pid_max</I>.
|
|
|
|
On 64-bit systems,
|
|
<I>pid_max</I>
|
|
|
|
can be set to any value up to 2^22
|
|
(<B>PID_MAX_LIMIT</B>,
|
|
|
|
approximately 4 million).
|
|
|
|
|
|
|
|
<DT id="754"><I>/proc/sys/kernel/powersave-nap</I> (PowerPC only)
|
|
|
|
<DD>
|
|
This file contains a flag.
|
|
If set, Linux-PPC will use the "nap" mode of
|
|
powersaving,
|
|
otherwise the "doze" mode will be used.
|
|
<DT id="755"><I>/proc/sys/kernel/printk</I>
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+syslog">syslog</A></B>(2).
|
|
|
|
<DT id="756"><I>/proc/sys/kernel/pty</I> (since Linux 2.6.4)
|
|
|
|
<DD>
|
|
This directory contains two files relating to the number of UNIX 98
|
|
pseudoterminals (see
|
|
<B><A HREF="/cgi-bin/man/man2html?4+pts">pts</A></B>(4))
|
|
|
|
on the system.
|
|
<DT id="757"><I>/proc/sys/kernel/pty/max</I>
|
|
|
|
<DD>
|
|
This file defines the maximum number of pseudoterminals.
|
|
|
|
|
|
|
|
<DT id="758"><I>/proc/sys/kernel/pty/nr</I>
|
|
|
|
<DD>
|
|
This read-only file
|
|
indicates how many pseudoterminals are currently in use.
|
|
<DT id="759"><I>/proc/sys/kernel/random</I>
|
|
|
|
<DD>
|
|
This directory
|
|
contains various parameters controlling the operation of the file
|
|
<I>/dev/random</I>.
|
|
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?4+random">random</A></B>(4)
|
|
|
|
for further information.
|
|
<DT id="760"><I>/proc/sys/kernel/random/uuid</I> (since Linux 2.4)
|
|
|
|
<DD>
|
|
Each read from this read-only file returns a randomly generated 128-bit UUID,
|
|
as a string in the standard UUID format.
|
|
<DT id="761"><I>/proc/sys/kernel/randomize_va_space</I> (since Linux 2.6.12)
|
|
|
|
<DD>
|
|
|
|
Select the address space layout randomization (ASLR) policy for the system
|
|
(on architectures that support ASLR).
|
|
Three values are supported for this file:
|
|
<DL COMPACT><DT id="762"><DD>
|
|
<DL COMPACT>
|
|
<DT id="763">0<DD>
|
|
Turn ASLR off.
|
|
This is the default for architectures that don't support ASLR,
|
|
and when the kernel is booted with the
|
|
<I>norandmaps</I>
|
|
|
|
parameter.
|
|
<DT id="764">1<DD>
|
|
Make the addresses of
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2)
|
|
|
|
allocations, the stack, and the VDSO page randomized.
|
|
Among other things, this means that shared libraries will be
|
|
loaded at randomized addresses.
|
|
The text segment of PIE-linked binaries will also be loaded
|
|
at a randomized address.
|
|
This value is the default if the kernel was configured with
|
|
<B>CONFIG_COMPAT_BRK</B>.
|
|
|
|
<DT id="765">2<DD>
|
|
(Since Linux 2.6.25)
|
|
|
|
Also support heap randomization.
|
|
This value is the default if the kernel was not configured with
|
|
<B>CONFIG_COMPAT_BRK</B>.
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="766"><I>/proc/sys/kernel/real-root-dev</I>
|
|
|
|
<DD>
|
|
This file is documented in the Linux kernel source file
|
|
<I>Documentation/admin-guide/initrd.rst</I>
|
|
|
|
|
|
(or
|
|
<I>Documentation/initrd.txt</I>
|
|
|
|
before Linux 4.10).
|
|
<DT id="767"><I>/proc/sys/kernel/reboot-cmd</I> (Sparc only)
|
|
|
|
<DD>
|
|
This file seems to be a way to give an argument to the SPARC
|
|
ROM/Flash boot loader.
|
|
Maybe to tell it what to do after
|
|
rebooting?
|
|
<DT id="768"><I>/proc/sys/kernel/rtsig-max</I>
|
|
|
|
<DD>
|
|
(Only in kernels up to and including 2.6.7; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setrlimit">setrlimit</A></B>(2))
|
|
|
|
This file can be used to tune the maximum number
|
|
of POSIX real-time (queued) signals that can be outstanding
|
|
in the system.
|
|
<DT id="769"><I>/proc/sys/kernel/rtsig-nr</I>
|
|
|
|
<DD>
|
|
(Only in kernels up to and including 2.6.7.)
|
|
This file shows the number of POSIX real-time signals currently queued.
|
|
<DT id="770"><I>/proc/[pid]/sched_autogroup_enabled</I> (since Linux 2.6.38)
|
|
|
|
<DD>
|
|
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+sched">sched</A></B>(7).
|
|
|
|
<DT id="771"><I>/proc/sys/kernel/sched_child_runs_first</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
If this file contains the value zero, then, after a
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fork">fork</A></B>(2),
|
|
|
|
the parent is first scheduled on the CPU.
|
|
If the file contains a nonzero value,
|
|
then the child is scheduled first on the CPU.
|
|
(Of course, on a multiprocessor system,
|
|
the parent and the child might both immediately be scheduled on a CPU.)
|
|
<DT id="772"><I>/proc/sys/kernel/sched_rr_timeslice_ms</I> (since Linux 3.9)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sched_rr_get_interval">sched_rr_get_interval</A></B>(2).
|
|
|
|
<DT id="773"><I>/proc/sys/kernel/sched_rt_period_us</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+sched">sched</A></B>(7).
|
|
|
|
<DT id="774"><I>/proc/sys/kernel/sched_rt_runtime_us</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+sched">sched</A></B>(7).
|
|
|
|
<DT id="775"><I>/proc/sys/kernel/seccomp</I> (since Linux 4.14)
|
|
|
|
<DD>
|
|
|
|
This directory provides additional seccomp information and
|
|
configuration.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+seccomp">seccomp</A></B>(2)
|
|
|
|
for further details.
|
|
<DT id="776"><I>/proc/sys/kernel/sem</I> (since Linux 2.4)
|
|
|
|
<DD>
|
|
This file contains 4 numbers defining limits for System V IPC semaphores.
|
|
These fields are, in order:
|
|
<DL COMPACT><DT id="777"><DD>
|
|
<DL COMPACT>
|
|
<DT id="778">SEMMSL<DD>
|
|
The maximum semaphores per semaphore set.
|
|
<DT id="779">SEMMNS<DD>
|
|
A system-wide limit on the number of semaphores in all semaphore sets.
|
|
<DT id="780">SEMOPM<DD>
|
|
The maximum number of operations that may be specified in a
|
|
<B><A HREF="/cgi-bin/man/man2html?2+semop">semop</A></B>(2)
|
|
|
|
call.
|
|
<DT id="781">SEMMNI<DD>
|
|
A system-wide limit on the maximum number of semaphore identifiers.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="782"><I>/proc/sys/kernel/sg-big-buff</I>
|
|
|
|
<DD>
|
|
This file
|
|
shows the size of the generic SCSI device (sg) buffer.
|
|
You can't tune it just yet, but you could change it at
|
|
compile time by editing
|
|
<I>include/scsi/sg.h</I>
|
|
|
|
and changing
|
|
the value of
|
|
<B>SG_BIG_BUFF</B>.
|
|
|
|
However, there shouldn't be any reason to change this value.
|
|
<DT id="783"><I>/proc/sys/kernel/shm_rmid_forced</I> (since Linux 3.1)
|
|
|
|
<DD>
|
|
|
|
|
|
If this file is set to 1, all System V shared memory segments will
|
|
be marked for destruction as soon as the number of attached processes
|
|
falls to zero;
|
|
in other words, it is no longer possible to create shared memory segments
|
|
that exist independently of any attached process.
|
|
<DT id="784"><DD>
|
|
The effect is as though a
|
|
<B><A HREF="/cgi-bin/man/man2html?2+shmctl">shmctl</A></B>(2)
|
|
|
|
<B>IPC_RMID</B>
|
|
|
|
is performed on all existing segments as well as all segments
|
|
created in the future (until this file is reset to 0).
|
|
Note that existing segments that are attached to no process will be
|
|
immediately destroyed when this file is set to 1.
|
|
Setting this option will also destroy segments that were created,
|
|
but never attached,
|
|
upon termination of the process that created the segment with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+shmget">shmget</A></B>(2).
|
|
|
|
<DT id="785"><DD>
|
|
Setting this file to 1 provides a way of ensuring that
|
|
all System V shared memory segments are counted against the
|
|
resource usage and resource limits (see the description of
|
|
<B>RLIMIT_AS</B>
|
|
|
|
in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getrlimit">getrlimit</A></B>(2))
|
|
|
|
of at least one process.
|
|
<DT id="786"><DD>
|
|
Because setting this file to 1 produces behavior that is nonstandard
|
|
and could also break existing applications,
|
|
the default value in this file is 0.
|
|
Set this file to 1 only if you have a good understanding
|
|
of the semantics of the applications using
|
|
System V shared memory on your system.
|
|
<DT id="787"><I>/proc/sys/kernel/shmall</I> (since Linux 2.2)
|
|
|
|
<DD>
|
|
This file
|
|
contains the system-wide limit on the total number of pages of
|
|
System V shared memory.
|
|
<DT id="788"><I>/proc/sys/kernel/shmmax</I> (since Linux 2.2)
|
|
|
|
<DD>
|
|
This file
|
|
can be used to query and set the run-time limit
|
|
on the maximum (System V IPC) shared memory segment size that can be
|
|
created.
|
|
Shared memory segments up to 1GB are now supported in the
|
|
kernel.
|
|
This value defaults to
|
|
<B>SHMMAX</B>.
|
|
|
|
<DT id="789"><I>/proc/sys/kernel/shmmni</I> (since Linux 2.4)
|
|
|
|
<DD>
|
|
This file
|
|
specifies the system-wide maximum number of System V shared memory
|
|
segments that can be created.
|
|
<DT id="790"><I>/proc/sys/kernel/sysctl_writes_strict</I> (since Linux 3.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
The value in this file determines how the file offset affects
|
|
the behavior of updating entries in files under
|
|
<I>/proc/sys</I>.
|
|
|
|
The file has three possible values:
|
|
<DL COMPACT><DT id="791"><DD>
|
|
<DL COMPACT>
|
|
<DT id="792">-1<DD>
|
|
This provides legacy handling, with no printk warnings.
|
|
Each
|
|
<B><A HREF="/cgi-bin/man/man2html?2+write">write</A></B>(2)
|
|
|
|
must fully contain the value to be written,
|
|
and multiple writes on the same file descriptor
|
|
will overwrite the entire value, regardless of the file position.
|
|
<DT id="793">0<DD>
|
|
(default) This provides the same behavior as for -1,
|
|
but printk warnings are written for processes that
|
|
perform writes when the file offset is not 0.
|
|
<DT id="794">1<DD>
|
|
Respect the file offset when writing strings into
|
|
<I>/proc/sys</I>
|
|
|
|
files.
|
|
Multiple writes will
|
|
<I>append</I>
|
|
|
|
to the value buffer.
|
|
Anything written beyond the maximum length
|
|
of the value buffer will be ignored.
|
|
Writes to numeric
|
|
<I>/proc/sys</I>
|
|
|
|
entries must always be at file offset 0 and the value must be
|
|
fully contained in the buffer provided to
|
|
<B><A HREF="/cgi-bin/man/man2html?2+write">write</A></B>(2).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="795"><I>/proc/sys/kernel/sysrq</I>
|
|
|
|
<DD>
|
|
This file controls the functions allowed to be invoked by the SysRq key.
|
|
By default,
|
|
the file contains 1 meaning that every possible SysRq request is allowed
|
|
(in older kernel versions, SysRq was disabled by default,
|
|
and you were required to specifically enable it at run-time,
|
|
but this is not the case any more).
|
|
Possible values in this file are:
|
|
<DL COMPACT><DT id="796"><DD>
|
|
<DL COMPACT>
|
|
<DT id="797">0<DD>
|
|
Disable sysrq completely
|
|
<DT id="798">1<DD>
|
|
Enable all functions of sysrq
|
|
<DT id="799">> 1<DD>
|
|
Bit mask of allowed sysrq functions, as follows:
|
|
|
|
<DL COMPACT><DT id="800"><DD>
|
|
<DL COMPACT>
|
|
<DT id="801"> 2<DD>
|
|
Enable control of console logging level
|
|
<DT id="802"> 4<DD>
|
|
Enable control of keyboard (SAK, unraw)
|
|
<DT id="803"> 8<DD>
|
|
Enable debugging dumps of processes etc.
|
|
<DT id="804"> 16<DD>
|
|
Enable sync command
|
|
<DT id="805"> 32<DD>
|
|
Enable remount read-only
|
|
<DT id="806"> 64<DD>
|
|
Enable signaling of processes (term, kill, oom-kill)
|
|
<DT id="807">128<DD>
|
|
Allow reboot/poweroff
|
|
<DT id="808">256<DD>
|
|
Allow nicing of all real-time tasks
|
|
</DL>
|
|
</DL>
|
|
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="809"><DD>
|
|
This file is present only if the
|
|
<B>CONFIG_MAGIC_SYSRQ</B>
|
|
|
|
kernel configuration option is enabled.
|
|
For further details see the Linux kernel source file
|
|
<I>Documentation/admin-guide/sysrq.rst</I>
|
|
|
|
|
|
(or
|
|
<I>Documentation/sysrq.txt</I>
|
|
|
|
before Linux 4.10).
|
|
<DT id="810"><I>/proc/sys/kernel/version</I>
|
|
|
|
<DD>
|
|
This file contains a string such as:
|
|
<DT id="811"><DD>
|
|
<BR> #5 Wed Feb 25 21:49:24 MET 1998
|
|
<DT id="812"><DD>
|
|
The "#5" means that
|
|
this is the fifth kernel built from this source base and the
|
|
date following it indicates the time the kernel was built.
|
|
<DT id="813"><I>/proc/sys/kernel/threads-max</I> (since Linux 2.3.11)
|
|
|
|
<DD>
|
|
|
|
This file specifies the system-wide limit on the number of
|
|
threads (tasks) that can be created on the system.
|
|
<DT id="814"><DD>
|
|
Since Linux 4.1,
|
|
|
|
the value that can be written to
|
|
<I>threads-max</I>
|
|
|
|
is bounded.
|
|
The minimum value that can be written is 20.
|
|
The maximum value that can be written is given by the
|
|
constant
|
|
<B>FUTEX_TID_MASK</B>
|
|
|
|
(0x3fffffff).
|
|
If a value outside of this range is written to
|
|
<I>threads-max</I>,
|
|
|
|
the error
|
|
<B>EINVAL</B>
|
|
|
|
occurs.
|
|
<DT id="815"><DD>
|
|
The value written is checked against the available RAM pages.
|
|
If the thread structures would occupy too much (more than 1/8th)
|
|
of the available RAM pages,
|
|
<I>threads-max</I>
|
|
|
|
is reduced accordingly.
|
|
<DT id="816"><I>/proc/sys/kernel/yama/ptrace_scope</I> (since Linux 3.5)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ptrace">ptrace</A></B>(2).
|
|
|
|
<DT id="817"><I>/proc/sys/kernel/zero-paged</I> (PowerPC only)
|
|
|
|
<DD>
|
|
This file
|
|
contains a flag.
|
|
When enabled (nonzero), Linux-PPC will pre-zero pages in
|
|
the idle loop, possibly speeding up get_free_pages.
|
|
<DT id="818"><I>/proc/sys/net</I>
|
|
|
|
<DD>
|
|
This directory contains networking stuff.
|
|
Explanations for some of the files under this directory can be found in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+tcp">tcp</A></B>(7)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?7+ip">ip</A></B>(7).
|
|
|
|
<DT id="819"><I>/proc/sys/net/core/bpf_jit_enable</I>
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?2+bpf">bpf</A></B>(2).
|
|
|
|
<DT id="820"><I>/proc/sys/net/core/somaxconn</I>
|
|
|
|
<DD>
|
|
This file defines a ceiling value for the
|
|
<I>backlog</I>
|
|
|
|
argument of
|
|
<B><A HREF="/cgi-bin/man/man2html?2+listen">listen</A></B>(2);
|
|
|
|
see the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+listen">listen</A></B>(2)
|
|
|
|
manual page for details.
|
|
<DT id="821"><I>/proc/sys/proc</I>
|
|
|
|
<DD>
|
|
This directory may be empty.
|
|
<DT id="822"><I>/proc/sys/sunrpc</I>
|
|
|
|
<DD>
|
|
This directory supports Sun remote procedure call for network filesystem
|
|
(NFS).
|
|
On some systems, it is not present.
|
|
<DT id="823"><I>/proc/sys/user</I> (since Linux 4.9)
|
|
|
|
<DD>
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+namespaces">namespaces</A></B>(7).
|
|
|
|
<DT id="824"><I>/proc/sys/vm</I>
|
|
|
|
<DD>
|
|
This directory contains files for memory management tuning, buffer and
|
|
cache management.
|
|
<DT id="825"><I>/proc/sys/vm/admin_reserve_kbytes</I> (since Linux 3.10)
|
|
|
|
<DD>
|
|
|
|
This file defines the amount of free memory (in KiB) on the system that
|
|
should be reserved for users with the capability
|
|
<B>CAP_SYS_ADMIN</B>.
|
|
|
|
<DT id="826"><DD>
|
|
The default value in this file is the minimum of [3% of free pages, 8MiB]
|
|
expressed as KiB.
|
|
The default is intended to provide enough for the superuser
|
|
to log in and kill a process, if necessary,
|
|
under the default overcommit 'guess' mode (i.e., 0 in
|
|
<I>/proc/sys/vm/overcommit_memory</I>).
|
|
|
|
<DT id="827"><DD>
|
|
Systems running in "overcommit never" mode (i.e., 2 in
|
|
<I>/proc/sys/vm/overcommit_memory</I>)
|
|
|
|
should increase the value in this file to account
|
|
for the full virtual memory size of the programs used to recover (e.g.,
|
|
<B><A HREF="/cgi-bin/man/man2html?1+login">login</A></B>(1)
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ssh">ssh</A></B>(1),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?1+top">top</A></B>(1))
|
|
|
|
Otherwise, the superuser may not be able to log in to recover the system.
|
|
For example, on x86-64 a suitable value is 131072 (128MiB reserved).
|
|
<DT id="828"><DD>
|
|
Changing the value in this file takes effect whenever
|
|
an application requests memory.
|
|
<DT id="829"><I>/proc/sys/vm/compact_memory</I> (since Linux 2.6.35)
|
|
|
|
<DD>
|
|
When 1 is written to this file, all zones are compacted such that free
|
|
memory is available in contiguous blocks where possible.
|
|
The effect of this action can be seen by examining
|
|
<I>/proc/buddyinfo</I>.
|
|
|
|
<DT id="830"><DD>
|
|
Present only if the kernel was configured with
|
|
<B>CONFIG_COMPACTION</B>.
|
|
|
|
<DT id="831"><I>/proc/sys/vm/drop_caches</I> (since Linux 2.6.16)
|
|
|
|
<DD>
|
|
Writing to this file causes the kernel to drop clean caches, dentries, and
|
|
inodes from memory, causing that memory to become free.
|
|
This can be useful for memory management testing and
|
|
performing reproducible filesystem benchmarks.
|
|
Because writing to this file causes the benefits of caching to be lost,
|
|
it can degrade overall system performance.
|
|
<DT id="832"><DD>
|
|
To free pagecache, use:
|
|
<DT id="833"><DD>
|
|
<BR> echo 1 > /proc/sys/vm/drop_caches
|
|
<DT id="834"><DD>
|
|
To free dentries and inodes, use:
|
|
<DT id="835"><DD>
|
|
<BR> echo 2 > /proc/sys/vm/drop_caches
|
|
<DT id="836"><DD>
|
|
To free pagecache, dentries and inodes, use:
|
|
<DT id="837"><DD>
|
|
<BR> echo 3 > /proc/sys/vm/drop_caches
|
|
<DT id="838"><DD>
|
|
Because writing to this file is a nondestructive operation and dirty objects
|
|
are not freeable, the
|
|
user should run
|
|
<B><A HREF="/cgi-bin/man/man2html?1+sync">sync</A></B>(1)
|
|
|
|
first.
|
|
<DT id="839"><I>/proc/sys/vm/legacy_va_layout</I> (since Linux 2.6.9)
|
|
|
|
<DD>
|
|
|
|
If nonzero, this disables the new 32-bit memory-mapping layout;
|
|
the kernel will use the legacy (2.4) layout for all processes.
|
|
<DT id="840"><I>/proc/sys/vm/memory_failure_early_kill</I> (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
|
|
Control how to kill processes when an uncorrected memory error
|
|
(typically a 2-bit error in a memory module)
|
|
that cannot be handled by the kernel
|
|
is detected in the background by hardware.
|
|
In some cases (like the page still having a valid copy on disk),
|
|
the kernel will handle the failure
|
|
transparently without affecting any applications.
|
|
But if there is no other up-to-date copy of the data,
|
|
it will kill processes to prevent any data corruptions from propagating.
|
|
<DT id="841"><DD>
|
|
The file has one of the following values:
|
|
<DL COMPACT><DT id="842"><DD>
|
|
<DL COMPACT>
|
|
<DT id="843">1:<DD>
|
|
Kill all processes that have the corrupted-and-not-reloadable page mapped
|
|
as soon as the corruption is detected.
|
|
Note that this is not supported for a few types of pages,
|
|
such as kernel internally
|
|
allocated data or the swap cache, but works for the majority of user pages.
|
|
<DT id="844">0:<DD>
|
|
Unmap the corrupted page from all processes and kill a process
|
|
only if it tries to access the page.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="845"><DD>
|
|
The kill is performed using a
|
|
<B>SIGBUS</B>
|
|
|
|
signal with
|
|
<I>si_code</I>
|
|
|
|
set to
|
|
<B>BUS_MCEERR_AO</B>.
|
|
|
|
Processes can handle this if they want to; see
|
|
<B><A HREF="/cgi-bin/man/man2html?2+sigaction">sigaction</A></B>(2)
|
|
|
|
for more details.
|
|
<DT id="846"><DD>
|
|
This feature is active only on architectures/platforms with advanced machine
|
|
check handling and depends on the hardware capabilities.
|
|
<DT id="847"><DD>
|
|
Applications can override the
|
|
<I>memory_failure_early_kill</I>
|
|
|
|
setting individually with the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prctl">prctl</A></B>(2)
|
|
|
|
<B>PR_MCE_KILL</B>
|
|
|
|
operation.
|
|
<DT id="848"><DD>
|
|
Present only if the kernel was configured with
|
|
<B>CONFIG_MEMORY_FAILURE</B>.
|
|
|
|
<DT id="849"><I>/proc/sys/vm/memory_failure_recovery</I> (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
|
|
Enable memory failure recovery (when supported by the platform)
|
|
<DL COMPACT><DT id="850"><DD>
|
|
<DL COMPACT>
|
|
<DT id="851">1:<DD>
|
|
Attempt recovery.
|
|
<DT id="852">0:<DD>
|
|
Always panic on a memory failure.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="853"><DD>
|
|
Present only if the kernel was configured with
|
|
<B>CONFIG_MEMORY_FAILURE</B>.
|
|
|
|
<DT id="854"><I>/proc/sys/vm/oom_dump_tasks</I> (since Linux 2.6.25)
|
|
|
|
<DD>
|
|
|
|
Enables a system-wide task dump (excluding kernel threads) to be
|
|
produced when the kernel performs an OOM-killing.
|
|
The dump includes the following information
|
|
for each task (thread, process):
|
|
thread ID, real user ID, thread group ID (process ID),
|
|
virtual memory size, resident set size,
|
|
the CPU that the task is scheduled on,
|
|
oom_adj score (see the description of
|
|
<I>/proc/[pid]/oom_adj</I>),
|
|
|
|
and command name.
|
|
This is helpful to determine why the OOM-killer was invoked
|
|
and to identify the rogue task that caused it.
|
|
<DT id="855"><DD>
|
|
If this contains the value zero, this information is suppressed.
|
|
On very large systems with thousands of tasks,
|
|
it may not be feasible to dump the memory state information for each one.
|
|
Such systems should not be forced to incur a performance penalty in
|
|
OOM situations when the information may not be desired.
|
|
<DT id="856"><DD>
|
|
If this is set to nonzero, this information is shown whenever the
|
|
OOM-killer actually kills a memory-hogging task.
|
|
<DT id="857"><DD>
|
|
The default value is 0.
|
|
<DT id="858"><I>/proc/sys/vm/oom_kill_allocating_task</I> (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
|
|
This enables or disables killing the OOM-triggering task in
|
|
out-of-memory situations.
|
|
<DT id="859"><DD>
|
|
If this is set to zero, the OOM-killer will scan through the entire
|
|
tasklist and select a task based on heuristics to kill.
|
|
This normally selects a rogue memory-hogging task that
|
|
frees up a large amount of memory when killed.
|
|
<DT id="860"><DD>
|
|
If this is set to nonzero, the OOM-killer simply kills the task that
|
|
triggered the out-of-memory condition.
|
|
This avoids a possibly expensive tasklist scan.
|
|
<DT id="861"><DD>
|
|
If
|
|
<I>/proc/sys/vm/panic_on_oom</I>
|
|
|
|
is nonzero, it takes precedence over whatever value is used in
|
|
<I>/proc/sys/vm/oom_kill_allocating_task</I>.
|
|
|
|
<DT id="862"><DD>
|
|
The default value is 0.
|
|
<DT id="863"><I>/proc/sys/vm/overcommit_kbytes</I> (since Linux 3.14)
|
|
|
|
<DD>
|
|
|
|
This writable file provides an alternative to
|
|
<I>/proc/sys/vm/overcommit_ratio</I>
|
|
|
|
for controlling the
|
|
<I>CommitLimit</I>
|
|
|
|
when
|
|
<I>/proc/sys/vm/overcommit_memory</I>
|
|
|
|
has the value 2.
|
|
It allows the amount of memory overcommitting to be specified as
|
|
an absolute value (in kB),
|
|
rather than as a percentage, as is done with
|
|
<I>overcommit_ratio</I>.
|
|
|
|
This allows for finer-grained control of
|
|
<I>CommitLimit</I>
|
|
|
|
on systems with extremely large memory sizes.
|
|
<DT id="864"><DD>
|
|
Only one of
|
|
<I>overcommit_kbytes</I>
|
|
|
|
or
|
|
<I>overcommit_ratio</I>
|
|
|
|
can have an effect:
|
|
if
|
|
<I>overcommit_kbytes</I>
|
|
|
|
has a nonzero value, then it is used to calculate
|
|
<I>CommitLimit</I>,
|
|
|
|
otherwise
|
|
<I>overcommit_ratio</I>
|
|
|
|
is used.
|
|
Writing a value to either of these files causes the
|
|
value in the other file to be set to zero.
|
|
<DT id="865"><I>/proc/sys/vm/overcommit_memory</I>
|
|
|
|
<DD>
|
|
This file contains the kernel virtual memory accounting mode.
|
|
Values are:
|
|
<DL COMPACT><DT id="866"><DD>
|
|
<DL COMPACT>
|
|
<DT id="867"><DD>
|
|
0: heuristic overcommit (this is the default)
|
|
<BR>
|
|
|
|
1: always overcommit, never check
|
|
<BR>
|
|
|
|
2: always check, never overcommit
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="868"><DD>
|
|
In mode 0, calls of
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2)
|
|
|
|
with
|
|
<B>MAP_NORESERVE</B>
|
|
|
|
are not checked, and the default check is very weak,
|
|
leading to the risk of getting a process "OOM-killed".
|
|
<DT id="869"><DD>
|
|
In mode 1, the kernel pretends there is always enough memory,
|
|
until memory actually runs out.
|
|
One use case for this mode is scientific computing applications
|
|
that employ large sparse arrays.
|
|
In Linux kernel versions before 2.6.0, any nonzero value implies mode 1.
|
|
<DT id="870"><DD>
|
|
In mode 2 (available since Linux 2.6), the total virtual address space
|
|
that can be allocated
|
|
(<I>CommitLimit</I>
|
|
|
|
in
|
|
<I>/proc/meminfo</I>)
|
|
|
|
is calculated as
|
|
<DT id="871"><DD>
|
|
<BR> CommitLimit = (total_RAM - total_huge_TLB) *
|
|
<BR> overcommit_ratio / 100 + total_swap
|
|
<DT id="872"><DD>
|
|
where:
|
|
<DL COMPACT><DT id="873"><DD>
|
|
<DL COMPACT>
|
|
<DT id="874">*<DD>
|
|
<I>total_RAM</I>
|
|
|
|
is the total amount of RAM on the system;
|
|
<DT id="875">*<DD>
|
|
<I>total_huge_TLB</I>
|
|
|
|
is the amount of memory set aside for huge pages;
|
|
<DT id="876">*<DD>
|
|
<I>overcommit_ratio</I>
|
|
|
|
is the value in
|
|
<I>/proc/sys/vm/overcommit_ratio</I>;
|
|
|
|
and
|
|
<DT id="877">*<DD>
|
|
<I>total_swap</I>
|
|
|
|
is the amount of swap space.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="878"><DD>
|
|
For example, on a system with 16GB of physical RAM, 16GB
|
|
of swap, no space dedicated to huge pages, and an
|
|
<I>overcommit_ratio</I>
|
|
|
|
of 50, this formula yields a
|
|
<I>CommitLimit</I>
|
|
|
|
of 24GB.
|
|
<DT id="879"><DD>
|
|
Since Linux 3.14, if the value in
|
|
<I>/proc/sys/vm/overcommit_kbytes</I>
|
|
|
|
is nonzero, then
|
|
<I>CommitLimit</I>
|
|
|
|
is instead calculated as:
|
|
<DT id="880"><DD>
|
|
<BR> CommitLimit = overcommit_kbytes + total_swap
|
|
<DT id="881"><DD>
|
|
See also the description of
|
|
<I>/proc/sys/vm/admin_reserve_kbytes</I>
|
|
|
|
and
|
|
<I>/proc/sys/vm/user_reserve_kbytes</I>.
|
|
|
|
<DT id="882"><I>/proc/sys/vm/overcommit_ratio</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
This writable file defines a percentage by which memory
|
|
can be overcommitted.
|
|
The default value in the file is 50.
|
|
See the description of
|
|
<I>/proc/sys/vm/overcommit_memory</I>.
|
|
|
|
<DT id="883"><I>/proc/sys/vm/panic_on_oom</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
This enables or disables a kernel panic in
|
|
an out-of-memory situation.
|
|
<DT id="884"><DD>
|
|
If this file is set to the value 0,
|
|
the kernel's OOM-killer will kill some rogue process.
|
|
Usually, the OOM-killer is able to kill a rogue process and the
|
|
system will survive.
|
|
<DT id="885"><DD>
|
|
If this file is set to the value 1,
|
|
then the kernel normally panics when out-of-memory happens.
|
|
However, if a process limits allocations to certain nodes
|
|
using memory policies
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+mbind">mbind</A></B>(2)
|
|
|
|
<B>MPOL_BIND</B>)
|
|
|
|
or cpusets
|
|
(<B><A HREF="/cgi-bin/man/man2html?7+cpuset">cpuset</A></B>(7))
|
|
|
|
and those nodes reach memory exhaustion status,
|
|
one process may be killed by the OOM-killer.
|
|
No panic occurs in this case:
|
|
because other nodes' memory may be free,
|
|
this means the system as a whole may not have reached
|
|
an out-of-memory situation yet.
|
|
<DT id="886"><DD>
|
|
If this file is set to the value 2,
|
|
the kernel always panics when an out-of-memory condition occurs.
|
|
<DT id="887"><DD>
|
|
The default value is 0.
|
|
1 and 2 are for failover of clustering.
|
|
Select either according to your policy of failover.
|
|
<DT id="888"><I>/proc/sys/vm/swappiness</I>
|
|
|
|
<DD>
|
|
|
|
The value in this file controls how aggressively the kernel will swap
|
|
memory pages.
|
|
Higher values increase aggressiveness, lower values
|
|
decrease aggressiveness.
|
|
The default value is 60.
|
|
<DT id="889"><I>/proc/sys/vm/user_reserve_kbytes</I> (since Linux 3.10)
|
|
|
|
<DD>
|
|
|
|
Specifies an amount of memory (in KiB) to reserve for user processes,
|
|
This is intended to prevent a user from starting a single memory hogging
|
|
process, such that they cannot recover (kill the hog).
|
|
The value in this file has an effect only when
|
|
<I>/proc/sys/vm/overcommit_memory</I>
|
|
|
|
is set to 2 ("overcommit never" mode).
|
|
In this case, the system reserves an amount of memory that is the minimum
|
|
of [3% of current process size,
|
|
<I>user_reserve_kbytes</I>].
|
|
|
|
<DT id="890"><DD>
|
|
The default value in this file is the minimum of [3% of free pages, 128MiB]
|
|
expressed as KiB.
|
|
<DT id="891"><DD>
|
|
If the value in this file is set to zero,
|
|
then a user will be allowed to allocate all free memory with a single process
|
|
(minus the amount reserved by
|
|
<I>/proc/sys/vm/admin_reserve_kbytes</I>).
|
|
|
|
Any subsequent attempts to execute a command will result in
|
|
"fork: Cannot allocate memory".
|
|
<DT id="892"><DD>
|
|
Changing the value in this file takes effect whenever
|
|
an application requests memory.
|
|
<DT id="893"><I>/proc/sys/vm/unprivileged_userfaultfd</I> (since Linux 5.2)
|
|
|
|
<DD>
|
|
|
|
This (writable) file exposes a flag that controls whether
|
|
unprivileged processes are allowed to employ
|
|
<B><A HREF="/cgi-bin/man/man2html?2+userfaultfd">userfaultfd</A></B>(2).
|
|
|
|
If this file has the value 1, then unprivileged processes may use
|
|
<B><A HREF="/cgi-bin/man/man2html?2+userfaultfd">userfaultfd</A></B>(2).
|
|
|
|
If this file has the value 0, then only processes that have the
|
|
<B>CAP_SYS_PTRACE</B>
|
|
|
|
capability may employ
|
|
<B><A HREF="/cgi-bin/man/man2html?2+userfaultfd">userfaultfd</A></B>(2).
|
|
|
|
The default value in this file is 1.
|
|
<DT id="894"><I>/proc/sysrq-trigger</I> (since Linux 2.4.21)
|
|
|
|
<DD>
|
|
Writing a character to this file triggers the same SysRq function as
|
|
typing ALT-SysRq-<character> (see the description of
|
|
<I>/proc/sys/kernel/sysrq</I>).
|
|
|
|
This file is normally writable only by
|
|
<I>root</I>.
|
|
|
|
For further details see the Linux kernel source file
|
|
<I>Documentation/admin-guide/sysrq.rst</I>
|
|
|
|
|
|
(or
|
|
<I>Documentation/sysrq.txt</I>
|
|
|
|
before Linux 4.10).
|
|
<DT id="895"><I>/proc/sysvipc</I>
|
|
|
|
<DD>
|
|
Subdirectory containing the pseudo-files
|
|
<I>msg</I>, <I>sem</I> and <I>shm</I>.
|
|
|
|
These files list the System V Interprocess Communication (IPC) objects
|
|
(respectively: message queues, semaphores, and shared memory)
|
|
that currently exist on the system,
|
|
providing similar information to that available via
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ipcs">ipcs</A></B>(1).
|
|
|
|
These files have headers and are formatted (one IPC object per line)
|
|
for easy understanding.
|
|
<B><A HREF="/cgi-bin/man/man2html?7+sysvipc">sysvipc</A></B>(7)
|
|
|
|
provides further background on the information shown by these files.
|
|
<DT id="896"><I>/proc/thread-self</I> (since Linux 3.17)
|
|
|
|
<DD>
|
|
|
|
This directory refers to the thread accessing the
|
|
<I>/proc</I>
|
|
|
|
filesystem,
|
|
and is identical to the
|
|
<I>/proc/self/task/[tid]</I>
|
|
|
|
directory named by the process thread ID
|
|
(<I>[tid]</I>)
|
|
|
|
of the same thread.
|
|
<DT id="897"><I>/proc/timer_list</I> (since Linux 2.6.21)
|
|
|
|
<DD>
|
|
|
|
This read-only file exposes a list of all currently pending
|
|
(high-resolution) timers,
|
|
all clock-event sources, and their parameters in a human-readable form.
|
|
<DT id="898"><I>/proc/timer_stats</I> (from Linux 2.6.21 until Linux 4.10)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
This is a debugging facility to make timer (ab)use in a Linux
|
|
system visible to kernel and user-space developers.
|
|
It can be used by kernel and user-space developers to verify that
|
|
their code does not make undue use of timers.
|
|
The goal is to avoid unnecessary wakeups,
|
|
thereby optimizing power consumption.
|
|
<DT id="899"><DD>
|
|
If enabled in the kernel
|
|
(<B>CONFIG_TIMER_STATS</B>),
|
|
|
|
but not used,
|
|
it has almost zero run-time overhead and a relatively small
|
|
data-structure overhead.
|
|
Even if collection is enabled at run time, overhead is low:
|
|
all the locking is per-CPU and lookup is hashed.
|
|
<DT id="900"><DD>
|
|
The
|
|
<I>/proc/timer_stats</I>
|
|
|
|
file is used both to control sampling facility and to read out the
|
|
sampled information.
|
|
<DT id="901"><DD>
|
|
The
|
|
<I>timer_stats</I>
|
|
|
|
functionality is inactive on bootup.
|
|
A sampling period can be started using the following command:
|
|
<DT id="902"><DD>
|
|
|
|
|
|
# echo 1 > /proc/timer_stats
|
|
|
|
|
|
<DT id="903"><DD>
|
|
The following command stops a sampling period:
|
|
<DT id="904"><DD>
|
|
|
|
|
|
# echo 0 > /proc/timer_stats
|
|
|
|
|
|
<DT id="905"><DD>
|
|
The statistics can be retrieved by:
|
|
<DT id="906"><DD>
|
|
|
|
|
|
$ cat /proc/timer_stats
|
|
|
|
|
|
<DT id="907"><DD>
|
|
While sampling is enabled, each readout from
|
|
<I>/proc/timer_stats</I>
|
|
|
|
will see
|
|
newly updated statistics.
|
|
Once sampling is disabled, the sampled information
|
|
is kept until a new sample period is started.
|
|
This allows multiple readouts.
|
|
<DT id="908"><DD>
|
|
Sample output from
|
|
<I>/proc/timer_stats</I>:
|
|
|
|
<DT id="909"><DD>
|
|
|
|
|
|
$<B> cat /proc/timer_stats</B>
|
|
|
|
Timer Stats Version: v0.3
|
|
Sample period: 1.764 s
|
|
Collection: active
|
|
<BR> 255, 0 swapper/3 hrtimer_start_range_ns (tick_sched_timer)
|
|
<BR> 71, 0 swapper/1 hrtimer_start_range_ns (tick_sched_timer)
|
|
<BR> 58, 0 swapper/0 hrtimer_start_range_ns (tick_sched_timer)
|
|
<BR> 4, 1694 gnome-shell mod_delayed_work_on (delayed_work_timer_fn)
|
|
<BR> 17, 7 rcu_sched rcu_gp_kthread (process_timeout)
|
|
...
|
|
<BR> 1, 4911 kworker/u16:0 mod_delayed_work_on (delayed_work_timer_fn)
|
|
<BR> 1D, 2522 kworker/0:0 queue_delayed_work_on (delayed_work_timer_fn)
|
|
1029 total events, 583.333 events/sec
|
|
|
|
|
|
<DT id="910"><DD>
|
|
The output columns are:
|
|
<DL COMPACT><DT id="911"><DD>
|
|
<DL COMPACT>
|
|
<DT id="912">*<DD>
|
|
a count of the number of events,
|
|
optionally (since Linux 2.6.23) followed by the letter 'D'
|
|
|
|
if this is a deferrable timer;
|
|
<DT id="913">*<DD>
|
|
the PID of the process that initialized the timer;
|
|
<DT id="914">*<DD>
|
|
the name of the process that initialized the timer;
|
|
<DT id="915">*<DD>
|
|
the function where the timer was initialized; and
|
|
<DT id="916">*<DD>
|
|
(in parentheses)
|
|
the callback function that is associated with the timer.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="917"><DD>
|
|
During the Linux 4.11 development cycle,
|
|
this file was removed because of security concerns,
|
|
as it exposes information across namespaces.
|
|
Furthermore, it is possible to obtain
|
|
the same information via in-kernel tracing facilities such as ftrace.
|
|
<DT id="918"><I>/proc/tty</I>
|
|
|
|
<DD>
|
|
Subdirectory containing the pseudo-files and subdirectories for
|
|
tty drivers and line disciplines.
|
|
<DT id="919"><I>/proc/uptime</I>
|
|
|
|
<DD>
|
|
This file contains two numbers (values in seconds): the uptime of the
|
|
system (including time spent in suspend) and the amount of time spent
|
|
in the idle process.
|
|
<DT id="920"><I>/proc/version</I>
|
|
|
|
<DD>
|
|
This string identifies the kernel version that is currently running.
|
|
It includes the contents of
|
|
<I>/proc/sys/kernel/ostype</I>,
|
|
|
|
<I>/proc/sys/kernel/osrelease</I>
|
|
|
|
and
|
|
<I>/proc/sys/kernel/version</I>.
|
|
|
|
For example:
|
|
<DT id="921"><DD>
|
|
|
|
|
|
Linux version 1.0.9 (<A HREF="mailto:quinlan@phaze">quinlan@phaze</A>) #1 Sat May 14 01:51:54 EDT 1994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="922"><I>/proc/vmstat</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
This file displays various virtual memory statistics.
|
|
Each line of this file contains a single name-value pair,
|
|
delimited by white space.
|
|
Some lines are present only if the kernel was configured with
|
|
suitable options.
|
|
(In some cases, the options required for particular files have changed
|
|
across kernel versions, so they are not listed here.
|
|
Details can be found by consulting the kernel source code.)
|
|
The following fields may be present:
|
|
|
|
<DL COMPACT><DT id="923"><DD>
|
|
<DL COMPACT>
|
|
<DT id="924"><I>nr_free_pages</I> (since Linux 2.6.31)
|
|
|
|
<DD>
|
|
|
|
<DT id="925"><I>nr_alloc_batch</I> (since Linux 3.12)
|
|
|
|
<DD>
|
|
|
|
<DT id="926"><I>nr_inactive_anon</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
<DT id="927"><I>nr_active_anon</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
<DT id="928"><I>nr_inactive_file</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
<DT id="929"><I>nr_active_file</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
<DT id="930"><I>nr_unevictable</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
<DT id="931"><I>nr_mlock</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
<DT id="932"><I>nr_anon_pages</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
<DT id="933"><I>nr_mapped</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
<DT id="934"><I>nr_file_pages</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
<DT id="935"><I>nr_dirty</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
<DT id="936"><I>nr_writeback</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
<DT id="937"><I>nr_slab_reclaimable</I> (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="938"><I>nr_slab_unreclaimable</I> (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
|
|
<DT id="939"><I>nr_page_table_pages</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
<DT id="940"><I>nr_kernel_stack</I> (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
|
|
Amount of memory allocated to kernel stacks.
|
|
<DT id="941"><I>nr_unstable</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
<DT id="942"><I>nr_bounce</I> (since Linux 2.6.12)
|
|
|
|
<DD>
|
|
|
|
<DT id="943"><I>nr_vmscan_write</I> (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
|
|
<DT id="944"><I>nr_vmscan_immediate_reclaim</I> (since Linux 3.2)
|
|
|
|
<DD>
|
|
|
|
<DT id="945"><I>nr_writeback_temp</I> (since Linux 2.6.26)
|
|
|
|
<DD>
|
|
|
|
<DT id="946"><I>nr_isolated_anon</I> (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
|
|
<DT id="947"><I>nr_isolated_file</I> (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
|
|
<DT id="948"><I>nr_shmem</I> (since Linux 2.6.32)
|
|
|
|
<DD>
|
|
|
|
Pages used by shmem and
|
|
<B><A HREF="/cgi-bin/man/man2html?5+tmpfs">tmpfs</A></B>(5).
|
|
|
|
<DT id="949"><I>nr_dirtied</I> (since Linux 2.6.37)
|
|
|
|
<DD>
|
|
|
|
<DT id="950"><I>nr_written</I> (since Linux 2.6.37)
|
|
|
|
<DD>
|
|
|
|
<DT id="951"><I>nr_pages_scanned</I> (since Linux 3.17)
|
|
|
|
<DD>
|
|
|
|
<DT id="952"><I>numa_hit</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="953"><I>numa_miss</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="954"><I>numa_foreign</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="955"><I>numa_interleave</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="956"><I>numa_local</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="957"><I>numa_other</I> (since Linux 2.6.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="958"><I>workingset_refault</I> (since Linux 3.15)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="959"><I>workingset_activate</I> (since Linux 3.15)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="960"><I>workingset_nodereclaim</I> (since Linux 3.15)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="961"><I>nr_anon_transparent_hugepages</I> (since Linux 2.6.38)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="962"><I>nr_free_cma</I> (since Linux 3.7)
|
|
|
|
<DD>
|
|
|
|
Number of free CMA (Contiguous Memory Allocator) pages.
|
|
|
|
|
|
<DT id="963"><I>nr_dirty_threshold</I> (since Linux 2.6.37)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="964"><I>nr_dirty_background_threshold</I> (since Linux 2.6.37)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="965"><I>pgpgin</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="966"><I>pgpgout</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="967"><I>pswpin</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="968"><I>pswpout</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="969"><I>pgalloc_dma</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="970"><I>pgalloc_dma32</I> (since Linux 2.6.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="971"><I>pgalloc_normal</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="972"><I>pgalloc_high</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="973"><I>pgalloc_movable</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="974"><I>pgfree</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="975"><I>pgactivate</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="976"><I>pgdeactivate</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="977"><I>pgfault</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="978"><I>pgmajfault</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="979"><I>pgrefill_dma</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="980"><I>pgrefill_dma32</I> (since Linux 2.6.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="981"><I>pgrefill_normal</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="982"><I>pgrefill_high</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="983"><I>pgrefill_movable</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="984"><I>pgsteal_kswapd_dma</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="985"><I>pgsteal_kswapd_dma32</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="986"><I>pgsteal_kswapd_normal</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="987"><I>pgsteal_kswapd_high</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="988"><I>pgsteal_kswapd_movable</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="989"><I>pgsteal_direct_dma</I>
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="990"><I>pgsteal_direct_dma32</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="991"><I>pgsteal_direct_normal</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="992"><I>pgsteal_direct_high</I> (since Linux 3.4)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="993"><I>pgsteal_direct_movable</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="994"><I>pgscan_kswapd_dma</I>
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="995"><I>pgscan_kswapd_dma32</I> (since Linux 2.6.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="996"><I>pgscan_kswapd_normal</I> (since Linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="997"><I>pgscan_kswapd_high</I>
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="998"><I>pgscan_kswapd_movable</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="999"><I>pgscan_direct_dma</I>
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1000"><I>pgscan_direct_dma32</I> (since Linux 2.6.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1001"><I>pgscan_direct_normal</I>
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1002"><I>pgscan_direct_high</I>
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="1003"><I>pgscan_direct_movable</I> (since Linux 2.6.23)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1004"><I>pgscan_direct_throttle</I> (since Linux 3.6)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1005"><I>zone_reclaim_failed</I> (since linux 2.6.31)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1006"><I>pginodesteal</I> (since linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1007"><I>slabs_scanned</I> (since linux 2.6.5)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1008"><I>kswapd_inodesteal</I> (since linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1009"><I>kswapd_low_wmark_hit_quickly</I> (since 2.6.33)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1010"><I>kswapd_high_wmark_hit_quickly</I> (since 2.6.33)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1011"><I>pageoutrun</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1012"><I>allocstall</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1013"><I>pgrotated</I> (since Linux 2.6.0)
|
|
|
|
<DD>
|
|
|
|
|
|
<DT id="1014"><I>drop_pagecache</I> (since Linux 3.15)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1015"><I>drop_slab</I> (since Linux 3.15)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1016"><I>numa_pte_updates</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1017"><I>numa_huge_pte_updates</I> (since Linux 3.13)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1018"><I>numa_hint_faults</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1019"><I>numa_hint_faults_local</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1020"><I>numa_pages_migrated</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1021"><I>pgmigrate_success</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1022"><I>pgmigrate_fail</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1023"><I>compact_migrate_scanned</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1024"><I>compact_free_scanned</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1025"><I>compact_isolated</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1026"><I>compact_stall</I> (since Linux 2.6.35)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1027"><I>compact_fail</I> (since Linux 2.6.35)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1028"><I>compact_success</I> (since Linux 2.6.35)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1029"><I>htlb_buddy_alloc_success</I> (since Linux 2.6.26)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1030"><I>htlb_buddy_alloc_fail</I> (since Linux 2.6.26)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1031"><I>unevictable_pgs_culled</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1032"><I>unevictable_pgs_scanned</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1033"><I>unevictable_pgs_rescued</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1034"><I>unevictable_pgs_mlocked</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1035"><I>unevictable_pgs_munlocked</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1036"><I>unevictable_pgs_cleared</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1037"><I>unevictable_pgs_stranded</I> (since Linux 2.6.28)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
<DT id="1038"><I>thp_fault_alloc</I> (since Linux 2.6.39)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1039"><I>thp_fault_fallback</I> (since Linux 2.6.39)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1040"><I>thp_collapse_alloc</I> (since Linux 2.6.39)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1041"><I>thp_collapse_alloc_failed</I> (since Linux 2.6.39)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1042"><I>thp_split</I> (since Linux 2.6.39)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1043"><I>thp_zero_page_alloc</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1044"><I>thp_zero_page_alloc_failed</I> (since Linux 3.8)
|
|
|
|
<DD>
|
|
|
|
See the kernel source file
|
|
<I>Documentation/admin-guide/mm/transhuge.rst</I>.
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1045"><I>balloon_inflate</I> (since Linux 3.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1046"><I>balloon_deflate</I> (since Linux 3.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1047"><I>balloon_migrate</I> (since Linux 3.18)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1048"><I>nr_tlb_remote_flush</I> (since Linux 3.12)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1049"><I>nr_tlb_remote_flush_received</I> (since Linux 3.12)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
|
|
<DT id="1050"><I>nr_tlb_local_flush_all</I> (since Linux 3.12)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1051"><I>nr_tlb_local_flush_one</I> (since Linux 3.12)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1052"><I>vmacache_find_calls</I> (since Linux 3.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1053"><I>vmacache_find_hits</I> (since Linux 3.16)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
<DT id="1054"><I>vmacache_full_flushes</I> (since Linux 3.19)
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="1055"><I>/proc/zoneinfo</I> (since Linux 2.6.13)
|
|
|
|
<DD>
|
|
This file display information about memory zones.
|
|
This is useful for analyzing virtual memory behavior.
|
|
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
Many files contain strings (e.g., the environment and command line)
|
|
that are in the internal format,
|
|
with subfields terminated by null bytes ('\0').
|
|
When inspecting such files, you may find that the results are more readable
|
|
if you use a command of the following form to display them:
|
|
<P>
|
|
|
|
|
|
|
|
$<B> cat </B><I>file</I> | tr '\000' '\n'
|
|
|
|
|
|
|
|
<P>
|
|
|
|
This manual page is incomplete, possibly inaccurate, and is the kind
|
|
of thing that needs to be updated very often.
|
|
|
|
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+cat">cat</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dmesg">dmesg</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+find">find</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+free">free</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+htop">htop</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+init">init</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ps">ps</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pstree">pstree</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tr">tr</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+uptime">uptime</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+chroot">chroot</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+mmap">mmap</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+readlink">readlink</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+syslog">syslog</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+slabinfo">slabinfo</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+sysfs">sysfs</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+hier">hier</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+namespaces">namespaces</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+time">time</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+arp">arp</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+hdparm">hdparm</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+ifconfig">ifconfig</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lsmod">lsmod</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+lspci">lspci</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+netstat">netstat</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+procinfo">procinfo</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+route">route</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+sysctl">sysctl</A></B>(8)
|
|
|
|
<P>
|
|
|
|
The Linux kernel source files:
|
|
<I>Documentation/filesystems/proc.txt</I>,
|
|
|
|
<I>Documentation/sysctl/fs.txt</I>,
|
|
|
|
<I>Documentation/sysctl/kernel.txt</I>,
|
|
|
|
<I>Documentation/sysctl/net.txt</I>,
|
|
|
|
and
|
|
<I>Documentation/sysctl/vm.txt</I>.
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1056"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="1057"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="1058"><A HREF="#lbAD">Mount options</A><DD>
|
|
<DT id="1059"><A HREF="#lbAE">Overview</A><DD>
|
|
<DT id="1060"><A HREF="#lbAF">Files and directories</A><DD>
|
|
</DL>
|
|
<DT id="1061"><A HREF="#lbAG">NOTES</A><DD>
|
|
<DT id="1062"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="1063"><A HREF="#lbAI">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:04 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|