nonroot users into the
.BR sudoers (5)
file.
+.\"
+.SS Overview
+Underneath
+.IR /proc ,
+there are the following general groups of files and subdirectories:
+.TP
+.IR /proc/[pid] " subdirectories"
+Each one of these subdirectories contains files and subdirectories
+exposing information about the process with the corresponding process ID.
+.IP
+Underneath each of the
+.I /proc/[pid]
+directories, a
+.I task
+subdirectory contains subdirectories of the form
+.IR task/[tid] ,
+which contain corresponding information about each of the threads
+in the process, where
+.I tid
+is the kernel thread ID of the thread.
+.IP
+The
+.I /proc/[pid]
+subdirectories are visible when iterating through
+.I /proc
+with
+.BR getdents (2)
+(and thus are visible when one uses
+.BR ls (1)
+to view the contents of
+.IR /proc ).
+.TP
+.IR /proc/[tid] " subdirectories"
+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
+.IR /proc/[pid]/task/[tid]
+directories.
+.IP
+The
+.I /proc/[tid]
+subdirectories are
+.I not
+visible when iterating through
+.I /proc
+with
+.BR getdents (2)
+(and thus are
+.I not
+visible when one uses
+.BR ls (1)
+to view the contents of
+.IR /proc ).
+.TP
+.I /proc/self
+When a process accesses this magic symbolic link,
+it resolves to the process's own
+.I /proc/[pid]
+directory.
+.TP
+.I /proc/thread-self
+When a thread accesses this magic symbolic link,
+it resolves to the process's own
+.I /proc/self/task/[tid]
+directory.
+.TP
+.I /proc/[a-z]*
+Various other files and subdirectories under
+.I /proc
+expose system-wide information.
+.PP
+All of the above are described in more detail below.
+.\"
.SS Files and directories
-The following list describes many of the files and directories under the
+The following list provides details of many of the files and directories
+under the
.I /proc
hierarchy.
.TP
See
.BR sched (7).
.TP
-.IR /proc/[pid]/auxv " (since 2.6.0-test7)"
+.IR /proc/[pid]/auxv " (since 2.6.0)"
+.\" Precisely: Linux 2.6.0-test7
This contains the contents of the ELF interpreter information passed
to the process at exec time.
The format is one \fIunsigned long\fP ID
.IP
.in +4n
.EX
-.RB "$" " strings /proc/1/environ"
+.RB "$" " cat /proc/1/environ | tr \(aq\e000\(aq \(aq\en\(aq"
.EE
.in
.IP
For timerfd file descriptors (see
.BR timerfd (2)),
we see (since Linux 3.17)
+.\" commit af9c4957cf212ad9cf0bee34c95cb11de5426e85
the following fields:
.IP
.in +4n
it_interval: (0, 0)
.EE
.in
-.IP
+.RS
+.TP
.I clockid
-is the numeric value of the clock constant used to mark the progress of the timer
-(in this example, 0 is
+This is the numeric value of the clock ID
+(corresponding to one of the
+.B CLOCK_*
+constants defined via
+.IR <time.h> )
+that is used to mark the progress of the timer (in this example, 0 is
.BR CLOCK_REALTIME ).
+.TP
.I ticks
-is the number of timer expirations that have occurred,
-i.e. the value that
+This is the number of timer expirations that have occurred,
+(i.e., the value that
.BR read (2)
-on it would return.
+on it would return).
+.TP
.I settime flags
-lists the flags with which the timerfd was last armed (see
+This field lists the flags with which the timerfd was last armed (see
.BR timerfd_settime (2)),
in octal
(in this example, both
and
.B TFD_TIMER_CANCEL_ON_SET
are set).
+.TP
.I it_value
-contains the amount of time until the timer will next expire, and
+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
+flag.
+.TP
.I it_interval
-contains the interval of the timer,
-both in seconds and nanoseconds,
-i.e. the values that
+This field contains the interval of the timer,
+in seconds and nanoseconds.
+(The
+.I it_value
+and
+.I it_interval
+fields contain the values that
.BR timerfd_gettime (2)
-on this file descriptor would return.
+on this file descriptor would return.)
+.RE
.TP
.IR /proc/[pid]/gid_map " (since Linux 3.5)"
See
.IR [stack]
The initial process's (also known as the main thread's) stack.
.TP
-.IR [stack:<tid>] " (since Linux 3.4)"
-.\" commit b76437579d1344b612cf1851ae610c636cec7db0
+.IR [stack:<tid>] " (from Linux 3.4 to 4.4)"
+.\" commit b76437579d1344b612cf1851ae610c636cec7db0 (added)
+.\" commit 65376df582174ffcec9e6471bf5b0dd79ba05e4a (removed)
A thread's stack (where the
.IR <tid>
is a thread ID).
It corresponds to the
.IR /proc/[pid]/task/[tid]/
path.
+This field was removed in Linux 4.5, since providing this information
+for a process with large numbers of threads is expensive.
.TP
.IR [vdso]
The virtual dynamically linked shared object.
to the process's root directory.
.TP
(6)
-mount options: per-mount options.
+mount options: per-mount options (see
+.BR mount (2)).
.TP
(7)
optional fields: zero or more fields of the form "tag[:value]"; see below.
mount source: filesystem-specific information or "none".
.TP
(11)
-super options: per-superblock options.
+super options: per-superblock options (see
+.BR mount (2)).
.RE
.IP
Currently, the possible optional fields are
55 (since Linux 3.11)
PTE is soft-dirty
(see the kernel source file
-.IR Documentation/vm/soft-dirty.txt ).
+.IR Documentation/admin-guide/mm/soft-dirty.rst ).
.TP
54\(en0
If the page is present in RAM (bit 63), then these bits
VmPMD: 12 kB
VmSwap: 0 kB
HugetlbPages: 0 kB # 4.4
+CoreDumping: 0 # 4.15
Threads: 1
SigQ: 0/3067
SigPnd: 0000000000000000
.IP *
.IR VmPMD :
.\" commit dc6c9a35b66b520cf67e05d8ca60ebecad3b0479
-Size of second-level page tables (since Linux 4.0).
+Size of second-level page tables (added in Linux 4.0; removed in Linux 4.15).
.IP *
.IR VmSwap :
.\" commit b084d4353ff99d824d3bc5a5c2c22c70b1fba722
shmem swap usage is not included (since Linux 2.6.34).
.IP *
.IR HugetlbPages :
-Size of hugetlb memory portions.
+Size of hugetlb memory portions
.\" commit 5d317b2b6536592a9b51fe65faed43d65ca9158e
(since Linux 4.4).
.IP *
+.IR CoreDumping :
+Contains the value 1 if the process is currently dumping core,
+and 0 if it is not
+.\" commit c643401218be0f4ab3522e0c0a63016596d6e9ca
+(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.
+.IP *
.IR Threads :
Number of threads in process containing this thread.
.IP *
check; see
.BR ptrace (2).
.TP
-.IR /proc/[pid]/task " (since Linux 2.6.0-test6)"
+.IR /proc/[pid]/task " (since Linux 2.6.0)"
+.\" Precisely: Linux 2.6.0-test6
This is a directory that contains one subdirectory
for each thread in the process.
The name of each subdirectory is the numerical thread ID
.RI ( [tid] )
of the thread (see
.BR gettid (2)).
+.IP
Within each of these subdirectories, there is a set of
files with the same names and contents as under the
.I /proc/[pid]
or they might not exist in
.I /proc/[pid]
at all.
+.IP
.\" The following was still true as at kernel 2.6.13
In a multithreaded process, the contents of the
.I /proc/[pid]/task
check; see
.BR ptrace (2).
.TP
+.IR /proc/[tid]
+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
+.IR tid .
+The contents of these directories are the same as the corresponding
+.IR /proc/[pid]/task/[tid]
+directories.
+.IP
+The
+.I /proc/[tid]
+subdirectories are
+.I not
+visible when iterating through
+.I /proc
+with
+.BR getdents (2)
+(and thus are
+.I not
+visible when one uses
+.BR ls (1)
+to view the contents of
+.IR /proc ).
+However, the pathnames of these directories are visible to
+(i.e., usable as arguments in)
+system calls that operate on pathnames.
+.TP
.I /proc/apm
Advanced power management version and battery information when
.B CONFIG_APM
.IP
For further details on the meanings of these bits,
see the kernel source file
-.IR Documentation/vm/pagemap.txt .
+.IR Documentation/admin-guide/mm/pagemap.rst .
Before kernel 2.6.29,
.\" commit ad3bdefe877afb47480418fdb05ecd42842de65e
.\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110
.BR tmpfs (5)
filesystems.
.TP
+.IR KReclaimable " %lu (since Linux 4.20)"
+Kernel allocations that the kernel will attempt to reclaim
+under memory pressure.
+Includes
+.I SReclaimable
+(below), and other direct allocations with a shrinker.
+.TP
.IR Slab " %lu"
In-kernel data structures cache.
(See
The limit is calculated according to the formula described under
.IR /proc/sys/vm/overcommit_memory .
For further details, see the kernel source file
-.IR Documentation/vm/overcommit-accounting .
+.IR Documentation/vm/overcommit-accounting.rst .
.TP
.IR Committed_AS " %lu"
The amount of memory presently allocated on the system.
.TP
.IR VmallocUsed " %lu"
Amount of vmalloc area which is used.
+Since Linux 4.4,
+.\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
+this field is no longer calculated, and is hard coded as 0.
+See
+.IR /proc/vmallocinfo .
.TP
.IR VmallocChunk " %lu"
Largest contiguous block of vmalloc area which is free.
+Since Linux 4.4,
+.\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
+this field is no longer calculated and is hard coded as 0.
+See
+.IR /proc/vmallocinfo .
.TP
.IR HardwareCorrupted " %lu (since Linux 2.6.32)"
(\fBCONFIG_MEMORY_FAILURE\fP is required.)
[To be documented.]
.TP
+.IR LazyFree " %lu (since Linux 4.12)"
+Shows the amount of memory marked by
+.BR madvise (2)
+.BR MADV_FREE .
+.TP
.IR AnonHugePages " %lu (since Linux 2.6.38)"
(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
Non-file backed huge pages mapped into user-space page tables.
in certain conditions.
.RE
.TP
-.IR irq " (since Linux 2.6.0-test4)"
+.IR irq " (since Linux 2.6.0)"
+.\" Precisely: Linux 2.6.0-test4
(6) Time servicing interrupts.
.TP
-.IR softirq " (since Linux 2.6.0-test4)"
+.IR softirq " (since Linux 2.6.0"
+.\" Precisely: Linux 2.6.0-test4
(7) Time servicing softirqs.
.TP
.IR steal " (since Linux 2.6.11)"
tty drivers and line disciplines.
.TP
.I /proc/uptime
-This file contains two numbers: the uptime of the system (seconds),
-and the amount of time spent in idle process (seconds).
+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.
.TP
.I /proc/version
This string identifies the kernel version that is currently running.
.IR compact_stall " (since Linux 2.6.35)"
.\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR compact_fail " (since Linux 2.6.35)"
.\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR compact_success " (since Linux 2.6.35)"
.\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_fault_alloc " (since Linux 2.6.39)"
.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_fault_fallback " (since Linux 2.6.39)"
.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_collapse_alloc " (since Linux 2.6.39)"
.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_collapse_alloc_failed " (since Linux 2.6.39)"
.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_split " (since Linux 2.6.39)"
.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_zero_page_alloc " (since Linux 3.8)"
.\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
.IR thp_zero_page_alloc_failed " (since Linux 3.8)"
.\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76
See the kernel source file
-.IR Documentation/vm/transhuge.txt .
+.IR Documentation/admin-guide/mm/transhuge.rst .
.\" Present only if the kernel was configured with
.\" .BR CONFIG_VM_EVENT_COUNTERS
.\" and
This is useful for analyzing virtual memory behavior.
.\" FIXME more should be said about /proc/zoneinfo
.SH NOTES
-Many strings (i.e., the environment and command line) are in
-the internal format, with subfields terminated by null bytes (\(aq\\0\(aq),
-so you
-may find that things are more readable if you use \fIod \-c\fP or \fItr
-"\\000" "\\n"\fP to read them.
-Alternatively, \fIecho \`cat <file>\`\fP works well.
+Many files contain strings (e.g., the environment and command line)
+that are in the internal format,
+with subfields terminated by null bytes (\(aq\\0\(aq).
+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:
+.PP
+.in +4n
+.EX
+.RB "$" " cat \fIfile\fP | tr \(aq\e000\(aq \(aq\en\(aq"
+.EE
+.in
.PP
This manual page is incomplete, possibly inaccurate, and is the kind
of thing that needs to be updated very often.
.BR dmesg (1),
.BR find (1),
.BR free (1),
+.BR htop (1),
.BR init (1),
.BR ps (1),
+.BR pstree (1),
.BR tr (1),
.BR uptime (1),
.BR chroot (2),