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