]> git.ipfire.org Git - thirdparty/man-pages.git/blame_incremental - man5/proc.5
ioctl_tty.2: ffix
[thirdparty/man-pages.git] / man5 / proc.5
... / ...
CommitLineData
1.\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com)
2.\" and Copyright (C) 2002-2008,2017 Michael Kerrisk <mtk.manpages@gmail.com>
3.\" with networking additions from Alan Cox (A.Cox@swansea.ac.uk)
4.\" and scsi additions from Michael Neuffer (neuffer@mail.uni-mainz.de)
5.\" and sysctl additions from Andries Brouwer (aeb@cwi.nl)
6.\" and System V IPC (as well as various other) additions from
7.\" Michael Kerrisk <mtk.manpages@gmail.com>
8.\"
9.\" SPDX-License-Identifier: GPL-2.0-or-later
10.\"
11.\" Modified 1995-05-17 by faith@cs.unc.edu
12.\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com).
13.\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl
14.\" Modified 2001-12-16 by rwhron@earthlink.net
15.\" Modified 2002-07-13 by jbelton@shaw.ca
16.\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25
17.\" by Michael Kerrisk <mtk.manpages@gmail.com>
18.\" 2004-11-17, mtk -- updated notes on /proc/loadavg
19.\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8
20.\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list
21.\" 2005-05-12, mtk, updated 'stat'
22.\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/*
23.\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable
24.\" 2005-09-19, mtk, added /proc/zoneinfo
25.\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7.
26.\" 2008-06-05, mtk, Added /proc/[pid]/oom_score, /proc/[pid]/oom_adj,
27.\" /proc/[pid]/limits, /proc/[pid]/mountinfo, /proc/[pid]/mountstats,
28.\" and /proc/[pid]/fdinfo/*.
29.\" 2008-06-19, mtk, Documented /proc/[pid]/status.
30.\" 2008-07-15, mtk, added /proc/config.gz
31.\"
32.\" FIXME cross check against Documentation/filesystems/proc.txt
33.\" to see what information could be imported from that file
34.\" into this file.
35.\"
36.TH PROC 5 2021-08-27 "Linux" "Linux Programmer's Manual"
37.SH NAME
38proc \- process information pseudo-filesystem
39.SH DESCRIPTION
40The
41.B proc
42filesystem is a pseudo-filesystem which provides an interface to
43kernel data structures.
44It is commonly mounted at
45.IR /proc .
46Typically, it is mounted automatically by the system,
47but it can also be mounted manually using a command such as:
48.PP
49.in +4n
50.EX
51mount \-t proc proc /proc
52.EE
53.in
54.PP
55Most of the files in the
56.B proc
57filesystem are read-only,
58but some files are writable, allowing kernel variables to be changed.
59.\"
60.SS Mount options
61The
62.B proc
63filesystem supports the following mount options:
64.TP
65.BR hidepid "=\fIn\fP (since Linux 3.3)"
66.\" commit 0499680a42141d86417a8fbaa8c8db806bea1201
67This option controls who can access the information in
68.IR /proc/[pid]
69directories.
70The argument,
71.IR n ,
72is one of the following values:
73.RS
74.TP 4
750
76Everybody may access all
77.IR /proc/[pid]
78directories.
79This is the traditional behavior,
80and the default if this mount option is not specified.
81.TP
821
83Users may not access files and subdirectories inside any
84.IR /proc/[pid]
85directories but their own (the
86.IR /proc/[pid]
87directories themselves remain visible).
88Sensitive files such as
89.IR /proc/[pid]/cmdline
90and
91.IR /proc/[pid]/status
92are now protected against other users.
93This makes it impossible to learn whether any user is running a
94specific program
95(so long as the program doesn't otherwise reveal itself by its behavior).
96.\" As an additional bonus, since
97.\" .IR /proc/[pid]/cmdline
98.\" is inaccessible for other users,
99.\" poorly written programs passing sensitive information via
100.\" program arguments are now protected against local eavesdroppers.
101.TP
1022
103As for mode 1, but in addition the
104.IR /proc/[pid]
105directories belonging to other users become invisible.
106This means that
107.IR /proc/[pid]
108entries can no longer be used to discover the PIDs on the system.
109This doesn't hide the fact that a process with a specific PID value exists
110(it can be learned by other means, for example, by "kill \-0 $PID"),
111but it hides a process's UID and GID,
112which could otherwise be learned by employing
113.BR stat (2)
114on a
115.IR /proc/[pid]
116directory.
117This greatly complicates an attacker's task of gathering
118information about running processes (e.g., discovering whether
119some daemon is running with elevated privileges,
120whether another user is running some sensitive program,
121whether other users are running any program at all, and so on).
122.RE
123.TP
124.BR gid "=\fIgid\fP (since Linux 3.3)"
125.\" commit 0499680a42141d86417a8fbaa8c8db806bea1201
126Specifies the ID of a group whose members are authorized to
127learn process information otherwise prohibited by
128.BR hidepid
129(i.e., users in this group behave as though
130.I /proc
131was mounted with
132.IR hidepid=0 ).
133This group should be used instead of approaches such as putting
134nonroot users into the
135.BR sudoers (5)
136file.
137.\"
138.SS Overview
139Underneath
140.IR /proc ,
141there are the following general groups of files and subdirectories:
142.TP
143.IR /proc/[pid] " subdirectories"
144Each one of these subdirectories contains files and subdirectories
145exposing information about the process with the corresponding process ID.
146.IP
147Underneath each of the
148.I /proc/[pid]
149directories, a
150.I task
151subdirectory contains subdirectories of the form
152.IR task/[tid] ,
153which contain corresponding information about each of the threads
154in the process, where
155.I tid
156is the kernel thread ID of the thread.
157.IP
158The
159.I /proc/[pid]
160subdirectories are visible when iterating through
161.I /proc
162with
163.BR getdents (2)
164(and thus are visible when one uses
165.BR ls (1)
166to view the contents of
167.IR /proc ).
168.TP
169.IR /proc/[tid] " subdirectories"
170Each one of these subdirectories contains files and subdirectories
171exposing information about the thread with the corresponding thread ID.
172The contents of these directories are the same as the corresponding
173.IR /proc/[pid]/task/[tid]
174directories.
175.IP
176The
177.I /proc/[tid]
178subdirectories are
179.I not
180visible when iterating through
181.I /proc
182with
183.BR getdents (2)
184(and thus are
185.I not
186visible when one uses
187.BR ls (1)
188to view the contents of
189.IR /proc ).
190.TP
191.I /proc/self
192When a process accesses this magic symbolic link,
193it resolves to the process's own
194.I /proc/[pid]
195directory.
196.TP
197.I /proc/thread\-self
198When a thread accesses this magic symbolic link,
199it resolves to the process's own
200.I /proc/self/task/[tid]
201directory.
202.TP
203.I /proc/[a\-z]*
204Various other files and subdirectories under
205.I /proc
206expose system-wide information.
207.PP
208All of the above are described in more detail below.
209.\"
210.SS Files and directories
211The following list provides details of many of the files and directories
212under the
213.I /proc
214hierarchy.
215.TP
216.I /proc/[pid]
217There is a numerical subdirectory for each running process; the
218subdirectory is named by the process ID.
219Each
220.I /proc/[pid]
221subdirectory contains the pseudo-files and directories described below.
222.IP
223The files inside each
224.I /proc/[pid]
225directory are normally owned by the effective user and
226effective group ID of the process.
227However, as a security measure, the ownership is made
228.IR root:root
229if the process's "dumpable" attribute is set to a value other than 1.
230.IP
231Before Linux 4.11,
232.\" commit 68eb94f16227336a5773b83ecfa8290f1d6b78ce
233.IR root:root
234meant the "global" root user ID and group ID
235(i.e., UID 0 and GID 0 in the initial user namespace).
236Since Linux 4.11,
237if the process is in a noninitial user namespace that has a
238valid mapping for user (group) ID 0 inside the namespace, then
239the user (group) ownership of the files under
240.I /proc/[pid]
241is instead made the same as the root user (group) ID of the namespace.
242This means that inside a container,
243things work as expected for the container "root" user.
244.IP
245The process's "dumpable" attribute may change for the following reasons:
246.RS
247.IP * 3
248The attribute was explicitly set via the
249.BR prctl (2)
250.B PR_SET_DUMPABLE
251operation.
252.IP *
253The attribute was reset to the value in the file
254.IR /proc/sys/fs/suid_dumpable
255(described below), for the reasons described in
256.BR prctl (2).
257.RE
258.IP
259Resetting the "dumpable" attribute to 1 reverts the ownership of the
260.IR /proc/[pid]/*
261files to the process's effective UID and GID.
262Note, however, that if the effective UID or GID is subsequently modified,
263then the "dumpable" attribute may be reset, as described in
264.BR prctl (2).
265Therefore, it may be desirable to reset the "dumpable" attribute
266.I after
267making any desired changes to the process's effective UID or GID.
268.TP
269.I /proc/[pid]/attr
270.\" https://lwn.net/Articles/28222/
271.\" From: Stephen Smalley <sds@epoch.ncsc.mil>
272.\" To: LKML and others
273.\" Subject: [RFC][PATCH] Process Attribute API for Security Modules
274.\" Date: 08 Apr 2003 16:17:52 -0400
275.\"
276.\" http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml
277.\"
278The files in this directory provide an API for security modules.
279The contents of this directory are files that can be read and written
280in order to set security-related attributes.
281This directory was added to support SELinux,
282but the intention was that the API be general enough to support
283other security modules.
284For the purpose of explanation,
285examples of how SELinux uses these files are provided below.
286.IP
287This directory is present only if the kernel was configured with
288.BR CONFIG_SECURITY .
289.TP
290.IR /proc/[pid]/attr/current " (since Linux 2.6.0)"
291The contents of this file represent the current
292security attributes of the process.
293.IP
294In SELinux, this file is used to get the security context of a process.
295Prior to Linux 2.6.11, this file could not be used to set the security
296context (a write was always denied), since SELinux limited process security
297transitions to
298.BR execve (2)
299(see the description of
300.IR /proc/[pid]/attr/exec ,
301below).
302Since Linux 2.6.11, SELinux lifted this restriction and began supporting
303"set" operations via writes to this node if authorized by policy,
304although use of this operation is only suitable for applications that are
305trusted to maintain any desired separation between the old and new security
306contexts.
307.IP
308Prior to Linux 2.6.28, SELinux did not allow threads within a
309multithreaded process to set their security context via this node
310as it would yield an inconsistency among the security contexts of the
311threads sharing the same memory space.
312Since Linux 2.6.28, SELinux lifted
313this restriction and began supporting "set" operations for threads within
314a multithreaded process if the new security context is bounded by the old
315security context, where the bounded relation is defined in policy and
316guarantees that the new security context has a subset of the permissions
317of the old security context.
318.IP
319Other security modules may choose to support "set" operations via
320writes to this node.
321.TP
322.IR /proc/[pid]/attr/exec " (since Linux 2.6.0)"
323This file represents the attributes to assign to the
324process upon a subsequent
325.BR execve (2).
326.IP
327In SELinux,
328this is needed to support role/domain transitions, and
329.BR execve (2)
330is the preferred point to make such transitions because it offers better
331control over the initialization of the process in the new security label
332and the inheritance of state.
333In SELinux, this attribute is reset on
334.BR execve (2)
335so that the new program reverts to the default behavior for any
336.BR execve (2)
337calls that it may make.
338In SELinux, a process can set
339only its own
340.I /proc/[pid]/attr/exec
341attribute.
342.TP
343.IR /proc/[pid]/attr/fscreate " (since Linux 2.6.0)"
344This file represents the attributes to assign to files
345created by subsequent calls to
346.BR open (2),
347.BR mkdir (2),
348.BR symlink (2),
349and
350.BR mknod (2)
351.IP
352SELinux employs this file to support creation of a file
353(using the aforementioned system calls)
354in a secure state,
355so that there is no risk of inappropriate access being obtained
356between the time of creation and the time that attributes are set.
357In SELinux, this attribute is reset on
358.BR execve (2),
359so that the new program reverts to the default behavior for
360any file creation calls it may make, but the attribute will persist
361across multiple file creation calls within a program unless it is
362explicitly reset.
363In SELinux, a process can set only its own
364.IR /proc/[pid]/attr/fscreate
365attribute.
366.TP
367.IR /proc/[pid]/attr/keycreate " (since Linux 2.6.18)"
368.\" commit 4eb582cf1fbd7b9e5f466e3718a59c957e75254e
369If a process writes a security context into this file,
370all subsequently created keys
371.RB ( add_key (2))
372will be labeled with this context.
373For further information, see the kernel source file
374.I Documentation/security/keys/core.rst
375(or file
376.\" commit b68101a1e8f0263dbc7b8375d2a7c57c6216fb76
377.I Documentation/security/keys.txt
378on Linux between 3.0 and 4.13, or
379.\" commit d410fa4ef99112386de5f218dd7df7b4fca910b4
380.I Documentation/keys.txt
381before Linux 3.0).
382.TP
383.IR /proc/[pid]/attr/prev " (since Linux 2.6.0)"
384This file contains the security context of the process before the last
385.BR execve (2);
386that is, the previous value of
387.IR /proc/[pid]/attr/current .
388.TP
389.IR /proc/[pid]/attr/socketcreate " (since Linux 2.6.18)"
390.\" commit 42c3e03ef6b298813557cdb997bd6db619cd65a2
391If a process writes a security context into this file,
392all subsequently created sockets will be labeled with this context.
393.TP
394.IR /proc/[pid]/autogroup " (since Linux 2.6.38)"
395.\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a
396See
397.BR sched (7).
398.TP
399.IR /proc/[pid]/auxv " (since 2.6.0)"
400.\" Precisely: Linux 2.6.0-test7
401This contains the contents of the ELF interpreter information passed
402to the process at exec time.
403The format is one \fIunsigned long\fP ID
404plus one \fIunsigned long\fP value for each entry.
405The last entry contains two zeros.
406See also
407.BR getauxval (3).
408.IP
409Permission to access this file is governed by a ptrace access mode
410.B PTRACE_MODE_READ_FSCREDS
411check; see
412.BR ptrace (2).
413.TP
414.IR /proc/[pid]/cgroup " (since Linux 2.6.24)"
415See
416.BR cgroups (7).
417.TP
418.IR /proc/[pid]/clear_refs " (since Linux 2.6.22)"
419.\" commit b813e931b4c8235bb42e301096ea97dbdee3e8fe (2.6.22)
420.\" commit 398499d5f3613c47f2143b8c54a04efb5d7a6da9 (2.6.32)
421.\" commit 040fa02077de01c7e08fa75be6125e4ca5636011 (3.11)
422.\"
423.\" "Clears page referenced bits shown in smaps output"
424.\" write-only, writable only by the owner of the process
425.IP
426This is a write-only file, writable only by owner of the process.
427.IP
428The following values may be written to the file:
429.RS
430.TP
4311 (since Linux 2.6.22)
432.\" Internally: CLEAR_REFS_ALL
433Reset the PG_Referenced and ACCESSED/YOUNG
434bits for all the pages associated with the process.
435(Before kernel 2.6.32, writing any nonzero value to this file
436had this effect.)
437.TP
4382 (since Linux 2.6.32)
439.\" Internally: CLEAR_REFS_ANON
440Reset the PG_Referenced and ACCESSED/YOUNG
441bits for all anonymous pages associated with the process.
442.TP
4433 (since Linux 2.6.32)
444.\" Internally: CLEAR_REFS_MAPPED
445Reset the PG_Referenced and ACCESSED/YOUNG
446bits for all file-mapped pages associated with the process.
447.RE
448.IP
449Clearing the PG_Referenced and ACCESSED/YOUNG bits provides a method
450to measure approximately how much memory a process is using.
451One first inspects the values in the "Referenced" fields
452for the VMAs shown in
453.IR /proc/[pid]/smaps
454to get an idea of the memory footprint of the
455process.
456One then clears the PG_Referenced and ACCESSED/YOUNG bits
457and, after some measured time interval,
458once again inspects the values in the "Referenced" fields
459to get an idea of the change in memory footprint of the
460process during the measured interval.
461If one is interested only in inspecting the selected mapping types,
462then the value 2 or 3 can be used instead of 1.
463.IP
464Further values can be written to affect different properties:
465.RS
466.TP
4674 (since Linux 3.11)
468Clear the soft-dirty bit for all the pages associated with the process.
469.\" Internally: CLEAR_REFS_SOFT_DIRTY
470This is used (in conjunction with
471.IR /proc/[pid]/pagemap )
472by the check-point restore system to discover which pages of a process
473have been dirtied since the file
474.IR /proc/[pid]/clear_refs
475was written to.
476.TP
4775 (since Linux 4.0)
478.\" Internally: CLEAR_REFS_MM_HIWATER_RSS
479Reset the peak resident set size ("high water mark") to the process's
480current resident set size value.
481.RE
482.IP
483Writing any value to
484.IR /proc/[pid]/clear_refs
485other than those listed above has no effect.
486.IP
487The
488.IR /proc/[pid]/clear_refs
489file is present only if the
490.B CONFIG_PROC_PAGE_MONITOR
491kernel configuration option is enabled.
492.TP
493.I /proc/[pid]/cmdline
494This read-only file holds the complete command line for the process,
495unless the process is a zombie.
496.\" In 2.3.26, this also used to be true if the process was swapped out.
497In the latter case, there is nothing in this file:
498that is, a read on this file will return 0 characters.
499The command-line arguments appear in this file as a set of
500strings separated by null bytes (\(aq\e0\(aq),
501with a further null byte after the last string.
502.IP
503If, after an
504.BR execve (2),
505the process modifies its
506.I argv
507strings, those changes will show up here.
508This is not the same thing as modifying the
509.I argv
510array.
511.IP
512Furthermore, a process may change the memory location that this file refers via
513.BR prctl (2)
514operations such as
515.BR PR_SET_MM_ARG_START .
516.IP
517Think of this file as the command line that the process wants you to see.
518.TP
519.IR /proc/[pid]/comm " (since Linux 2.6.33)"
520.\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
521This file exposes the process's
522.I comm
523value\(emthat is, the command name associated with the process.
524Different threads in the same process may have different
525.I comm
526values, accessible via
527.IR /proc/[pid]/task/[tid]/comm .
528A thread may modify its
529.I comm
530value, or that of any of other thread in the same thread group (see
531the discussion of
532.B CLONE_THREAD
533in
534.BR clone (2)),
535by writing to the file
536.IR /proc/self/task/[tid]/comm .
537Strings longer than
538.B TASK_COMM_LEN
539(16) characters (including the terminating null byte) are silently truncated.
540.IP
541This file provides a superset of the
542.BR prctl (2)
543.B PR_SET_NAME
544and
545.B PR_GET_NAME
546operations, and is employed by
547.BR pthread_setname_np (3)
548when used to rename threads other than the caller.
549The value in this file is used for the
550.I %e
551specifier in
552.IR /proc/sys/kernel/core_pattern ;
553see
554.BR core (5).
555.TP
556.IR /proc/[pid]/coredump_filter " (since Linux 2.6.23)"
557See
558.BR core (5).
559.TP
560.IR /proc/[pid]/cpuset " (since Linux 2.6.12)"
561.\" and/proc/[pid]/task/[tid]/cpuset
562See
563.BR cpuset (7).
564.TP
565.I /proc/[pid]/cwd
566This is a symbolic link to the current working directory of the process.
567To find out the current working directory of process 20,
568for instance, you can do this:
569.IP
570.in +4n
571.EX
572.RB "$" " cd /proc/20/cwd; pwd \-P"
573.EE
574.in
575.IP
576.\" The following was still true as at kernel 2.6.13
577In a multithreaded process, the contents of this symbolic link
578are not available if the main thread has already terminated
579(typically by calling
580.BR pthread_exit (3)).
581.IP
582Permission to dereference or read
583.RB ( readlink (2))
584this symbolic link is governed by a ptrace access mode
585.B PTRACE_MODE_READ_FSCREDS
586check; see
587.BR ptrace (2).
588.TP
589.I /proc/[pid]/environ
590This file contains the initial environment that was set
591when the currently executing program was started via
592.BR execve (2).
593The entries are separated by null bytes (\(aq\e0\(aq),
594and there may be a null byte at the end.
595Thus, to print out the environment of process 1, you would do:
596.IP
597.in +4n
598.EX
599.RB "$" " cat /proc/1/environ | tr \(aq\e000\(aq \(aq\en\(aq"
600.EE
601.in
602.IP
603If, after an
604.BR execve (2),
605the process modifies its environment
606(e.g., by calling functions such as
607.BR putenv (3)
608or modifying the
609.BR environ (7)
610variable directly),
611this file will
612.I not
613reflect those changes.
614.IP
615Furthermore, a process may change the memory location that this file refers via
616.BR prctl (2)
617operations such as
618.BR PR_SET_MM_ENV_START .
619.IP
620Permission to access this file is governed by a ptrace access mode
621.B PTRACE_MODE_READ_FSCREDS
622check; see
623.BR ptrace (2).
624.TP
625.I /proc/[pid]/exe
626Under Linux 2.2 and later, this file is a symbolic link
627containing the actual pathname of the executed command.
628This symbolic link can be dereferenced normally; attempting to open
629it will open the executable.
630You can even type
631.I /proc/[pid]/exe
632to run another copy of the same executable that is being run by
633process [pid].
634If the pathname has been unlinked, the symbolic link will contain the
635string \(aq(deleted)\(aq appended to the original pathname.
636.\" The following was still true as at kernel 2.6.13
637In a multithreaded process, the contents of this symbolic link
638are not available if the main thread has already terminated
639(typically by calling
640.BR pthread_exit (3)).
641.IP
642Permission to dereference or read
643.RB ( readlink (2))
644this symbolic link is governed by a ptrace access mode
645.B PTRACE_MODE_READ_FSCREDS
646check; see
647.BR ptrace (2).
648.IP
649Under Linux 2.0 and earlier,
650.I /proc/[pid]/exe
651is a pointer to the binary which was executed,
652and appears as a symbolic link.
653A
654.BR readlink (2)
655call on this file under Linux 2.0 returns a string in the format:
656.IP
657 [device]:inode
658.IP
659For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
660MFM, etc. drives) minor 01 (first partition on the first drive).
661.IP
662.BR find (1)
663with the
664.I \-inum
665option can be used to locate the file.
666.TP
667.I /proc/[pid]/fd/
668This is a subdirectory containing one entry for each file which the
669process has open, named by its file descriptor, and which is a
670symbolic link to the actual file.
671Thus, 0 is standard input, 1 standard output, 2 standard error, and so on.
672.IP
673For file descriptors for pipes and sockets,
674the entries will be symbolic links whose content is the
675file type with the inode.
676A
677.BR readlink (2)
678call on this file returns a string in the format:
679.IP
680 type:[inode]
681.IP
682For example,
683.I socket:[2248868]
684will be a socket and its inode is 2248868.
685For sockets, that inode can be used to find more information
686in one of the files under
687.IR /proc/net/ .
688.IP
689For file descriptors that have no corresponding inode
690(e.g., file descriptors produced by
691.BR bpf (2),
692.BR epoll_create (2),
693.BR eventfd (2),
694.BR inotify_init (2),
695.BR perf_event_open (2),
696.BR signalfd (2),
697.BR timerfd_create (2),
698and
699.BR userfaultfd (2)),
700the entry will be a symbolic link with contents of the form
701.IP
702 anon_inode:<file-type>
703.IP
704In many cases (but not all), the
705.I file-type
706is surrounded by square brackets.
707.IP
708For example, an epoll file descriptor will have a symbolic link
709whose content is the string
710.IR "anon_inode:[eventpoll]" .
711.IP
712.\"The following was still true as at kernel 2.6.13
713In a multithreaded process, the contents of this directory
714are not available if the main thread has already terminated
715(typically by calling
716.BR pthread_exit (3)).
717.IP
718Programs that take a filename as a command-line argument,
719but don't take input from standard input if no argument is supplied,
720and programs that write to a file named as a command-line argument,
721but don't send their output to standard output
722if no argument is supplied, can nevertheless be made to use
723standard input or standard output by using
724.IR /proc/[pid]/fd
725files as command-line arguments.
726For example, assuming that
727.I \-i
728is the flag designating an input file and
729.I \-o
730is the flag designating an output file:
731.IP
732.in +4n
733.EX
734.RB "$" " foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ..."
735.EE
736.in
737.IP
738and you have a working filter.
739.\" The following is not true in my tests (MTK):
740.\" Note that this will not work for
741.\" programs that seek on their files, as the files in the fd directory
742.\" are not seekable.
743.IP
744.I /proc/self/fd/N
745is approximately the same as
746.I /dev/fd/N
747in some UNIX and UNIX-like systems.
748Most Linux MAKEDEV scripts symbolically link
749.I /dev/fd
750to
751.IR /proc/self/fd ,
752in fact.
753.IP
754Most systems provide symbolic links
755.IR /dev/stdin ,
756.IR /dev/stdout ,
757and
758.IR /dev/stderr ,
759which respectively link to the files
760.IR 0 ,
761.IR 1 ,
762and
763.IR 2
764in
765.IR /proc/self/fd .
766Thus the example command above could be written as:
767.IP
768.in +4n
769.EX
770.RB "$" " foobar \-i /dev/stdin \-o /dev/stdout ..."
771.EE
772.in
773.IP
774Permission to dereference or read
775.RB ( readlink (2))
776the symbolic links in this directory is governed by a ptrace access mode
777.B PTRACE_MODE_READ_FSCREDS
778check; see
779.BR ptrace (2).
780.IP
781Note that for file descriptors referring to inodes (pipes and sockets, see above),
782those inodes still have permission bits and ownership information
783distinct from those of the
784.I /proc/[pid]/fd
785entry,
786and that the owner may differ from the user and group IDs of the process.
787An unprivileged process may lack permissions to open them, as in this example:
788.IP
789.in +4n
790.EX
791.RB "$" " echo test | sudo \-u nobody cat"
792test
793.RB "$" " echo test | sudo \-u nobody cat /proc/self/fd/0"
794cat: /proc/self/fd/0: Permission denied
795.EE
796.in
797.IP
798File descriptor 0 refers to the pipe created by the shell
799and owned by that shell's user, which is not
800.IR nobody ,
801so
802.B cat
803does not have permission to create a new file descriptor to read from that inode,
804even though it can still read from its existing file descriptor 0.
805.TP
806.IR /proc/[pid]/fdinfo/ " (since Linux 2.6.22)"
807This is a subdirectory containing one entry for each file which the
808process has open, named by its file descriptor.
809The files in this directory are readable only by the owner of the process.
810The contents of each file can be read to obtain information
811about the corresponding file descriptor.
812The content depends on the type of file referred to by the
813corresponding file descriptor.
814.IP
815For regular files and directories, we see something like:
816.IP
817.in +4n
818.EX
819.RB "$" " cat /proc/12015/fdinfo/4"
820pos: 1000
821flags: 01002002
822mnt_id: 21
823.EE
824.in
825.IP
826The fields are as follows:
827.RS
828.TP
829.I pos
830This is a decimal number showing the file offset.
831.TP
832.I flags
833This is an octal number that displays the
834file access mode and file status flags (see
835.BR open (2)).
836If the close-on-exec file descriptor flag is set, then
837.I flags
838will also include the value
839.BR O_CLOEXEC .
840.IP
841Before Linux 3.1,
842.\" commit 1117f72ea0217ba0cc19f05adbbd8b9a397f5ab7
843this field incorrectly displayed the setting of
844.B O_CLOEXEC
845at the time the file was opened,
846rather than the current setting of the close-on-exec flag.
847.TP
848.I
849.I mnt_id
850This field, present since Linux 3.15,
851.\" commit 49d063cb353265c3af701bab215ac438ca7df36d
852is the ID of the mount containing this file.
853See the description of
854.IR /proc/[pid]/mountinfo .
855.RE
856.IP
857For eventfd file descriptors (see
858.BR eventfd (2)),
859we see (since Linux 3.8)
860.\" commit cbac5542d48127b546a23d816380a7926eee1c25
861the following fields:
862.IP
863.in +4n
864.EX
865pos: 0
866flags: 02
867mnt_id: 10
868eventfd\-count: 40
869.EE
870.in
871.IP
872.I eventfd\-count
873is the current value of the eventfd counter, in hexadecimal.
874.IP
875For epoll file descriptors (see
876.BR epoll (7)),
877we see (since Linux 3.8)
878.\" commit 138d22b58696c506799f8de759804083ff9effae
879the following fields:
880.IP
881.in +4n
882.EX
883pos: 0
884flags: 02
885mnt_id: 10
886tfd: 9 events: 19 data: 74253d2500000009
887tfd: 7 events: 19 data: 74253d2500000007
888.EE
889.in
890.IP
891Each of the lines beginning
892.I tfd
893describes one of the file descriptors being monitored via
894the epoll file descriptor (see
895.BR epoll_ctl (2)
896for some details).
897The
898.IR tfd
899field is the number of the file descriptor.
900The
901.I events
902field is a hexadecimal mask of the events being monitored for this file
903descriptor.
904The
905.I data
906field is the data value associated with this file descriptor.
907.IP
908For signalfd file descriptors (see
909.BR signalfd (2)),
910we see (since Linux 3.8)
911.\" commit 138d22b58696c506799f8de759804083ff9effae
912the following fields:
913.IP
914.in +4n
915.EX
916pos: 0
917flags: 02
918mnt_id: 10
919sigmask: 0000000000000006
920.EE
921.in
922.IP
923.I sigmask
924is the hexadecimal mask of signals that are accepted via this
925signalfd file descriptor.
926(In this example, bits 2 and 3 are set, corresponding to the signals
927.B SIGINT
928and
929.BR SIGQUIT ;
930see
931.BR signal (7).)
932.IP
933For inotify file descriptors (see
934.BR inotify (7)),
935we see (since Linux 3.8)
936the following fields:
937.IP
938.in +4n
939.EX
940pos: 0
941flags: 00
942mnt_id: 11
943inotify wd:2 ino:7ef82a sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:2af87e00220ffd73
944inotify wd:1 ino:192627 sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:27261900802dfd73
945.EE
946.in
947.IP
948Each of the lines beginning with "inotify" displays information about
949one file or directory that is being monitored.
950The fields in this line are as follows:
951.RS
952.TP
953.I wd
954A watch descriptor number (in decimal).
955.TP
956.I ino
957The inode number of the target file (in hexadecimal).
958.TP
959.I sdev
960The ID of the device where the target file resides (in hexadecimal).
961.TP
962.I mask
963The mask of events being monitored for the target file (in hexadecimal).
964.RE
965.IP
966If the kernel was built with exportfs support, the path to the target
967file is exposed as a file handle, via three hexadecimal fields:
968.IR fhandle\-bytes ,
969.IR fhandle\-type ,
970and
971.IR f_handle .
972.IP
973For fanotify file descriptors (see
974.BR fanotify (7)),
975we see (since Linux 3.8)
976the following fields:
977.IP
978.in +4n
979.EX
980pos: 0
981flags: 02
982mnt_id: 11
983fanotify flags:0 event\-flags:88002
984fanotify ino:19264f sdev:800001 mflags:0 mask:1 ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:4f261900a82dfd73
985.EE
986.in
987.IP
988The fourth line displays information defined when the fanotify group
989was created via
990.BR fanotify_init (2):
991.RS
992.TP
993.I flags
994The
995.I flags
996argument given to
997.BR fanotify_init (2)
998(expressed in hexadecimal).
999.TP
1000.I event\-flags
1001The
1002.I event_f_flags
1003argument given to
1004.BR fanotify_init (2)
1005(expressed in hexadecimal).
1006.RE
1007.IP
1008Each additional line shown in the file contains information
1009about one of the marks in the fanotify group.
1010Most of these fields are as for inotify, except:
1011.RS
1012.TP
1013.I mflags
1014The flags associated with the mark
1015(expressed in hexadecimal).
1016.TP
1017.I mask
1018The events mask for this mark
1019(expressed in hexadecimal).
1020.TP
1021.I ignored_mask
1022The mask of events that are ignored for this mark
1023(expressed in hexadecimal).
1024.RE
1025.IP
1026For details on these fields, see
1027.BR fanotify_mark (2).
1028.IP
1029For timerfd file descriptors (see
1030.BR timerfd (2)),
1031we see (since Linux 3.17)
1032.\" commit af9c4957cf212ad9cf0bee34c95cb11de5426e85
1033the following fields:
1034.IP
1035.in +4n
1036.EX
1037pos: 0
1038flags: 02004002
1039mnt_id: 13
1040clockid: 0
1041ticks: 0
1042settime flags: 03
1043it_value: (7695568592, 640020877)
1044it_interval: (0, 0)
1045.EE
1046.in
1047.RS
1048.TP
1049.I clockid
1050This is the numeric value of the clock ID
1051(corresponding to one of the
1052.B CLOCK_*
1053constants defined via
1054.IR <time.h> )
1055that is used to mark the progress of the timer (in this example, 0 is
1056.BR CLOCK_REALTIME ).
1057.TP
1058.I ticks
1059This is the number of timer expirations that have occurred,
1060(i.e., the value that
1061.BR read (2)
1062on it would return).
1063.TP
1064.I settime flags
1065This field lists the flags with which the timerfd was last armed (see
1066.BR timerfd_settime (2)),
1067in octal
1068(in this example, both
1069.B TFD_TIMER_ABSTIME
1070and
1071.B TFD_TIMER_CANCEL_ON_SET
1072are set).
1073.TP
1074.I it_value
1075This field contains the amount of time until the timer will next expire,
1076expressed in seconds and nanoseconds.
1077This is always expressed as a relative value,
1078regardless of whether the timer was created using the
1079.B TFD_TIMER_ABSTIME
1080flag.
1081.TP
1082.I it_interval
1083This field contains the interval of the timer,
1084in seconds and nanoseconds.
1085(The
1086.I it_value
1087and
1088.I it_interval
1089fields contain the values that
1090.BR timerfd_gettime (2)
1091on this file descriptor would return.)
1092.RE
1093.TP
1094.IR /proc/[pid]/gid_map " (since Linux 3.5)"
1095See
1096.BR user_namespaces (7).
1097.TP
1098.IR /proc/[pid]/io " (since kernel 2.6.20)"
1099.\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2
1100This file contains I/O statistics for the process, for example:
1101.IP
1102.in +4n
1103.EX
1104.RB "#" " cat /proc/3828/io"
1105rchar: 323934931
1106wchar: 323929600
1107syscr: 632687
1108syscw: 632675
1109read_bytes: 0
1110write_bytes: 323932160
1111cancelled_write_bytes: 0
1112.EE
1113.in
1114.IP
1115The fields are as follows:
1116.RS
1117.TP
1118.IR rchar ": characters read"
1119The number of bytes which this task has caused to be read from storage.
1120This is simply the sum of bytes which this process passed to
1121.BR read (2)
1122and similar system calls.
1123It includes things such as terminal I/O and
1124is unaffected by whether or not actual
1125physical disk I/O was required (the read might have been satisfied from
1126pagecache).
1127.TP
1128.IR wchar ": characters written"
1129The number of bytes which this task has caused, or shall cause to be written
1130to disk.
1131Similar caveats apply here as with
1132.IR rchar .
1133.TP
1134.IR syscr ": read syscalls"
1135Attempt to count the number of read I/O operations\(emthat is,
1136system calls such as
1137.BR read (2)
1138and
1139.BR pread (2).
1140.TP
1141.IR syscw ": write syscalls"
1142Attempt to count the number of write I/O operations\(emthat is,
1143system calls such as
1144.BR write (2)
1145and
1146.BR pwrite (2).
1147.TP
1148.IR read_bytes ": bytes read"
1149Attempt to count the number of bytes which this process really did cause to
1150be fetched from the storage layer.
1151This is accurate for block-backed filesystems.
1152.TP
1153.IR write_bytes ": bytes written"
1154Attempt to count the number of bytes which this process caused to be sent to
1155the storage layer.
1156.TP
1157.IR cancelled_write_bytes :
1158The big inaccuracy here is truncate.
1159If a process writes 1 MB to a file and then deletes the file,
1160it will in fact perform no writeout.
1161But it will have been accounted as having caused 1 MB of write.
1162In other words: this field represents the number of bytes which this process
1163caused to not happen, by truncating pagecache.
1164A task can cause "negative" I/O too.
1165If this task truncates some dirty pagecache,
1166some I/O which another task has been accounted for
1167(in its
1168.IR write_bytes )
1169will not be happening.
1170.RE
1171.IP
1172.IR Note :
1173In the current implementation, things are a bit racy on 32-bit systems:
1174if process A reads process B's
1175.I /proc/[pid]/io
1176while process B is updating one of these 64-bit counters,
1177process A could see an intermediate result.
1178.IP
1179Permission to access this file is governed by a ptrace access mode
1180.B PTRACE_MODE_READ_FSCREDS
1181check; see
1182.BR ptrace (2).
1183.TP
1184.IR /proc/[pid]/limits " (since Linux 2.6.24)"
1185This file displays the soft limit, hard limit, and units of measurement
1186for each of the process's resource limits (see
1187.BR getrlimit (2)).
1188Up to and including Linux 2.6.35,
1189this file is protected to allow reading only by the real UID of the process.
1190Since Linux 2.6.36,
1191.\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589
1192this file is readable by all users on the system.
1193.\" FIXME Describe /proc/[pid]/loginuid
1194.\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
1195.\" CONFIG_AUDITSYSCALL
1196.TP
1197.IR /proc/[pid]/map_files/ " (since kernel 3.3)"
1198.\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e
1199This subdirectory contains entries corresponding to memory-mapped
1200files (see
1201.BR mmap (2)).
1202Entries are named by memory region start and end
1203address pair (expressed as hexadecimal numbers),
1204and are symbolic links to the mapped files themselves.
1205Here is an example, with the output wrapped and reformatted to fit on an 80-column display:
1206.IP
1207.in +4n
1208.EX
1209.RB "#" " ls \-l /proc/self/map_files/"
1210lr\-\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:31
1211 3252e00000\-3252e20000 \-> /usr/lib64/ld\-2.15.so
1212\&...
1213.EE
1214.in
1215.IP
1216Although these entries are present for memory regions that were
1217mapped with the
1218.BR MAP_FILE
1219flag, the way anonymous shared memory (regions created with the
1220.B MAP_ANON | MAP_SHARED
1221flags)
1222is implemented in Linux
1223means that such regions also appear on this directory.
1224Here is an example where the target file is the deleted
1225.I /dev/zero
1226one:
1227.IP
1228.in +4n
1229.EX
1230lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33
1231 7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted)
1232.EE
1233.in
1234.IP
1235Permission to access this file is governed by a ptrace access mode
1236.B PTRACE_MODE_READ_FSCREDS
1237check; see
1238.BR ptrace (2).
1239.IP
1240Until kernel version 4.3,
1241.\" commit bdb4d100afe9818aebd1d98ced575c5ef143456c
1242this directory appeared only if the
1243.B CONFIG_CHECKPOINT_RESTORE
1244kernel configuration option was enabled.
1245.IP
1246Capabilities are required to read the contents of the symbolic links in
1247this directory: before Linux 5.9, the reading process requires
1248.BR CAP_SYS_ADMIN
1249in the initial user namespace;
1250since Linux 5.9, the reading process must have either
1251.BR CAP_SYS_ADMIN
1252or
1253.BR CAP_CHECKPOINT_RESTORE
1254in the user namespace where it resides.
1255.TP
1256.I /proc/[pid]/maps
1257A file containing the currently mapped memory regions and their access
1258permissions.
1259See
1260.BR mmap (2)
1261for some further information about memory mappings.
1262.IP
1263Permission to access this file is governed by a ptrace access mode
1264.B PTRACE_MODE_READ_FSCREDS
1265check; see
1266.BR ptrace (2).
1267.IP
1268The format of the file is:
1269.IP
1270.in +4n
1271.EX
1272.I "address perms offset dev inode pathname"
127300400000\-00452000 r\-xp 00000000 08:02 173521 /usr/bin/dbus\-daemon
127400651000\-00652000 r\-\-p 00051000 08:02 173521 /usr/bin/dbus\-daemon
127500652000\-00655000 rw\-p 00052000 08:02 173521 /usr/bin/dbus\-daemon
127600e03000\-00e24000 rw\-p 00000000 00:00 0 [heap]
127700e24000\-011f7000 rw\-p 00000000 00:00 0 [heap]
1278\&...
127935b1800000\-35b1820000 r\-xp 00000000 08:02 135522 /usr/lib64/ld\-2.15.so
128035b1a1f000\-35b1a20000 r\-\-p 0001f000 08:02 135522 /usr/lib64/ld\-2.15.so
128135b1a20000\-35b1a21000 rw\-p 00020000 08:02 135522 /usr/lib64/ld\-2.15.so
128235b1a21000\-35b1a22000 rw\-p 00000000 00:00 0
128335b1c00000\-35b1dac000 r\-xp 00000000 08:02 135870 /usr/lib64/libc\-2.15.so
128435b1dac000\-35b1fac000 \-\-\-p 001ac000 08:02 135870 /usr/lib64/libc\-2.15.so
128535b1fac000\-35b1fb0000 r\-\-p 001ac000 08:02 135870 /usr/lib64/libc\-2.15.so
128635b1fb0000\-35b1fb2000 rw\-p 001b0000 08:02 135870 /usr/lib64/libc\-2.15.so
1287\&...
1288f2c6ff8c000\-7f2c7078c000 rw\-p 00000000 00:00 0 [stack:986]
1289\&...
12907fffb2c0d000\-7fffb2c2e000 rw\-p 00000000 00:00 0 [stack]
12917fffb2d48000\-7fffb2d49000 r\-xp 00000000 00:00 0 [vdso]
1292.EE
1293.in
1294.IP
1295The
1296.I address
1297field is the address space in the process that the mapping occupies.
1298The
1299.I perms
1300field is a set of permissions:
1301.IP
1302.in +4n
1303.EX
1304r = read
1305w = write
1306x = execute
1307s = shared
1308p = private (copy on write)
1309.EE
1310.in
1311.IP
1312The
1313.I offset
1314field is the offset into the file/whatever;
1315.I dev
1316is the device
1317(major:minor);
1318.I inode
1319is the inode on that device.
13200 indicates that no inode is associated with the memory region,
1321as would be the case with BSS (uninitialized data).
1322.IP
1323The
1324.I pathname
1325field will usually be the file that is backing the mapping.
1326For ELF files,
1327you can easily coordinate with the
1328.I offset
1329field by looking at the
1330Offset field in the ELF program headers
1331.RI ( "readelf\ \-l" ).
1332.IP
1333There are additional helpful pseudo-paths:
1334.RS
1335.TP
1336.IR [stack]
1337The initial process's (also known as the main thread's) stack.
1338.TP
1339.IR [stack:<tid>] " (from Linux 3.4 to 4.4)"
1340.\" commit b76437579d1344b612cf1851ae610c636cec7db0 (added)
1341.\" commit 65376df582174ffcec9e6471bf5b0dd79ba05e4a (removed)
1342A thread's stack (where the
1343.IR <tid>
1344is a thread ID).
1345It corresponds to the
1346.IR /proc/[pid]/task/[tid]/
1347path.
1348This field was removed in Linux 4.5, since providing this information
1349for a process with large numbers of threads is expensive.
1350.TP
1351.IR [vdso]
1352The virtual dynamically linked shared object.
1353See
1354.BR vdso (7).
1355.TP
1356.IR [heap]
1357The process's heap.
1358.in
1359.RE
1360.IP
1361If the
1362.I pathname
1363field is blank,
1364this is an anonymous mapping as obtained via
1365.BR mmap (2).
1366There is no easy way to coordinate this back to a process's source,
1367short of running it through
1368.BR gdb (1),
1369.BR strace (1),
1370or similar.
1371.IP
1372.I pathname
1373is shown unescaped except for newline characters, which are replaced
1374with an octal escape sequence.
1375As a result, it is not possible to determine whether the original
1376pathname contained a newline character or the literal
1377.I \e012
1378character sequence.
1379.IP
1380If the mapping is file-backed and the file has been deleted, the string
1381" (deleted)" is appended to the pathname.
1382Note that this is ambiguous too.
1383.IP
1384Under Linux 2.0, there is no field giving pathname.
1385.TP
1386.I /proc/[pid]/mem
1387This file can be used to access the pages of a process's memory through
1388.BR open (2),
1389.BR read (2),
1390and
1391.BR lseek (2).
1392.IP
1393Permission to access this file is governed by a ptrace access mode
1394.B PTRACE_MODE_ATTACH_FSCREDS
1395check; see
1396.BR ptrace (2).
1397.TP
1398.IR /proc/[pid]/mountinfo " (since Linux 2.6.26)"
1399.\" This info adapted from Documentation/filesystems/proc.txt
1400.\" commit 2d4d4864ac08caff5c204a752bd004eed4f08760
1401This file contains information about mounts
1402in the process's mount namespace (see
1403.BR mount_namespaces (7)).
1404It supplies various information
1405(e.g., propagation state, root of mount for bind mounts,
1406identifier for each mount and its parent) that is missing from the (older)
1407.IR /proc/[pid]/mounts
1408file, and fixes various other problems with that file
1409(e.g., nonextensibility,
1410failure to distinguish per-mount versus per-superblock options).
1411.IP
1412The file contains lines of the form:
1413.IP
1414.EX
141536 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
1416(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
1417.EE
1418.IP
1419The numbers in parentheses are labels for the descriptions below:
1420.RS 7
1421.TP 5
1422(1)
1423mount ID: a unique ID for the mount (may be reused after
1424.BR umount (2)).
1425.TP
1426(2)
1427parent ID: the ID of the parent mount
1428(or of self for the root of this mount namespace's mount tree).
1429.IP
1430If a new mount is stacked on top of a previous existing mount
1431(so that it hides the existing mount) at pathname P,
1432then the parent of the new mount is the previous mount at that location.
1433Thus, when looking at all the mounts stacked at a particular location,
1434the top-most mount is the one that is not the parent
1435of any other mount at the same location.
1436(Note, however, that this top-most mount will be accessible only if
1437the longest path subprefix of P that is a mount point
1438is not itself hidden by a stacked mount.)
1439.IP
1440If the parent mount lies outside the process's root directory (see
1441.BR chroot (2)),
1442the ID shown here won't have a corresponding record in
1443.I mountinfo
1444whose mount ID (field 1) matches this parent mount ID
1445(because mounts that lie outside the process's root directory
1446are not shown in
1447.IR mountinfo ).
1448As a special case of this point,
1449the process's root mount may have a parent mount
1450(for the initramfs filesystem) that lies
1451.\" Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe
1452.\" mtk: In the initial mount namespace, this hidden ID has the value 0
1453outside the process's root directory,
1454and an entry for that mount will not appear in
1455.IR mountinfo .
1456.TP
1457(3)
1458major:minor: the value of
1459.I st_dev
1460for files on this filesystem (see
1461.BR stat (2)).
1462.TP
1463(4)
1464root: the pathname of the directory in the filesystem
1465which forms the root of this mount.
1466.TP
1467(5)
1468mount point: the pathname of the mount point relative
1469to the process's root directory.
1470.TP
1471(6)
1472mount options: per-mount options (see
1473.BR mount (2)).
1474.TP
1475(7)
1476optional fields: zero or more fields of the form "tag[:value]"; see below.
1477.TP
1478(8)
1479separator: the end of the optional fields is marked by a single hyphen.
1480.TP
1481(9)
1482filesystem type: the filesystem type in the form "type[.subtype]".
1483.TP
1484(10)
1485mount source: filesystem-specific information or "none".
1486.TP
1487(11)
1488super options: per-superblock options (see
1489.BR mount (2)).
1490.RE
1491.IP
1492Currently, the possible optional fields are
1493.IR shared ,
1494.IR master ,
1495.IR propagate_from ,
1496and
1497.IR unbindable .
1498See
1499.BR mount_namespaces (7)
1500for a description of these fields.
1501Parsers should ignore all unrecognized optional fields.
1502.IP
1503For more information on mount propagation see
1504.I Documentation/filesystems/sharedsubtree.rst
1505(or
1506.I Documentation/filesystems/sharedsubtree.txt
1507before Linux 5.8)
1508in the Linux kernel source tree.
1509.TP
1510.IR /proc/[pid]/mounts " (since Linux 2.4.19)"
1511This file lists all the filesystems currently mounted in the
1512process's mount namespace (see
1513.BR mount_namespaces (7)).
1514The format of this file is documented in
1515.BR fstab (5).
1516.IP
1517Since kernel version 2.6.15, this file is pollable:
1518after opening the file for reading, a change in this file
1519(i.e., a filesystem mount or unmount) causes
1520.BR select (2)
1521to mark the file descriptor as having an exceptional condition, and
1522.BR poll (2)
1523and
1524.BR epoll_wait (2)
1525mark the file as having a priority event
1526.RB ( POLLPRI ).
1527(Before Linux 2.6.30,
1528a change in this file was indicated by the file descriptor
1529being marked as readable for
1530.BR select (2),
1531and being marked as having an error condition for
1532.BR poll (2)
1533and
1534.BR epoll_wait (2).)
1535.TP
1536.IR /proc/[pid]/mountstats " (since Linux 2.6.17)"
1537This file exports information (statistics, configuration information)
1538about the mounts in the process's mount namespace (see
1539.BR mount_namespaces (7)).
1540Lines in this file have the form:
1541.IP
1542.in +4n
1543.EX
1544device /dev/sda7 mounted on /home with fstype ext3 [stats]
1545( 1 ) ( 2 ) (3 ) ( 4 )
1546.EE
1547.in
1548.IP
1549The fields in each line are:
1550.RS 7
1551.TP 5
1552(1)
1553The name of the mounted device
1554(or "nodevice" if there is no corresponding device).
1555.TP
1556(2)
1557The mount point within the filesystem tree.
1558.TP
1559(3)
1560The filesystem type.
1561.TP
1562(4)
1563Optional statistics and configuration information.
1564Currently (as at Linux 2.6.26), only NFS filesystems export
1565information via this field.
1566.RE
1567.IP
1568This file is readable only by the owner of the process.
1569.TP
1570.IR /proc/[pid]/net " (since Linux 2.6.25)"
1571See the description of
1572.IR /proc/net .
1573.TP
1574.IR /proc/[pid]/ns/ " (since Linux 3.0)"
1575.\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
1576This is a subdirectory containing one entry for each namespace that
1577supports being manipulated by
1578.BR setns (2).
1579For more information, see
1580.BR namespaces (7).
1581.TP
1582.IR /proc/[pid]/numa_maps " (since Linux 2.6.14)"
1583See
1584.BR numa (7).
1585.TP
1586.IR /proc/[pid]/oom_adj " (since Linux 2.6.11)"
1587This file can be used to adjust the score used to select which process
1588should be killed in an out-of-memory (OOM) situation.
1589The kernel uses this value for a bit-shift operation of the process's
1590.IR oom_score
1591value:
1592valid values are in the range \-16 to +15,
1593plus the special value \-17,
1594which disables OOM-killing altogether for this process.
1595A positive score increases the likelihood of this
1596process being killed by the OOM-killer;
1597a negative score decreases the likelihood.
1598.IP
1599The default value for this file is 0;
1600a new process inherits its parent's
1601.I oom_adj
1602setting.
1603A process must be privileged
1604.RB ( CAP_SYS_RESOURCE )
1605to update this file.
1606.IP
1607Since Linux 2.6.36, use of this file is deprecated in favor of
1608.IR /proc/[pid]/oom_score_adj .
1609.TP
1610.IR /proc/[pid]/oom_score " (since Linux 2.6.11)"
1611.\" See mm/oom_kill.c::badness() in pre 2.6.36 sources
1612.\" See mm/oom_kill.c::oom_badness() after 2.6.36
1613.\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10
1614This file displays the current score that the kernel gives to
1615this process for the purpose of selecting a process
1616for the OOM-killer.
1617A higher score means that the process is more likely to be
1618selected by the OOM-killer.
1619The basis for this score is the amount of memory used by the process,
1620with increases (+) or decreases (\-) for factors including:
1621.\" See mm/oom_kill.c::badness() in pre 2.6.36 sources
1622.\" See mm/oom_kill.c::oom_badness() after 2.6.36
1623.\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10
1624.RS
1625.IP * 2
1626whether the process is privileged (\-).
1627.\" More precisely, if it has CAP_SYS_ADMIN or (pre 2.6.36) CAP_SYS_RESOURCE
1628.RE
1629.IP
1630Before kernel 2.6.36 the following factors were also used in the calculation of oom_score:
1631.RS
1632.IP * 2
1633whether the process creates a lot of children using
1634.BR fork (2)
1635(+);
1636.IP *
1637whether the process has been running a long time,
1638or has used a lot of CPU time (\-);
1639.IP *
1640whether the process has a low nice value (i.e., > 0) (+); and
1641.IP *
1642whether the process is making direct hardware access (\-).
1643.\" More precisely, if it has CAP_SYS_RAWIO
1644.RE
1645.IP
1646The
1647.I oom_score
1648also reflects the adjustment specified by the
1649.I oom_score_adj
1650or
1651.I oom_adj
1652setting for the process.
1653.TP
1654.IR /proc/[pid]/oom_score_adj " (since Linux 2.6.36)"
1655.\" Text taken from 3.7 Documentation/filesystems/proc.txt
1656This file can be used to adjust the badness heuristic used to select which
1657process gets killed in out-of-memory conditions.
1658.IP
1659The badness heuristic assigns a value to each candidate task ranging from 0
1660(never kill) to 1000 (always kill) to determine which process is targeted.
1661The units are roughly a proportion along that range of
1662allowed memory the process may allocate from,
1663based on an estimation of its current memory and swap use.
1664For example, if a task is using all allowed memory,
1665its badness score will be 1000.
1666If it is using half of its allowed memory, its score will be 500.
1667.IP
1668There is an additional factor included in the badness score: root
1669processes are given 3% extra memory over other tasks.
1670.IP
1671The amount of "allowed" memory depends on the context
1672in which the OOM-killer was called.
1673If it is due to the memory assigned to the allocating task's cpuset
1674being exhausted,
1675the allowed memory represents the set of mems assigned to that
1676cpuset (see
1677.BR cpuset (7)).
1678If it is due to a mempolicy's node(s) being exhausted,
1679the allowed memory represents the set of mempolicy nodes.
1680If it is due to a memory limit (or swap limit) being reached,
1681the allowed memory is that configured limit.
1682Finally, if it is due to the entire system being out of memory, the
1683allowed memory represents all allocatable resources.
1684.IP
1685The value of
1686.I oom_score_adj
1687is added to the badness score before it
1688is used to determine which task to kill.
1689Acceptable values range from \-1000
1690(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).
1691This allows user space to control the preference for OOM-killing,
1692ranging from always preferring a certain
1693task or completely disabling it from OOM-killing.
1694The lowest possible value, \-1000, is
1695equivalent to disabling OOM-killing entirely for that task,
1696since it will always report a badness score of 0.
1697.IP
1698Consequently, it is very simple for user space to define
1699the amount of memory to consider for each task.
1700Setting an
1701.I oom_score_adj
1702value of +500, for example,
1703is roughly equivalent to allowing the remainder of tasks sharing the
1704same system, cpuset, mempolicy, or memory controller resources
1705to use at least 50% more memory.
1706A value of \-500, on the other hand, would be roughly
1707equivalent to discounting 50% of the task's
1708allowed memory from being considered as scoring against the task.
1709.IP
1710For backward compatibility with previous kernels,
1711.I /proc/[pid]/oom_adj
1712can still be used to tune the badness score.
1713Its value is
1714scaled linearly with
1715.IR oom_score_adj .
1716.IP
1717Writing to
1718.IR /proc/[pid]/oom_score_adj
1719or
1720.IR /proc/[pid]/oom_adj
1721will change the other with its scaled value.
1722.IP
1723The
1724.BR choom (1)
1725program provides a command-line interface for adjusting the
1726.I oom_score_adj
1727value of a running process or a newly executed command.
1728.TP
1729.IR /proc/[pid]/pagemap " (since Linux 2.6.25)"
1730This file shows the mapping of each of the process's virtual pages
1731into physical page frames or swap area.
1732It contains one 64-bit value for each virtual page,
1733with the bits set as follows:
1734.RS
1735.TP
173663
1737If set, the page is present in RAM.
1738.TP
173962
1740If set, the page is in swap space
1741.TP
174261 (since Linux 3.5)
1743The page is a file-mapped page or a shared anonymous page.
1744.TP
174560\(en57 (since Linux 3.11)
1746Zero
1747.\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f
1748.TP
174956 (since Linux 4.2)
1750.\" commit 77bb499bb60f4b79cca7d139c8041662860fcf87
1751.\" commit 83b4b0bb635eee2b8e075062e4e008d1bc110ed7
1752The page is exclusively mapped.
1753.TP
175455 (since Linux 3.11)
1755PTE is soft-dirty
1756(see the kernel source file
1757.IR Documentation/admin\-guide/mm/soft\-dirty.rst ).
1758.TP
175954\(en0
1760If the page is present in RAM (bit 63), then these bits
1761provide the page frame number, which can be used to index
1762.IR /proc/kpageflags
1763and
1764.IR /proc/kpagecount .
1765If the page is present in swap (bit 62),
1766then bits 4\(en0 give the swap type, and bits 54\(en5 encode the swap offset.
1767.RE
1768.IP
1769Before Linux 3.11, bits 60\(en55 were
1770used to encode the base-2 log of the page size.
1771.IP
1772To employ
1773.IR /proc/[pid]/pagemap
1774efficiently, use
1775.IR /proc/[pid]/maps
1776to determine which areas of memory are actually mapped and seek
1777to skip over unmapped regions.
1778.IP
1779The
1780.IR /proc/[pid]/pagemap
1781file is present only if the
1782.B CONFIG_PROC_PAGE_MONITOR
1783kernel configuration option is enabled.
1784.IP
1785Permission to access this file is governed by a ptrace access mode
1786.B PTRACE_MODE_READ_FSCREDS
1787check; see
1788.BR ptrace (2).
1789.TP
1790.IR /proc/[pid]/personality " (since Linux 2.6.28)"
1791.\" commit 478307230810d7e2a753ed220db9066dfdf88718
1792This read-only file exposes the process's execution domain, as set by
1793.BR personality (2).
1794The value is displayed in hexadecimal notation.
1795.IP
1796Permission to access this file is governed by a ptrace access mode
1797.B PTRACE_MODE_ATTACH_FSCREDS
1798check; see
1799.BR ptrace (2).
1800.TP
1801.I /proc/[pid]/root
1802UNIX and Linux support the idea of a per-process root of the
1803filesystem, set by the
1804.BR chroot (2)
1805system call.
1806This file is a symbolic link that points to the process's
1807root directory, and behaves in the same way as
1808.IR exe ,
1809and
1810.IR fd/* .
1811.IP
1812Note however that this file is not merely a symbolic link.
1813It provides the same view of the filesystem (including namespaces and the
1814set of per-process mounts) as the process itself.
1815An example illustrates this point.
1816In one terminal, we start a shell in new user and mount namespaces,
1817and in that shell we create some new mounts:
1818.IP
1819.in +4n
1820.EX
1821$ \fBPS1=\(aqsh1# \(aq unshare \-Urnm\fP
1822sh1# \fBmount \-t tmpfs tmpfs /etc\fP # Mount empty tmpfs at /etc
1823sh1# \fBmount \-\-bind /usr /dev\fP # Mount /usr at /dev
1824sh1# \fBecho $$\fP
182527123
1826.EE
1827.in
1828.IP
1829In a second terminal window, in the initial mount namespace,
1830we look at the contents of the corresponding mounts in
1831the initial and new namespaces:
1832.IP
1833.in +4n
1834.EX
1835$ \fBPS1=\(aqsh2# \(aq sudo sh\fP
1836sh2# \fBls /etc | wc \-l\fP # In initial NS
1837309
1838sh2# \fBls /proc/27123/root/etc | wc \-l\fP # /etc in other NS
18390 # The empty tmpfs dir
1840sh2# \fBls /dev | wc \-l\fP # In initial NS
1841205
1842sh2# \fBls /proc/27123/root/dev | wc \-l\fP # /dev in other NS
184311 # Actually bind
1844 # mounted to /usr
1845sh2# \fBls /usr | wc \-l\fP # /usr in initial NS
184611
1847.EE
1848.in
1849.IP
1850.\" The following was still true as at kernel 2.6.13
1851In a multithreaded process, the contents of the
1852.I /proc/[pid]/root
1853symbolic link are not available if the main thread has already terminated
1854(typically by calling
1855.BR pthread_exit (3)).
1856.IP
1857Permission to dereference or read
1858.RB ( readlink (2))
1859this symbolic link is governed by a ptrace access mode
1860.B PTRACE_MODE_READ_FSCREDS
1861check; see
1862.BR ptrace (2).
1863.TP
1864.IR /proc/[pid]/projid_map " (since Linux 3.7)"
1865.\" commit f76d207a66c3a53defea67e7d36c3eb1b7d6d61d
1866See
1867.BR user_namespaces (7).
1868.TP
1869.IR /proc/[pid]/seccomp " (Linux 2.6.12 to 2.6.22)"
1870This file can be used to read and change the process's
1871secure computing (seccomp) mode setting.
1872It contains the value 0 if the process is not in seccomp mode,
1873and 1 if the process is in strict seccomp mode (see
1874.BR seccomp (2)).
1875Writing 1 to this file places the process irreversibly in strict seccomp mode.
1876(Further attempts to write to the file fail with the
1877.B EPERM
1878error.)
1879.IP
1880In Linux 2.6.23,
1881this file went away, to be replaced by the
1882.BR prctl (2)
1883.BR PR_GET_SECCOMP
1884and
1885.BR PR_SET_SECCOMP
1886operations (and later by
1887.BR seccomp (2)
1888and the
1889.I Seccomp
1890field in
1891.IR /proc/[pid]/status ).
1892.\" FIXME Describe /proc/[pid]/sessionid
1893.\" commit 1e0bd7550ea9cf474b1ad4c6ff5729a507f75fdc
1894.\" CONFIG_AUDITSYSCALL
1895.\" Added in 2.6.25; read-only; only readable by real UID
1896.\"
1897.\" FIXME Describe /proc/[pid]/sched
1898.\" Added in 2.6.23
1899.\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
1900.\" Displays various scheduling parameters
1901.\" This file can be written, to reset stats
1902.\" The set of fields exposed by this file have changed
1903.\" significantly over time.
1904.\" commit 43ae34cb4cd650d1eb4460a8253a8e747ba052ac
1905.\"
1906.\" FIXME Describe /proc/[pid]/schedstats and
1907.\" /proc/[pid]/task/[tid]/schedstats
1908.\" Added in 2.6.9
1909.\" CONFIG_SCHEDSTATS
1910.TP
1911.IR /proc/[pid]/setgroups " (since Linux 3.19)"
1912See
1913.BR user_namespaces (7).
1914.TP
1915.IR /proc/[pid]/smaps " (since Linux 2.6.14)"
1916This file shows memory consumption for each of the process's mappings.
1917(The
1918.BR pmap (1)
1919command displays similar information,
1920in a form that may be easier for parsing.)
1921For each mapping there is a series of lines such as the following:
1922.IP
1923.in +4n
1924.EX
192500400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash
1926Size: 552 kB
1927Rss: 460 kB
1928Pss: 100 kB
1929Shared_Clean: 452 kB
1930Shared_Dirty: 0 kB
1931Private_Clean: 8 kB
1932Private_Dirty: 0 kB
1933Referenced: 460 kB
1934Anonymous: 0 kB
1935AnonHugePages: 0 kB
1936ShmemHugePages: 0 kB
1937ShmemPmdMapped: 0 kB
1938Swap: 0 kB
1939KernelPageSize: 4 kB
1940MMUPageSize: 4 kB
1941KernelPageSize: 4 kB
1942MMUPageSize: 4 kB
1943Locked: 0 kB
1944ProtectionKey: 0
1945VmFlags: rd ex mr mw me dw
1946.EE
1947.in
1948.IP
1949The first of these lines shows the same information as is displayed
1950for the mapping in
1951.IR /proc/[pid]/maps .
1952The following lines show the size of the mapping,
1953the amount of the mapping that is currently resident in RAM ("Rss"),
1954the process's proportional share of this mapping ("Pss"),
1955the number of clean and dirty shared pages in the mapping,
1956and the number of clean and dirty private pages in the mapping.
1957"Referenced" indicates the amount of memory currently marked as
1958referenced or accessed.
1959"Anonymous" shows the amount of memory
1960that does not belong to any file.
1961"Swap" shows how much
1962would-be-anonymous memory is also used, but out on swap.
1963.IP
1964The "KernelPageSize" line (available since Linux 2.6.29)
1965is the page size used by the kernel to back the virtual memory area.
1966This matches the size used by the MMU in the majority of cases.
1967However, one counter-example occurs on PPC64 kernels
1968whereby a kernel using 64 kB as a base page size may still use 4 kB
1969pages for the MMU on older processors.
1970To distinguish the two attributes, the "MMUPageSize" line
1971(also available since Linux 2.6.29)
1972reports the page size used by the MMU.
1973.IP
1974The "Locked" indicates whether the mapping is locked in memory
1975or not.
1976.IP
1977The "ProtectionKey" line (available since Linux 4.9, on x86 only)
1978contains the memory protection key (see
1979.BR pkeys (7))
1980associated with the virtual memory area.
1981This entry is present only if the kernel was built with the
1982.B CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
1983configuration option (since Linux 4.6).
1984.IP
1985The "VmFlags" line (available since Linux 3.8)
1986represents the kernel flags associated with the virtual memory area,
1987encoded using the following two-letter codes:
1988.IP
1989 rd - readable
1990 wr - writable
1991 ex - executable
1992 sh - shared
1993 mr - may read
1994 mw - may write
1995 me - may execute
1996 ms - may share
1997 gd - stack segment grows down
1998 pf - pure PFN range
1999 dw - disabled write to the mapped file
2000 lo - pages are locked in memory
2001 io - memory mapped I/O area
2002 sr - sequential read advise provided
2003 rr - random read advise provided
2004 dc - do not copy area on fork
2005 de - do not expand area on remapping
2006 ac - area is accountable
2007 nr - swap space is not reserved for the area
2008 ht - area uses huge tlb pages
2009 sf - perform synchronous page faults (since Linux 4.15)
2010 nl - non-linear mapping (removed in Linux 4.0)
2011 ar - architecture specific flag
2012 wf - wipe on fork (since Linux 4.14)
2013 dd - do not include area into core dump
2014 sd - soft-dirty flag (since Linux 3.13)
2015 mm - mixed map area
2016 hg - huge page advise flag
2017 nh - no-huge page advise flag
2018 mg - mergeable advise flag
2019 um - userfaultfd missing pages tracking (since Linux 4.3)
2020 uw - userfaultfd wprotect pages tracking (since Linux 4.3)
2021.IP
2022The
2023.IR /proc/[pid]/smaps
2024file is present only if the
2025.B CONFIG_PROC_PAGE_MONITOR
2026kernel configuration option is enabled.
2027.TP
2028.IR /proc/[pid]/stack " (since Linux 2.6.29)"
2029.\" 2ec220e27f5040aec1e88901c1b6ea3d135787ad
2030This file provides a symbolic trace of the function calls in this
2031process's kernel stack.
2032This file is provided only if the kernel was built with the
2033.B CONFIG_STACKTRACE
2034configuration option.
2035.IP
2036Permission to access this file is governed by a ptrace access mode
2037.B PTRACE_MODE_ATTACH_FSCREDS
2038check; see
2039.BR ptrace (2).
2040.TP
2041.I /proc/[pid]/stat
2042Status information about the process.
2043This is used by
2044.BR ps (1).
2045It is defined in the kernel source file
2046.IR fs/proc/array.c "."
2047.IP
2048The fields, in order, with their proper
2049.BR scanf (3)
2050format specifiers, are listed below.
2051Whether or not certain of these fields display valid information is governed by
2052a ptrace access mode
2053.BR PTRACE_MODE_READ_FSCREDS " | " PTRACE_MODE_NOAUDIT
2054check (refer to
2055.BR ptrace (2)).
2056If the check denies access, then the field value is displayed as 0.
2057The affected fields are indicated with the marking [PT].
2058.RS
2059.TP
2060(1) \fIpid\fP \ %d
2061.br
2062The process ID.
2063.TP
2064(2) \fIcomm\fP \ %s
2065The filename of the executable, in parentheses.
2066Strings longer than
2067.B TASK_COMM_LEN
2068(16) characters (including the terminating null byte) are silently truncated.
2069This is visible whether or not the executable is swapped out.
2070.TP
2071(3) \fIstate\fP \ %c
2072One of the following characters, indicating process state:
2073.RS
2074.IP R 3
2075Running
2076.IP S
2077Sleeping in an interruptible wait
2078.IP D
2079Waiting in uninterruptible
2080disk sleep
2081.IP Z
2082Zombie
2083.IP T
2084Stopped (on a signal) or (before Linux 2.6.33) trace stopped
2085.IP t
2086.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
2087Tracing stop (Linux 2.6.33 onward)
2088.IP W
2089Paging (only before Linux 2.6.0)
2090.IP X
2091Dead (from Linux 2.6.0 onward)
2092.IP x
2093.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
2094Dead (Linux 2.6.33 to
2095.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
20963.13 only)
2097.IP K
2098.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
2099Wakekill (Linux 2.6.33 to
2100.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
21013.13 only)
2102.IP W
2103.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
2104Waking (Linux 2.6.33 to
2105.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
21063.13 only)
2107.IP P
2108.\" commit f2530dc71cf0822f90bb63ea4600caaef33a66bb
2109Parked (Linux 3.9 to
2110.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
21113.13 only)
2112.RE
2113.TP
2114(4) \fIppid\fP \ %d
2115The PID of the parent of this process.
2116.TP
2117(5) \fIpgrp\fP \ %d
2118The process group ID of the process.
2119.TP
2120(6) \fIsession\fP \ %d
2121The session ID of the process.
2122.TP
2123(7) \fItty_nr\fP \ %d
2124The controlling terminal of the process.
2125(The minor device number is contained in the combination of bits
212631 to 20 and 7 to 0;
2127the major device number is in bits 15 to 8.)
2128.TP
2129(8) \fItpgid\fP \ %d
2130.\" This field and following, up to and including wchan added 0.99.1
2131The ID of the foreground process group of the controlling
2132terminal of the process.
2133.TP
2134(9) \fIflags\fP \ %u
2135The kernel flags word of the process.
2136For bit meanings,
2137see the PF_* defines in the Linux kernel source file
2138.IR include/linux/sched.h .
2139Details depend on the kernel version.
2140.IP
2141The format for this field was %lu before Linux 2.6.
2142.TP
2143(10) \fIminflt\fP \ %lu
2144The number of minor faults the process has made which have not
2145required loading a memory page from disk.
2146.TP
2147(11) \fIcminflt\fP \ %lu
2148The number of minor faults that the process's
2149waited-for children have made.
2150.TP
2151(12) \fImajflt\fP \ %lu
2152The number of major faults the process has made which have
2153required loading a memory page from disk.
2154.TP
2155(13) \fIcmajflt\fP \ %lu
2156The number of major faults that the process's
2157waited-for children have made.
2158.TP
2159(14) \fIutime\fP \ %lu
2160Amount of time that this process has been scheduled in user mode,
2161measured in clock ticks (divide by
2162.IR sysconf(_SC_CLK_TCK) ).
2163This includes guest time, \fIguest_time\fP
2164(time spent running a virtual CPU, see below),
2165so that applications that are not aware of the guest time field
2166do not lose that time from their calculations.
2167.TP
2168(15) \fIstime\fP \ %lu
2169Amount of time that this process has been scheduled in kernel mode,
2170measured in clock ticks (divide by
2171.IR sysconf(_SC_CLK_TCK) ).
2172.TP
2173(16) \fIcutime\fP \ %ld
2174Amount of time that this process's
2175waited-for children have been scheduled in user mode,
2176measured in clock ticks (divide by
2177.IR sysconf(_SC_CLK_TCK) ).
2178(See also
2179.BR times (2).)
2180This includes guest time, \fIcguest_time\fP
2181(time spent running a virtual CPU, see below).
2182.TP
2183(17) \fIcstime\fP \ %ld
2184Amount of time that this process's
2185waited-for children have been scheduled in kernel mode,
2186measured in clock ticks (divide by
2187.IR sysconf(_SC_CLK_TCK) ).
2188.TP
2189(18) \fIpriority\fP \ %ld
2190(Explanation for Linux 2.6)
2191For processes running a real-time scheduling policy
2192.RI ( policy
2193below; see
2194.BR sched_setscheduler (2)),
2195this is the negated scheduling priority, minus one;
2196that is, a number in the range \-2 to \-100,
2197corresponding to real-time priorities 1 to 99.
2198For processes running under a non-real-time scheduling policy,
2199this is the raw nice value
2200.RB ( setpriority (2))
2201as represented in the kernel.
2202The kernel stores nice values as numbers
2203in the range 0 (high) to 39 (low),
2204corresponding to the user-visible nice range of \-20 to 19.
2205.IP
2206Before Linux 2.6, this was a scaled value based on
2207the scheduler weighting given to this process.
2208.\" And back in kernel 1.2 days things were different again.
2209.TP
2210(19) \fInice\fP \ %ld
2211The nice value (see
2212.BR setpriority (2)),
2213a value in the range 19 (low priority) to \-20 (high priority).
2214.\" Back in kernel 1.2 days things were different.
2215.\" .TP
2216.\" \fIcounter\fP %ld
2217.\" The current maximum size in jiffies of the process's next timeslice,
2218.\" or what is currently left of its current timeslice, if it is the
2219.\" currently running process.
2220.\" .TP
2221.\" \fItimeout\fP %u
2222.\" The time in jiffies of the process's next timeout.
2223.\" timeout was removed sometime around 2.1/2.2
2224.TP
2225(20) \fInum_threads\fP \ %ld
2226Number of threads in this process (since Linux 2.6).
2227Before kernel 2.6, this field was hard coded to 0 as a placeholder
2228for an earlier removed field.
2229.TP
2230(21) \fIitrealvalue\fP \ %ld
2231The time in jiffies before the next
2232.B SIGALRM
2233is sent to the process due to an interval timer.
2234Since kernel 2.6.17, this field is no longer maintained,
2235and is hard coded as 0.
2236.TP
2237(22) \fIstarttime\fP \ %llu
2238The time the process started after system boot.
2239In kernels before Linux 2.6, this value was expressed in jiffies.
2240Since Linux 2.6, the value is expressed in clock ticks (divide by
2241.IR sysconf(_SC_CLK_TCK) ).
2242.IP
2243The format for this field was %lu before Linux 2.6.
2244.TP
2245(23) \fIvsize\fP \ %lu
2246Virtual memory size in bytes.
2247.TP
2248(24) \fIrss\fP \ %ld
2249Resident Set Size: number of pages the process has in real memory.
2250This is just the pages which
2251count toward text, data, or stack space.
2252This does not include pages
2253which have not been demand-loaded in, or which are swapped out.
2254This value is inaccurate; see
2255.I /proc/[pid]/statm
2256below.
2257.TP
2258(25) \fIrsslim\fP \ %lu
2259Current soft limit in bytes on the rss of the process;
2260see the description of
2261.B RLIMIT_RSS
2262in
2263.BR getrlimit (2).
2264.TP
2265(26) \fIstartcode\fP \ %lu \ [PT]
2266The address above which program text can run.
2267.TP
2268(27) \fIendcode\fP \ %lu \ [PT]
2269The address below which program text can run.
2270.TP
2271(28) \fIstartstack\fP \ %lu \ [PT]
2272The address of the start (i.e., bottom) of the stack.
2273.TP
2274(29) \fIkstkesp\fP \ %lu \ [PT]
2275The current value of ESP (stack pointer), as found in the
2276kernel stack page for the process.
2277.TP
2278(30) \fIkstkeip\fP \ %lu \ [PT]
2279The current EIP (instruction pointer).
2280.TP
2281(31) \fIsignal\fP \ %lu
2282The bitmap of pending signals, displayed as a decimal number.
2283Obsolete, because it does not provide information on real-time signals; use
2284.I /proc/[pid]/status
2285instead.
2286.TP
2287(32) \fIblocked\fP \ %lu
2288The bitmap of blocked signals, displayed as a decimal number.
2289Obsolete, because it does not provide information on real-time signals; use
2290.I /proc/[pid]/status
2291instead.
2292.TP
2293(33) \fIsigignore\fP \ %lu
2294The bitmap of ignored signals, displayed as a decimal number.
2295Obsolete, because it does not provide information on real-time signals; use
2296.I /proc/[pid]/status
2297instead.
2298.TP
2299(34) \fIsigcatch\fP \ %lu
2300The bitmap of caught signals, displayed as a decimal number.
2301Obsolete, because it does not provide information on real-time signals; use
2302.I /proc/[pid]/status
2303instead.
2304.TP
2305(35) \fIwchan\fP \ %lu \ [PT]
2306This is the "channel" in which the process is waiting.
2307It is the address of a location in the kernel where the process is sleeping.
2308The corresponding symbolic name can be found in
2309.IR /proc/[pid]/wchan .
2310.TP
2311(36) \fInswap\fP \ %lu
2312.\" nswap was added in 2.0
2313Number of pages swapped (not maintained).
2314.TP
2315(37) \fIcnswap\fP \ %lu
2316.\" cnswap was added in 2.0
2317Cumulative \fInswap\fP for child processes (not maintained).
2318.TP
2319(38) \fIexit_signal\fP \ %d \ (since Linux 2.1.22)
2320Signal to be sent to parent when we die.
2321.TP
2322(39) \fIprocessor\fP \ %d \ (since Linux 2.2.8)
2323CPU number last executed on.
2324.TP
2325(40) \fIrt_priority\fP \ %u \ (since Linux 2.5.19)
2326Real-time scheduling priority, a number in the range 1 to 99 for
2327processes scheduled under a real-time policy,
2328or 0, for non-real-time processes (see
2329.BR sched_setscheduler (2)).
2330.TP
2331(41) \fIpolicy\fP \ %u \ (since Linux 2.5.19)
2332Scheduling policy (see
2333.BR sched_setscheduler (2)).
2334Decode using the SCHED_* constants in
2335.IR linux/sched.h .
2336.IP
2337The format for this field was %lu before Linux 2.6.22.
2338.TP
2339(42) \fIdelayacct_blkio_ticks\fP \ %llu \ (since Linux 2.6.18)
2340Aggregated block I/O delays, measured in clock ticks (centiseconds).
2341.TP
2342(43) \fIguest_time\fP \ %lu \ (since Linux 2.6.24)
2343Guest time of the process (time spent running a virtual CPU
2344for a guest operating system), measured in clock ticks (divide by
2345.IR sysconf(_SC_CLK_TCK) ).
2346.TP
2347(44) \fIcguest_time\fP \ %ld \ (since Linux 2.6.24)
2348Guest time of the process's children, measured in clock ticks (divide by
2349.IR sysconf(_SC_CLK_TCK) ).
2350.TP
2351(45) \fIstart_data\fP \ %lu \ (since Linux 3.3) \ [PT]
2352.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
2353Address above which program initialized and
2354uninitialized (BSS) data are placed.
2355.TP
2356(46) \fIend_data\fP \ %lu \ (since Linux 3.3) \ [PT]
2357.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
2358Address below which program initialized and
2359uninitialized (BSS) data are placed.
2360.TP
2361(47) \fIstart_brk\fP \ %lu \ (since Linux 3.3) \ [PT]
2362.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
2363Address above which program heap can be expanded with
2364.BR brk (2).
2365.TP
2366(48) \fIarg_start\fP \ %lu \ (since Linux 3.5) \ [PT]
2367.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
2368Address above which program command-line arguments
2369.RI ( argv )
2370are placed.
2371.TP
2372(49) \fIarg_end\fP \ %lu \ (since Linux 3.5) \ [PT]
2373.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
2374Address below program command-line arguments
2375.RI ( argv )
2376are placed.
2377.TP
2378(50) \fIenv_start\fP \ %lu \ (since Linux 3.5) \ [PT]
2379.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
2380Address above which program environment is placed.
2381.TP
2382(51) \fIenv_end\fP \ %lu \ (since Linux 3.5) \ [PT]
2383.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
2384Address below which program environment is placed.
2385.TP
2386(52) \fIexit_code\fP \ %d \ (since Linux 3.5) \ [PT]
2387.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
2388The thread's exit status in the form reported by
2389.BR waitpid (2).
2390.RE
2391.TP
2392.I /proc/[pid]/statm
2393Provides information about memory usage, measured in pages.
2394The columns are:
2395.IP
2396.in +4n
2397.EX
2398size (1) total program size
2399 (same as VmSize in \fI/proc/[pid]/status\fP)
2400resident (2) resident set size
2401 (inaccurate; same as VmRSS in \fI/proc/[pid]/status\fP)
2402shared (3) number of resident shared pages
2403 (i.e., backed by a file)
2404 (inaccurate; same as RssFile+RssShmem in
2405 \fI/proc/[pid]/status\fP)
2406text (4) text (code)
2407.\" (not including libs; broken, includes data segment)
2408lib (5) library (unused since Linux 2.6; always 0)
2409data (6) data + stack
2410.\" (including libs; broken, includes library text)
2411dt (7) dirty pages (unused since Linux 2.6; always 0)
2412.EE
2413.in
2414.IP
2415.\" See SPLIT_RSS_COUNTING in the kernel.
2416.\" Inaccuracy is bounded by TASK_RSS_EVENTS_THRESH.
2417Some of these values are inaccurate because
2418of a kernel-internal scalability optimization.
2419If accurate values are required, use
2420.I /proc/[pid]/smaps
2421or
2422.I /proc/[pid]/smaps_rollup
2423instead, which are much slower but provide accurate, detailed information.
2424.TP
2425.I /proc/[pid]/status
2426Provides much of the information in
2427.I /proc/[pid]/stat
2428and
2429.I /proc/[pid]/statm
2430in a format that's easier for humans to parse.
2431Here's an example:
2432.IP
2433.in +4n
2434.EX
2435.RB "$" " cat /proc/$$/status"
2436Name: bash
2437Umask: 0022
2438State: S (sleeping)
2439Tgid: 17248
2440Ngid: 0
2441Pid: 17248
2442PPid: 17200
2443TracerPid: 0
2444Uid: 1000 1000 1000 1000
2445Gid: 100 100 100 100
2446FDSize: 256
2447Groups: 16 33 100
2448NStgid: 17248
2449NSpid: 17248
2450NSpgid: 17248
2451NSsid: 17200
2452VmPeak: 131168 kB
2453VmSize: 131168 kB
2454VmLck: 0 kB
2455VmPin: 0 kB
2456VmHWM: 13484 kB
2457VmRSS: 13484 kB
2458RssAnon: 10264 kB
2459RssFile: 3220 kB
2460RssShmem: 0 kB
2461VmData: 10332 kB
2462VmStk: 136 kB
2463VmExe: 992 kB
2464VmLib: 2104 kB
2465VmPTE: 76 kB
2466VmPMD: 12 kB
2467VmSwap: 0 kB
2468HugetlbPages: 0 kB # 4.4
2469CoreDumping: 0 # 4.15
2470Threads: 1
2471SigQ: 0/3067
2472SigPnd: 0000000000000000
2473ShdPnd: 0000000000000000
2474SigBlk: 0000000000010000
2475SigIgn: 0000000000384004
2476SigCgt: 000000004b813efb
2477CapInh: 0000000000000000
2478CapPrm: 0000000000000000
2479CapEff: 0000000000000000
2480CapBnd: ffffffffffffffff
2481CapAmb: 0000000000000000
2482NoNewPrivs: 0
2483Seccomp: 0
2484Speculation_Store_Bypass: vulnerable
2485Cpus_allowed: 00000001
2486Cpus_allowed_list: 0
2487Mems_allowed: 1
2488Mems_allowed_list: 0
2489voluntary_ctxt_switches: 150
2490nonvoluntary_ctxt_switches: 545
2491.EE
2492.in
2493.IP
2494The fields are as follows:
2495.RS
2496.TP
2497.IR Name
2498Command run by this process.
2499Strings longer than
2500.B TASK_COMM_LEN
2501(16) characters (including the terminating null byte) are silently truncated.
2502.TP
2503.IR Umask
2504Process umask, expressed in octal with a leading zero; see
2505.BR umask (2).
2506(Since Linux 4.7.)
2507.TP
2508.IR State
2509Current state of the process.
2510One of
2511"R (running)",
2512"S (sleeping)",
2513"D (disk sleep)",
2514"T (stopped)",
2515"t (tracing stop)",
2516"Z (zombie)",
2517or
2518"X (dead)".
2519.TP
2520.IR Tgid
2521Thread group ID (i.e., Process ID).
2522.TP
2523.IR Ngid
2524NUMA group ID (0 if none; since Linux 3.13).
2525.TP
2526.IR Pid
2527Thread ID (see
2528.BR gettid (2)).
2529.TP
2530.IR PPid
2531PID of parent process.
2532.TP
2533.IR TracerPid
2534PID of process tracing this process (0 if not being traced).
2535.TP
2536.IR Uid ", " Gid
2537Real, effective, saved set, and filesystem UIDs (GIDs).
2538.TP
2539.IR FDSize
2540Number of file descriptor slots currently allocated.
2541.TP
2542.IR Groups
2543Supplementary group list.
2544.TP
2545.IR NStgid
2546Thread group ID (i.e., PID) in each of the PID namespaces of which
2547.I [pid]
2548is a member.
2549The leftmost entry shows the value with respect to the PID namespace
2550of the process that mounted this procfs (or the root namespace
2551if mounted by the kernel),
2552followed by the value in successively nested inner namespaces.
2553.\" commit e4bc33245124db69b74a6d853ac76c2976f472d5
2554(Since Linux 4.1.)
2555.TP
2556.IR NSpid
2557Thread ID in each of the PID namespaces of which
2558.I [pid]
2559is a member.
2560The fields are ordered as for
2561.IR NStgid .
2562(Since Linux 4.1.)
2563.TP
2564.IR NSpgid
2565Process group ID in each of the PID namespaces of which
2566.I [pid]
2567is a member.
2568The fields are ordered as for
2569.IR NStgid .
2570(Since Linux 4.1.)
2571.TP
2572.IR NSsid
2573descendant namespace session ID hierarchy
2574Session ID in each of the PID namespaces of which
2575.I [pid]
2576is a member.
2577The fields are ordered as for
2578.IR NStgid .
2579(Since Linux 4.1.)
2580.TP
2581.IR VmPeak
2582Peak virtual memory size.
2583.TP
2584.IR VmSize
2585Virtual memory size.
2586.TP
2587.IR VmLck
2588Locked memory size (see
2589.BR mlock (2)).
2590.TP
2591.IR VmPin
2592Pinned memory size
2593.\" commit bc3e53f682d93df677dbd5006a404722b3adfe18
2594(since Linux 3.2).
2595These are pages that can't be moved because something needs to
2596directly access physical memory.
2597.TP
2598.IR VmHWM
2599Peak resident set size ("high water mark").
2600This value is inaccurate; see
2601.I /proc/[pid]/statm
2602above.
2603.TP
2604.IR VmRSS
2605Resident set size.
2606Note that the value here is the sum of
2607.IR RssAnon ,
2608.IR RssFile ,
2609and
2610.IR RssShmem .
2611This value is inaccurate; see
2612.I /proc/[pid]/statm
2613above.
2614.TP
2615.IR RssAnon
2616Size of resident anonymous memory.
2617.\" commit bf9683d6990589390b5178dafe8fd06808869293
2618(since Linux 4.5).
2619This value is inaccurate; see
2620.I /proc/[pid]/statm
2621above.
2622.TP
2623.IR RssFile
2624Size of resident file mappings.
2625.\" commit bf9683d6990589390b5178dafe8fd06808869293
2626(since Linux 4.5).
2627This value is inaccurate; see
2628.I /proc/[pid]/statm
2629above.
2630.TP
2631.IR RssShmem
2632Size of resident shared memory (includes System V shared memory,
2633mappings from
2634.BR tmpfs (5),
2635and shared anonymous mappings).
2636.\" commit bf9683d6990589390b5178dafe8fd06808869293
2637(since Linux 4.5).
2638.TP
2639.IR VmData ", " VmStk ", " VmExe
2640Size of data, stack, and text segments.
2641This value is inaccurate; see
2642.I /proc/[pid]/statm
2643above.
2644.TP
2645.IR VmLib
2646Shared library code size.
2647.TP
2648.IR VmPTE
2649Page table entries size (since Linux 2.6.10).
2650.TP
2651.IR VmPMD
2652.\" commit dc6c9a35b66b520cf67e05d8ca60ebecad3b0479
2653Size of second-level page tables (added in Linux 4.0; removed in Linux 4.15).
2654.TP
2655.IR VmSwap
2656.\" commit b084d4353ff99d824d3bc5a5c2c22c70b1fba722
2657Swapped-out virtual memory size by anonymous private pages;
2658shmem swap usage is not included (since Linux 2.6.34).
2659This value is inaccurate; see
2660.I /proc/[pid]/statm
2661above.
2662.TP
2663.IR HugetlbPages
2664Size of hugetlb memory portions
2665.\" commit 5d317b2b6536592a9b51fe65faed43d65ca9158e
2666(since Linux 4.4).
2667.TP
2668.IR CoreDumping
2669Contains the value 1 if the process is currently dumping core,
2670and 0 if it is not
2671.\" commit c643401218be0f4ab3522e0c0a63016596d6e9ca
2672(since Linux 4.15).
2673This information can be used by a monitoring process to avoid killing
2674a process that is currently dumping core,
2675which could result in a corrupted core dump file.
2676.TP
2677.IR Threads
2678Number of threads in process containing this thread.
2679.TP
2680.IR SigQ
2681This field contains two slash-separated numbers that relate to
2682queued signals for the real user ID of this process.
2683The first of these is the number of currently queued
2684signals for this real user ID, and the second is the
2685resource limit on the number of queued signals for this process
2686(see the description of
2687.BR RLIMIT_SIGPENDING
2688in
2689.BR getrlimit (2)).
2690.TP
2691.IR SigPnd ", " ShdPnd
2692Mask (expressed in hexadecimal)
2693of signals pending for thread and for process as a whole (see
2694.BR pthreads (7)
2695and
2696.BR signal (7)).
2697.TP
2698.IR SigBlk ", " SigIgn ", " SigCgt
2699Masks (expressed in hexadecimal)
2700indicating signals being blocked, ignored, and caught (see
2701.BR signal (7)).
2702.TP
2703.IR CapInh ", " CapPrm ", " CapEff
2704Masks (expressed in hexadecimal)
2705of capabilities enabled in inheritable, permitted, and effective sets
2706(see
2707.BR capabilities (7)).
2708.TP
2709.IR CapBnd
2710Capability bounding set, expressed in hexadecimal
2711(since Linux 2.6.26, see
2712.BR capabilities (7)).
2713.TP
2714.IR CapAmb
2715Ambient capability set, expressed in hexadecimal
2716(since Linux 4.3, see
2717.BR capabilities (7)).
2718.TP
2719.IR NoNewPrivs
2720.\" commit af884cd4a5ae62fcf5e321fecf0ec1014730353d
2721Value of the
2722.I no_new_privs
2723bit
2724(since Linux 4.10, see
2725.BR prctl (2)).
2726.TP
2727.IR Seccomp
2728.\" commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816
2729Seccomp mode of the process
2730(since Linux 3.8, see
2731.BR seccomp (2)).
27320 means
2733.BR SECCOMP_MODE_DISABLED ;
27341 means
2735.BR SECCOMP_MODE_STRICT ;
27362 means
2737.BR SECCOMP_MODE_FILTER .
2738This field is provided only if the kernel was built with the
2739.BR CONFIG_SECCOMP
2740kernel configuration option enabled.
2741.TP
2742.IR Speculation_Store_Bypass
2743.\" commit fae1fa0fc6cca8beee3ab8ed71d54f9a78fa3f64
2744Speculation flaw mitigation state
2745(since Linux 4.17, see
2746.BR prctl (2)).
2747.TP
2748.IR Cpus_allowed
2749Hexadecimal mask of CPUs on which this process may run
2750(since Linux 2.6.24, see
2751.BR cpuset (7)).
2752.TP
2753.IR Cpus_allowed_list
2754Same as previous, but in "list format"
2755(since Linux 2.6.26, see
2756.BR cpuset (7)).
2757.TP
2758.IR Mems_allowed
2759Mask of memory nodes allowed to this process
2760(since Linux 2.6.24, see
2761.BR cpuset (7)).
2762.TP
2763.IR Mems_allowed_list
2764Same as previous, but in "list format"
2765(since Linux 2.6.26, see
2766.BR cpuset (7)).
2767.TP
2768.IR voluntary_ctxt_switches ", " nonvoluntary_ctxt_switches
2769Number of voluntary and involuntary context switches (since Linux 2.6.23).
2770.RE
2771.TP
2772.IR /proc/[pid]/syscall " (since Linux 2.6.27)"
2773.\" commit ebcb67341fee34061430f3367f2e507e52ee051b
2774This file exposes the system call number and argument registers for the
2775system call currently being executed by the process,
2776followed by the values of the stack pointer and program counter registers.
2777The values of all six argument registers are exposed,
2778although most system calls use fewer registers.
2779.IP
2780If the process is blocked, but not in a system call,
2781then the file displays \-1 in place of the system call number,
2782followed by just the values of the stack pointer and program counter.
2783If process is not blocked, then the file contains just the string "running".
2784.IP
2785This file is present only if the kernel was configured with
2786.BR CONFIG_HAVE_ARCH_TRACEHOOK .
2787.IP
2788Permission to access this file is governed by a ptrace access mode
2789.B PTRACE_MODE_ATTACH_FSCREDS
2790check; see
2791.BR ptrace (2).
2792.TP
2793.IR /proc/[pid]/task " (since Linux 2.6.0)"
2794.\" Precisely: Linux 2.6.0-test6
2795This is a directory that contains one subdirectory
2796for each thread in the process.
2797The name of each subdirectory is the numerical thread ID
2798.RI ( [tid] )
2799of the thread (see
2800.BR gettid (2)).
2801.IP
2802Within each of these subdirectories, there is a set of
2803files with the same names and contents as under the
2804.I /proc/[pid]
2805directories.
2806For attributes that are shared by all threads, the contents for
2807each of the files under the
2808.I task/[tid]
2809subdirectories will be the same as in the corresponding
2810file in the parent
2811.I /proc/[pid]
2812directory
2813(e.g., in a multithreaded process, all of the
2814.I task/[tid]/cwd
2815files will have the same value as the
2816.I /proc/[pid]/cwd
2817file in the parent directory, since all of the threads in a process
2818share a working directory).
2819For attributes that are distinct for each thread,
2820the corresponding files under
2821.I task/[tid]
2822may have different values (e.g., various fields in each of the
2823.I task/[tid]/status
2824files may be different for each thread),
2825.\" in particular: "children" :/
2826or they might not exist in
2827.I /proc/[pid]
2828at all.
2829.IP
2830.\" The following was still true as at kernel 2.6.13
2831In a multithreaded process, the contents of the
2832.I /proc/[pid]/task
2833directory are not available if the main thread has already terminated
2834(typically by calling
2835.BR pthread_exit (3)).
2836.TP
2837.IR /proc/[pid]/task/[tid]/children " (since Linux 3.5)"
2838.\" commit 818411616baf46ceba0cff6f05af3a9b294734f7
2839A space-separated list of child tasks of this task.
2840Each child task is represented by its TID.
2841.IP
2842.\" see comments in get_children_pid() in fs/proc/array.c
2843This option is intended for use by the checkpoint-restore (CRIU) system,
2844and reliably provides a list of children only if all of the child processes
2845are stopped or frozen.
2846It does not work properly if children of the target task exit while
2847the file is being read!
2848Exiting children may cause non-exiting children to be omitted from the list.
2849This makes this interface even more unreliable than classic PID-based
2850approaches if the inspected task and its children aren't frozen,
2851and most code should probably not use this interface.
2852.IP
2853Until Linux 4.2, the presence of this file was governed by the
2854.B CONFIG_CHECKPOINT_RESTORE
2855kernel configuration option.
2856Since Linux 4.2,
2857.\" commit 2e13ba54a2682eea24918b87ad3edf70c2cf085b
2858it is governed by the
2859.B CONFIG_PROC_CHILDREN
2860option.
2861.TP
2862.IR /proc/[pid]/timers " (since Linux 3.10)"
2863.\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5
2864.\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0
2865A list of the POSIX timers for this process.
2866Each timer is listed with a line that starts with the string "ID:".
2867For example:
2868.IP
2869.in +4n
2870.EX
2871ID: 1
2872signal: 60/00007fff86e452a8
2873notify: signal/pid.2634
2874ClockID: 0
2875ID: 0
2876signal: 60/00007fff86e452a8
2877notify: signal/pid.2634
2878ClockID: 1
2879.EE
2880.in
2881.IP
2882The lines shown for each timer have the following meanings:
2883.RS
2884.TP
2885.I ID
2886The ID for this timer.
2887This is not the same as the timer ID returned by
2888.BR timer_create (2);
2889rather, it is the same kernel-internal ID that is available via the
2890.I si_timerid
2891field of the
2892.IR siginfo_t
2893structure (see
2894.BR sigaction (2)).
2895.TP
2896.I signal
2897This is the signal number that this timer uses to deliver notifications
2898followed by a slash, and then the
2899.I sigev_value
2900value supplied to the signal handler.
2901Valid only for timers that notify via a signal.
2902.TP
2903.I notify
2904The part before the slash specifies the mechanism
2905that this timer uses to deliver notifications,
2906and is one of "thread", "signal", or "none".
2907Immediately following the slash is either the string "tid" for timers
2908with
2909.B SIGEV_THREAD_ID
2910notification, or "pid" for timers that notify by other mechanisms.
2911Following the "." is the PID of the process
2912(or the kernel thread ID of the thread) that will be delivered
2913a signal if the timer delivers notifications via a signal.
2914.TP
2915.I ClockID
2916This field identifies the clock that the timer uses for measuring time.
2917For most clocks, this is a number that matches one of the user-space
2918.BR CLOCK_*
2919constants exposed via
2920.IR <time.h> .
2921.B CLOCK_PROCESS_CPUTIME_ID
2922timers display with a value of \-6
2923in this field.
2924.B CLOCK_THREAD_CPUTIME_ID
2925timers display with a value of \-2
2926in this field.
2927.RE
2928.IP
2929This file is available only when the kernel was configured with
2930.BR CONFIG_CHECKPOINT_RESTORE .
2931.TP
2932.IR /proc/[pid]/timerslack_ns " (since Linux 4.6)"
2933.\" commit da8b44d5a9f8bf26da637b7336508ca534d6b319
2934.\" commit 5de23d435e88996b1efe0e2cebe242074ce67c9e
2935This file exposes the process's "current" timer slack value,
2936expressed in nanoseconds.
2937The file is writable,
2938allowing the process's timer slack value to be changed.
2939Writing 0 to this file resets the "current" timer slack to the
2940"default" timer slack value.
2941For further details, see the discussion of
2942.BR PR_SET_TIMERSLACK
2943in
2944.BR prctl (2).
2945.IP
2946Initially,
2947permission to access this file was governed by a ptrace access mode
2948.B PTRACE_MODE_ATTACH_FSCREDS
2949check (see
2950.BR ptrace (2)).
2951However, this was subsequently deemed too strict a requirement
2952(and had the side effect that requiring a process to have the
2953.B CAP_SYS_PTRACE
2954capability would also allow it to view and change any process's memory).
2955Therefore, since Linux 4.9,
2956.\" commit 7abbaf94049914f074306d960b0f968ffe52e59f
2957only the (weaker)
2958.B CAP_SYS_NICE
2959capability is required to access this file.
2960.TP
2961.IR /proc/[pid]/uid_map " (since Linux 3.5)"
2962See
2963.BR user_namespaces (7).
2964.TP
2965.IR /proc/[pid]/wchan " (since Linux 2.6.0)"
2966The symbolic name corresponding to the location
2967in the kernel where the process is sleeping.
2968.IP
2969Permission to access this file is governed by a ptrace access mode
2970.B PTRACE_MODE_READ_FSCREDS
2971check; see
2972.BR ptrace (2).
2973.TP
2974.IR /proc/[tid]
2975There is a numerical subdirectory for each running thread
2976that is not a thread group leader
2977(i.e., a thread whose thread ID is not the same as its process ID);
2978the subdirectory is named by the thread ID.
2979Each one of these subdirectories contains files and subdirectories
2980exposing information about the thread with the thread ID
2981.IR tid .
2982The contents of these directories are the same as the corresponding
2983.IR /proc/[pid]/task/[tid]
2984directories.
2985.IP
2986The
2987.I /proc/[tid]
2988subdirectories are
2989.I not
2990visible when iterating through
2991.I /proc
2992with
2993.BR getdents (2)
2994(and thus are
2995.I not
2996visible when one uses
2997.BR ls (1)
2998to view the contents of
2999.IR /proc ).
3000However, the pathnames of these directories are visible to
3001(i.e., usable as arguments in)
3002system calls that operate on pathnames.
3003.TP
3004.I /proc/apm
3005Advanced power management version and battery information when
3006.B CONFIG_APM
3007is defined at kernel compilation time.
3008.TP
3009.I /proc/buddyinfo
3010This file contains information which is used for diagnosing memory
3011fragmentation issues.
3012Each line starts with the identification of the node and the name
3013of the zone which together identify a memory region.
3014This is then
3015followed by the count of available chunks of a certain order in
3016which these zones are split.
3017The size in bytes of a certain order is given by the formula:
3018.IP
3019 (2^order)\ *\ PAGE_SIZE
3020.IP
3021The binary buddy allocator algorithm inside the kernel will split
3022one chunk into two chunks of a smaller order (thus with half the
3023size) or combine two contiguous chunks into one larger chunk of
3024a higher order (thus with double the size) to satisfy allocation
3025requests and to counter memory fragmentation.
3026The order matches the column number, when starting to count at zero.
3027.IP
3028For example on an x86-64 system:
3029.RS -12
3030.EX
3031Node 0, zone DMA 1 1 1 0 2 1 1 0 1 1 3
3032Node 0, zone DMA32 65 47 4 81 52 28 13 10 5 1 404
3033Node 0, zone Normal 216 55 189 101 84 38 37 27 5 3 587
3034.EE
3035.RE
3036.IP
3037In this example, there is one node containing three zones and there
3038are 11 different chunk sizes.
3039If the page size is 4 kilobytes, then the first zone called
3040.I DMA
3041(on x86 the first 16 megabyte of memory) has 1 chunk of 4 kilobytes
3042(order 0) available and has 3 chunks of 4 megabytes (order 10) available.
3043.IP
3044If the memory is heavily fragmented, the counters for higher
3045order chunks will be zero and allocation of large contiguous areas
3046will fail.
3047.IP
3048Further information about the zones can be found in
3049.IR /proc/zoneinfo .
3050.TP
3051.I /proc/bus
3052Contains subdirectories for installed buses.
3053.TP
3054.I /proc/bus/pccard
3055Subdirectory for PCMCIA devices when
3056.B CONFIG_PCMCIA
3057is set at kernel compilation time.
3058.TP
3059.I /proc/bus/pccard/drivers
3060.TP
3061.I /proc/bus/pci
3062Contains various bus subdirectories and pseudo-files containing
3063information about PCI buses, installed devices, and device
3064drivers.
3065Some of these files are not ASCII.
3066.TP
3067.I /proc/bus/pci/devices
3068Information about PCI devices.
3069They may be accessed through
3070.BR lspci (8)
3071and
3072.BR setpci (8).
3073.TP
3074.IR /proc/cgroups " (since Linux 2.6.24)"
3075See
3076.BR cgroups (7).
3077.TP
3078.I /proc/cmdline
3079Arguments passed to the Linux kernel at boot time.
3080Often done via a boot manager such as
3081.BR lilo (8)
3082or
3083.BR grub (8).
3084.TP
3085.IR /proc/config.gz " (since Linux 2.6)"
3086This file exposes the configuration options that were used
3087to build the currently running kernel,
3088in the same format as they would be shown in the
3089.I .config
3090file that resulted when configuring the kernel (using
3091.IR "make xconfig" ,
3092.IR "make config" ,
3093or similar).
3094The file contents are compressed; view or search them using
3095.BR zcat (1)
3096and
3097.BR zgrep (1).
3098As long as no changes have been made to the following file,
3099the contents of
3100.I /proc/config.gz
3101are the same as those provided by:
3102.IP
3103.in +4n
3104.EX
3105cat /lib/modules/$(uname \-r)/build/.config
3106.EE
3107.in
3108.IP
3109.I /proc/config.gz
3110is provided only if the kernel is configured with
3111.BR CONFIG_IKCONFIG_PROC .
3112.TP
3113.I /proc/crypto
3114A list of the ciphers provided by the kernel crypto API.
3115For details, see the kernel
3116.I "Linux Kernel Crypto API"
3117documentation available under the kernel source directory
3118.I Documentation/crypto/
3119.\" commit 3b72c814a8e8cd638e1ba0da4dfce501e9dff5af
3120(or
3121.I Documentation/DocBook
3122before 4.10;
3123the documentation can be built using a command such as
3124.IR "make htmldocs"
3125in the root directory of the kernel source tree).
3126.TP
3127.I /proc/cpuinfo
3128This is a collection of CPU and system architecture dependent items,
3129for each supported architecture a different list.
3130Two common entries are \fIprocessor\fP which gives CPU number and
3131\fIbogomips\fP; a system constant that is calculated
3132during kernel initialization.
3133SMP machines have information for
3134each CPU.
3135The
3136.BR lscpu (1)
3137command gathers its information from this file.
3138.TP
3139.I /proc/devices
3140Text listing of major numbers and device groups.
3141This can be used by MAKEDEV scripts for consistency with the kernel.
3142.TP
3143.IR /proc/diskstats " (since Linux 2.5.69)"
3144This file contains disk I/O statistics for each disk device.
3145See the Linux kernel source file
3146.I ./Documentation/admin\-guide/iostats.rst
3147(or
3148.I Documentation/iostats.txt
3149before Linux 5.3)
3150for further information.
3151.TP
3152.I /proc/dma
3153This is a list of the registered \fIISA\fP DMA (direct memory access)
3154channels in use.
3155.TP
3156.I /proc/driver
3157Empty subdirectory.
3158.TP
3159.I /proc/execdomains
3160List of the execution domains (ABI personalities).
3161.TP
3162.I /proc/fb
3163Frame buffer information when
3164.B CONFIG_FB
3165is defined during kernel compilation.
3166.TP
3167.I /proc/filesystems
3168A text listing of the filesystems which are supported by the kernel,
3169namely filesystems which were compiled into the kernel or whose kernel
3170modules are currently loaded.
3171(See also
3172.BR filesystems (5).)
3173If a filesystem is marked with "nodev",
3174this means that it does not require a block device to be mounted
3175(e.g., virtual filesystem, network filesystem).
3176.IP
3177Incidentally, this file may be used by
3178.BR mount (8)
3179when no filesystem is specified and it didn't manage to determine the
3180filesystem type.
3181Then filesystems contained in this file are tried
3182(excepted those that are marked with "nodev").
3183.TP
3184.I /proc/fs
3185.\" FIXME Much more needs to be said about /proc/fs
3186.\"
3187Contains subdirectories that in turn contain files
3188with information about (certain) mounted filesystems.
3189.TP
3190.I /proc/ide
3191This directory
3192exists on systems with the IDE bus.
3193There are directories for each IDE channel and attached device.
3194Files include:
3195.IP
3196.in +4n
3197.EX
3198cache buffer size in KB
3199capacity number of sectors
3200driver driver version
3201geometry physical and logical geometry
3202identify in hexadecimal
3203media media type
3204model manufacturer\(aqs model number
3205settings drive settings
3206smart_thresholds IDE disk management thresholds (in hex)
3207smart_values IDE disk management values (in hex)
3208.EE
3209.in
3210.IP
3211The
3212.BR hdparm (8)
3213utility provides access to this information in a friendly format.
3214.TP
3215.I /proc/interrupts
3216This is used to record the number of interrupts per CPU per IO device.
3217Since Linux 2.6.24,
3218for the i386 and x86-64 architectures, at least, this also includes
3219interrupts internal to the system (that is, not associated with a device
3220as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt),
3221and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling
3222interrupt), CAL (remote function call interrupt), and possibly others.
3223Very easy to read formatting, done in ASCII.
3224.TP
3225.I /proc/iomem
3226I/O memory map in Linux 2.4.
3227.TP
3228.I /proc/ioports
3229This is a list of currently registered Input-Output port regions that
3230are in use.
3231.TP
3232.IR /proc/kallsyms " (since Linux 2.5.71)"
3233This holds the kernel exported symbol definitions used by the
3234.BR modules (X)
3235tools to dynamically link and bind loadable modules.
3236In Linux 2.5.47 and earlier, a similar file with slightly different syntax
3237was named
3238.IR ksyms .
3239.TP
3240.I /proc/kcore
3241This file represents the physical memory of the system and is stored
3242in the ELF core file format.
3243With this pseudo-file, and an unstripped
3244kernel
3245.RI ( /usr/src/linux/vmlinux )
3246binary, GDB can be used to
3247examine the current state of any kernel data structures.
3248.IP
3249The total length of the file is the size of physical memory (RAM) plus
32504\ KiB.
3251.TP
3252.IR /proc/keys " (since Linux 2.6.10)"
3253See
3254.BR keyrings (7).
3255.TP
3256.IR /proc/key\-users " (since Linux 2.6.10)"
3257See
3258.BR keyrings (7).
3259.TP
3260.I /proc/kmsg
3261This file can be used instead of the
3262.BR syslog (2)
3263system call to read kernel messages.
3264A process must have superuser
3265privileges to read this file, and only one process should read this
3266file.
3267This file should not be read if a syslog process is running
3268which uses the
3269.BR syslog (2)
3270system call facility to log kernel messages.
3271.IP
3272Information in this file is retrieved with the
3273.BR dmesg (1)
3274program.
3275.TP
3276.IR /proc/kpagecgroup " (since Linux 4.3)"
3277.\" commit 80ae2fdceba8313b0433f899bdd9c6c463291a17
3278This file contains a 64-bit inode number of
3279the memory cgroup each page is charged to,
3280indexed by page frame number (see the discussion of
3281.IR /proc/[pid]/pagemap ).
3282.IP
3283The
3284.IR /proc/kpagecgroup
3285file is present only if the
3286.B CONFIG_MEMCG
3287kernel configuration option is enabled.
3288.TP
3289.IR /proc/kpagecount " (since Linux 2.6.25)"
3290This file contains a 64-bit count of the number of
3291times each physical page frame is mapped,
3292indexed by page frame number (see the discussion of
3293.IR /proc/[pid]/pagemap ).
3294.IP
3295The
3296.IR /proc/kpagecount
3297file is present only if the
3298.B CONFIG_PROC_PAGE_MONITOR
3299kernel configuration option is enabled.
3300.TP
3301.IR /proc/kpageflags " (since Linux 2.6.25)"
3302This file contains 64-bit masks corresponding to each physical page frame;
3303it is indexed by page frame number (see the discussion of
3304.IR /proc/[pid]/pagemap ).
3305The bits are as follows:
3306.IP
3307 0 - KPF_LOCKED
3308 1 - KPF_ERROR
3309 2 - KPF_REFERENCED
3310 3 - KPF_UPTODATE
3311 4 - KPF_DIRTY
3312 5 - KPF_LRU
3313 6 - KPF_ACTIVE
3314 7 - KPF_SLAB
3315 8 - KPF_WRITEBACK
3316 9 - KPF_RECLAIM
3317 10 - KPF_BUDDY
3318 11 - KPF_MMAP (since Linux 2.6.31)
3319 12 - KPF_ANON (since Linux 2.6.31)
3320 13 - KPF_SWAPCACHE (since Linux 2.6.31)
3321 14 - KPF_SWAPBACKED (since Linux 2.6.31)
3322 15 - KPF_COMPOUND_HEAD (since Linux 2.6.31)
3323 16 - KPF_COMPOUND_TAIL (since Linux 2.6.31)
3324 17 - KPF_HUGE (since Linux 2.6.31)
3325 18 - KPF_UNEVICTABLE (since Linux 2.6.31)
3326 19 - KPF_HWPOISON (since Linux 2.6.31)
3327 20 - KPF_NOPAGE (since Linux 2.6.31)
3328 21 - KPF_KSM (since Linux 2.6.32)
3329 22 - KPF_THP (since Linux 3.4)
3330 23 - KPF_BALLOON (since Linux 3.18)
3331.\" KPF_BALLOON: commit 09316c09dde33aae14f34489d9e3d243ec0d5938
3332 24 - KPF_ZERO_PAGE (since Linux 4.0)
3333.\" KPF_ZERO_PAGE: commit 56873f43abdcd574b25105867a990f067747b2f4
3334 25 - KPF_IDLE (since Linux 4.3)
3335.\" KPF_IDLE: commit f074a8f49eb87cde95ac9d040ad5e7ea4f029738
3336.IP
3337For further details on the meanings of these bits,
3338see the kernel source file
3339.IR Documentation/admin\-guide/mm/pagemap.rst .
3340Before kernel 2.6.29,
3341.\" commit ad3bdefe877afb47480418fdb05ecd42842de65e
3342.\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110
3343.BR KPF_WRITEBACK ,
3344.BR KPF_RECLAIM ,
3345.BR KPF_BUDDY ,
3346and
3347.BR KPF_LOCKED
3348did not report correctly.
3349.IP
3350The
3351.IR /proc/kpageflags
3352file is present only if the
3353.B CONFIG_PROC_PAGE_MONITOR
3354kernel configuration option is enabled.
3355.TP
3356.IR /proc/ksyms " (Linux 1.1.23\(en2.5.47)"
3357See
3358.IR /proc/kallsyms .
3359.TP
3360.I /proc/loadavg
3361The first three fields in this file are load average figures
3362giving the number of jobs in the run queue (state R)
3363or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
3364They are the same as the load average numbers given by
3365.BR uptime (1)
3366and other programs.
3367The fourth field consists of two numbers separated by a slash (/).
3368The first of these is the number of currently runnable kernel
3369scheduling entities (processes, threads).
3370The value after the slash is the number of kernel scheduling entities
3371that currently exist on the system.
3372The fifth field is the PID of the process that was most
3373recently created on the system.
3374.TP
3375.I /proc/locks
3376This file shows current file locks
3377.RB ( flock "(2) and " fcntl (2))
3378and leases
3379.RB ( fcntl (2)).
3380.IP
3381An example of the content shown in this file is the following:
3382.IP
3383.in +4n
3384.EX
33851: POSIX ADVISORY READ 5433 08:01:7864448 128 128
33862: FLOCK ADVISORY WRITE 2001 08:01:7864554 0 EOF
33873: FLOCK ADVISORY WRITE 1568 00:2f:32388 0 EOF
33884: POSIX ADVISORY WRITE 699 00:16:28457 0 EOF
33895: POSIX ADVISORY WRITE 764 00:16:21448 0 0
33906: POSIX ADVISORY READ 3548 08:01:7867240 1 1
33917: POSIX ADVISORY READ 3548 08:01:7865567 1826 2335
33928: OFDLCK ADVISORY WRITE \-1 08:01:8713209 128 191
3393.EE
3394.in
3395.IP
3396The fields shown in each line are as follows:
3397.RS
3398.IP (1) 4
3399The ordinal position of the lock in the list.
3400.IP (2)
3401The lock type.
3402Values that may appear here include:
3403.RS
3404.TP
3405.B FLOCK
3406This is a BSD file lock created using
3407.BR flock (2).
3408.TP
3409.B OFDLCK
3410This is an open file description (OFD) lock created using
3411.BR fcntl (2).
3412.TP
3413.B POSIX
3414This is a POSIX byte-range lock created using
3415.BR fcntl (2).
3416.RE
3417.IP (3)
3418Among the strings that can appear here are the following:
3419.RS
3420.TP
3421.B ADVISORY
3422This is an advisory lock.
3423.TP
3424.B MANDATORY
3425This is a mandatory lock.
3426.RE
3427.IP (4)
3428The type of lock.
3429Values that can appear here are:
3430.RS
3431.TP
3432.B READ
3433This is a POSIX or OFD read lock, or a BSD shared lock.
3434.TP
3435.B WRITE
3436This is a POSIX or OFD write lock, or a BSD exclusive lock.
3437.RE
3438.IP (5)
3439The PID of the process that owns the lock.
3440.IP
3441Because OFD locks are not owned by a single process
3442(since multiple processes may have file descriptors that
3443refer to the same open file description),
3444the value \-1 is displayed in this field for OFD locks.
3445(Before kernel 4.14,
3446.\" commit 9d5b86ac13c573795525ecac6ed2db39ab23e2a8
3447a bug meant that the PID of the process that
3448initially acquired the lock was displayed instead of the value \-1.)
3449.IP (6)
3450Three colon-separated subfields that identify the major and minor device
3451ID of the device containing the filesystem where the locked file resides,
3452followed by the inode number of the locked file.
3453.IP (7)
3454The byte offset of the first byte of the lock.
3455For BSD locks, this value is always 0.
3456.IP (8)
3457The byte offset of the last byte of the lock.
3458.B EOF
3459in this field means that the lock extends to the end of the file.
3460For BSD locks, the value shown is always
3461.IR EOF .
3462.RE
3463.IP
3464Since Linux 4.9,
3465.\" commit d67fd44f697dff293d7cdc29af929241b669affe
3466the list of locks shown in
3467.I /proc/locks
3468is filtered to show just the locks for the processes in the PID
3469namespace (see
3470.BR pid_namespaces (7))
3471for which the
3472.I /proc
3473filesystem was mounted.
3474(In the initial PID namespace,
3475there is no filtering of the records shown in this file.)
3476.IP
3477The
3478.BR lslocks (8)
3479command provides a bit more information about each lock.
3480.TP
3481.IR /proc/malloc " (only up to and including Linux 2.2)"
3482.\" It looks like this only ever did something back in 1.0 days
3483This file is present only if
3484.B CONFIG_DEBUG_MALLOC
3485was defined during compilation.
3486.TP
3487.I /proc/meminfo
3488This file reports statistics about memory usage on the system.
3489It is used by
3490.BR free (1)
3491to report the amount of free and used memory (both physical and swap)
3492on the system as well as the shared memory and buffers used by the
3493kernel.
3494Each line of the file consists of a parameter name, followed by a colon,
3495the value of the parameter, and an option unit of measurement (e.g., "kB").
3496The list below describes the parameter names and
3497the format specifier required to read the field value.
3498Except as noted below,
3499all of the fields have been present since at least Linux 2.6.0.
3500Some fields are displayed only if the kernel was configured
3501with various options; those dependencies are noted in the list.
3502.RS
3503.TP
3504.IR MemTotal " %lu"
3505Total usable RAM (i.e., physical RAM minus a few reserved
3506bits and the kernel binary code).
3507.TP
3508.IR MemFree " %lu"
3509The sum of
3510.IR LowFree + HighFree .
3511.TP
3512.IR MemAvailable " %lu (since Linux 3.14)"
3513An estimate of how much memory is available for starting new
3514applications, without swapping.
3515.TP
3516.IR Buffers " %lu"
3517Relatively temporary storage for raw disk blocks that
3518shouldn't get tremendously large (20 MB or so).
3519.TP
3520.IR Cached " %lu"
3521In-memory cache for files read from the disk (the page cache).
3522Doesn't include
3523.IR SwapCached .
3524.TP
3525.IR SwapCached " %lu"
3526Memory that once was swapped out, is swapped back in but
3527still also is in the swap file.
3528(If memory pressure is high, these pages
3529don't need to be swapped out again because they are already
3530in the swap file.
3531This saves I/O.)
3532.TP
3533.IR Active " %lu"
3534Memory that has been used more recently and usually not
3535reclaimed unless absolutely necessary.
3536.TP
3537.IR Inactive " %lu"
3538Memory which has been less recently used.
3539It is more eligible to be reclaimed for other purposes.
3540.TP
3541.IR Active(anon) " %lu (since Linux 2.6.28)"
3542[To be documented.]
3543.TP
3544.IR Inactive(anon) " %lu (since Linux 2.6.28)"
3545[To be documented.]
3546.TP
3547.IR Active(file) " %lu (since Linux 2.6.28)"
3548[To be documented.]
3549.TP
3550.IR Inactive(file) " %lu (since Linux 2.6.28)"
3551[To be documented.]
3552.TP
3553.IR Unevictable " %lu (since Linux 2.6.28)"
3554(From Linux 2.6.28 to 2.6.30,
3555\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
3556[To be documented.]
3557.TP
3558.IR Mlocked " %lu (since Linux 2.6.28)"
3559(From Linux 2.6.28 to 2.6.30,
3560\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
3561[To be documented.]
3562.TP
3563.IR HighTotal " %lu"
3564(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
3565Total amount of highmem.
3566Highmem is all memory above \(ti860 MB of physical memory.
3567Highmem areas are for use by user-space programs,
3568or for the page cache.
3569The kernel must use tricks to access
3570this memory, making it slower to access than lowmem.
3571.TP
3572.IR HighFree " %lu"
3573(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
3574Amount of free highmem.
3575.TP
3576.IR LowTotal " %lu"
3577(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
3578Total amount of lowmem.
3579Lowmem is memory which can be used for everything that
3580highmem can be used for, but it is also available for the
3581kernel's use for its own data structures.
3582Among many other things,
3583it is where everything from
3584.I Slab
3585is allocated.
3586Bad things happen when you're out of lowmem.
3587.TP
3588.IR LowFree " %lu"
3589(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
3590Amount of free lowmem.
3591.TP
3592.IR MmapCopy " %lu (since Linux 2.6.29)"
3593.RB ( CONFIG_MMU
3594is required.)
3595[To be documented.]
3596.TP
3597.IR SwapTotal " %lu"
3598Total amount of swap space available.
3599.TP
3600.IR SwapFree " %lu"
3601Amount of swap space that is currently unused.
3602.TP
3603.IR Dirty " %lu"
3604Memory which is waiting to get written back to the disk.
3605.TP
3606.IR Writeback " %lu"
3607Memory which is actively being written back to the disk.
3608.TP
3609.IR AnonPages " %lu (since Linux 2.6.18)"
3610Non-file backed pages mapped into user-space page tables.
3611.TP
3612.IR Mapped " %lu"
3613Files which have been mapped into memory (with
3614.BR mmap (2)),
3615such as libraries.
3616.TP
3617.IR Shmem " %lu (since Linux 2.6.32)"
3618Amount of memory consumed in
3619.BR tmpfs (5)
3620filesystems.
3621.TP
3622.IR KReclaimable " %lu (since Linux 4.20)"
3623Kernel allocations that the kernel will attempt to reclaim
3624under memory pressure.
3625Includes
3626.I SReclaimable
3627(below), and other direct allocations with a shrinker.
3628.TP
3629.IR Slab " %lu"
3630In-kernel data structures cache.
3631(See
3632.BR slabinfo (5).)
3633.TP
3634.IR SReclaimable " %lu (since Linux 2.6.19)"
3635Part of
3636.IR Slab ,
3637that might be reclaimed, such as caches.
3638.TP
3639.IR SUnreclaim " %lu (since Linux 2.6.19)"
3640Part of
3641.IR Slab ,
3642that cannot be reclaimed on memory pressure.
3643.TP
3644.IR KernelStack " %lu (since Linux 2.6.32)"
3645Amount of memory allocated to kernel stacks.
3646.TP
3647.IR PageTables " %lu (since Linux 2.6.18)"
3648Amount of memory dedicated to the lowest level of page tables.
3649.TP
3650.IR Quicklists " %lu (since Linux 2.6.27)"
3651(\fBCONFIG_QUICKLIST\fP is required.)
3652[To be documented.]
3653.TP
3654.IR NFS_Unstable " %lu (since Linux 2.6.18)"
3655NFS pages sent to the server, but not yet committed to stable storage.
3656.TP
3657.IR Bounce " %lu (since Linux 2.6.18)"
3658Memory used for block device "bounce buffers".
3659.TP
3660.IR WritebackTmp " %lu (since Linux 2.6.26)"
3661Memory used by FUSE for temporary writeback buffers.
3662.TP
3663.IR CommitLimit " %lu (since Linux 2.6.10)"
3664This is the total amount of memory currently available to
3665be allocated on the system, expressed in kilobytes.
3666This limit is adhered to
3667only if strict overcommit accounting is enabled (mode 2 in
3668.IR /proc/sys/vm/overcommit_memory ).
3669The limit is calculated according to the formula described under
3670.IR /proc/sys/vm/overcommit_memory .
3671For further details, see the kernel source file
3672.IR Documentation/vm/overcommit\-accounting.rst .
3673.TP
3674.IR Committed_AS " %lu"
3675The amount of memory presently allocated on the system.
3676The committed memory is a sum of all of the memory which
3677has been allocated by processes, even if it has not been
3678"used" by them as of yet.
3679A process which allocates 1 GB of memory (using
3680.BR malloc (3)
3681or similar), but touches only 300 MB of that memory will show up
3682as using only 300 MB of memory even if it has the address space
3683allocated for the entire 1 GB.
3684.IP
3685This 1 GB is memory which has been "committed" to by the VM
3686and can be used at any time by the allocating application.
3687With strict overcommit enabled on the system (mode 2 in
3688.IR /proc/sys/vm/overcommit_memory ),
3689allocations which would exceed the
3690.I CommitLimit
3691will not be permitted.
3692This is useful if one needs to guarantee that processes will not
3693fail due to lack of memory once that memory has been successfully allocated.
3694.TP
3695.IR VmallocTotal " %lu"
3696Total size of vmalloc memory area.
3697.TP
3698.IR VmallocUsed " %lu"
3699Amount of vmalloc area which is used.
3700Since Linux 4.4,
3701.\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
3702this field is no longer calculated, and is hard coded as 0.
3703See
3704.IR /proc/vmallocinfo .
3705.TP
3706.IR VmallocChunk " %lu"
3707Largest contiguous block of vmalloc area which is free.
3708Since Linux 4.4,
3709.\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
3710this field is no longer calculated and is hard coded as 0.
3711See
3712.IR /proc/vmallocinfo .
3713.TP
3714.IR HardwareCorrupted " %lu (since Linux 2.6.32)"
3715(\fBCONFIG_MEMORY_FAILURE\fP is required.)
3716[To be documented.]
3717.TP
3718.IR LazyFree " %lu (since Linux 4.12)"
3719Shows the amount of memory marked by
3720.BR madvise (2)
3721.BR MADV_FREE .
3722.TP
3723.IR AnonHugePages " %lu (since Linux 2.6.38)"
3724(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
3725Non-file backed huge pages mapped into user-space page tables.
3726.TP
3727.IR ShmemHugePages " %lu (since Linux 4.8)"
3728(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
3729Memory used by shared memory (shmem) and
3730.BR tmpfs (5)
3731allocated with huge pages.
3732.TP
3733.IR ShmemPmdMapped " %lu (since Linux 4.8)"
3734(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
3735Shared memory mapped into user space with huge pages.
3736.TP
3737.IR CmaTotal " %lu (since Linux 3.1)"
3738Total CMA (Contiguous Memory Allocator) pages.
3739(\fBCONFIG_CMA\fP is required.)
3740.TP
3741.IR CmaFree " %lu (since Linux 3.1)"
3742Free CMA (Contiguous Memory Allocator) pages.
3743(\fBCONFIG_CMA\fP is required.)
3744.TP
3745.IR HugePages_Total " %lu"
3746(\fBCONFIG_HUGETLB_PAGE\fP is required.)
3747The size of the pool of huge pages.
3748.TP
3749.IR HugePages_Free " %lu"
3750(\fBCONFIG_HUGETLB_PAGE\fP is required.)
3751The number of huge pages in the pool that are not yet allocated.
3752.TP
3753.IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
3754(\fBCONFIG_HUGETLB_PAGE\fP is required.)
3755This is the number of huge pages for
3756which a commitment to allocate from the pool has been made,
3757but no allocation has yet been made.
3758These reserved huge pages
3759guarantee that an application will be able to allocate a
3760huge page from the pool of huge pages at fault time.
3761.TP
3762.IR HugePages_Surp " %lu (since Linux 2.6.24)"
3763(\fBCONFIG_HUGETLB_PAGE\fP is required.)
3764This is the number of huge pages in
3765the pool above the value in
3766.IR /proc/sys/vm/nr_hugepages .
3767The maximum number of surplus huge pages is controlled by
3768.IR /proc/sys/vm/nr_overcommit_hugepages .
3769.TP
3770.IR Hugepagesize " %lu"
3771(\fBCONFIG_HUGETLB_PAGE\fP is required.)
3772The size of huge pages.
3773.TP
3774.IR DirectMap4k " %lu (since Linux 2.6.27)"
3775Number of bytes of RAM linearly mapped by kernel in 4 kB pages.
3776(x86.)
3777.TP
3778.IR DirectMap4M " %lu (since Linux 2.6.27)"
3779Number of bytes of RAM linearly mapped by kernel in 4 MB pages.
3780(x86 with
3781.BR CONFIG_X86_64
3782or
3783.BR CONFIG_X86_PAE
3784enabled.)
3785.TP
3786.IR DirectMap2M " %lu (since Linux 2.6.27)"
3787Number of bytes of RAM linearly mapped by kernel in 2 MB pages.
3788(x86 with neither
3789.BR CONFIG_X86_64
3790nor
3791.BR CONFIG_X86_PAE
3792enabled.)
3793.TP
3794.IR DirectMap1G " %lu (since Linux 2.6.27)"
3795(x86 with
3796.BR CONFIG_X86_64
3797and
3798.B CONFIG_X86_DIRECT_GBPAGES
3799enabled.)
3800.RE
3801.TP
3802.I /proc/modules
3803A text list of the modules that have been loaded by the system.
3804See also
3805.BR lsmod (8).
3806.TP
3807.I /proc/mounts
3808Before kernel 2.4.19, this file was a list
3809of all the filesystems currently mounted on the system.
3810With the introduction of per-process mount namespaces in Linux 2.4.19 (see
3811.BR mount_namespaces (7)),
3812this file became a link to
3813.IR /proc/self/mounts ,
3814which lists the mounts of the process's own mount namespace.
3815The format of this file is documented in
3816.BR fstab (5).
3817.TP
3818.I /proc/mtrr
3819Memory Type Range Registers.
3820See the Linux kernel source file
3821.I Documentation/x86/mtrr.rst
3822(or
3823.I Documentation/x86/mtrr.txt
3824.\" commit 7225e75144b9718cbbe1820d9c011c809d5773fd
3825before Linux 5.2, or
3826.I Documentation/mtrr.txt
3827before Linux 2.6.28)
3828for details.
3829.TP
3830.I /proc/net
3831This directory contains various files and subdirectories containing
3832information about the networking layer.
3833The files contain ASCII structures and are,
3834therefore, readable with
3835.BR cat (1).
3836However, the standard
3837.BR netstat (8)
3838suite provides much cleaner access to these files.
3839.IP
3840With the advent of network namespaces,
3841various information relating to the network stack is virtualized (see
3842.BR network_namespaces (7)).
3843Thus, since Linux 2.6.25,
3844.\" commit e9720acd728a46cb40daa52c99a979f7c4ff195c
3845.IR /proc/net
3846is a symbolic link to the directory
3847.IR /proc/self/net ,
3848which contains the same files and directories as listed below.
3849However, these files and directories now expose information
3850for the network namespace of which the process is a member.
3851.TP
3852.I /proc/net/arp
3853This holds an ASCII readable dump of the kernel ARP table used for
3854address resolutions.
3855It will show both dynamically learned and preprogrammed ARP entries.
3856The format is:
3857.IP
3858.in +4n
3859.EX
3860IP address HW type Flags HW address Mask Device
3861192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
3862192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
3863.EE
3864.in
3865.IP
3866Here "IP address" is the IPv4 address of the machine and the "HW type"
3867is the hardware type of the address from RFC\ 826.
3868The flags are the internal
3869flags of the ARP structure (as defined in
3870.IR /usr/include/linux/if_arp.h )
3871and
3872the "HW address" is the data link layer mapping for that IP address if
3873it is known.
3874.TP
3875.I /proc/net/dev
3876The dev pseudo-file contains network device status information.
3877This gives
3878the number of received and sent packets, the number of errors and
3879collisions
3880and other basic statistics.
3881These are used by the
3882.BR ifconfig (8)
3883program to report device status.
3884The format is:
3885.IP
3886.EX
3887Inter\-| Receive | Transmit
3888 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
3889 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
3890 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
3891 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
3892 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
3893.EE
3894.\" .TP
3895.\" .I /proc/net/ipx
3896.\" No information.
3897.\" .TP
3898.\" .I /proc/net/ipx_route
3899.\" No information.
3900.TP
3901.I /proc/net/dev_mcast
3902Defined in
3903.IR /usr/src/linux/net/core/dev_mcast.c :
3904.IP
3905.in +4n
3906.EX
3907indx interface_name dmi_u dmi_g dmi_address
39082 eth0 1 0 01005e000001
39093 eth1 1 0 01005e000001
39104 eth2 1 0 01005e000001
3911.EE
3912.in
3913.TP
3914.I /proc/net/igmp
3915Internet Group Management Protocol.
3916Defined in
3917.IR /usr/src/linux/net/core/igmp.c .
3918.TP
3919.I /proc/net/rarp
3920This file uses the same format as the
3921.I arp
3922file and contains the current reverse mapping database used to provide
3923.BR rarp (8)
3924reverse address lookup services.
3925If RARP is not configured into the
3926kernel,
3927this file will not be present.
3928.TP
3929.I /proc/net/raw
3930Holds a dump of the RAW socket table.
3931Much of the information is not of
3932use
3933apart from debugging.
3934The "sl" value is the kernel hash slot for the
3935socket,
3936the "local_address" is the local address and protocol number pair.
3937\&"St" is
3938the internal status of the socket.
3939The "tx_queue" and "rx_queue" are the
3940outgoing and incoming data queue in terms of kernel memory usage.
3941The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
3942The "uid"
3943field holds the effective UID of the creator of the socket.
3944.\" .TP
3945.\" .I /proc/net/route
3946.\" No information, but looks similar to
3947.\" .BR route (8).
3948.TP
3949.I /proc/net/snmp
3950This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
3951management
3952information bases for an SNMP agent.
3953.TP
3954.I /proc/net/tcp
3955Holds a dump of the TCP socket table.
3956Much of the information is not
3957of use apart from debugging.
3958The "sl" value is the kernel hash slot
3959for the socket, the "local_address" is the local address and port number pair.
3960The "rem_address" is the remote address and port number pair
3961(if connected).
3962\&"St" is the internal status of the socket.
3963The "tx_queue" and "rx_queue" are the
3964outgoing and incoming data queue in terms of kernel memory usage.
3965The "tr", "tm\->when", and "rexmits" fields hold internal information of
3966the kernel socket state and are useful only for debugging.
3967The "uid"
3968field holds the effective UID of the creator of the socket.
3969.TP
3970.I /proc/net/udp
3971Holds a dump of the UDP socket table.
3972Much of the information is not of
3973use apart from debugging.
3974The "sl" value is the kernel hash slot for the
3975socket, the "local_address" is the local address and port number pair.
3976The "rem_address" is the remote address and port number pair
3977(if connected).
3978"St" is the internal status of the socket.
3979The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
3980in terms of kernel memory usage.
3981The "tr", "tm\->when", and "rexmits" fields
3982are not used by UDP.
3983The "uid"
3984field holds the effective UID of the creator of the socket.
3985The format is:
3986.IP
3987.EX
3988sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
3989 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
3990 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
3991 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
3992.EE
3993.TP
3994.I /proc/net/unix
3995Lists the UNIX domain sockets present within the system and their
3996status.
3997The format is:
3998.IP
3999.EX
4000Num RefCount Protocol Flags Type St Inode Path
4001 0: 00000002 00000000 00000000 0001 03 42
4002 1: 00000001 00000000 00010000 0001 01 1948 /dev/printer
4003.EE
4004.IP
4005The fields are as follows:
4006.RS
4007.TP 10
4008.IR Num :
4009the kernel table slot number.
4010.TP
4011.IR RefCount :
4012the number of users of the socket.
4013.TP
4014.IR Protocol :
4015currently always 0.
4016.TP
4017.IR Flags :
4018the internal kernel flags holding the status of the socket.
4019.TP
4020.IR Type :
4021the socket type.
4022For
4023.BR SOCK_STREAM
4024sockets, this is 0001; for
4025.BR SOCK_DGRAM
4026sockets, it is 0002; and for
4027.BR SOCK_SEQPACKET
4028sockets, it is 0005.
4029.TP
4030.IR St :
4031the internal state of the socket.
4032.TP
4033.IR Inode :
4034the inode number of the socket.
4035.TP
4036.IR Path :
4037the bound pathname (if any) of the socket.
4038Sockets in the abstract namespace are included in the list,
4039and are shown with a
4040.I Path
4041that commences with the character '@'.
4042.RE
4043.TP
4044.I /proc/net/netfilter/nfnetlink_queue
4045This file contains information about netfilter user-space queueing, if used.
4046Each line represents a queue.
4047Queues that have not been subscribed to
4048by user space are not shown.
4049.IP
4050.in +4n
4051.EX
4052 1 4207 0 2 65535 0 0 0 1
4053 (1) (2) (3)(4) (5) (6) (7) (8)
4054.EE
4055.in
4056.IP
4057The fields in each line are:
4058.RS 7
4059.TP 5
4060(1)
4061The ID of the queue.
4062This matches what is specified in the
4063.B \-\-queue\-num
4064or
4065.B \-\-queue\-balance
4066options to the
4067.BR iptables (8)
4068NFQUEUE target.
4069See
4070.BR iptables\-extensions (8)
4071for more information.
4072.TP
4073(2)
4074The netlink port ID subscribed to the queue.
4075.TP
4076(3)
4077The number of packets currently queued and waiting to be processed by
4078the application.
4079.TP
4080(4)
4081The copy mode of the queue.
4082It is either 1 (metadata only) or 2
4083(also copy payload data to user space).
4084.TP
4085(5)
4086Copy range; that is, how many bytes of packet payload should be copied to
4087user space at most.
4088.TP
4089(6)
4090queue dropped.
4091Number of packets that had to be dropped by the kernel because
4092too many packets are already waiting for user space to send back the mandatory
4093accept/drop verdicts.
4094.TP
4095(7)
4096queue user dropped.
4097Number of packets that were dropped within the netlink
4098subsystem.
4099Such drops usually happen when the corresponding socket buffer is
4100full; that is, user space is not able to read messages fast enough.
4101.TP
4102(8)
4103sequence number.
4104Every queued packet is associated with a (32-bit)
4105monotonically increasing sequence number.
4106This shows the ID of the most recent packet queued.
4107.RE
4108.IP
4109The last number exists only for compatibility reasons and is always 1.
4110.TP
4111.I /proc/partitions
4112Contains the major and minor numbers of each partition as well as the number
4113of 1024-byte blocks and the partition name.
4114.TP
4115.I /proc/pci
4116This is a listing of all PCI devices found during kernel initialization
4117and their configuration.
4118.IP
4119This file has been deprecated in favor of a new
4120.I /proc
4121interface for PCI
4122.RI ( /proc/bus/pci ).
4123It became optional in Linux 2.2 (available with
4124.B CONFIG_PCI_OLD_PROC
4125set at kernel compilation).
4126It became once more nonoptionally enabled in Linux 2.4.
4127Next, it was deprecated in Linux 2.6 (still available with
4128.B CONFIG_PCI_LEGACY_PROC
4129set), and finally removed altogether since Linux 2.6.17.
4130.\" FIXME Document /proc/sched_debug (since Linux 2.6.23)
4131.\" See also /proc/[pid]/sched
4132.TP
4133.IR /proc/profile " (since Linux 2.4)"
4134This file is present only if the kernel was booted with the
4135.I profile=1
4136command-line option.
4137It exposes kernel profiling information in a binary format for use by
4138.BR readprofile (1).
4139Writing (e.g., an empty string) to this file resets the profiling counters;
4140on some architectures,
4141writing a binary integer "profiling multiplier" of size
4142.IR sizeof(int)
4143sets the profiling interrupt frequency.
4144.TP
4145.I /proc/scsi
4146A directory with the
4147.I scsi
4148mid-level pseudo-file and various SCSI low-level
4149driver directories,
4150which contain a file for each SCSI host in this system, all of
4151which give the status of some part of the SCSI IO subsystem.
4152These files contain ASCII structures and are, therefore, readable with
4153.BR cat (1).
4154.IP
4155You can also write to some of the files to reconfigure the subsystem or
4156switch certain features on or off.
4157.TP
4158.I /proc/scsi/scsi
4159This is a listing of all SCSI devices known to the kernel.
4160The listing is similar to the one seen during bootup.
4161scsi currently supports only the \fIadd\-single\-device\fP command which
4162allows root to add a hotplugged device to the list of known devices.
4163.IP
4164The command
4165.IP
4166.in +4n
4167.EX
4168echo \(aqscsi add\-single\-device 1 0 5 0\(aq > /proc/scsi/scsi
4169.EE
4170.in
4171.IP
4172will cause
4173host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
4174If there
4175is already a device known on this address or the address is invalid, an
4176error will be returned.
4177.TP
4178.I /proc/scsi/[drivername]
4179\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
4180aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
4181scsi_debug, seagate, t128, u15\-24f, ultrastore, or wd7000.
4182These directories show up for all drivers that registered at least one
4183SCSI HBA.
4184Every directory contains one file per registered host.
4185Every host-file is named after the number the host was assigned during
4186initialization.
4187.IP
4188Reading these files will usually show driver and host configuration,
4189statistics, and so on.
4190.IP
4191Writing to these files allows different things on different hosts.
4192For example, with the \fIlatency\fP and \fInolatency\fP commands,
4193root can switch on and off command latency measurement code in the
4194eata_dma driver.
4195With the \fIlockup\fP and \fIunlock\fP commands,
4196root can control bus lockups simulated by the scsi_debug driver.
4197.TP
4198.I /proc/self
4199This directory refers to the process accessing the
4200.I /proc
4201filesystem,
4202and is identical to the
4203.I /proc
4204directory named by the process ID of the same process.
4205.TP
4206.I /proc/slabinfo
4207Information about kernel caches.
4208See
4209.BR slabinfo (5)
4210for details.
4211.TP
4212.I /proc/stat
4213kernel/system statistics.
4214Varies with architecture.
4215Common
4216entries include:
4217.RS
4218.TP
4219.I cpu 10132153 290696 3084719 46828483 16683 0 25195 0 175628 0
4220.TQ
4221.I cpu0 1393280 32966 572056 13343292 6130 0 17875 0 23933 0
4222The amount of time, measured in units of
4223USER_HZ (1/100ths of a second on most architectures, use
4224.IR sysconf(_SC_CLK_TCK)
4225to obtain the right value),
4226.\" 1024 on Alpha and ia64
4227that the system ("cpu" line) or the specific CPU ("cpu\fIN\fR" line)
4228spent in various states:
4229.RS
4230.TP
4231.I user
4232(1) Time spent in user mode.
4233.TP
4234.I nice
4235(2) Time spent in user mode with low priority (nice).
4236.TP
4237.I system
4238(3) Time spent in system mode.
4239.TP
4240.I idle
4241(4) Time spent in the idle task.
4242.\" FIXME . Actually, the following info about the /proc/stat 'cpu' field
4243.\" does not seem to be quite right (at least in 2.6.12 or 3.6):
4244.\" the idle time in /proc/uptime does not quite match this value
4245This value should be USER_HZ times the
4246second entry in the
4247.I /proc/uptime
4248pseudo-file.
4249.TP
4250.IR iowait " (since Linux 2.5.41)"
4251(5) Time waiting for I/O to complete.
4252This value is not reliable, for the following reasons:
4253.\" See kernel commit 9c240d757658a3ae9968dd309e674c61f07c7f48
4254.RS
4255.IP 1. 3
4256The CPU will not wait for I/O to complete;
4257iowait is the time that a task is waiting for I/O to complete.
4258When a CPU goes into idle state for outstanding task I/O,
4259another task will be scheduled on this CPU.
4260.IP 2.
4261On a multi-core CPU,
4262the task waiting for I/O to complete is not running on any CPU,
4263so the iowait of each CPU is difficult to calculate.
4264.IP 3.
4265The value in this field may
4266.I decrease
4267in certain conditions.
4268.RE
4269.TP
4270.IR irq " (since Linux 2.6.0)"
4271.\" Precisely: Linux 2.6.0-test4
4272(6) Time servicing interrupts.
4273.TP
4274.IR softirq " (since Linux 2.6.0)"
4275.\" Precisely: Linux 2.6.0-test4
4276(7) Time servicing softirqs.
4277.TP
4278.IR steal " (since Linux 2.6.11)"
4279(8) Stolen time, which is the time spent in other operating systems when
4280running in a virtualized environment
4281.TP
4282.IR guest " (since Linux 2.6.24)"
4283(9) Time spent running a virtual CPU for guest
4284operating systems under the control of the Linux kernel.
4285.\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
4286.TP
4287.IR guest_nice " (since Linux 2.6.33)"
4288.\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
4289(10) Time spent running a niced guest (virtual CPU for guest
4290operating systems under the control of the Linux kernel).
4291.RE
4292.TP
4293\fIpage 5741 1808\fP
4294The number of pages the system paged in and the number that were paged
4295out (from disk).
4296.TP
4297\fIswap 1 0\fP
4298The number of swap pages that have been brought in and out.
4299.TP
4300.\" FIXME . The following is not the full picture for the 'intr' of
4301.\" /proc/stat on 2.6:
4302\fIintr 1462898\fP
4303This line shows counts of interrupts serviced since boot time,
4304for each of the possible system interrupts.
4305The first column is the total of all interrupts serviced
4306including unnumbered architecture specific interrupts;
4307each subsequent column is the total for that particular numbered interrupt.
4308Unnumbered interrupts are not shown, only summed into the total.
4309.TP
4310\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
4311(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
4312.br
4313(Linux 2.4 only)
4314.TP
4315\fIctxt 115315\fP
4316The number of context switches that the system underwent.
4317.TP
4318\fIbtime 769041601\fP
4319boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
4320.TP
4321\fIprocesses 86031\fP
4322Number of forks since boot.
4323.TP
4324\fIprocs_running 6\fP
4325Number of processes in runnable state.
4326(Linux 2.5.45 onward.)
4327.TP
4328\fIprocs_blocked 2\fP
4329Number of processes blocked waiting for I/O to complete.
4330(Linux 2.5.45 onward.)
4331.TP
4332.I softirq 229245889 94 60001584 13619 5175704 2471304 28 51212741 59130143 0 51240672
4333.\" commit d3d64df21d3d0de675a0d3ffa7c10514f3644b30
4334This line shows the number of softirq for all CPUs.
4335The first column is the total of all softirqs and
4336each subsequent column is the total for particular softirq.
4337(Linux 2.6.31 onward.)
4338.RE
4339.TP
4340.I /proc/swaps
4341Swap areas in use.
4342See also
4343.BR swapon (8).
4344.TP
4345.I /proc/sys
4346This directory (present since 1.3.57) contains a number of files
4347and subdirectories corresponding to kernel variables.
4348These variables can be read and in some cases modified using
4349the \fI/proc\fP filesystem, and the (deprecated)
4350.BR sysctl (2)
4351system call.
4352.IP
4353String values may be terminated by either \(aq\e0\(aq or \(aq\en\(aq.
4354.IP
4355Integer and long values may be written either in decimal or in
4356hexadecimal notation (e.g., 0x3FFF).
4357When writing multiple integer or long values, these may be separated
4358by any of the following whitespace characters:
4359\(aq\ \(aq, \(aq\et\(aq, or \(aq\en\(aq.
4360Using other separators leads to the error
4361.BR EINVAL .
4362.TP
4363.IR /proc/sys/abi " (since Linux 2.4.10)"
4364This directory may contain files with application binary information.
4365.\" On some systems, it is not present.
4366See the Linux kernel source file
4367.I Documentation/sysctl/abi.rst
4368(or
4369.I Documentation/sysctl/abi.txt
4370before Linux 5.3)
4371for more information.
4372.TP
4373.I /proc/sys/debug
4374This directory may be empty.
4375.TP
4376.I /proc/sys/dev
4377This directory contains device-specific information (e.g.,
4378.IR dev/cdrom/info ).
4379On
4380some systems, it may be empty.
4381.TP
4382.I /proc/sys/fs
4383This directory contains the files and subdirectories for kernel variables
4384related to filesystems.
4385.TP
4386.IR /proc/sys/fs/aio\-max\-nr " and " /proc/sys/fs/aio\-nr " (since Linux 2.6.4)"
4387.I aio\-nr
4388is the running total of the number of events specified by
4389.BR io_setup (2)
4390calls for all currently active AIO contexts.
4391If
4392.I aio\-nr
4393reaches
4394.IR aio\-max\-nr ,
4395then
4396.BR io_setup (2)
4397will fail with the error
4398.BR EAGAIN .
4399Raising
4400.I aio\-max\-nr
4401does not result in the preallocation or resizing
4402of any kernel data structures.
4403.TP
4404.I /proc/sys/fs/binfmt_misc
4405Documentation for files in this directory can be found
4406in the Linux kernel source in the file
4407.IR Documentation/admin\-guide/binfmt\-misc.rst
4408(or in
4409.IR Documentation/binfmt_misc.txt
4410on older kernels).
4411.TP
4412.IR /proc/sys/fs/dentry\-state " (since Linux 2.2)"
4413This file contains information about the status of the
4414directory cache (dcache).
4415The file contains six numbers,
4416.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds),"
4417.I want_pages
4418(pages requested by system) and two dummy values.
4419.RS
4420.IP * 2
4421.I nr_dentry
4422is the number of allocated dentries (dcache entries).
4423This field is unused in Linux 2.2.
4424.IP *
4425.I nr_unused
4426is the number of unused dentries.
4427.IP *
4428.I age_limit
4429.\" looks like this is unused in kernels 2.2 to 2.6
4430is the age in seconds after which dcache entries
4431can be reclaimed when memory is short.
4432.IP *
4433.I want_pages
4434.\" looks like this is unused in kernels 2.2 to 2.6
4435is nonzero when the kernel has called shrink_dcache_pages() and the
4436dcache isn't pruned yet.
4437.RE
4438.TP
4439.I /proc/sys/fs/dir\-notify\-enable
4440This file can be used to disable or enable the
4441.I dnotify
4442interface described in
4443.BR fcntl (2)
4444on a system-wide basis.
4445A value of 0 in this file disables the interface,
4446and a value of 1 enables it.
4447.TP
4448.I /proc/sys/fs/dquot\-max
4449This file shows the maximum number of cached disk quota entries.
4450On some (2.4) systems, it is not present.
4451If the number of free cached disk quota entries is very low and
4452you have some awesome number of simultaneous system users,
4453you might want to raise the limit.
4454.TP
4455.I /proc/sys/fs/dquot\-nr
4456This file shows the number of allocated disk quota
4457entries and the number of free disk quota entries.
4458.TP
4459.IR /proc/sys/fs/epoll " (since Linux 2.6.28)"
4460This directory contains the file
4461.IR max_user_watches ,
4462which can be used to limit the amount of kernel memory consumed by the
4463.I epoll
4464interface.
4465For further details, see
4466.BR epoll (7).
4467.TP
4468.I /proc/sys/fs/file\-max
4469This file defines
4470a system-wide limit on the number of open files for all processes.
4471System calls that fail when encountering this limit fail with the error
4472.BR ENFILE .
4473(See also
4474.BR setrlimit (2),
4475which can be used by a process to set the per-process limit,
4476.BR RLIMIT_NOFILE ,
4477on the number of files it may open.)
4478If you get lots
4479of error messages in the kernel log about running out of file handles
4480(open file descriptions)
4481(look for "VFS: file\-max limit <number> reached"),
4482try increasing this value:
4483.IP
4484.in +4n
4485.EX
4486echo 100000 > /proc/sys/fs/file\-max
4487.EE
4488.in
4489.IP
4490Privileged processes
4491.RB ( CAP_SYS_ADMIN )
4492can override the
4493.I file\-max
4494limit.
4495.TP
4496.I /proc/sys/fs/file\-nr
4497This (read-only) file contains three numbers:
4498the number of allocated file handles
4499(i.e., the number of open file descriptions; see
4500.BR open (2));
4501the number of free file handles;
4502and the maximum number of file handles (i.e., the same value as
4503.IR /proc/sys/fs/file\-max ).
4504If the number of allocated file handles is close to the
4505maximum, you should consider increasing the maximum.
4506Before Linux 2.6,
4507the kernel allocated file handles dynamically,
4508but it didn't free them again.
4509Instead the free file handles were kept in a list for reallocation;
4510the "free file handles" value indicates the size of that list.
4511A large number of free file handles indicates that there was
4512a past peak in the usage of open file handles.
4513Since Linux 2.6, the kernel does deallocate freed file handles,
4514and the "free file handles" value is always zero.
4515.TP
4516.IR /proc/sys/fs/inode\-max " (only present until Linux 2.2)"
4517This file contains the maximum number of in-memory inodes.
4518This value should be 3\(en4 times larger
4519than the value in
4520.IR file\-max ,
4521since \fIstdin\fP, \fIstdout\fP
4522and network sockets also need an inode to handle them.
4523When you regularly run out of inodes, you need to increase this value.
4524.IP
4525Starting with Linux 2.4,
4526there is no longer a static limit on the number of inodes,
4527and this file is removed.
4528.TP
4529.I /proc/sys/fs/inode\-nr
4530This file contains the first two values from
4531.IR inode\-state .
4532.TP
4533.I /proc/sys/fs/inode\-state
4534This file
4535contains seven numbers:
4536.IR nr_inodes ,
4537.IR nr_free_inodes ,
4538.IR preshrink ,
4539and four dummy values (always zero).
4540.IP
4541.I nr_inodes
4542is the number of inodes the system has allocated.
4543.\" This can be slightly more than
4544.\" .I inode\-max
4545.\" because Linux allocates them one page full at a time.
4546.I nr_free_inodes
4547represents the number of free inodes.
4548.IP
4549.I preshrink
4550is nonzero when the
4551.I nr_inodes
4552>
4553.I inode\-max
4554and the system needs to prune the inode list instead of allocating more;
4555since Linux 2.4, this field is a dummy value (always zero).
4556.TP
4557.IR /proc/sys/fs/inotify " (since Linux 2.6.13)"
4558This directory contains files
4559.IR max_queued_events ", " max_user_instances ", and " max_user_watches ,
4560that can be used to limit the amount of kernel memory consumed by the
4561.I inotify
4562interface.
4563For further details, see
4564.BR inotify (7).
4565.TP
4566.I /proc/sys/fs/lease\-break\-time
4567This file specifies the grace period that the kernel grants to a process
4568holding a file lease
4569.RB ( fcntl (2))
4570after it has sent a signal to that process notifying it
4571that another process is waiting to open the file.
4572If the lease holder does not remove or downgrade the lease within
4573this grace period, the kernel forcibly breaks the lease.
4574.TP
4575.I /proc/sys/fs/leases\-enable
4576This file can be used to enable or disable file leases
4577.RB ( fcntl (2))
4578on a system-wide basis.
4579If this file contains the value 0, leases are disabled.
4580A nonzero value enables leases.
4581.TP
4582.IR /proc/sys/fs/mount\-max " (since Linux 4.9)"
4583.\" commit d29216842a85c7970c536108e093963f02714498
4584The value in this file specifies the maximum number of mounts that may exist
4585in a mount namespace.
4586The default value in this file is 100,000.
4587.TP
4588.IR /proc/sys/fs/mqueue " (since Linux 2.6.6)"
4589This directory contains files
4590.IR msg_max ", " msgsize_max ", and " queues_max ,
4591controlling the resources used by POSIX message queues.
4592See
4593.BR mq_overview (7)
4594for details.
4595.TP
4596.IR /proc/sys/fs/nr_open " (since Linux 2.6.25)"
4597.\" commit 9cfe015aa424b3c003baba3841a60dd9b5ad319b
4598This file imposes a ceiling on the value to which the
4599.BR RLIMIT_NOFILE
4600resource limit can be raised (see
4601.BR getrlimit (2)).
4602This ceiling is enforced for both unprivileged and privileged process.
4603The default value in this file is 1048576.
4604(Before Linux 2.6.25, the ceiling for
4605.BR RLIMIT_NOFILE
4606was hard-coded to the same value.)
4607.TP
4608.IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid
4609These files
4610allow you to change the value of the fixed UID and GID.
4611The default is 65534.
4612Some filesystems support only 16-bit UIDs and GIDs, although in Linux
4613UIDs and GIDs are 32 bits.
4614When one of these filesystems is mounted
4615with writes enabled, any UID or GID that would exceed 65535 is translated
4616to the overflow value before being written to disk.
4617.TP
4618.IR /proc/sys/fs/pipe\-max\-size " (since Linux 2.6.35)"
4619See
4620.BR pipe (7).
4621.TP
4622.IR /proc/sys/fs/pipe\-user\-pages\-hard " (since Linux 4.5)"
4623See
4624.BR pipe (7).
4625.TP
4626.IR /proc/sys/fs/pipe\-user\-pages\-soft " (since Linux 4.5)"
4627See
4628.BR pipe (7).
4629.TP
4630.IR /proc/sys/fs/protected_fifos " (since Linux 4.19)"
4631The value in this file is/can be set to one of the following:
4632.RS
4633.TP 4
46340
4635Writing to FIFOs is unrestricted.
4636.TP
46371
4638Don't allow
4639.B O_CREAT
4640.BR open (2)
4641on FIFOs that the caller doesn't own in world-writable sticky directories,
4642unless the FIFO is owned by the owner of the directory.
4643.TP
46442
4645As for the value 1,
4646but the restriction also applies to group-writable sticky directories.
4647.RE
4648.IP
4649The intent of the above protections is to avoid unintentional writes to an
4650attacker-controlled FIFO when a program expected to create a regular file.
4651.TP
4652.IR /proc/sys/fs/protected_hardlinks " (since Linux 3.6)"
4653.\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
4654When the value in this file is 0,
4655no restrictions are placed on the creation of hard links
4656(i.e., this is the historical behavior before Linux 3.6).
4657When the value in this file is 1,
4658a hard link can be created to a target file
4659only if one of the following conditions is true:
4660.RS
4661.IP * 3
4662The calling process has the
4663.BR CAP_FOWNER
4664capability in its user namespace
4665and the file UID has a mapping in the namespace.
4666.IP *
4667The filesystem UID of the process creating the link matches
4668the owner (UID) of the target file
4669(as described in
4670.BR credentials (7),
4671a process's filesystem UID is normally the same as its effective UID).
4672.IP *
4673All of the following conditions are true:
4674.RS 4
4675.IP \(bu 3
4676the target is a regular file;
4677.IP \(bu
4678the target file does not have its set-user-ID mode bit enabled;
4679.IP \(bu
4680the target file does not have both its set-group-ID and
4681group-executable mode bits enabled; and
4682.IP \(bu
4683the caller has permission to read and write the target file
4684(either via the file's permissions mask or because it has
4685suitable capabilities).
4686.RE
4687.RE
4688.IP
4689The default value in this file is 0.
4690Setting the value to 1
4691prevents a longstanding class of security issues caused by
4692hard-link-based time-of-check, time-of-use races,
4693most commonly seen in world-writable directories such as
4694.IR /tmp .
4695The common method of exploiting this flaw
4696is to cross privilege boundaries when following a given hard link
4697(i.e., a root process follows a hard link created by another user).
4698Additionally, on systems without separated partitions,
4699this stops unauthorized users from "pinning" vulnerable set-user-ID and
4700set-group-ID files against being upgraded by
4701the administrator, or linking to special files.
4702.TP
4703.IR /proc/sys/fs/protected_regular " (since Linux 4.19)"
4704The value in this file is/can be set to one of the following:
4705.RS
4706.TP 4
47070
4708Writing to regular files is unrestricted.
4709.TP
47101
4711Don't allow
4712.B O_CREAT
4713.BR open (2)
4714on regular files that the caller doesn't own in
4715world-writable sticky directories,
4716unless the regular file is owned by the owner of the directory.
4717.TP
47182
4719As for the value 1,
4720but the restriction also applies to group-writable sticky directories.
4721.RE
4722.IP
4723The intent of the above protections is similar to
4724.IR protected_fifos ,
4725but allows an application to
4726avoid writes to an attacker-controlled regular file,
4727where the application expected to create one.
4728.TP
4729.IR /proc/sys/fs/protected_symlinks " (since Linux 3.6)"
4730.\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
4731When the value in this file is 0,
4732no restrictions are placed on following symbolic links
4733(i.e., this is the historical behavior before Linux 3.6).
4734When the value in this file is 1, symbolic links are followed only
4735in the following circumstances:
4736.RS
4737.IP * 3
4738the filesystem UID of the process following the link matches
4739the owner (UID) of the symbolic link
4740(as described in
4741.BR credentials (7),
4742a process's filesystem UID is normally the same as its effective UID);
4743.IP *
4744the link is not in a sticky world-writable directory; or
4745.IP *
4746the symbolic link and its parent directory have the same owner (UID)
4747.RE
4748.IP
4749A system call that fails to follow a symbolic link
4750because of the above restrictions returns the error
4751.BR EACCES
4752in
4753.IR errno .
4754.IP
4755The default value in this file is 0.
4756Setting the value to 1 avoids a longstanding class of security issues
4757based on time-of-check, time-of-use races when accessing symbolic links.
4758.TP
4759.IR /proc/sys/fs/suid_dumpable " (since Linux 2.6.13)"
4760.\" The following is based on text from Documentation/sysctl/kernel.txt
4761The value in this file is assigned to a process's "dumpable" flag
4762in the circumstances described in
4763.BR prctl (2).
4764In effect,
4765the value in this file determines whether core dump files are
4766produced for set-user-ID or otherwise protected/tainted binaries.
4767The "dumpable" setting also affects the ownership of files in a process's
4768.IR /proc/[pid]
4769directory, as described above.
4770.IP
4771Three different integer values can be specified:
4772.RS
4773.TP
4774\fI0\ (default)\fP
4775.\" In kernel source: SUID_DUMP_DISABLE
4776This provides the traditional (pre-Linux 2.6.13) behavior.
4777A core dump will not be produced for a process which has
4778changed credentials (by calling
4779.BR seteuid (2),
4780.BR setgid (2),
4781or similar, or by executing a set-user-ID or set-group-ID program)
4782or whose binary does not have read permission enabled.
4783.TP
4784\fI1\ ("debug")\fP
4785.\" In kernel source: SUID_DUMP_USER
4786All processes dump core when possible.
4787(Reasons why a process might nevertheless not dump core are described in
4788.BR core (5).)
4789The core dump is owned by the filesystem user ID of the dumping process
4790and no security is applied.
4791This is intended for system debugging situations only:
4792this mode is insecure because it allows unprivileged users to
4793examine the memory contents of privileged processes.
4794.TP
4795\fI2\ ("suidsafe")\fP
4796.\" In kernel source: SUID_DUMP_ROOT
4797Any binary which normally would not be dumped (see "0" above)
4798is dumped readable by root only.
4799This allows the user to remove the core dump file but not to read it.
4800For security reasons core dumps in this mode will not overwrite one
4801another or other files.
4802This mode is appropriate when administrators are
4803attempting to debug problems in a normal environment.
4804.IP
4805Additionally, since Linux 3.6,
4806.\" 9520628e8ceb69fa9a4aee6b57f22675d9e1b709
4807.I /proc/sys/kernel/core_pattern
4808must either be an absolute pathname
4809or a pipe command, as detailed in
4810.BR core (5).
4811Warnings will be written to the kernel log if
4812.I core_pattern
4813does not follow these rules, and no core dump will be produced.
4814.\" 54b501992dd2a839e94e76aa392c392b55080ce8
4815.RE
4816.IP
4817For details of the effect of a process's "dumpable" setting
4818on ptrace access mode checking, see
4819.BR ptrace (2).
4820.TP
4821.I /proc/sys/fs/super\-max
4822This file
4823controls the maximum number of superblocks, and
4824thus the maximum number of mounted filesystems the kernel
4825can have.
4826You need increase only
4827.I super\-max
4828if you need to mount more filesystems than the current value in
4829.I super\-max
4830allows you to.
4831.TP
4832.I /proc/sys/fs/super\-nr
4833This file
4834contains the number of filesystems currently mounted.
4835.TP
4836.I /proc/sys/kernel
4837This directory contains files controlling a range of kernel parameters,
4838as described below.
4839.TP
4840.I /proc/sys/kernel/acct
4841This file
4842contains three numbers:
4843.IR highwater ,
4844.IR lowwater ,
4845and
4846.IR frequency .
4847If BSD-style process accounting is enabled, these values control
4848its behavior.
4849If free space on filesystem where the log lives goes below
4850.I lowwater
4851percent, accounting suspends.
4852If free space gets above
4853.I highwater
4854percent, accounting resumes.
4855.I frequency
4856determines
4857how often the kernel checks the amount of free space (value is in
4858seconds).
4859Default values are 4, 2, and 30.
4860That is, suspend accounting if 2% or less space is free; resume it
4861if 4% or more space is free; consider information about amount of free space
4862valid for 30 seconds.
4863.TP
4864.IR /proc/sys/kernel/auto_msgmni " (Linux 2.6.27 to 3.18)"
4865.\" commit 9eefe520c814f6f62c5d36a2ddcd3fb99dfdb30e (introduces feature)
4866.\" commit 0050ee059f7fc86b1df2527aaa14ed5dc72f9973 (rendered redundant)
4867From Linux 2.6.27 to 3.18,
4868this file was used to control recomputing of the value in
4869.IR /proc/sys/kernel/msgmni
4870upon the addition or removal of memory or upon IPC namespace creation/removal.
4871Echoing "1" into this file enabled
4872.I msgmni
4873automatic recomputing (and triggered a recomputation of
4874.I msgmni
4875based on the current amount of available memory and number of IPC namespaces).
4876Echoing "0" disabled automatic recomputing.
4877(Automatic recomputing was also disabled if a value was explicitly assigned to
4878.IR /proc/sys/kernel/msgmni .)
4879The default value in
4880.I auto_msgmni
4881was 1.
4882.IP
4883Since Linux 3.19, the content of this file has no effect (because
4884.IR msgmni
4885.\" FIXME Must document the 3.19 'msgmni' changes.
4886defaults to near the maximum value possible),
4887and reads from this file always return the value "0".
4888.TP
4889.IR /proc/sys/kernel/cap_last_cap " (since Linux 3.2)"
4890See
4891.BR capabilities (7).
4892.TP
4893.IR /proc/sys/kernel/cap\-bound " (from Linux 2.2 to 2.6.24)"
4894This file holds the value of the kernel
4895.I "capability bounding set"
4896(expressed as a signed decimal number).
4897This set is ANDed against the capabilities permitted to a process
4898during
4899.BR execve (2).
4900Starting with Linux 2.6.25,
4901the system-wide capability bounding set disappeared,
4902and was replaced by a per-thread bounding set; see
4903.BR capabilities (7).
4904.TP
4905.I /proc/sys/kernel/core_pattern
4906See
4907.BR core (5).
4908.TP
4909.I /proc/sys/kernel/core_pipe_limit
4910See
4911.BR core (5).
4912.TP
4913.I /proc/sys/kernel/core_uses_pid
4914See
4915.BR core (5).
4916.TP
4917.I /proc/sys/kernel/ctrl\-alt\-del
4918This file
4919controls the handling of Ctrl-Alt-Del from the keyboard.
4920When the value in this file is 0, Ctrl-Alt-Del is trapped and
4921sent to the
4922.BR init (1)
4923program to handle a graceful restart.
4924When the value is greater than zero, Linux's reaction to a Vulcan
4925Nerve Pinch (tm) will be an immediate reboot, without even
4926syncing its dirty buffers.
4927Note: when a program (like dosemu) has the keyboard in "raw"
4928mode, the ctrl-alt-del is intercepted by the program before it
4929ever reaches the kernel tty layer, and it's up to the program
4930to decide what to do with it.
4931.TP
4932.IR /proc/sys/kernel/dmesg_restrict " (since Linux 2.6.37)"
4933The value in this file determines who can see kernel syslog contents.
4934A value of 0 in this file imposes no restrictions.
4935If the value is 1, only privileged users can read the kernel syslog.
4936(See
4937.BR syslog (2)
4938for more details.)
4939Since Linux 3.4,
4940.\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
4941only users with the
4942.BR CAP_SYS_ADMIN
4943capability may change the value in this file.
4944.TP
4945.IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname
4946can be used to set the NIS/YP domainname and the
4947hostname of your box in exactly the same way as the commands
4948.BR domainname (1)
4949and
4950.BR hostname (1),
4951that is:
4952.IP
4953.in +4n
4954.EX
4955.RB "#" " echo \(aqdarkstar\(aq > /proc/sys/kernel/hostname"
4956.RB "#" " echo \(aqmydomain\(aq > /proc/sys/kernel/domainname"
4957.EE
4958.in
4959.IP
4960has the same effect as
4961.IP
4962.in +4n
4963.EX
4964.RB "#" " hostname \(aqdarkstar\(aq"
4965.RB "#" " domainname \(aqmydomain\(aq"
4966.EE
4967.in
4968.IP
4969Note, however, that the classic darkstar.frop.org has the
4970hostname "darkstar" and DNS (Internet Domain Name Server)
4971domainname "frop.org", not to be confused with the NIS (Network
4972Information Service) or YP (Yellow Pages) domainname.
4973These two
4974domain names are in general different.
4975For a detailed discussion
4976see the
4977.BR hostname (1)
4978man page.
4979.TP
4980.I /proc/sys/kernel/hotplug
4981This file
4982contains the pathname for the hotplug policy agent.
4983The default value in this file is
4984.IR /sbin/hotplug .
4985.TP
4986.\" Removed in commit 87f504e5c78b910b0c1d6ffb89bc95e492322c84 (tglx/history.git)
4987.IR /proc/sys/kernel/htab\-reclaim " (before Linux 2.4.9.2)"
4988(PowerPC only) If this file is set to a nonzero value,
4989the PowerPC htab
4990.\" removed in commit 1b483a6a7b2998e9c98ad985d7494b9b725bd228, before 2.6.28
4991(see kernel file
4992.IR Documentation/powerpc/ppc_htab.txt )
4993is pruned
4994each time the system hits the idle loop.
4995.TP
4996.IR /proc/sys/kernel/keys/*
4997This directory contains various files that define parameters and limits
4998for the key-management facility.
4999These files are described in
5000.BR keyrings (7).
5001.TP
5002.IR /proc/sys/kernel/kptr_restrict " (since Linux 2.6.38)"
5003.\" 455cd5ab305c90ffc422dd2e0fb634730942b257
5004The value in this file determines whether kernel addresses are exposed via
5005.I /proc
5006files and other interfaces.
5007A value of 0 in this file imposes no restrictions.
5008If the value is 1, kernel pointers printed using the
5009.I %pK
5010format specifier will be replaced with zeros unless the user has the
5011.BR CAP_SYSLOG
5012capability.
5013If the value is 2, kernel pointers printed using the
5014.I %pK
5015format specifier will be replaced with zeros regardless
5016of the user's capabilities.
5017The initial default value for this file was 1,
5018but the default was changed
5019.\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9
5020to 0 in Linux 2.6.39.
5021Since Linux 3.4,
5022.\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
5023only users with the
5024.BR CAP_SYS_ADMIN
5025capability can change the value in this file.
5026.TP
5027.I /proc/sys/kernel/l2cr
5028(PowerPC only) This file
5029contains a flag that controls the L2 cache of G3 processor
5030boards.
5031If 0, the cache is disabled.
5032Enabled if nonzero.
5033.TP
5034.I /proc/sys/kernel/modprobe
5035This file contains the pathname for the kernel module loader.
5036The default value is
5037.IR /sbin/modprobe .
5038The file is present only if the kernel is built with the
5039.B CONFIG_MODULES
5040.RB ( CONFIG_KMOD
5041in Linux 2.6.26 and earlier)
5042option enabled.
5043It is described by the Linux kernel source file
5044.I Documentation/kmod.txt
5045(present only in kernel 2.4 and earlier).
5046.TP
5047.IR /proc/sys/kernel/modules_disabled " (since Linux 2.6.31)"
5048.\" 3d43321b7015387cfebbe26436d0e9d299162ea1
5049.\" From Documentation/sysctl/kernel.txt
5050A toggle value indicating if modules are allowed to be loaded
5051in an otherwise modular kernel.
5052This toggle defaults to off (0), but can be set true (1).
5053Once true, modules can be neither loaded nor unloaded,
5054and the toggle cannot be set back to false.
5055The file is present only if the kernel is built with the
5056.B CONFIG_MODULES
5057option enabled.
5058.TP
5059.IR /proc/sys/kernel/msgmax " (since Linux 2.2)"
5060This file defines
5061a system-wide limit specifying the maximum number of bytes in
5062a single message written on a System V message queue.
5063.TP
5064.IR /proc/sys/kernel/msgmni " (since Linux 2.4)"
5065This file defines the system-wide limit on the number of
5066message queue identifiers.
5067See also
5068.IR /proc/sys/kernel/auto_msgmni .
5069.TP
5070.IR /proc/sys/kernel/msgmnb " (since Linux 2.2)"
5071This file defines a system-wide parameter used to initialize the
5072.I msg_qbytes
5073setting for subsequently created message queues.
5074The
5075.I msg_qbytes
5076setting specifies the maximum number of bytes that may be written to the
5077message queue.
5078.TP
5079.IR /proc/sys/kernel/ngroups_max " (since Linux 2.6.4)"
5080This is a read-only file that displays the upper limit on the
5081number of a process's group memberships.
5082.TP
5083.IR /proc/sys/kernel/ns_last_pid " (since Linux 3.3)"
5084See
5085.BR pid_namespaces (7).
5086.TP
5087.IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease
5088These files
5089give substrings of
5090.IR /proc/version .
5091.TP
5092.IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid
5093These files duplicate the files
5094.I /proc/sys/fs/overflowgid
5095and
5096.IR /proc/sys/fs/overflowuid .
5097.TP
5098.I /proc/sys/kernel/panic
5099This file gives read/write access to the kernel variable
5100.IR panic_timeout .
5101If this is zero, the kernel will loop on a panic; if nonzero,
5102it indicates that the kernel should autoreboot after this number
5103of seconds.
5104When you use the
5105software watchdog device driver, the recommended setting is 60.
5106.TP
5107.IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)"
5108This file controls the kernel's behavior when an oops
5109or BUG is encountered.
5110If this file contains 0, then the system
5111tries to continue operation.
5112If it contains 1, then the system
5113delays a few seconds (to give klogd time to record the oops output)
5114and then panics.
5115If the
5116.I /proc/sys/kernel/panic
5117file is also nonzero, then the machine will be rebooted.
5118.TP
5119.IR /proc/sys/kernel/pid_max " (since Linux 2.5.34)"
5120This file specifies the value at which PIDs wrap around
5121(i.e., the value in this file is one greater than the maximum PID).
5122PIDs greater than this value are not allocated;
5123thus, the value in this file also acts as a system-wide limit
5124on the total number of processes and threads.
5125The default value for this file, 32768,
5126results in the same range of PIDs as on earlier kernels.
5127On 32-bit platforms, 32768 is the maximum value for
5128.IR pid_max .
5129On 64-bit systems,
5130.I pid_max
5131can be set to any value up to 2^22
5132.RB ( PID_MAX_LIMIT ,
5133approximately 4 million).
5134.\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit
5135.\" platforms, but this broke /proc/[pid]
5136.\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
5137.TP
5138.IR /proc/sys/kernel/powersave\-nap " (PowerPC only)"
5139This file contains a flag.
5140If set, Linux-PPC will use the "nap" mode of
5141powersaving,
5142otherwise the "doze" mode will be used.
5143.TP
5144.I /proc/sys/kernel/printk
5145See
5146.BR syslog (2).
5147.TP
5148.IR /proc/sys/kernel/pty " (since Linux 2.6.4)"
5149This directory contains two files relating to the number of UNIX 98
5150pseudoterminals (see
5151.BR pts (4))
5152on the system.
5153.TP
5154.I /proc/sys/kernel/pty/max
5155This file defines the maximum number of pseudoterminals.
5156.\" FIXME Document /proc/sys/kernel/pty/reserve
5157.\" New in Linux 3.3
5158.\" commit e9aba5158a80098447ff207a452a3418ae7ee386
5159.TP
5160.I /proc/sys/kernel/pty/nr
5161This read-only file
5162indicates how many pseudoterminals are currently in use.
5163.TP
5164.I /proc/sys/kernel/random
5165This directory
5166contains various parameters controlling the operation of the file
5167.IR /dev/random .
5168See
5169.BR random (4)
5170for further information.
5171.TP
5172.IR /proc/sys/kernel/random/uuid " (since Linux 2.4)"
5173Each read from this read-only file returns a randomly generated 128-bit UUID,
5174as a string in the standard UUID format.
5175.TP
5176.IR /proc/sys/kernel/randomize_va_space " (since Linux 2.6.12)"
5177.\" Some further details can be found in Documentation/sysctl/kernel.txt
5178Select the address space layout randomization (ASLR) policy for the system
5179(on architectures that support ASLR).
5180Three values are supported for this file:
5181.RS
5182.IP 0 3
5183Turn ASLR off.
5184This is the default for architectures that don't support ASLR,
5185and when the kernel is booted with the
5186.I norandmaps
5187parameter.
5188.IP 1
5189Make the addresses of
5190.BR mmap (2)
5191allocations, the stack, and the VDSO page randomized.
5192Among other things, this means that shared libraries will be
5193loaded at randomized addresses.
5194The text segment of PIE-linked binaries will also be loaded
5195at a randomized address.
5196This value is the default if the kernel was configured with
5197.BR CONFIG_COMPAT_BRK .
5198.IP 2
5199(Since Linux 2.6.25)
5200.\" commit c1d171a002942ea2d93b4fbd0c9583c56fce0772
5201Also support heap randomization.
5202This value is the default if the kernel was not configured with
5203.BR CONFIG_COMPAT_BRK .
5204.RE
5205.TP
5206.I /proc/sys/kernel/real\-root\-dev
5207This file is documented in the Linux kernel source file
5208.I Documentation/admin\-guide/initrd.rst
5209.\" commit 9d85025b0418163fae079c9ba8f8445212de8568
5210(or
5211.I Documentation/initrd.txt
5212before Linux 4.10).
5213.TP
5214.IR /proc/sys/kernel/reboot\-cmd " (Sparc only)"
5215This file seems to be a way to give an argument to the SPARC
5216ROM/Flash boot loader.
5217Maybe to tell it what to do after
5218rebooting?
5219.TP
5220.I /proc/sys/kernel/rtsig\-max
5221(Only in kernels up to and including 2.6.7; see
5222.BR setrlimit (2))
5223This file can be used to tune the maximum number
5224of POSIX real-time (queued) signals that can be outstanding
5225in the system.
5226.TP
5227.I /proc/sys/kernel/rtsig\-nr
5228(Only in kernels up to and including 2.6.7.)
5229This file shows the number of POSIX real-time signals currently queued.
5230.TP
5231.IR /proc/[pid]/sched_autogroup_enabled " (since Linux 2.6.38)"
5232.\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a
5233See
5234.BR sched (7).
5235.TP
5236.IR /proc/sys/kernel/sched_child_runs_first " (since Linux 2.6.23)"
5237If this file contains the value zero, then, after a
5238.BR fork (2),
5239the parent is first scheduled on the CPU.
5240If the file contains a nonzero value,
5241then the child is scheduled first on the CPU.
5242(Of course, on a multiprocessor system,
5243the parent and the child might both immediately be scheduled on a CPU.)
5244.TP
5245.IR /proc/sys/kernel/sched_rr_timeslice_ms " (since Linux 3.9)"
5246See
5247.BR sched_rr_get_interval (2).
5248.TP
5249.IR /proc/sys/kernel/sched_rt_period_us " (since Linux 2.6.25)"
5250See
5251.BR sched (7).
5252.TP
5253.IR /proc/sys/kernel/sched_rt_runtime_us " (since Linux 2.6.25)"
5254See
5255.BR sched (7).
5256.TP
5257.IR /proc/sys/kernel/seccomp " (since Linux 4.14)"
5258.\" commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af
5259This directory provides additional seccomp information and
5260configuration.
5261See
5262.BR seccomp (2)
5263for further details.
5264.TP
5265.IR /proc/sys/kernel/sem " (since Linux 2.4)"
5266This file contains 4 numbers defining limits for System V IPC semaphores.
5267These fields are, in order:
5268.RS
5269.IP SEMMSL 8
5270The maximum semaphores per semaphore set.
5271.IP SEMMNS 8
5272A system-wide limit on the number of semaphores in all semaphore sets.
5273.IP SEMOPM 8
5274The maximum number of operations that may be specified in a
5275.BR semop (2)
5276call.
5277.IP SEMMNI 8
5278A system-wide limit on the maximum number of semaphore identifiers.
5279.RE
5280.TP
5281.I /proc/sys/kernel/sg\-big\-buff
5282This file
5283shows the size of the generic SCSI device (sg) buffer.
5284You can't tune it just yet, but you could change it at
5285compile time by editing
5286.I include/scsi/sg.h
5287and changing
5288the value of
5289.BR SG_BIG_BUFF .
5290However, there shouldn't be any reason to change this value.
5291.TP
5292.IR /proc/sys/kernel/shm_rmid_forced " (since Linux 3.1)"
5293.\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53
5294.\" See also Documentation/sysctl/kernel.txt
5295If this file is set to 1, all System V shared memory segments will
5296be marked for destruction as soon as the number of attached processes
5297falls to zero;
5298in other words, it is no longer possible to create shared memory segments
5299that exist independently of any attached process.
5300.IP
5301The effect is as though a
5302.BR shmctl (2)
5303.B IPC_RMID
5304is performed on all existing segments as well as all segments
5305created in the future (until this file is reset to 0).
5306Note that existing segments that are attached to no process will be
5307immediately destroyed when this file is set to 1.
5308Setting this option will also destroy segments that were created,
5309but never attached,
5310upon termination of the process that created the segment with
5311.BR shmget (2).
5312.IP
5313Setting this file to 1 provides a way of ensuring that
5314all System V shared memory segments are counted against the
5315resource usage and resource limits (see the description of
5316.B RLIMIT_AS
5317in
5318.BR getrlimit (2))
5319of at least one process.
5320.IP
5321Because setting this file to 1 produces behavior that is nonstandard
5322and could also break existing applications,
5323the default value in this file is 0.
5324Set this file to 1 only if you have a good understanding
5325of the semantics of the applications using
5326System V shared memory on your system.
5327.TP
5328.IR /proc/sys/kernel/shmall " (since Linux 2.2)"
5329This file
5330contains the system-wide limit on the total number of pages of
5331System V shared memory.
5332.TP
5333.IR /proc/sys/kernel/shmmax " (since Linux 2.2)"
5334This file
5335can be used to query and set the run-time limit
5336on the maximum (System V IPC) shared memory segment size that can be
5337created.
5338Shared memory segments up to 1 GB are now supported in the
5339kernel.
5340This value defaults to
5341.BR SHMMAX .
5342.TP
5343.IR /proc/sys/kernel/shmmni " (since Linux 2.4)"
5344This file
5345specifies the system-wide maximum number of System V shared memory
5346segments that can be created.
5347.TP
5348.IR /proc/sys/kernel/sysctl_writes_strict " (since Linux 3.16)"
5349.\" commit f88083005ab319abba5d0b2e4e997558245493c8
5350.\" commit 2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92
5351.\" commit f4aacea2f5d1a5f7e3154e967d70cf3f711bcd61
5352.\" commit 24fe831c17ab8149413874f2fd4e5c8a41fcd294
5353The value in this file determines how the file offset affects
5354the behavior of updating entries in files under
5355.IR /proc/sys .
5356The file has three possible values:
5357.RS
5358.TP 4
5359\-1
5360This provides legacy handling, with no printk warnings.
5361Each
5362.BR write (2)
5363must fully contain the value to be written,
5364and multiple writes on the same file descriptor
5365will overwrite the entire value, regardless of the file position.
5366.TP
53670
5368(default) This provides the same behavior as for \-1,
5369but printk warnings are written for processes that
5370perform writes when the file offset is not 0.
5371.TP
53721
5373Respect the file offset when writing strings into
5374.I /proc/sys
5375files.
5376Multiple writes will
5377.I append
5378to the value buffer.
5379Anything written beyond the maximum length
5380of the value buffer will be ignored.
5381Writes to numeric
5382.I /proc/sys
5383entries must always be at file offset 0 and the value must be
5384fully contained in the buffer provided to
5385.BR write (2).
5386.\" FIXME .
5387.\" With /proc/sys/kernel/sysctl_writes_strict==1, writes at an
5388.\" offset other than 0 do not generate an error. Instead, the
5389.\" write() succeeds, but the file is left unmodified.
5390.\" This is surprising. The behavior may change in the future.
5391.\" See thread.gmane.org/gmane.linux.man/9197
5392.\" From: Michael Kerrisk (man-pages <mtk.manpages@...>
5393.\" Subject: sysctl_writes_strict documentation + an oddity?
5394.\" Newsgroups: gmane.linux.man, gmane.linux.kernel
5395.\" Date: 2015-05-09 08:54:11 GMT
5396.RE
5397.TP
5398.I /proc/sys/kernel/sysrq
5399This file controls the functions allowed to be invoked by the SysRq key.
5400By default,
5401the file contains 1 meaning that every possible SysRq request is allowed
5402(in older kernel versions, SysRq was disabled by default,
5403and you were required to specifically enable it at run-time,
5404but this is not the case any more).
5405Possible values in this file are:
5406.RS
5407.TP 5
54080
5409Disable sysrq completely
5410.TP
54111
5412Enable all functions of sysrq
5413.TP
5414> 1
5415Bit mask of allowed sysrq functions, as follows:
5416.PD 0
5417.RS
5418.TP 5
5419\ \ 2
5420Enable control of console logging level
5421.TP
5422\ \ 4
5423Enable control of keyboard (SAK, unraw)
5424.TP
5425\ \ 8
5426Enable debugging dumps of processes etc.
5427.TP
5428\ 16
5429Enable sync command
5430.TP
5431\ 32
5432Enable remount read-only
5433.TP
5434\ 64
5435Enable signaling of processes (term, kill, oom-kill)
5436.TP
5437128
5438Allow reboot/poweroff
5439.TP
5440256
5441Allow nicing of all real-time tasks
5442.RE
5443.PD
5444.RE
5445.IP
5446This file is present only if the
5447.B CONFIG_MAGIC_SYSRQ
5448kernel configuration option is enabled.
5449For further details see the Linux kernel source file
5450.I Documentation/admin\-guide/sysrq.rst
5451.\" commit 9d85025b0418163fae079c9ba8f8445212de8568
5452(or
5453.I Documentation/sysrq.txt
5454before Linux 4.10).
5455.TP
5456.I /proc/sys/kernel/version
5457This file contains a string such as:
5458.IP
5459 #5 Wed Feb 25 21:49:24 MET 1998
5460.IP
5461The "#5" means that
5462this is the fifth kernel built from this source base and the
5463date following it indicates the time the kernel was built.
5464.TP
5465.IR /proc/sys/kernel/threads\-max " (since Linux 2.3.11)"
5466.\" The following is based on Documentation/sysctl/kernel.txt
5467This file specifies the system-wide limit on the number of
5468threads (tasks) that can be created on the system.
5469.IP
5470Since Linux 4.1,
5471.\" commit 230633d109e35b0a24277498e773edeb79b4a331
5472the value that can be written to
5473.I threads\-max
5474is bounded.
5475The minimum value that can be written is 20.
5476The maximum value that can be written is given by the
5477constant
5478.B FUTEX_TID_MASK
5479(0x3fffffff).
5480If a value outside of this range is written to
5481.IR threads\-max ,
5482the error
5483.B EINVAL
5484occurs.
5485.IP
5486The value written is checked against the available RAM pages.
5487If the thread structures would occupy too much (more than 1/8th)
5488of the available RAM pages,
5489.I threads\-max
5490is reduced accordingly.
5491.TP
5492.IR /proc/sys/kernel/yama/ptrace_scope " (since Linux 3.5)"
5493See
5494.BR ptrace (2).
5495.TP
5496.IR /proc/sys/kernel/zero\-paged " (PowerPC only)"
5497This file
5498contains a flag.
5499When enabled (nonzero), Linux-PPC will pre-zero pages in
5500the idle loop, possibly speeding up get_free_pages.
5501.TP
5502.I /proc/sys/net
5503This directory contains networking stuff.
5504Explanations for some of the files under this directory can be found in
5505.BR tcp (7)
5506and
5507.BR ip (7).
5508.TP
5509.I /proc/sys/net/core/bpf_jit_enable
5510See
5511.BR bpf (2).
5512.TP
5513.I /proc/sys/net/core/somaxconn
5514This file defines a ceiling value for the
5515.I backlog
5516argument of
5517.BR listen (2);
5518see the
5519.BR listen (2)
5520manual page for details.
5521.TP
5522.I /proc/sys/proc
5523This directory may be empty.
5524.TP
5525.I /proc/sys/sunrpc
5526This directory supports Sun remote procedure call for network filesystem
5527(NFS).
5528On some systems, it is not present.
5529.TP
5530.IR /proc/sys/user " (since Linux 4.9)"
5531See
5532.BR namespaces (7).
5533.TP
5534.I /proc/sys/vm
5535This directory contains files for memory management tuning, buffer, and
5536cache management.
5537.TP
5538.IR /proc/sys/vm/admin_reserve_kbytes " (since Linux 3.10)"
5539.\" commit 4eeab4f5580d11bffedc697684b91b0bca0d5009
5540This file defines the amount of free memory (in KiB) on the system that
5541should be reserved for users with the capability
5542.BR CAP_SYS_ADMIN .
5543.IP
5544The default value in this file is the minimum of [3% of free pages, 8MiB]
5545expressed as KiB.
5546The default is intended to provide enough for the superuser
5547to log in and kill a process, if necessary,
5548under the default overcommit 'guess' mode (i.e., 0 in
5549.IR /proc/sys/vm/overcommit_memory ).
5550.IP
5551Systems running in "overcommit never" mode (i.e., 2 in
5552.IR /proc/sys/vm/overcommit_memory )
5553should increase the value in this file to account
5554for the full virtual memory size of the programs used to recover (e.g.,
5555.BR login (1)
5556.BR ssh (1),
5557and
5558.BR top (1))
5559Otherwise, the superuser may not be able to log in to recover the system.
5560For example, on x86-64 a suitable value is 131072 (128MiB reserved).
5561.IP
5562Changing the value in this file takes effect whenever
5563an application requests memory.
5564.TP
5565.IR /proc/sys/vm/compact_memory " (since Linux 2.6.35)"
5566When 1 is written to this file, all zones are compacted such that free
5567memory is available in contiguous blocks where possible.
5568The effect of this action can be seen by examining
5569.IR /proc/buddyinfo .
5570.IP
5571Present only if the kernel was configured with
5572.BR CONFIG_COMPACTION .
5573.TP
5574.IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)"
5575Writing to this file causes the kernel to drop clean caches, dentries, and
5576inodes from memory, causing that memory to become free.
5577This can be useful for memory management testing and
5578performing reproducible filesystem benchmarks.
5579Because writing to this file causes the benefits of caching to be lost,
5580it can degrade overall system performance.
5581.IP
5582To free pagecache, use:
5583.IP
5584 echo 1 > /proc/sys/vm/drop_caches
5585.IP
5586To free dentries and inodes, use:
5587.IP
5588 echo 2 > /proc/sys/vm/drop_caches
5589.IP
5590To free pagecache, dentries, and inodes, use:
5591.IP
5592 echo 3 > /proc/sys/vm/drop_caches
5593.IP
5594Because writing to this file is a nondestructive operation and dirty objects
5595are not freeable, the
5596user should run
5597.BR sync (1)
5598first.
5599.TP
5600.IR /proc/sys/vm/sysctl_hugetlb_shm_group " (since Linux 2.6.7)"
5601This writable file contains a group ID that is allowed
5602to allocate memory using huge pages.
5603If a process has a filesystem group ID or any supplementary group ID that
5604matches this group ID,
5605then it can make huge-page allocations without holding the
5606.BR CAP_IPC_LOCK
5607capability; see
5608.BR memfd_create (2),
5609.BR mmap (2),
5610and
5611.BR shmget (2).
5612.TP
5613.IR /proc/sys/vm/legacy_va_layout " (since Linux 2.6.9)"
5614.\" The following is from Documentation/filesystems/proc.txt
5615If nonzero, this disables the new 32-bit memory-mapping layout;
5616the kernel will use the legacy (2.4) layout for all processes.
5617.TP
5618.IR /proc/sys/vm/memory_failure_early_kill " (since Linux 2.6.32)"
5619.\" The following is based on the text in Documentation/sysctl/vm.txt
5620Control how to kill processes when an uncorrected memory error
5621(typically a 2-bit error in a memory module)
5622that cannot be handled by the kernel
5623is detected in the background by hardware.
5624In some cases (like the page still having a valid copy on disk),
5625the kernel will handle the failure
5626transparently without affecting any applications.
5627But if there is no other up-to-date copy of the data,
5628it will kill processes to prevent any data corruptions from propagating.
5629.IP
5630The file has one of the following values:
5631.RS
5632.IP 1: 4
5633Kill all processes that have the corrupted-and-not-reloadable page mapped
5634as soon as the corruption is detected.
5635Note that this is not supported for a few types of pages,
5636such as kernel internally
5637allocated data or the swap cache, but works for the majority of user pages.
5638.IP 0: 4
5639Unmap the corrupted page from all processes and kill a process
5640only if it tries to access the page.
5641.RE
5642.IP
5643The kill is performed using a
5644.B SIGBUS
5645signal with
5646.I si_code
5647set to
5648.BR BUS_MCEERR_AO .
5649Processes can handle this if they want to; see
5650.BR sigaction (2)
5651for more details.
5652.IP
5653This feature is active only on architectures/platforms with advanced machine
5654check handling and depends on the hardware capabilities.
5655.IP
5656Applications can override the
5657.I memory_failure_early_kill
5658setting individually with the
5659.BR prctl (2)
5660.B PR_MCE_KILL
5661operation.
5662.IP
5663Present only if the kernel was configured with
5664.BR CONFIG_MEMORY_FAILURE .
5665.TP
5666.IR /proc/sys/vm/memory_failure_recovery " (since Linux 2.6.32)"
5667.\" The following is based on the text in Documentation/sysctl/vm.txt
5668Enable memory failure recovery (when supported by the platform).
5669.RS
5670.IP 1: 4
5671Attempt recovery.
5672.IP 0: 4
5673Always panic on a memory failure.
5674.RE
5675.IP
5676Present only if the kernel was configured with
5677.BR CONFIG_MEMORY_FAILURE .
5678.TP
5679.IR /proc/sys/vm/oom_dump_tasks " (since Linux 2.6.25)"
5680.\" The following is from Documentation/sysctl/vm.txt
5681Enables a system-wide task dump (excluding kernel threads) to be
5682produced when the kernel performs an OOM-killing.
5683The dump includes the following information
5684for each task (thread, process):
5685thread ID, real user ID, thread group ID (process ID),
5686virtual memory size, resident set size,
5687the CPU that the task is scheduled on,
5688oom_adj score (see the description of
5689.IR /proc/[pid]/oom_adj ),
5690and command name.
5691This is helpful to determine why the OOM-killer was invoked
5692and to identify the rogue task that caused it.
5693.IP
5694If this contains the value zero, this information is suppressed.
5695On very large systems with thousands of tasks,
5696it may not be feasible to dump the memory state information for each one.
5697Such systems should not be forced to incur a performance penalty in
5698OOM situations when the information may not be desired.
5699.IP
5700If this is set to nonzero, this information is shown whenever the
5701OOM-killer actually kills a memory-hogging task.
5702.IP
5703The default value is 0.
5704.TP
5705.IR /proc/sys/vm/oom_kill_allocating_task " (since Linux 2.6.24)"
5706.\" The following is from Documentation/sysctl/vm.txt
5707This enables or disables killing the OOM-triggering task in
5708out-of-memory situations.
5709.IP
5710If this is set to zero, the OOM-killer will scan through the entire
5711tasklist and select a task based on heuristics to kill.
5712This normally selects a rogue memory-hogging task that
5713frees up a large amount of memory when killed.
5714.IP
5715If this is set to nonzero, the OOM-killer simply kills the task that
5716triggered the out-of-memory condition.
5717This avoids a possibly expensive tasklist scan.
5718.IP
5719If
5720.I /proc/sys/vm/panic_on_oom
5721is nonzero, it takes precedence over whatever value is used in
5722.IR /proc/sys/vm/oom_kill_allocating_task .
5723.IP
5724The default value is 0.
5725.TP
5726.IR /proc/sys/vm/overcommit_kbytes " (since Linux 3.14)"
5727.\" commit 49f0ce5f92321cdcf741e35f385669a421013cb7
5728This writable file provides an alternative to
5729.IR /proc/sys/vm/overcommit_ratio
5730for controlling the
5731.I CommitLimit
5732when
5733.IR /proc/sys/vm/overcommit_memory
5734has the value 2.
5735It allows the amount of memory overcommitting to be specified as
5736an absolute value (in kB),
5737rather than as a percentage, as is done with
5738.IR overcommit_ratio .
5739This allows for finer-grained control of
5740.IR CommitLimit
5741on systems with extremely large memory sizes.
5742.IP
5743Only one of
5744.IR overcommit_kbytes
5745or
5746.IR overcommit_ratio
5747can have an effect:
5748if
5749.IR overcommit_kbytes
5750has a nonzero value, then it is used to calculate
5751.IR CommitLimit ,
5752otherwise
5753.IR overcommit_ratio
5754is used.
5755Writing a value to either of these files causes the
5756value in the other file to be set to zero.
5757.TP
5758.I /proc/sys/vm/overcommit_memory
5759This file contains the kernel virtual memory accounting mode.
5760Values are:
5761.RS
5762.IP
57630: heuristic overcommit (this is the default)
5764.br
57651: always overcommit, never check
5766.br
57672: always check, never overcommit
5768.RE
5769.IP
5770In mode 0, calls of
5771.BR mmap (2)
5772with
5773.B MAP_NORESERVE
5774are not checked, and the default check is very weak,
5775leading to the risk of getting a process "OOM-killed".
5776.IP
5777In mode 1, the kernel pretends there is always enough memory,
5778until memory actually runs out.
5779One use case for this mode is scientific computing applications
5780that employ large sparse arrays.
5781In Linux kernel versions before 2.6.0, any nonzero value implies mode 1.
5782.IP
5783In mode 2 (available since Linux 2.6), the total virtual address space
5784that can be allocated
5785.RI ( CommitLimit
5786in
5787.IR /proc/meminfo )
5788is calculated as
5789.IP
5790 CommitLimit = (total_RAM \- total_huge_TLB) *
5791 overcommit_ratio / 100 + total_swap
5792.IP
5793where:
5794.RS 12
5795.IP * 3
5796.I total_RAM
5797is the total amount of RAM on the system;
5798.IP *
5799.I total_huge_TLB
5800is the amount of memory set aside for huge pages;
5801.IP *
5802.I overcommit_ratio
5803is the value in
5804.IR /proc/sys/vm/overcommit_ratio ;
5805and
5806.IP *
5807.I total_swap
5808is the amount of swap space.
5809.RE
5810.IP
5811For example, on a system with 16 GB of physical RAM, 16 GB
5812of swap, no space dedicated to huge pages, and an
5813.I overcommit_ratio
5814of 50, this formula yields a
5815.I CommitLimit
5816of 24 GB.
5817.IP
5818Since Linux 3.14, if the value in
5819.I /proc/sys/vm/overcommit_kbytes
5820is nonzero, then
5821.I CommitLimit
5822is instead calculated as:
5823.IP
5824 CommitLimit = overcommit_kbytes + total_swap
5825.IP
5826See also the description of
5827.IR /proc/sys/vm/admin_reserve_kbytes
5828and
5829.IR /proc/sys/vm/user_reserve_kbytes .
5830.TP
5831.IR /proc/sys/vm/overcommit_ratio " (since Linux 2.6.0)"
5832This writable file defines a percentage by which memory
5833can be overcommitted.
5834The default value in the file is 50.
5835See the description of
5836.IR /proc/sys/vm/overcommit_memory .
5837.TP
5838.IR /proc/sys/vm/panic_on_oom " (since Linux 2.6.18)"
5839.\" The following is adapted from Documentation/sysctl/vm.txt
5840This enables or disables a kernel panic in
5841an out-of-memory situation.
5842.IP
5843If this file is set to the value 0,
5844the kernel's OOM-killer will kill some rogue process.
5845Usually, the OOM-killer is able to kill a rogue process and the
5846system will survive.
5847.IP
5848If this file is set to the value 1,
5849then the kernel normally panics when out-of-memory happens.
5850However, if a process limits allocations to certain nodes
5851using memory policies
5852.RB ( mbind (2)
5853.BR MPOL_BIND )
5854or cpusets
5855.RB ( cpuset (7))
5856and those nodes reach memory exhaustion status,
5857one process may be killed by the OOM-killer.
5858No panic occurs in this case:
5859because other nodes' memory may be free,
5860this means the system as a whole may not have reached
5861an out-of-memory situation yet.
5862.IP
5863If this file is set to the value 2,
5864the kernel always panics when an out-of-memory condition occurs.
5865.IP
5866The default value is 0.
58671 and 2 are for failover of clustering.
5868Select either according to your policy of failover.
5869.TP
5870.IR /proc/sys/vm/swappiness
5871.\" The following is from Documentation/sysctl/vm.txt
5872The value in this file controls how aggressively the kernel will swap
5873memory pages.
5874Higher values increase aggressiveness, lower values
5875decrease aggressiveness.
5876The default value is 60.
5877.TP
5878.IR /proc/sys/vm/user_reserve_kbytes " (since Linux 3.10)"
5879.\" commit c9b1d0981fcce3d9976d7b7a56e4e0503bc610dd
5880Specifies an amount of memory (in KiB) to reserve for user processes.
5881This is intended to prevent a user from starting a single memory hogging
5882process, such that they cannot recover (kill the hog).
5883The value in this file has an effect only when
5884.IR /proc/sys/vm/overcommit_memory
5885is set to 2 ("overcommit never" mode).
5886In this case, the system reserves an amount of memory that is the minimum
5887of [3% of current process size,
5888.IR user_reserve_kbytes ].
5889.IP
5890The default value in this file is the minimum of [3% of free pages, 128MiB]
5891expressed as KiB.
5892.IP
5893If the value in this file is set to zero,
5894then a user will be allowed to allocate all free memory with a single process
5895(minus the amount reserved by
5896.IR /proc/sys/vm/admin_reserve_kbytes ).
5897Any subsequent attempts to execute a command will result in
5898"fork: Cannot allocate memory".
5899.IP
5900Changing the value in this file takes effect whenever
5901an application requests memory.
5902.TP
5903.IR /proc/sys/vm/unprivileged_userfaultfd " (since Linux 5.2)"
5904.\" cefdca0a86be517bc390fc4541e3674b8e7803b0
5905This (writable) file exposes a flag that controls whether
5906unprivileged processes are allowed to employ
5907.BR userfaultfd (2).
5908If this file has the value 1, then unprivileged processes may use
5909.BR userfaultfd (2).
5910If this file has the value 0, then only processes that have the
5911.B CAP_SYS_PTRACE
5912capability may employ
5913.BR userfaultfd (2).
5914The default value in this file is 1.
5915.TP
5916.IR /proc/sysrq\-trigger " (since Linux 2.4.21)"
5917Writing a character to this file triggers the same SysRq function as
5918typing ALT-SysRq-<character> (see the description of
5919.IR /proc/sys/kernel/sysrq ).
5920This file is normally writable only by
5921.IR root .
5922For further details see the Linux kernel source file
5923.I Documentation/admin\-guide/sysrq.rst
5924.\" commit 9d85025b0418163fae079c9ba8f8445212de8568
5925(or
5926.I Documentation/sysrq.txt
5927before Linux 4.10).
5928.TP
5929.I /proc/sysvipc
5930Subdirectory containing the pseudo-files
5931.IR msg ", " sem " and " shm "."
5932These files list the System V Interprocess Communication (IPC) objects
5933(respectively: message queues, semaphores, and shared memory)
5934that currently exist on the system,
5935providing similar information to that available via
5936.BR ipcs (1).
5937These files have headers and are formatted (one IPC object per line)
5938for easy understanding.
5939.BR sysvipc (7)
5940provides further background on the information shown by these files.
5941.TP
5942.IR /proc/thread\-self " (since Linux 3.17)"
5943.\" commit 0097875bd41528922fb3bb5f348c53f17e00e2fd
5944This directory refers to the thread accessing the
5945.I /proc
5946filesystem,
5947and is identical to the
5948.I /proc/self/task/[tid]
5949directory named by the process thread ID
5950.RI ( [tid] )
5951of the same thread.
5952.TP
5953.IR /proc/timer_list " (since Linux 2.6.21)"
5954.\" commit 289f480af87e45f7a6de6ba9b4c061c2e259fe98
5955This read-only file exposes a list of all currently pending
5956(high-resolution) timers,
5957all clock-event sources, and their parameters in a human-readable form.
5958.TP
5959.IR /proc/timer_stats " (from Linux 2.6.21 until Linux 4.10)"
5960.\" commit 82f67cd9fca8c8762c15ba7ed0d5747588c1e221
5961.\" Date: Fri Feb 16 01:28:13 2007 -0800
5962.\" Text largely derived from Documentation/timers/timer_stats.txt
5963.\" removed in commit dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
5964.\" Date: Wed Feb 8 11:26:59 2017 -0800
5965This is a debugging facility to make timer (ab)use in a Linux
5966system visible to kernel and user-space developers.
5967It can be used by kernel and user-space developers to verify that
5968their code does not make undue use of timers.
5969The goal is to avoid unnecessary wakeups,
5970thereby optimizing power consumption.
5971.IP
5972If enabled in the kernel
5973.RB ( CONFIG_TIMER_STATS ),
5974but not used,
5975it has almost zero run-time overhead and a relatively small
5976data-structure overhead.
5977Even if collection is enabled at run time, overhead is low:
5978all the locking is per-CPU and lookup is hashed.
5979.IP
5980The
5981.I /proc/timer_stats
5982file is used both to control sampling facility and to read out the
5983sampled information.
5984.IP
5985The
5986.I timer_stats
5987functionality is inactive on bootup.
5988A sampling period can be started using the following command:
5989.IP
5990.in +4n
5991.EX
5992# echo 1 > /proc/timer_stats
5993.EE
5994.in
5995.IP
5996The following command stops a sampling period:
5997.IP
5998.in +4n
5999.EX
6000# echo 0 > /proc/timer_stats
6001.EE
6002.in
6003.IP
6004The statistics can be retrieved by:
6005.IP
6006.in +4n
6007.EX
6008$ cat /proc/timer_stats
6009.EE
6010.in
6011.IP
6012While sampling is enabled, each readout from
6013.I /proc/timer_stats
6014will see
6015newly updated statistics.
6016Once sampling is disabled, the sampled information
6017is kept until a new sample period is started.
6018This allows multiple readouts.
6019.IP
6020Sample output from
6021.IR /proc/timer_stats :
6022.IP
6023.in +4n
6024.EX
6025.RB $ " cat /proc/timer_stats"
6026Timer Stats Version: v0.3
6027Sample period: 1.764 s
6028Collection: active
6029 255, 0 swapper/3 hrtimer_start_range_ns (tick_sched_timer)
6030 71, 0 swapper/1 hrtimer_start_range_ns (tick_sched_timer)
6031 58, 0 swapper/0 hrtimer_start_range_ns (tick_sched_timer)
6032 4, 1694 gnome\-shell mod_delayed_work_on (delayed_work_timer_fn)
6033 17, 7 rcu_sched rcu_gp_kthread (process_timeout)
6034\&...
6035 1, 4911 kworker/u16:0 mod_delayed_work_on (delayed_work_timer_fn)
6036 1D, 2522 kworker/0:0 queue_delayed_work_on (delayed_work_timer_fn)
60371029 total events, 583.333 events/sec
6038.EE
6039.in
6040.IP
6041The output columns are:
6042.RS
6043.IP * 3
6044a count of the number of events,
6045optionally (since Linux 2.6.23) followed by the letter \(aqD\(aq
6046.\" commit c5c061b8f9726bc2c25e19dec227933a13d1e6b7 deferrable timers
6047if this is a deferrable timer;
6048.IP *
6049the PID of the process that initialized the timer;
6050.IP *
6051the name of the process that initialized the timer;
6052.IP *
6053the function where the timer was initialized; and
6054.IP *
6055(in parentheses)
6056the callback function that is associated with the timer.
6057.RE
6058.IP
6059During the Linux 4.11 development cycle,
6060this file was removed because of security concerns,
6061as it exposes information across namespaces.
6062Furthermore, it is possible to obtain
6063the same information via in-kernel tracing facilities such as ftrace.
6064.TP
6065.I /proc/tty
6066Subdirectory containing the pseudo-files and subdirectories for
6067tty drivers and line disciplines.
6068.TP
6069.I /proc/uptime
6070This file contains two numbers (values in seconds): the uptime of the
6071system (including time spent in suspend) and the amount of time spent
6072in the idle process.
6073.TP
6074.I /proc/version
6075This string identifies the kernel version that is currently running.
6076It includes the contents of
6077.IR /proc/sys/kernel/ostype ,
6078.IR /proc/sys/kernel/osrelease ,
6079and
6080.IR /proc/sys/kernel/version .
6081For example:
6082.IP
6083.in +4n
6084.EX
6085Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994
6086.EE
6087.in
6088.\" FIXME 2.6.13 seems to have /proc/vmcore implemented; document this
6089.\" See Documentation/kdump/kdump.txt
6090.\" commit 666bfddbe8b8fd4fd44617d6c55193d5ac7edb29
6091.\" Needs CONFIG_VMCORE
6092.\"
6093.TP
6094.IR /proc/vmstat " (since Linux 2.6.0)"
6095This file displays various virtual memory statistics.
6096Each line of this file contains a single name-value pair,
6097delimited by white space.
6098Some lines are present only if the kernel was configured with
6099suitable options.
6100(In some cases, the options required for particular files have changed
6101across kernel versions, so they are not listed here.
6102Details can be found by consulting the kernel source code.)
6103The following fields may be present:
6104.\" FIXME We need explanations for each of the following fields...
6105.RS
6106.TP
6107.IR nr_free_pages " (since Linux 2.6.31)"
6108.\" commit d23ad42324cc4378132e51f2fc5c9ba6cbe75182
6109.TP
6110.IR nr_alloc_batch " (since Linux 3.12)"
6111.\" commit 81c0a2bb515fd4daae8cab64352877480792b515
6112.TP
6113.IR nr_inactive_anon " (since Linux 2.6.28)"
6114.\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
6115.TP
6116.IR nr_active_anon " (since Linux 2.6.28)"
6117.\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
6118.TP
6119.IR nr_inactive_file " (since Linux 2.6.28)"
6120.\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
6121.TP
6122.IR nr_active_file " (since Linux 2.6.28)"
6123.\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
6124.TP
6125.IR nr_unevictable " (since Linux 2.6.28)"
6126.\" commit 7b854121eb3e5ba0241882ff939e2c485228c9c5
6127.TP
6128.IR nr_mlock " (since Linux 2.6.28)"
6129.\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
6130.TP
6131.IR nr_anon_pages " (since Linux 2.6.18)"
6132.\" commit f3dbd34460ff54962d3e3244b6bcb7f5295356e6
6133.TP
6134.IR nr_mapped " (since Linux 2.6.0)"
6135.TP
6136.IR nr_file_pages " (since Linux 2.6.18)"
6137.\" commit 347ce434d57da80fd5809c0c836f206a50999c26
6138.TP
6139.IR nr_dirty " (since Linux 2.6.0)"
6140.TP
6141.IR nr_writeback " (since Linux 2.6.0)"
6142.TP
6143.IR nr_slab_reclaimable " (since Linux 2.6.19)"
6144.\" commit 972d1a7b140569084439a81265a0f15b74e924e0
6145.\" Linux 2.6.0 had nr_slab
6146.TP
6147.IR nr_slab_unreclaimable " (since Linux 2.6.19)"
6148.\" commit 972d1a7b140569084439a81265a0f15b74e924e0
6149.TP
6150.IR nr_page_table_pages " (since Linux 2.6.0)"
6151.TP
6152.IR nr_kernel_stack " (since Linux 2.6.32)"
6153.\" commit c6a7f5728a1db45d30df55a01adc130b4ab0327c
6154Amount of memory allocated to kernel stacks.
6155.TP
6156.IR nr_unstable " (since Linux 2.6.0)"
6157.TP
6158.IR nr_bounce " (since Linux 2.6.12)"
6159.\" commit edfbe2b0038723e5699ab22695ccd62b5542a5c1
6160.TP
6161.IR nr_vmscan_write " (since Linux 2.6.19)"
6162.\" commit e129b5c23c2b471d47f1c5d2b8b193fc2034af43
6163.TP
6164.IR nr_vmscan_immediate_reclaim " (since Linux 3.2)"
6165.\" commit 49ea7eb65e7c5060807fb9312b1ad4c3eab82e2c
6166.TP
6167.IR nr_writeback_temp " (since Linux 2.6.26)"
6168.\" commit fc3ba692a4d19019387c5acaea63131f9eab05dd
6169.TP
6170.IR nr_isolated_anon " (since Linux 2.6.32)"
6171.\" commit a731286de62294b63d8ceb3c5914ac52cc17e690
6172.TP
6173.IR nr_isolated_file " (since Linux 2.6.32)"
6174.\" commit a731286de62294b63d8ceb3c5914ac52cc17e690
6175.TP
6176.IR nr_shmem " (since Linux 2.6.32)"
6177.\" commit 4b02108ac1b3354a22b0d83c684797692efdc395
6178Pages used by shmem and
6179.BR tmpfs (5).
6180.TP
6181.IR nr_dirtied " (since Linux 2.6.37)"
6182.\" commit ea941f0e2a8c02ae876cd73deb4e1557248f258c
6183.TP
6184.IR nr_written " (since Linux 2.6.37)"
6185.\" commit ea941f0e2a8c02ae876cd73deb4e1557248f258c
6186.TP
6187.IR nr_pages_scanned " (since Linux 3.17)"
6188.\" commit 0d5d823ab4e608ec7b52ac4410de4cb74bbe0edd
6189.TP
6190.IR numa_hit " (since Linux 2.6.18)"
6191.\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
6192.\" Present only if the kernel was configured with
6193.\" .BR CONFIG_NUMA .
6194.TP
6195.IR numa_miss " (since Linux 2.6.18)"
6196.\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
6197.\" Present only if the kernel was configured with
6198.\" .BR CONFIG_NUMA .
6199.TP
6200.IR numa_foreign " (since Linux 2.6.18)"
6201.\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
6202.\" Present only if the kernel was configured with
6203.\" .BR CONFIG_NUMA .
6204.TP
6205.IR numa_interleave " (since Linux 2.6.18)"
6206.\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
6207.\" Present only if the kernel was configured with
6208.\" .BR CONFIG_NUMA .
6209.TP
6210.IR numa_local " (since Linux 2.6.18)"
6211.\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
6212.\" Present only if the kernel was configured with
6213.\" .BR CONFIG_NUMA .
6214.TP
6215.IR numa_other " (since Linux 2.6.18)"
6216.\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
6217.\" Present only if the kernel was configured with
6218.\" .BR CONFIG_NUMA .
6219.TP
6220.IR workingset_refault " (since Linux 3.15)"
6221.\" commit a528910e12ec7ee203095eb1711468a66b9b60b0
6222.\" Present only if the kernel was configured with
6223.\" .BR CONFIG_VM_EVENT_COUNTERS .
6224.TP
6225.IR workingset_activate " (since Linux 3.15)"
6226.\" commit a528910e12ec7ee203095eb1711468a66b9b60b0
6227.\" Present only if the kernel was configured with
6228.\" .BR CONFIG_VM_EVENT_COUNTERS .
6229.TP
6230.IR workingset_nodereclaim " (since Linux 3.15)"
6231.\" commit 449dd6984d0e47643c04c807f609dd56d48d5bcc
6232.\" Present only if the kernel was configured with
6233.\" .BR CONFIG_VM_EVENT_COUNTERS .
6234.TP
6235.IR nr_anon_transparent_hugepages " (since Linux 2.6.38)"
6236.\" Present only if the kernel was configured with
6237.\" .BR CONFIG_VM_EVENT_COUNTERS .
6238.TP
6239.IR nr_free_cma " (since Linux 3.7)"
6240.\" commit d1ce749a0db12202b711d1aba1d29e823034648d
6241Number of free CMA (Contiguous Memory Allocator) pages.
6242.\" Present only if the kernel was configured with
6243.\" .BR CONFIG_VM_EVENT_COUNTERS .
6244.TP
6245.IR nr_dirty_threshold " (since Linux 2.6.37)"
6246.\" commit 79da826aee6a10902ef411bc65864bd02102fa83
6247.\" Present only if the kernel was configured with
6248.\" .BR CONFIG_VM_EVENT_COUNTERS .
6249.TP
6250.IR nr_dirty_background_threshold " (since Linux 2.6.37)"
6251.\" commit 79da826aee6a10902ef411bc65864bd02102fa83
6252.\" Present only if the kernel was configured with
6253.\" .BR CONFIG_VM_EVENT_COUNTERS .
6254.TP
6255.IR pgpgin " (since Linux 2.6.0)"
6256.\" Present only if the kernel was configured with
6257.\" .BR CONFIG_VM_EVENT_COUNTERS .
6258.TP
6259.IR pgpgout " (since Linux 2.6.0)"
6260.\" Present only if the kernel was configured with
6261.\" .BR CONFIG_VM_EVENT_COUNTERS .
6262.TP
6263.IR pswpin " (since Linux 2.6.0)"
6264.\" Present only if the kernel was configured with
6265.\" .BR CONFIG_VM_EVENT_COUNTERS .
6266.TP
6267.IR pswpout " (since Linux 2.6.0)"
6268.\" Present only if the kernel was configured with
6269.\" .BR CONFIG_VM_EVENT_COUNTERS .
6270.TP
6271.IR pgalloc_dma " (since Linux 2.6.5)"
6272.\" Linux 2.6.0 had pgalloc
6273.\" Present only if the kernel was configured with
6274.\" .BR CONFIG_VM_EVENT_COUNTERS .
6275.TP
6276.IR pgalloc_dma32 " (since Linux 2.6.16)"
6277.\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
6278.\" Present only if the kernel was configured with
6279.\" .BR CONFIG_VM_EVENT_COUNTERS .
6280.TP
6281.IR pgalloc_normal " (since Linux 2.6.5)"
6282.\" Present only if the kernel was configured with
6283.\" .BR CONFIG_VM_EVENT_COUNTERS .
6284.TP
6285.IR pgalloc_high " (since Linux 2.6.5)"
6286.\" Present only if the kernel was configured with
6287.\" .BR CONFIG_VM_EVENT_COUNTERS
6288.\" and
6289.\" .BR CONFIG_HIGHMEM .
6290.TP
6291.IR pgalloc_movable " (since Linux 2.6.23)"
6292.\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
6293.\" Present only if the kernel was configured with
6294.\" .BR CONFIG_VM_EVENT_COUNTERS .
6295.TP
6296.IR pgfree " (since Linux 2.6.0)"
6297.\" Present only if the kernel was configured with
6298.\" .BR CONFIG_VM_EVENT_COUNTERS .
6299.TP
6300.IR pgactivate " (since Linux 2.6.0)"
6301.\" Present only if the kernel was configured with
6302.\" .BR CONFIG_VM_EVENT_COUNTERS .
6303.TP
6304.IR pgdeactivate " (since Linux 2.6.0)"
6305.\" Present only if the kernel was configured with
6306.\" .BR CONFIG_VM_EVENT_COUNTERS .
6307.TP
6308.IR pgfault " (since Linux 2.6.0)"
6309.\" Present only if the kernel was configured with
6310.\" .BR CONFIG_VM_EVENT_COUNTERS .
6311.TP
6312.IR pgmajfault " (since Linux 2.6.0)"
6313.\" Present only if the kernel was configured with
6314.\" .BR CONFIG_VM_EVENT_COUNTERS .
6315.TP
6316.IR pgrefill_dma " (since Linux 2.6.5)"
6317.\" Linux 2.6.0 had pgrefill
6318.\" Present only if the kernel was configured with
6319.\" .BR CONFIG_VM_EVENT_COUNTERS .
6320.TP
6321.IR pgrefill_dma32 " (since Linux 2.6.16)"
6322.\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
6323.\" Present only if the kernel was configured with
6324.\" .BR CONFIG_VM_EVENT_COUNTERS .
6325.TP
6326.IR pgrefill_normal " (since Linux 2.6.5)"
6327.\" Present only if the kernel was configured with
6328.\" .BR CONFIG_VM_EVENT_COUNTERS .
6329.TP
6330.IR pgrefill_high " (since Linux 2.6.5)"
6331.\" Present only if the kernel was configured with
6332.\" .BR CONFIG_VM_EVENT_COUNTERS
6333.\" and
6334.\" .BR CONFIG_HIGHMEM .
6335.TP
6336.IR pgrefill_movable " (since Linux 2.6.23)"
6337.\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
6338.\" Present only if the kernel was configured with
6339.\" .BR CONFIG_VM_EVENT_COUNTERS .
6340.\" Formerly there were
6341.\" pgsteal_high
6342.\" pgsteal_normal
6343.\" pgsteal_dma32
6344.\" pgsteal_dma
6345.\" These were split out into pgsteal_kswapd* and pgsteal_direct*
6346.\" in commit 904249aa68010c8e223263c922fcbb840a3f42e4
6347.TP
6348.IR pgsteal_kswapd_dma " (since Linux 3.4)"
6349.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6350.\" Linux 2.6.0 had pgsteal
6351.\" Present only if the kernel was configured with
6352.\" .\" .BR CONFIG_VM_EVENT_COUNTERS .
6353.TP
6354.IR pgsteal_kswapd_dma32 " (since Linux 3.4)"
6355.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6356.\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
6357.\" Present only if the kernel was configured with
6358.\" .BR CONFIG_VM_EVENT_COUNTERS .
6359.TP
6360.IR pgsteal_kswapd_normal " (since Linux 3.4)"
6361.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6362.\" Present only if the kernel was configured with
6363.\" .BR CONFIG_VM_EVENT_COUNTERS .
6364.TP
6365.IR pgsteal_kswapd_high " (since Linux 3.4)"
6366.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6367.\" Present only if the kernel was configured with
6368.\" .BR CONFIG_VM_EVENT_COUNTERS
6369.\" and
6370.\" .BR CONFIG_HIGHMEM .
6371.TP
6372.IR pgsteal_kswapd_movable " (since Linux 3.4)"
6373.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6374.\" Present only if the kernel was configured with
6375.\" .BR CONFIG_VM_EVENT_COUNTERS .
6376.TP
6377.IR pgsteal_direct_dma
6378.\" Present only if the kernel was configured with
6379.\" .BR CONFIG_VM_EVENT_COUNTERS .
6380.TP
6381.IR pgsteal_direct_dma32 " (since Linux 3.4)"
6382.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6383.\" Present only if the kernel was configured with
6384.\" .BR CONFIG_VM_EVENT_COUNTERS .
6385.TP
6386.IR pgsteal_direct_normal " (since Linux 3.4)"
6387.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6388.\" Present only if the kernel was configured with
6389.\" .BR CONFIG_VM_EVENT_COUNTERS .
6390.TP
6391.IR pgsteal_direct_high " (since Linux 3.4)"
6392.\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
6393.\" Present only if the kernel was configured with
6394.\" .BR CONFIG_VM_EVENT_COUNTERS
6395.\" and
6396.\" .BR CONFIG_HIGHMEM .
6397.TP
6398.IR pgsteal_direct_movable " (since Linux 2.6.23)"
6399.\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
6400.\" Present only if the kernel was configured with
6401.\" .BR CONFIG_VM_EVENT_COUNTERS .
6402.TP
6403.IR pgscan_kswapd_dma
6404.\" Linux 2.6.0 had pgscan
6405.\" Present only if the kernel was configured with
6406.\" .BR CONFIG_VM_EVENT_COUNTERS .
6407.TP
6408.IR pgscan_kswapd_dma32 " (since Linux 2.6.16)"
6409.\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
6410.\" Present only if the kernel was configured with
6411.\" .BR CONFIG_VM_EVENT_COUNTERS .
6412.TP
6413.IR pgscan_kswapd_normal " (since Linux 2.6.5)"
6414.\" Present only if the kernel was configured with
6415.\" .BR CONFIG_VM_EVENT_COUNTERS .
6416.TP
6417.IR pgscan_kswapd_high
6418.\" Present only if the kernel was configured with
6419.\" .BR CONFIG_VM_EVENT_COUNTERS
6420.\" and
6421.\" .BR CONFIG_HIGHMEM .
6422.TP
6423.IR pgscan_kswapd_movable " (since Linux 2.6.23)"
6424.\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
6425.\" Present only if the kernel was configured with
6426.\" .BR CONFIG_VM_EVENT_COUNTERS .
6427.TP
6428.IR pgscan_direct_dma
6429.\" Present only if the kernel was configured with
6430.\" .BR CONFIG_VM_EVENT_COUNTERS .
6431.TP
6432.IR pgscan_direct_dma32 " (since Linux 2.6.16)"
6433.\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
6434.\" Present only if the kernel was configured with
6435.\" .BR CONFIG_VM_EVENT_COUNTERS .
6436.TP
6437.IR pgscan_direct_normal
6438.\" Present only if the kernel was configured with
6439.\" .BR CONFIG_VM_EVENT_COUNTERS .
6440.TP
6441.IR pgscan_direct_high
6442.\" Present only if the kernel was configured with
6443.\" .BR CONFIG_VM_EVENT_COUNTERS
6444.\" and
6445.\" .BR CONFIG_HIGHMEM .
6446.TP
6447.IR pgscan_direct_movable " (since Linux 2.6.23)"
6448.\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
6449.\" Present only if the kernel was configured with
6450.\" .BR CONFIG_VM_EVENT_COUNTERS .
6451.TP
6452.IR pgscan_direct_throttle " (since Linux 3.6)"
6453.\" commit 68243e76ee343d63c6cf76978588a885951e2818
6454.\" Present only if the kernel was configured with
6455.\" .BR CONFIG_VM_EVENT_COUNTERS .
6456.TP
6457.IR zone_reclaim_failed " (since linux 2.6.31)"
6458.\" commit 24cf72518c79cdcda486ed26074ff8151291cf65
6459.\" Present only if the kernel was configured with
6460.\" .BR CONFIG_VM_EVENT_COUNTERS
6461.\" and
6462.\" .BR CONFIG_NUMA .
6463.TP
6464.IR pginodesteal " (since linux 2.6.0)"
6465.\" Present only if the kernel was configured with
6466.\" .BR CONFIG_VM_EVENT_COUNTERS .
6467.TP
6468.IR slabs_scanned " (since linux 2.6.5)"
6469.\" Present only if the kernel was configured with
6470.\" .BR CONFIG_VM_EVENT_COUNTERS .
6471.TP
6472.IR kswapd_inodesteal " (since linux 2.6.0)"
6473.\" Present only if the kernel was configured with
6474.\" .BR CONFIG_VM_EVENT_COUNTERS .
6475.TP
6476.IR kswapd_low_wmark_hit_quickly " (since 2.6.33)"
6477.\" commit bb3ab596832b920c703d1aea1ce76d69c0f71fb7
6478.\" Present only if the kernel was configured with
6479.\" .BR CONFIG_VM_EVENT_COUNTERS .
6480.TP
6481.IR kswapd_high_wmark_hit_quickly " (since 2.6.33)"
6482.\" commit bb3ab596832b920c703d1aea1ce76d69c0f71fb7
6483.\" Present only if the kernel was configured with
6484.\" .BR CONFIG_VM_EVENT_COUNTERS .
6485.TP
6486.IR pageoutrun " (since Linux 2.6.0)"
6487.\" Present only if the kernel was configured with
6488.\" .BR CONFIG_VM_EVENT_COUNTERS .
6489.TP
6490.IR allocstall " (since Linux 2.6.0)"
6491.\" Present only if the kernel was configured with
6492.\" .BR CONFIG_VM_EVENT_COUNTERS .
6493.TP
6494.IR pgrotated " (since Linux 2.6.0)"
6495.\" Present only if the kernel was configured with
6496.\" .BR CONFIG_VM_EVENT_COUNTERS .
6497.TP
6498.IR drop_pagecache " (since Linux 3.15)"
6499.\" commit 5509a5d27b971a90b940e148ca9ca53312e4fa7a
6500.\" Present only if the kernel was configured with
6501.\" .BR CONFIG_VM_EVENT_COUNTERS .
6502.TP
6503.IR drop_slab " (since Linux 3.15)"
6504.\" commit 5509a5d27b971a90b940e148ca9ca53312e4fa7a
6505.\" Present only if the kernel was configured with
6506.\" .BR CONFIG_VM_EVENT_COUNTERS .
6507.TP
6508.IR numa_pte_updates " (since Linux 3.8)"
6509.\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
6510.\" Present only if the kernel was configured with
6511.\" .BR CONFIG_VM_EVENT_COUNTERS
6512.\" and
6513.\" .BR CONFIG_NUMA_BALANCING .
6514.TP
6515.IR numa_huge_pte_updates " (since Linux 3.13)"
6516.\" commit 72403b4a0fbdf433c1fe0127e49864658f6f6468
6517.\" Present only if the kernel was configured with
6518.\" .BR CONFIG_VM_EVENT_COUNTERS
6519.\" and
6520.\" .BR CONFIG_NUMA_BALANCING .
6521.TP
6522.IR numa_hint_faults " (since Linux 3.8)"
6523.\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
6524.\" Present only if the kernel was configured with
6525.\" .BR CONFIG_VM_EVENT_COUNTERS
6526.\" and
6527.\" .BR CONFIG_NUMA_BALANCING .
6528.TP
6529.IR numa_hint_faults_local " (since Linux 3.8)"
6530.\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
6531.\" Present only if the kernel was configured with
6532.\" .BR CONFIG_VM_EVENT_COUNTERS
6533.\" and
6534.\" .BR CONFIG_NUMA_BALANCING .
6535.TP
6536.IR numa_pages_migrated " (since Linux 3.8)"
6537.\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
6538.\" Present only if the kernel was configured with
6539.\" .BR CONFIG_VM_EVENT_COUNTERS
6540.\" and
6541.\" .BR CONFIG_NUMA_BALANCING
6542.\" and
6543.\" .BR CONFIG_NUMA_BALANCING .
6544.TP
6545.IR pgmigrate_success " (since Linux 3.8)"
6546.\" commit 5647bc293ab15f66a7b1cda850c5e9d162a6c7c2
6547.\" Present only if the kernel was configured with
6548.\" .BR CONFIG_VM_EVENT_COUNTERS
6549.\" and
6550.\" .BR CONFIG_MIGRATION .
6551.TP
6552.IR pgmigrate_fail " (since Linux 3.8)"
6553.\" commit 5647bc293ab15f66a7b1cda850c5e9d162a6c7c2
6554.\" Present only if the kernel was configured with
6555.\" .BR CONFIG_VM_EVENT_COUNTERS
6556.\" and
6557.\" .BR CONFIG_MIGRATION .
6558.TP
6559.IR compact_migrate_scanned " (since Linux 3.8)"
6560.\" commit 397487db696cae0b026a474a5cd66f4e372995e6
6561.\" Linux 3.8 dropped compact_blocks_moved, compact_pages_moved, and
6562.\" compact_pagemigrate_failed
6563.\" Present only if the kernel was configured with
6564.\" .BR CONFIG_VM_EVENT_COUNTERS
6565.\" and
6566.\" .BR CONFIG_COMPACTION .
6567.TP
6568.IR compact_free_scanned " (since Linux 3.8)"
6569.\" commit 397487db696cae0b026a474a5cd66f4e372995e6
6570.\" Present only if the kernel was configured with
6571.\" .BR CONFIG_VM_EVENT_COUNTERS
6572.\" and
6573.\" .BR CONFIG_COMPACTION .
6574.TP
6575.IR compact_isolated " (since Linux 3.8)"
6576.\" commit 397487db696cae0b026a474a5cd66f4e372995e6
6577.\" Present only if the kernel was configured with
6578.\" .BR CONFIG_VM_EVENT_COUNTERS
6579.\" and
6580.\" .BR CONFIG_COMPACTION .
6581.TP
6582.IR compact_stall " (since Linux 2.6.35)"
6583.\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
6584See the kernel source file
6585.IR Documentation/admin\-guide/mm/transhuge.rst .
6586.\" Present only if the kernel was configured with
6587.\" .BR CONFIG_VM_EVENT_COUNTERS
6588.\" and
6589.\" .BR CONFIG_COMPACTION .
6590.TP
6591.IR compact_fail " (since Linux 2.6.35)"
6592.\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
6593See the kernel source file
6594.IR Documentation/admin\-guide/mm/transhuge.rst .
6595.\" Present only if the kernel was configured with
6596.\" .BR CONFIG_VM_EVENT_COUNTERS
6597.\" and
6598.\" .BR CONFIG_COMPACTION .
6599.TP
6600.IR compact_success " (since Linux 2.6.35)"
6601.\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
6602See the kernel source file
6603.IR Documentation/admin\-guide/mm/transhuge.rst .
6604.\" Present only if the kernel was configured with
6605.\" .BR CONFIG_VM_EVENT_COUNTERS
6606.\" and
6607.\" .BR CONFIG_COMPACTION .
6608.TP
6609.IR htlb_buddy_alloc_success " (since Linux 2.6.26)"
6610.\" commit 3b1163006332302117b1b2acf226d4014ff46525
6611.\" Present only if the kernel was configured with
6612.\" .BR CONFIG_VM_EVENT_COUNTERS
6613.\" and
6614.\" .BR CONFIG_HUGETLB_PAGE .
6615.TP
6616.IR htlb_buddy_alloc_fail " (since Linux 2.6.26)"
6617.\" commit 3b1163006332302117b1b2acf226d4014ff46525
6618.\" Present only if the kernel was configured with
6619.\" .BR CONFIG_VM_EVENT_COUNTERS
6620.\" and
6621.\" .BR CONFIG_HUGETLB_PAGE .
6622.TP
6623.IR unevictable_pgs_culled " (since Linux 2.6.28)"
6624.\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa
6625.\" Present only if the kernel was configured with
6626.\" .BR CONFIG_VM_EVENT_COUNTERS .
6627.TP
6628.IR unevictable_pgs_scanned " (since Linux 2.6.28)"
6629.\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa
6630.\" Present only if the kernel was configured with
6631.\" .BR CONFIG_VM_EVENT_COUNTERS .
6632.TP
6633.IR unevictable_pgs_rescued " (since Linux 2.6.28)"
6634.\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa
6635.\" Present only if the kernel was configured with
6636.\" .BR CONFIG_VM_EVENT_COUNTERS .
6637.TP
6638.IR unevictable_pgs_mlocked " (since Linux 2.6.28)"
6639.\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
6640.\" Present only if the kernel was configured with
6641.\" .BR CONFIG_VM_EVENT_COUNTERS .
6642.TP
6643.IR unevictable_pgs_munlocked " (since Linux 2.6.28)"
6644.\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
6645.\" Present only if the kernel was configured with
6646.\" .BR CONFIG_VM_EVENT_COUNTERS .
6647.TP
6648.IR unevictable_pgs_cleared " (since Linux 2.6.28)"
6649.\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
6650.\" Present only if the kernel was configured with
6651.\" .BR CONFIG_VM_EVENT_COUNTERS .
6652.TP
6653.IR unevictable_pgs_stranded " (since Linux 2.6.28)"
6654.\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
6655.\" Present only if the kernel was configured with
6656.\" .BR CONFIG_VM_EVENT_COUNTERS .
6657.\" Linux 3.7 removed unevictable_pgs_mlockfreed
6658.TP
6659.IR thp_fault_alloc " (since Linux 2.6.39)"
6660.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
6661See the kernel source file
6662.IR Documentation/admin\-guide/mm/transhuge.rst .
6663.\" Present only if the kernel was configured with
6664.\" .BR CONFIG_VM_EVENT_COUNTERS
6665.\" and
6666.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6667.TP
6668.IR thp_fault_fallback " (since Linux 2.6.39)"
6669.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
6670See the kernel source file
6671.IR Documentation/admin\-guide/mm/transhuge.rst .
6672.\" Present only if the kernel was configured with
6673.\" .BR CONFIG_VM_EVENT_COUNTERS
6674.\" and
6675.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6676.TP
6677.IR thp_collapse_alloc " (since Linux 2.6.39)"
6678.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
6679See the kernel source file
6680.IR Documentation/admin\-guide/mm/transhuge.rst .
6681.\" Present only if the kernel was configured with
6682.\" .BR CONFIG_VM_EVENT_COUNTERS
6683.\" and
6684.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6685.TP
6686.IR thp_collapse_alloc_failed " (since Linux 2.6.39)"
6687.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
6688See the kernel source file
6689.IR Documentation/admin\-guide/mm/transhuge.rst .
6690.\" Present only if the kernel was configured with
6691.\" .BR CONFIG_VM_EVENT_COUNTERS
6692.\" and
6693.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6694.TP
6695.IR thp_split " (since Linux 2.6.39)"
6696.\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
6697See the kernel source file
6698.IR Documentation/admin\-guide/mm/transhuge.rst .
6699.\" Present only if the kernel was configured with
6700.\" .BR CONFIG_VM_EVENT_COUNTERS
6701.\" and
6702.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6703.TP
6704.IR thp_zero_page_alloc " (since Linux 3.8)"
6705.\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76
6706See the kernel source file
6707.IR Documentation/admin\-guide/mm/transhuge.rst .
6708.\" Present only if the kernel was configured with
6709.\" .BR CONFIG_VM_EVENT_COUNTERS
6710.\" and
6711.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6712.TP
6713.IR thp_zero_page_alloc_failed " (since Linux 3.8)"
6714.\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76
6715See the kernel source file
6716.IR Documentation/admin\-guide/mm/transhuge.rst .
6717.\" Present only if the kernel was configured with
6718.\" .BR CONFIG_VM_EVENT_COUNTERS
6719.\" and
6720.\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
6721.TP
6722.IR balloon_inflate " (since Linux 3.18)"
6723.\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938
6724.\" Present only if the kernel was configured with
6725.\" .BR CONFIG_VM_EVENT_COUNTERS
6726.\" and
6727.\" .BR CONFIG_MEMORY_BALLOON .
6728.TP
6729.IR balloon_deflate " (since Linux 3.18)"
6730.\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938
6731.\" Present only if the kernel was configured with
6732.\" .BR CONFIG_VM_EVENT_COUNTERS
6733.\" and
6734.\" .BR CONFIG_MEMORY_BALLOON .
6735.TP
6736.IR balloon_migrate " (since Linux 3.18)"
6737.\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938
6738.\" Present only if the kernel was configured with
6739.\" .BR CONFIG_VM_EVENT_COUNTERS ,
6740.\" .BR CONFIG_MEMORY_BALLOON ,
6741.\" and
6742.\" .BR CONFIG_BALLOON_COMPACTION .
6743.TP
6744.IR nr_tlb_remote_flush " (since Linux 3.12)"
6745.\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
6746.\" Present only if the kernel was configured with
6747.\" .BR CONFIG_DEBUG_TLBFLUSH
6748.\" and
6749.\" .BR CONFIG_SMP .
6750.TP
6751.IR nr_tlb_remote_flush_received " (since Linux 3.12)"
6752.\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
6753.\" Present only if the kernel was configured with
6754.\" .BR CONFIG_DEBUG_TLBFLUSH
6755.\" and
6756.\" .BR CONFIG_SMP .
6757.TP
6758.IR nr_tlb_local_flush_all " (since Linux 3.12)"
6759.\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
6760.\" Present only if the kernel was configured with
6761.\" .BR CONFIG_DEBUG_TLBFLUSH .
6762.TP
6763.IR nr_tlb_local_flush_one " (since Linux 3.12)"
6764.\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
6765.\" Present only if the kernel was configured with
6766.\" .BR CONFIG_DEBUG_TLBFLUSH .
6767.TP
6768.IR vmacache_find_calls " (since Linux 3.16)"
6769.\" commit 4f115147ff802267d0aa41e361c5aa5bd933d896
6770.\" Present only if the kernel was configured with
6771.\" .BR CONFIG_DEBUG_VM_VMACACHE .
6772.TP
6773.IR vmacache_find_hits " (since Linux 3.16)"
6774.\" commit 4f115147ff802267d0aa41e361c5aa5bd933d896
6775.\" Present only if the kernel was configured with
6776.\" .BR CONFIG_DEBUG_VM_VMACACHE .
6777.TP
6778.IR vmacache_full_flushes " (since Linux 3.19)"
6779.\" commit f5f302e21257ebb0c074bbafc37606c26d28cc3d
6780.\" Present only if the kernel was configured with
6781.\" .BR CONFIG_DEBUG_VM_VMACACHE .
6782.RE
6783.TP
6784.IR /proc/zoneinfo " (since Linux 2.6.13)"
6785This file displays information about memory zones.
6786This is useful for analyzing virtual memory behavior.
6787.\" FIXME more should be said about /proc/zoneinfo
6788.SH NOTES
6789Many files contain strings (e.g., the environment and command line)
6790that are in the internal format,
6791with subfields terminated by null bytes (\(aq\e0\(aq).
6792When inspecting such files, you may find that the results are more readable
6793if you use a command of the following form to display them:
6794.PP
6795.in +4n
6796.EX
6797.RB "$" " cat \fIfile\fP | tr \(aq\e000\(aq \(aq\en\(aq"
6798.EE
6799.in
6800.PP
6801This manual page is incomplete, possibly inaccurate, and is the kind
6802of thing that needs to be updated very often.
6803.\" .SH ACKNOWLEDGEMENTS
6804.\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on
6805.\" kernel source documentation files written by Rik van Riel.
6806.SH SEE ALSO
6807.BR cat (1),
6808.BR dmesg (1),
6809.BR find (1),
6810.BR free (1),
6811.BR htop (1),
6812.BR init (1),
6813.BR ps (1),
6814.BR pstree (1),
6815.BR tr (1),
6816.BR uptime (1),
6817.BR chroot (2),
6818.BR mmap (2),
6819.BR readlink (2),
6820.BR syslog (2),
6821.BR slabinfo (5),
6822.BR sysfs (5),
6823.BR hier (7),
6824.BR namespaces (7),
6825.BR time (7),
6826.BR arp (8),
6827.BR hdparm (8),
6828.BR ifconfig (8),
6829.BR lsmod (8),
6830.BR lspci (8),
6831.BR mount (8),
6832.BR netstat (8),
6833.BR procinfo (8),
6834.BR route (8),
6835.BR sysctl (8)
6836.PP
6837The Linux kernel source files:
6838.IR Documentation/filesystems/proc.rst ,
6839.IR Documentation/admin\-guide/sysctl/fs.rst ,
6840.IR Documentation/admin\-guide/sysctl/kernel.rst ,
6841.IR Documentation/admin\-guide/sysctl/net.rst ,
6842and
6843.IR Documentation/admin\-guide/sysctl/vm.rst .