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