]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man5/proc.5
proc.5: Fix order of SEE ALSO entries
[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; see
2084 .BR umask (2).
2085 (Since Linux 4.7.)
2086 .IP *
2087 .IR State :
2088 Current state of the process.
2089 One of
2090 "R (running)",
2091 "S (sleeping)",
2092 "D (disk sleep)",
2093 "T (stopped)",
2094 "T (tracing stop)",
2095 "Z (zombie)",
2096 or
2097 "X (dead)".
2098 .IP *
2099 .IR Tgid :
2100 Thread group ID (i.e., Process ID).
2101 .IP *
2102 .IR Ngid :
2103 NUMA group ID (0 if none; since Linux 3.13).
2104 .IP *
2105 .IR Pid :
2106 Thread ID (see
2107 .BR gettid (2)).
2108 .IP *
2109 .IR PPid :
2110 PID of parent process.
2111 .IP *
2112 .IR TracerPid :
2113 PID of process tracing this process (0 if not being traced).
2114 .IP *
2115 .IR Uid ", " Gid :
2116 Real, effective, saved set, and filesystem UIDs (GIDs).
2117 .IP *
2118 .IR FDSize :
2119 Number of file descriptor slots currently allocated.
2120 .IP *
2121 .IR Groups :
2122 Supplementary group list.
2123 .IP *
2124 .I NStgid
2125 Thread group ID (i.e., PID) in each of the PID namespaces of which
2126 .I [pid]
2127 is a member.
2128 The leftmost entry shows the value with respect to the PID namespace
2129 of the reading process,
2130 followed by the value in successively nested inner namespaces.
2131 .\" commit e4bc33245124db69b74a6d853ac76c2976f472d5
2132 (Since Linux 4.1.)
2133 .IP *
2134 .I NSpid
2135 Thread ID in each of the PID namespaces of which
2136 .I [pid]
2137 is a member.
2138 The fields are ordered as for
2139 .IR NStgid .
2140 (Since Linux 4.1.)
2141 .IP *
2142 .I NSpgid
2143 Process group ID in each of the PID namespaces of which
2144 .I [pid]
2145 is a member.
2146 The fields are ordered as for
2147 .IR NStgid .
2148 (Since Linux 4.1.)
2149 .IP *
2150 .I NSsid
2151 descendant namespace session ID hierarchy
2152 Session ID in each of the PID namespaces of which
2153 .I [pid]
2154 is a member.
2155 The fields are ordered as for
2156 .IR NStgid .
2157 (Since Linux 4.1.)
2158 .IP *
2159 .IR VmPeak :
2160 Peak virtual memory size.
2161 .IP *
2162 .IR VmSize :
2163 Virtual memory size.
2164 .IP *
2165 .IR VmLck :
2166 Locked memory size (see
2167 .BR mlock (3)).
2168 .IP *
2169 .IR VmPin :
2170 Pinned memory size
2171 .\" commit bc3e53f682d93df677dbd5006a404722b3adfe18
2172 (since Linux 3.2).
2173 These are pages that can't be moved because something needs to
2174 directly access physical memory.
2175 .IP *
2176 .IR VmHWM :
2177 Peak resident set size ("high water mark").
2178 .IP *
2179 .IR VmRSS :
2180 Resident set size.
2181 .IP *
2182 .IR VmData ", " VmStk ", " VmExe :
2183 Size of data, stack, and text segments.
2184 .IP *
2185 .IR VmLib :
2186 Shared library code size.
2187 .IP *
2188 .IR VmPTE :
2189 Page table entries size (since Linux 2.6.10).
2190 .IP *
2191 .IR VmPMD :
2192 .\" commit dc6c9a35b66b520cf67e05d8ca60ebecad3b0479
2193 Size of second-level page tables (since Linux 4.0).
2194 .IP *
2195 .IR VmSwap :
2196 .\" commit b084d4353ff99d824d3bc5a5c2c22c70b1fba722
2197 Swapped-out virtual memory size by anonymous private pages;
2198 shmem swap usage is not included (since Linux 2.6.34).
2199 .IP *
2200 .IR Threads :
2201 Number of threads in process containing this thread.
2202 .IP *
2203 .IR SigQ :
2204 This field contains two slash-separated numbers that relate to
2205 queued signals for the real user ID of this process.
2206 The first of these is the number of currently queued
2207 signals for this real user ID, and the second is the
2208 resource limit on the number of queued signals for this process
2209 (see the description of
2210 .BR RLIMIT_SIGPENDING
2211 in
2212 .BR getrlimit (2)).
2213 .IP *
2214 .IR SigPnd ", " ShdPnd :
2215 Number of signals pending for thread and for process as a whole (see
2216 .BR pthreads (7)
2217 and
2218 .BR signal (7)).
2219 .IP *
2220 .IR SigBlk ", " SigIgn ", " SigCgt :
2221 Masks indicating signals being blocked, ignored, and caught (see
2222 .BR signal (7)).
2223 .IP *
2224 .IR CapInh ", " CapPrm ", " CapEff :
2225 Masks of capabilities enabled in inheritable, permitted, and effective sets
2226 (see
2227 .BR capabilities (7)).
2228 .IP *
2229 .IR CapBnd :
2230 Capability Bounding set
2231 (since Linux 2.6.26, see
2232 .BR capabilities (7)).
2233 .IP *
2234 .IR CapAmb :
2235 Ambient capability set
2236 (since Linux 4.3, see
2237 .BR capabilities (7)).
2238 .IP *
2239 .IR Seccomp :
2240 .\" commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816
2241 Seccomp mode of the process
2242 (since Linux 3.8, see
2243 .BR seccomp (2)).
2244 0 means
2245 .BR SECCOMP_MODE_DISABLED ;
2246 1 means
2247 .BR SECCOMP_MODE_STRICT ;
2248 2 means
2249 .BR SECCOMP_MODE_FILTER .
2250 This field is provided only if the kernel was built with the
2251 .BR CONFIG_SECCOMP
2252 kernel configuration option enabled.
2253 .IP *
2254 .IR Cpus_allowed :
2255 Mask of CPUs on which this process may run
2256 (since Linux 2.6.24, see
2257 .BR cpuset (7)).
2258 .IP *
2259 .IR Cpus_allowed_list :
2260 Same as previous, but in "list format"
2261 (since Linux 2.6.26, see
2262 .BR cpuset (7)).
2263 .IP *
2264 .IR Mems_allowed :
2265 Mask of memory nodes allowed to this process
2266 (since Linux 2.6.24, see
2267 .BR cpuset (7)).
2268 .IP *
2269 .IR Mems_allowed_list :
2270 Same as previous, but in "list format"
2271 (since Linux 2.6.26, see
2272 .BR cpuset (7)).
2273 .IP *
2274 .IR voluntary_ctxt_switches ", " nonvoluntary_ctxt_switches :
2275 Number of voluntary and involuntary context switches (since Linux 2.6.23).
2276 .RE
2277 .TP
2278 .IR /proc/[pid]/syscall " (since Linux 2.6.27)"
2279 .\" commit ebcb67341fee34061430f3367f2e507e52ee051b
2280 This file exposes the system call number and argument registers for the
2281 system call currently being executed by the process,
2282 followed by the values of the stack pointer and program counter registers.
2283 The values of all six argument registers are exposed,
2284 although most system calls use fewer registers.
2285
2286 If the process is blocked, but not in a system call,
2287 then the file displays \-1 in place of the system call number,
2288 followed by just the values of the stack pointer and program counter.
2289 If process is not blocked, then the file contains just the string "running".
2290
2291 This file is present only if the kernel was configured with
2292 .BR CONFIG_HAVE_ARCH_TRACEHOOK .
2293
2294 Permission to access this file is governed by a ptrace access mode
2295 .B PTRACE_MODE_ATTACH_FSCREDS
2296 check; see
2297 .BR ptrace (2).
2298 .TP
2299 .IR /proc/[pid]/task " (since Linux 2.6.0-test6)"
2300 This is a directory that contains one subdirectory
2301 for each thread in the process.
2302 The name of each subdirectory is the numerical thread ID
2303 .RI ( [tid] )
2304 of the thread (see
2305 .BR gettid (2)).
2306 Within each of these subdirectories, there is a set of
2307 files with the same names and contents as under the
2308 .I /proc/[pid]
2309 directories.
2310 For attributes that are shared by all threads, the contents for
2311 each of the files under the
2312 .I task/[tid]
2313 subdirectories will be the same as in the corresponding
2314 file in the parent
2315 .I /proc/[pid]
2316 directory
2317 (e.g., in a multithreaded process, all of the
2318 .I task/[tid]/cwd
2319 files will have the same value as the
2320 .I /proc/[pid]/cwd
2321 file in the parent directory, since all of the threads in a process
2322 share a working directory).
2323 For attributes that are distinct for each thread,
2324 the corresponding files under
2325 .I task/[tid]
2326 may have different values (e.g., various fields in each of the
2327 .I task/[tid]/status
2328 files may be different for each thread),
2329 .\" in particular: "children" :/
2330 or they might not exist in
2331 .I /proc/[pid]
2332 at all.
2333 .\" The following was still true as at kernel 2.6.13
2334 In a multithreaded process, the contents of the
2335 .I /proc/[pid]/task
2336 directory are not available if the main thread has already terminated
2337 (typically by calling
2338 .BR pthread_exit (3)).
2339
2340 .TP
2341 .IR /proc/[pid]/task/[tid]/children " (since Linux 3.5)"
2342 .\" commit 818411616baf46ceba0cff6f05af3a9b294734f7
2343 A space-separated list of child tasks of this task.
2344 Each child task is represented by its TID.
2345
2346 .\" see comments in get_children_pid() in fs/proc/array.c
2347 This option is intended for use by the checkpoint-restore (CRIU) system,
2348 and reliably provides a list of children only if all of the child processes
2349 are stopped or frozen.
2350 It does not work properly if children of the target task exit while
2351 the file is being read!
2352 Exiting children may cause non-exiting children to be omitted from the list.
2353 This makes this interface even more unreliable than classic PID-based
2354 approaches if the inspected task and its children aren't frozen,
2355 and most code should probably not use this interface.
2356
2357 Until Linux 4.2, the presence of this file was governed by the
2358 .B CONFIG_CHECKPOINT_RESTORE
2359 kernel configuration option.
2360 Since Linux 4.2,
2361 .\" commit 2e13ba54a2682eea24918b87ad3edf70c2cf085b
2362 it it is governed by the
2363 .B CONFIG_PROC_CHILDREN
2364 option.
2365 .TP
2366 .IR /proc/[pid]/timers " (since Linux 3.10)"
2367 .\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5
2368 .\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0
2369 A list of the POSIX timers for this process.
2370 Each timer is listed with a line that starts with the string "ID:".
2371 For example:
2372
2373 .in +4n
2374 .nf
2375 ID: 1
2376 signal: 60/00007fff86e452a8
2377 notify: signal/pid.2634
2378 ClockID: 0
2379 ID: 0
2380 signal: 60/00007fff86e452a8
2381 notify: signal/pid.2634
2382 ClockID: 1
2383 .fi
2384 .in
2385
2386 The lines shown for each timer have the following meanings:
2387 .RS
2388 .TP
2389 .I ID
2390 The ID for this timer.
2391 This is not the same as the timer ID returned by
2392 .BR timer_create (2);
2393 rather, it is the same kernel-internal ID that is available via the
2394 .I si_timerid
2395 field of the
2396 .IR siginfo_t
2397 structure (see
2398 .BR sigaction (2)).
2399 .TP
2400 .I signal
2401 This is the signal number that this timer uses to deliver notifications
2402 followed by a slash, and then the
2403 .I sigev_value
2404 value supplied to the signal handler.
2405 Valid only for timers that notify via a signal.
2406 .TP
2407 .I notify
2408 The part before the slash specifies the mechanism
2409 that this timer uses to deliver notifications,
2410 and is one of "thread", "signal", or "none".
2411 Immediately following the slash is either the string "tid" for timers
2412 with
2413 .B SIGEV_THREAD_ID
2414 notification, or "pid" for timers that notify by other mechanisms.
2415 Following the "." is the PID of the process
2416 (or the kernel thread ID of the thread) that will be delivered
2417 a signal if the timer delivers notifications via a signal.
2418 .TP
2419 .I ClockID
2420 This field identifies the clock that the timer uses for measuring time.
2421 For most clocks, this is a number that matches one of the user-space
2422 .BR CLOCK_*
2423 constants exposed via
2424 .IR <time.h> .
2425 .B CLOCK_PROCESS_CPUTIME_ID
2426 timers display with a value of -6
2427 in this field.
2428 .B CLOCK_THREAD_CPUTIME_ID
2429 timers display with a value of -2
2430 in this field.
2431 .RE
2432 .IP
2433 This file is available only when the kernel was configured with
2434 .BR CONFIG_CHECKPOINT_RESTORE .
2435 .TP
2436 .IR /proc/[pid]/timerslack_ns " (since Linux 4.6)"
2437 .\" commit da8b44d5a9f8bf26da637b7336508ca534d6b319
2438 .\" commit 5de23d435e88996b1efe0e2cebe242074ce67c9e
2439 This file exposes the process's "current" timer slack value,
2440 expressed in nanoseconds.
2441 The file is writable,
2442 allowing the process's timer slack value to be changed.
2443 Writing 0 to this file resets the "current" timer slack to the
2444 "default" timer slack value.
2445 For further details, see the discussion of
2446 .BR PR_SET_TIMERSLACK
2447 in
2448 .BR prctl (2).
2449
2450 Permission to access this file is governed by a ptrace access mode
2451 .B PTRACE_MODE_ATTACH_FSCREDS
2452 check; see
2453 .BR ptrace (2).
2454 .TP
2455 .IR /proc/[pid]/uid_map ", " /proc/[pid]/gid_map " (since Linux 3.5)"
2456 See
2457 .BR user_namespaces (7).
2458 .TP
2459 .IR /proc/[pid]/wchan " (since Linux 2.6.0)"
2460 The symbolic name corresponding to the location
2461 in the kernel where the process is sleeping.
2462
2463 Permission to access this file is governed by a ptrace access mode
2464 .B PTRACE_MODE_READ_FSCREDS
2465 check; see
2466 .BR ptrace (2).
2467 .TP
2468 .I /proc/apm
2469 Advanced power management version and battery information when
2470 .B CONFIG_APM
2471 is defined at kernel compilation time.
2472 .TP
2473 .I /proc/buddyinfo
2474 This file contains information which is used for diagnosing memory
2475 fragmentation issues.
2476 Each line starts with the identification of the node and the name
2477 of the zone which together identify a memory region
2478 This is then
2479 followed by the count of available chunks of a certain order in
2480 which these zones are split.
2481 The size in bytes of a certain order is given by the formula:
2482
2483 (2^order)\ *\ PAGE_SIZE
2484
2485 The binary buddy allocator algorithm inside the kernel will split
2486 one chunk into two chunks of a smaller order (thus with half the
2487 size) or combine two contiguous chunks into one larger chunk of
2488 a higher order (thus with double the size) to satisfy allocation
2489 requests and to counter memory fragmentation.
2490 The order matches the column number, when starting to count at zero.
2491
2492 For example on a x86_64 system:
2493
2494 .in -12n
2495 .nf
2496 Node 0, zone DMA 1 1 1 0 2 1 1 0 1 1 3
2497 Node 0, zone DMA32 65 47 4 81 52 28 13 10 5 1 404
2498 Node 0, zone Normal 216 55 189 101 84 38 37 27 5 3 587
2499 .fi
2500 .in
2501
2502 In this example, there is one node containing three zones and there
2503 are 11 different chunk sizes.
2504 If the page size is 4 kilobytes, then the first zone called
2505 .I DMA
2506 (on x86 the first 16 megabyte of memory) has 1 chunk of 4 kilobytes
2507 (order 0) available and has 3 chunks of 4 megabytes (order 10) available.
2508
2509 If the memory is heavily fragmented, the counters for higher
2510 order chunks will be zero and allocation of large contiguous areas
2511 will fail.
2512
2513 Further information about the zones can be found in
2514 .IR /proc/zoneinfo .
2515 .TP
2516 .I /proc/bus
2517 Contains subdirectories for installed busses.
2518 .TP
2519 .I /proc/bus/pccard
2520 Subdirectory for PCMCIA devices when
2521 .B CONFIG_PCMCIA
2522 is set at kernel compilation time.
2523 .TP
2524 .I /proc/bus/pccard/drivers
2525 .TP
2526 .I /proc/bus/pci
2527 Contains various bus subdirectories and pseudo-files containing
2528 information about PCI busses, installed devices, and device
2529 drivers.
2530 Some of these files are not ASCII.
2531 .TP
2532 .I /proc/bus/pci/devices
2533 Information about PCI devices.
2534 They may be accessed through
2535 .BR lspci (8)
2536 and
2537 .BR setpci (8).
2538 .TP
2539 .IR /proc/cgroups " (since Linux 2.6.24)"
2540 See
2541 .BR cgroups (7).
2542 .TP
2543 .I /proc/cmdline
2544 Arguments passed to the Linux kernel at boot time.
2545 Often done via a boot manager such as
2546 .BR lilo (8)
2547 or
2548 .BR grub (8).
2549 .TP
2550 .IR /proc/config.gz " (since Linux 2.6)"
2551 This file exposes the configuration options that were used
2552 to build the currently running kernel,
2553 in the same format as they would be shown in the
2554 .I .config
2555 file that resulted when configuring the kernel (using
2556 .IR "make xconfig" ,
2557 .IR "make config" ,
2558 or similar).
2559 The file contents are compressed; view or search them using
2560 .BR zcat (1)
2561 and
2562 .BR zgrep (1).
2563 As long as no changes have been made to the following file,
2564 the contents of
2565 .I /proc/config.gz
2566 are the same as those provided by :
2567 .in +4n
2568 .nf
2569
2570 cat /lib/modules/$(uname \-r)/build/.config
2571 .fi
2572 .in
2573 .IP
2574 .I /proc/config.gz
2575 is provided only if the kernel is configured with
2576 .BR CONFIG_IKCONFIG_PROC .
2577 .TP
2578 .I /proc/crypto
2579 A list of the ciphers provided by the kernel crypto API.
2580 For details, see the kernel
2581 .I "Linux Kernel Crypto API"
2582 documentation available under the kernel source directory
2583 .IR Documentation/DocBook .
2584 (That documentation can be built using a command such as
2585 .IR "make htmldocs"
2586 in the root directory of the kernel source tree.)
2587 .TP
2588 .I /proc/cpuinfo
2589 This is a collection of CPU and system architecture dependent items,
2590 for each supported architecture a different list.
2591 Two common entries are \fIprocessor\fP which gives CPU number and
2592 \fIbogomips\fP; a system constant that is calculated
2593 during kernel initialization.
2594 SMP machines have information for
2595 each CPU.
2596 The
2597 .BR lscpu (1)
2598 command gathers its information from this file.
2599 .TP
2600 .I /proc/devices
2601 Text listing of major numbers and device groups.
2602 This can be used by MAKEDEV scripts for consistency with the kernel.
2603 .TP
2604 .IR /proc/diskstats " (since Linux 2.5.69)"
2605 This file contains disk I/O statistics for each disk device.
2606 See the Linux kernel source file
2607 .I Documentation/iostats.txt
2608 for further information.
2609 .TP
2610 .I /proc/dma
2611 This is a list of the registered \fIISA\fP DMA (direct memory access)
2612 channels in use.
2613 .TP
2614 .I /proc/driver
2615 Empty subdirectory.
2616 .TP
2617 .I /proc/execdomains
2618 List of the execution domains (ABI personalities).
2619 .TP
2620 .I /proc/fb
2621 Frame buffer information when
2622 .B CONFIG_FB
2623 is defined during kernel compilation.
2624 .TP
2625 .I /proc/filesystems
2626 A text listing of the filesystems which are supported by the kernel,
2627 namely filesystems which were compiled into the kernel or whose kernel
2628 modules are currently loaded.
2629 (See also
2630 .BR filesystems (5).)
2631 If a filesystem is marked with "nodev",
2632 this means that it does not require a block device to be mounted
2633 (e.g., virtual filesystem, network filesystem).
2634
2635 Incidentally, this file may be used by
2636 .BR mount (8)
2637 when no filesystem is specified and it didn't manage to determine the
2638 filesystem type.
2639 Then filesystems contained in this file are tried
2640 (excepted those that are marked with "nodev").
2641 .TP
2642 .I /proc/fs
2643 .\" FIXME Much more needs to be said about /proc/fs
2644 .\"
2645 Contains subdirectories that in turn contain files
2646 with information about (certain) mounted filesystems.
2647 .TP
2648 .I /proc/ide
2649 This directory
2650 exists on systems with the IDE bus.
2651 There are directories for each IDE channel and attached device.
2652 Files include:
2653
2654 .in +4n
2655 .nf
2656 cache buffer size in KB
2657 capacity number of sectors
2658 driver driver version
2659 geometry physical and logical geometry
2660 identify in hexadecimal
2661 media media type
2662 model manufacturer's model number
2663 settings drive settings
2664 smart_thresholds in hexadecimal
2665 smart_values in hexadecimal
2666 .fi
2667 .in
2668
2669 The
2670 .BR hdparm (8)
2671 utility provides access to this information in a friendly format.
2672 .TP
2673 .I /proc/interrupts
2674 This is used to record the number of interrupts per CPU per IO device.
2675 Since Linux 2.6.24,
2676 for the i386 and x86_64 architectures, at least, this also includes
2677 interrupts internal to the system (that is, not associated with a device
2678 as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt),
2679 and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling
2680 interrupt), CAL (remote function call interrupt), and possibly others.
2681 Very easy to read formatting, done in ASCII.
2682 .TP
2683 .I /proc/iomem
2684 I/O memory map in Linux 2.4.
2685 .TP
2686 .I /proc/ioports
2687 This is a list of currently registered Input-Output port regions that
2688 are in use.
2689 .TP
2690 .IR /proc/kallsyms " (since Linux 2.5.71)"
2691 This holds the kernel exported symbol definitions used by the
2692 .BR modules (X)
2693 tools to dynamically link and bind loadable modules.
2694 In Linux 2.5.47 and earlier, a similar file with slightly different syntax
2695 was named
2696 .IR ksyms .
2697 .TP
2698 .I /proc/kcore
2699 This file represents the physical memory of the system and is stored
2700 in the ELF core file format.
2701 With this pseudo-file, and an unstripped
2702 kernel
2703 .RI ( /usr/src/linux/vmlinux )
2704 binary, GDB can be used to
2705 examine the current state of any kernel data structures.
2706
2707 The total length of the file is the size of physical memory (RAM) plus
2708 4KB.
2709 .TP
2710 .I /proc/kmsg
2711 This file can be used instead of the
2712 .BR syslog (2)
2713 system call to read kernel messages.
2714 A process must have superuser
2715 privileges to read this file, and only one process should read this
2716 file.
2717 This file should not be read if a syslog process is running
2718 which uses the
2719 .BR syslog (2)
2720 system call facility to log kernel messages.
2721
2722 Information in this file is retrieved with the
2723 .BR dmesg (1)
2724 program.
2725 .TP
2726 .IR /proc/kpagecount " (since Linux 2.6.25)"
2727 This file contains a 64-bit count of the number of
2728 times each physical page frame is mapped,
2729 indexed by page frame number (see the discussion of
2730 .IR /proc/[pid]/pagemap ).
2731 .IP
2732 The
2733 .IR /proc/kpagecount
2734 file is present only if the
2735 .B CONFIG_PROC_PAGE_MONITOR
2736 kernel configuration option is enabled.
2737 .TP
2738 .IR /proc/kpageflags " (since Linux 2.6.25)"
2739 This file contains 64-bit masks corresponding to each physical page frame;
2740 it is indexed by page frame number (see the discussion of
2741 .IR /proc/[pid]/pagemap ).
2742 The bits are as follows:
2743
2744 0 - KPF_LOCKED
2745 1 - KPF_ERROR
2746 2 - KPF_REFERENCED
2747 3 - KPF_UPTODATE
2748 4 - KPF_DIRTY
2749 5 - KPF_LRU
2750 6 - KPF_ACTIVE
2751 7 - KPF_SLAB
2752 8 - KPF_WRITEBACK
2753 9 - KPF_RECLAIM
2754 10 - KPF_BUDDY
2755 11 - KPF_MMAP (since Linux 2.6.31)
2756 12 - KPF_ANON (since Linux 2.6.31)
2757 13 - KPF_SWAPCACHE (since Linux 2.6.31)
2758 14 - KPF_SWAPBACKED (since Linux 2.6.31)
2759 15 - KPF_COMPOUND_HEAD (since Linux 2.6.31)
2760 16 - KPF_COMPOUND_TAIL (since Linux 2.6.31)
2761 16 - KPF_HUGE (since Linux 2.6.31)
2762 18 - KPF_UNEVICTABLE (since Linux 2.6.31)
2763 19 - KPF_HWPOISON (since Linux 2.6.31)
2764 20 - KPF_NOPAGE (since Linux 2.6.31)
2765 21 - KPF_KSM (since Linux 2.6.32)
2766 22 - KPF_THP (since Linux 3.4)
2767
2768 For further details on the meanings of these bits,
2769 see the kernel source file
2770 .IR Documentation/vm/pagemap.txt .
2771 Before kernel 2.6.29,
2772 .\" commit ad3bdefe877afb47480418fdb05ecd42842de65e
2773 .\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110
2774 .BR KPF_WRITEBACK ,
2775 .BR KPF_RECLAIM ,
2776 .BR KPF_BUDDY ,
2777 and
2778 .BR KPF_LOCKED
2779 did not report correctly.
2780 .IP
2781 The
2782 .IR /proc/kpageflags
2783 file is present only if the
2784 .B CONFIG_PROC_PAGE_MONITOR
2785 kernel configuration option is enabled.
2786 .TP
2787 .IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
2788 See
2789 .IR /proc/kallsyms .
2790 .TP
2791 .I /proc/loadavg
2792 The first three fields in this file are load average figures
2793 giving the number of jobs in the run queue (state R)
2794 or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
2795 They are the same as the load average numbers given by
2796 .BR uptime (1)
2797 and other programs.
2798 The fourth field consists of two numbers separated by a slash (/).
2799 The first of these is the number of currently runnable kernel
2800 scheduling entities (processes, threads).
2801 The value after the slash is the number of kernel scheduling entities
2802 that currently exist on the system.
2803 The fifth field is the PID of the process that was most
2804 recently created on the system.
2805 .TP
2806 .I /proc/locks
2807 This file shows current file locks
2808 .RB ( flock "(2) and " fcntl (2))
2809 and leases
2810 .RB ( fcntl (2)).
2811 .TP
2812 .IR /proc/malloc " (only up to and including Linux 2.2)"
2813 .\" It looks like this only ever did something back in 1.0 days
2814 This file is present only if
2815 .B CONFIG_DEBUG_MALLOC
2816 was defined during compilation.
2817 .TP
2818 .I /proc/meminfo
2819 This file reports statistics about memory usage on the system.
2820 It is used by
2821 .BR free (1)
2822 to report the amount of free and used memory (both physical and swap)
2823 on the system as well as the shared memory and buffers used by the
2824 kernel.
2825 Each line of the file consists of a parameter name, followed by a colon,
2826 the value of the parameter, and an option unit of measurement (e.g., "kB").
2827 The list below describes the parameter names and
2828 the format specifier required to read the field value.
2829 Except as noted below,
2830 all of the fields have been present since at least Linux 2.6.0.
2831 Some fields are displayed only if the kernel was configured
2832 with various options; those dependencies are noted in the list.
2833 .RS
2834 .TP
2835 .IR MemTotal " %lu"
2836 Total usable RAM (i.e., physical RAM minus a few reserved
2837 bits and the kernel binary code).
2838 .TP
2839 .IR MemFree " %lu"
2840 The sum of
2841 .IR LowFree + HighFree .
2842 .TP
2843 .IR MemAvailable " %lu (since Linux 3.14)"
2844 An estimate of how much memory is available for starting new
2845 applications, without swapping.
2846 .TP
2847 .IR Buffers " %lu"
2848 Relatively temporary storage for raw disk blocks that
2849 shouldn't get tremendously large (20MB or so).
2850 .TP
2851 .IR Cached " %lu"
2852 In-memory cache for files read from the disk (the page cache).
2853 Doesn't include
2854 .IR SwapCached .
2855 .TP
2856 .IR SwapCached " %lu"
2857 Memory that once was swapped out, is swapped back in but
2858 still also is in the swap file.
2859 (If memory pressure is high, these pages
2860 don't need to be swapped out again because they are already
2861 in the swap file.
2862 This saves I/O.)
2863 .TP
2864 .IR Active " %lu"
2865 Memory that has been used more recently and usually not
2866 reclaimed unless absolutely necessary.
2867 .TP
2868 .IR Inactive " %lu"
2869 Memory which has been less recently used.
2870 It is more eligible to be reclaimed for other purposes.
2871 .TP
2872 .IR Active(anon) " %lu (since Linux 2.6.28)"
2873 [To be documented.]
2874 .TP
2875 .IR Inactive(anon) " %lu (since Linux 2.6.28)"
2876 [To be documented.]
2877 .TP
2878 .IR Active(file) " %lu (since Linux 2.6.28)"
2879 [To be documented.]
2880 .TP
2881 .IR Inactive(file) " %lu (since Linux 2.6.28)"
2882 [To be documented.]
2883 .TP
2884 .IR Unevictable " %lu (since Linux 2.6.28)"
2885 (From Linux 2.6.28 to 2.6.30,
2886 \fBCONFIG_UNEVICTABLE_LRU\fP was required.)
2887 [To be documented.]
2888 .TP
2889 .IR Mlocked " %lu (since Linux 2.6.28)"
2890 (From Linux 2.6.28 to 2.6.30,
2891 \fBCONFIG_UNEVICTABLE_LRU\fP was required.)
2892 [To be documented.]
2893 .TP
2894 .IR HighTotal " %lu"
2895 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2896 Total amount of highmem.
2897 Highmem is all memory above ~860MB of physical memory.
2898 Highmem areas are for use by user-space programs,
2899 or for the page cache.
2900 The kernel must use tricks to access
2901 this memory, making it slower to access than lowmem.
2902 .TP
2903 .IR HighFree " %lu
2904 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2905 Amount of free highmem.
2906 .TP
2907 .IR LowTotal " %lu
2908 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2909 Total amount of lowmem.
2910 Lowmem is memory which can be used for everything that
2911 highmem can be used for, but it is also available for the
2912 kernel's use for its own data structures.
2913 Among many other things,
2914 it is where everything from
2915 .I Slab
2916 is allocated.
2917 Bad things happen when you're out of lowmem.
2918 .TP
2919 .IR LowFree " %lu
2920 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2921 Amount of free lowmem.
2922 .TP
2923 .IR MmapCopy " %lu (since Linux 2.6.29)"
2924 .RB ( CONFIG_MMU
2925 is required.)
2926 [To be documented.]
2927 .TP
2928 .IR SwapTotal " %lu"
2929 Total amount of swap space available.
2930 .TP
2931 .IR SwapFree " %lu"
2932 Amount of swap space that is currently unused.
2933 .TP
2934 .IR Dirty " %lu"
2935 Memory which is waiting to get written back to the disk.
2936 .TP
2937 .IR Writeback " %lu"
2938 Memory which is actively being written back to the disk.
2939 .TP
2940 .IR AnonPages " %lu (since Linux 2.6.18)"
2941 Non-file backed pages mapped into user-space page tables.
2942 .TP
2943 .IR Mapped " %lu"
2944 Files which have been mapped into memory (with
2945 .BR mmap (2)),
2946 such as libraries.
2947 .TP
2948 .IR Shmem " %lu (since Linux 2.6.32)"
2949 [To be documented.]
2950 .TP
2951 .IR Slab " %lu"
2952 In-kernel data structures cache.
2953 .TP
2954 .IR SReclaimable " %lu (since Linux 2.6.19)"
2955 Part of
2956 .IR Slab ,
2957 that might be reclaimed, such as caches.
2958 .TP
2959 .IR SUnreclaim " %lu (since Linux 2.6.19)"
2960 Part of
2961 .IR Slab ,
2962 that cannot be reclaimed on memory pressure.
2963 .TP
2964 .IR KernelStack " %lu (since Linux 2.6.32)"
2965 Amount of memory allocated to kernel stacks.
2966 .TP
2967 .IR PageTables " %lu (since Linux 2.6.18)"
2968 Amount of memory dedicated to the lowest level of page tables.
2969 .TP
2970 .IR Quicklists " %lu (since Linux 2.6.27)"
2971 (\fBCONFIG_QUICKLIST\fP is required.)
2972 [To be documented.]
2973 .TP
2974 .IR NFS_Unstable " %lu (since Linux 2.6.18)"
2975 NFS pages sent to the server, but not yet committed to stable storage.
2976 .TP
2977 .IR Bounce " %lu (since Linux 2.6.18)"
2978 Memory used for block device "bounce buffers".
2979 .TP
2980 .IR WritebackTmp " %lu (since Linux 2.6.26)"
2981 Memory used by FUSE for temporary writeback buffers.
2982 .TP
2983 .IR CommitLimit " %lu (since Linux 2.6.10)"
2984 This is the total amount of memory currently available to
2985 be allocated on the system, expressed in kilobytes.
2986 This limit is adhered to
2987 only if strict overcommit accounting is enabled (mode 2 in
2988 .IR /proc/sys/vm/overcommit_memory ).
2989 The limit is calculated according to the formula described under
2990 .IR /proc/sys/vm/overcommit_memory .
2991 For further details, see the kernel source file
2992 .IR Documentation/vm/overcommit-accounting .
2993 .TP
2994 .IR Committed_AS " %lu"
2995 The amount of memory presently allocated on the system.
2996 The committed memory is a sum of all of the memory which
2997 has been allocated by processes, even if it has not been
2998 "used" by them as of yet.
2999 A process which allocates 1GB of memory (using
3000 .BR malloc (3)
3001 or similar), but touches only 300MB of that memory will show up
3002 as using only 300MB of memory even if it has the address space
3003 allocated for the entire 1GB.
3004
3005 This 1GB is memory which has been "committed" to by the VM
3006 and can be used at any time by the allocating application.
3007 With strict overcommit enabled on the system (mode 2 in
3008 .IR /proc/sys/vm/overcommit_memory ),
3009 allocations which would exceed the
3010 .I CommitLimit
3011 will not be permitted.
3012 This is useful if one needs to guarantee that processes will not
3013 fail due to lack of memory once that memory has been successfully allocated.
3014 .TP
3015 .IR VmallocTotal " %lu"
3016 Total size of vmalloc memory area.
3017 .TP
3018 .IR VmallocUsed " %lu"
3019 Amount of vmalloc area which is used.
3020 .TP
3021 .IR VmallocChunk " %lu"
3022 Largest contiguous block of vmalloc area which is free.
3023 .TP
3024 .IR HardwareCorrupted " %lu (since Linux 2.6.32)"
3025 (\fBCONFIG_MEMORY_FAILURE\fP is required.)
3026 [To be documented.]
3027 .TP
3028 .IR AnonHugePages " %lu (since Linux 2.6.38)"
3029 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
3030 Non-file backed huge pages mapped into user-space page tables.
3031 .TP
3032 .IR CmaTotal " %lu (since Linux 3.1)"
3033 Total CMA (Contiguous Memory Allocator) pages.
3034 (\fBCONFIG_CMA\fP is required.)
3035 .TP
3036 .IR CmaFree " %lu (since Linux 3.1)"
3037 Free CMA (Contiguous Memory Allocator) pages.
3038 (\fBCONFIG_CMA\fP is required.)
3039 .TP
3040 .IR HugePages_Total " %lu"
3041 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
3042 The size of the pool of huge pages.
3043 .TP
3044 .IR HugePages_Free " %lu"
3045 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
3046 The number of huge pages in the pool that are not yet allocated.
3047 .TP
3048 .IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
3049 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
3050 This is the number of huge pages for
3051 which a commitment to allocate from the pool has been made,
3052 but no allocation has yet been made.
3053 These reserved huge pages
3054 guarantee that an application will be able to allocate a
3055 huge page from the pool of huge pages at fault time.
3056 .TP
3057 .IR HugePages_Surp " %lu (since Linux 2.6.24)"
3058 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
3059 This is the number of huge pages in
3060 the pool above the value in
3061 .IR /proc/sys/vm/nr_hugepages .
3062 The maximum number of surplus huge pages is controlled by
3063 .IR /proc/sys/vm/nr_overcommit_hugepages .
3064 .TP
3065 .IR Hugepagesize " %lu"
3066 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
3067 The size of huge pages.
3068 .TP
3069 .IR DirectMap4k " %lu (since Linux 2.6.27)"
3070 Number of bytes of RAM linearly mapped by kernel in 4kB pages.
3071 (x86.)
3072 .TP
3073 .IR DirectMap4M " %lu (since Linux 2.6.27)"
3074 Number of bytes of RAM linearly mapped by kernel in 4MB pages.
3075 (x86 with
3076 .BR CONFIG_X86_64
3077 or
3078 .BR CONFIG_X86_PAE
3079 enabled.)
3080 .TP
3081 .IR DirectMap2M " %lu (since Linux 2.6.27)"
3082 Number of bytes of RAM linearly mapped by kernel in 2MB pages.
3083 (x86 with neither
3084 .BR CONFIG_X86_64
3085 nor
3086 .BR CONFIG_X86_PAE
3087 enabled.)
3088 .TP
3089 .IR DirectMap1G " %lu (since Linux 2.6.27)"
3090 (x86 with
3091 .BR CONFIG_X86_64
3092 and
3093 .B CONFIG_X86_DIRECT_GBPAGES
3094 enabled.)
3095 .RE
3096 .TP
3097 .I /proc/modules
3098 A text list of the modules that have been loaded by the system.
3099 See also
3100 .BR lsmod (8).
3101 .TP
3102 .I /proc/mounts
3103 Before kernel 2.4.19, this file was a list
3104 of all the filesystems currently mounted on the system.
3105 With the introduction of per-process mount namespaces in Linux 2.4.19 (see
3106 .BR mount_namespaces (7)),
3107 this file became a link to
3108 .IR /proc/self/mounts ,
3109 which lists the mount points of the process's own mount namespace.
3110 The format of this file is documented in
3111 .BR fstab (5).
3112 .TP
3113 .I /proc/mtrr
3114 Memory Type Range Registers.
3115 See the Linux kernel source file
3116 .I Documentation/mtrr.txt
3117 for details.
3118 .TP
3119 .I /proc/net
3120 This directory contains various files and subdirectories containing
3121 information about the networking layer.
3122 The files contain ASCII structures and are,
3123 therefore, readable with
3124 .BR cat (1).
3125 However, the standard
3126 .BR netstat (8)
3127 suite provides much cleaner access to these files.
3128
3129 With the advent of network namespaces,
3130 various information relating to the network stack is virtualized (see
3131 .BR namespaces (7)).
3132 Thus, since Linux 2.6.25,
3133 .\" commit e9720acd728a46cb40daa52c99a979f7c4ff195c
3134 .IR /proc/net
3135 is a symbolic link to the directory
3136 .IR /proc/self/net ,
3137 which contains the same files and directories as listed below.
3138 However, these files and directories now expose information
3139 for the network namespace of which the process is a member.
3140 .TP
3141 .I /proc/net/arp
3142 This holds an ASCII readable dump of the kernel ARP table used for
3143 address resolutions.
3144 It will show both dynamically learned and preprogrammed ARP entries.
3145 The format is:
3146
3147 .nf
3148 .ft CW
3149 .in 8n
3150 IP address HW type Flags HW address Mask Device
3151 192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
3152 192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
3153 .ft
3154 .fi
3155 .in
3156
3157 Here "IP address" is the IPv4 address of the machine and the "HW type"
3158 is the hardware type of the address from RFC\ 826.
3159 The flags are the internal
3160 flags of the ARP structure (as defined in
3161 .IR /usr/include/linux/if_arp.h )
3162 and
3163 the "HW address" is the data link layer mapping for that IP address if
3164 it is known.
3165 .TP
3166 .I /proc/net/dev
3167 The dev pseudo-file contains network device status information.
3168 This gives
3169 the number of received and sent packets, the number of errors and
3170 collisions
3171 and other basic statistics.
3172 These are used by the
3173 .BR ifconfig (8)
3174 program to report device status.
3175 The format is:
3176
3177 .nf
3178 .ft CW
3179 .in 1n
3180 Inter-| Receive | Transmit
3181 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
3182 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
3183 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
3184 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
3185 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
3186 .in
3187 .ft
3188 .fi
3189 .\" .TP
3190 .\" .I /proc/net/ipx
3191 .\" No information.
3192 .\" .TP
3193 .\" .I /proc/net/ipx_route
3194 .\" No information.
3195 .TP
3196 .I /proc/net/dev_mcast
3197 Defined in
3198 .IR /usr/src/linux/net/core/dev_mcast.c :
3199 .nf
3200 .in +5
3201 indx interface_name dmi_u dmi_g dmi_address
3202 2 eth0 1 0 01005e000001
3203 3 eth1 1 0 01005e000001
3204 4 eth2 1 0 01005e000001
3205 .in
3206 .fi
3207 .TP
3208 .I /proc/net/igmp
3209 Internet Group Management Protocol.
3210 Defined in
3211 .IR /usr/src/linux/net/core/igmp.c .
3212 .TP
3213 .I /proc/net/rarp
3214 This file uses the same format as the
3215 .I arp
3216 file and contains the current reverse mapping database used to provide
3217 .BR rarp (8)
3218 reverse address lookup services.
3219 If RARP is not configured into the
3220 kernel,
3221 this file will not be present.
3222 .TP
3223 .I /proc/net/raw
3224 Holds a dump of the RAW socket table.
3225 Much of the information is not of
3226 use
3227 apart from debugging.
3228 The "sl" value is the kernel hash slot for the
3229 socket,
3230 the "local_address" is the local address and protocol number pair.
3231 \&"St" is
3232 the internal status of the socket.
3233 The "tx_queue" and "rx_queue" are the
3234 outgoing and incoming data queue in terms of kernel memory usage.
3235 The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
3236 The "uid"
3237 field holds the effective UID of the creator of the socket.
3238 .\" .TP
3239 .\" .I /proc/net/route
3240 .\" No information, but looks similar to
3241 .\" .BR route (8).
3242 .TP
3243 .I /proc/net/snmp
3244 This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
3245 management
3246 information bases for an SNMP agent.
3247 .TP
3248 .I /proc/net/tcp
3249 Holds a dump of the TCP socket table.
3250 Much of the information is not
3251 of use apart from debugging.
3252 The "sl" value is the kernel hash slot
3253 for the socket, the "local_address" is the local address and port number pair.
3254 The "rem_address" is the remote address and port number pair
3255 (if connected).
3256 \&"St" is the internal status of the socket.
3257 The "tx_queue" and "rx_queue" are the
3258 outgoing and incoming data queue in terms of kernel memory usage.
3259 The "tr", "tm\->when", and "rexmits" fields hold internal information of
3260 the kernel socket state and are useful only for debugging.
3261 The "uid"
3262 field holds the effective UID of the creator of the socket.
3263 .TP
3264 .I /proc/net/udp
3265 Holds a dump of the UDP socket table.
3266 Much of the information is not of
3267 use apart from debugging.
3268 The "sl" value is the kernel hash slot for the
3269 socket, the "local_address" is the local address and port number pair.
3270 The "rem_address" is the remote address and port number pair
3271 (if connected).
3272 "St" is the internal status of the socket.
3273 The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
3274 in terms of kernel memory usage.
3275 The "tr", "tm\->when", and "rexmits" fields
3276 are not used by UDP.
3277 The "uid"
3278 field holds the effective UID of the creator of the socket.
3279 The format is:
3280
3281 .nf
3282 .ft CW
3283 .in 1n
3284 sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
3285 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
3286 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
3287 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
3288 .in
3289 .ft
3290 .fi
3291 .TP
3292 .I /proc/net/unix
3293 Lists the UNIX domain sockets present within the system and their
3294 status.
3295 The format is:
3296 .nf
3297 .sp .5
3298 .ft CW
3299 Num RefCount Protocol Flags Type St Path
3300 0: 00000002 00000000 00000000 0001 03
3301 1: 00000001 00000000 00010000 0001 01 /dev/printer
3302 .ft
3303 .sp .5
3304 .fi
3305
3306 The fields are as follows:
3307 .RS
3308 .TP 10
3309 .IR Num :
3310 the kernel table slot number.
3311 .TP
3312 .IR RefCount :
3313 the number of users of the socket.
3314 .TP
3315 .IR Protocol :
3316 currently always 0.
3317 .TP
3318 .IR Flags :
3319 the internal kernel flags holding the status of the socket.
3320 .TP
3321 .IR Type :
3322 the socket type.
3323 For
3324 .BR SOCK_STREAM
3325 sockets, this is 0001; for
3326 .BR SOCK_DGRAM
3327 sockets, it is 0002; and for
3328 .BR SOCK_SEQPACKET
3329 sockets, it is 0005.
3330 .TP
3331 .IR St :
3332 the internal state of the socket.
3333 .TP
3334 .IR Path :
3335 the bound path (if any) of the socket.
3336 Sockets in the abstract namespace are included in the list,
3337 and are shown with a
3338 .I Path
3339 that commences with the character '@'.
3340 .RE
3341 .TP
3342 .I /proc/net/netfilter/nfnetlink_queue
3343 This file contains information about netfilter userspace queueing, if used.
3344 Each line represents a queue.
3345 Queues that have not been subscribed to
3346 by userspace are not shown.
3347 .nf
3348
3349 1 4207 0 2 65535 0 0 0 1
3350 (1) (2) (3)(4) (5) (6) (7) (8)
3351 .fi
3352 .IP
3353 The fields in each line are:
3354 .RS 7
3355 .TP 5
3356 (1)
3357 The ID of the queue.
3358 This matches what is specified in the
3359 .B \-\-queue\-num
3360 or
3361 .B \-\-queue\-balance
3362 options to the
3363 .BR iptables (8)
3364 NFQUEUE target.
3365 See
3366 .BR iptables-extensions (8)
3367 for more information.
3368 .TP
3369 (2)
3370 The netlink port ID subscribed to the queue.
3371 .TP
3372 (3)
3373 The number of packets currently queued and waiting to be processed by
3374 the application.
3375 .TP
3376 (4)
3377 The copy mode of the queue.
3378 It is either 1 (metadata only) or 2
3379 (also copy payload data to userspace).
3380 .TP
3381 (5)
3382 Copy range; that is, how many bytes of packet payload should be copied to
3383 userspace at most.
3384 .TP
3385 (6)
3386 queue dropped.
3387 Number of packets that had to be dropped by the kernel because
3388 too many packets are already waiting for userspace to send back the mandatory
3389 accept/drop verdicts.
3390 .TP
3391 (7)
3392 queue user dropped.
3393 Number of packets that were dropped within the netlink
3394 subsystem.
3395 Such drops usually happen when the corresponding socket buffer is
3396 full; that is, userspace is not able to read messages fast enough.
3397 .TP
3398 (8)
3399 sequence number.
3400 Every queued packet is associated with a (32-bit)
3401 monotonically-increasing sequence number.
3402 This shows the ID of the most recent packet queued.
3403 .RE
3404 .IP
3405 The last number exists only for compatibility reasons and is always 1.
3406 .TP
3407 .I /proc/partitions
3408 Contains the major and minor numbers of each partition as well as the number
3409 of 1024-byte blocks and the partition name.
3410 .TP
3411 .I /proc/pci
3412 This is a listing of all PCI devices found during kernel initialization
3413 and their configuration.
3414
3415 This file has been deprecated in favor of a new
3416 .I /proc
3417 interface for PCI
3418 .RI ( /proc/bus/pci ).
3419 It became optional in Linux 2.2 (available with
3420 .B CONFIG_PCI_OLD_PROC
3421 set at kernel compilation).
3422 It became once more nonoptionally enabled in Linux 2.4.
3423 Next, it was deprecated in Linux 2.6 (still available with
3424 .B CONFIG_PCI_LEGACY_PROC
3425 set), and finally removed altogether since Linux 2.6.17.
3426 .\" FIXME Document /proc/sched_debug
3427 .\"
3428 .\" .TP
3429 .\" .IR /proc/sched_debug " (since Linux 2.6.23)"
3430 .\" See also /proc/[pid]/sched
3431 .TP
3432 .IR /proc/profile " (since Linux 2.4)"
3433 This file is present only if the kernel was booted with the
3434 .I profile=1
3435 command-line option.
3436 It exposes kernel profiling information in a binary format for use by
3437 .BR readprofile (1).
3438 Writing (e.g., an empty string) to this file resets the profiling counters;
3439 on some architectures,
3440 writing a binary integer "profiling multiplier" of size
3441 .IR sizeof(int)
3442 sets the profiling interrupt frequency.
3443 .TP
3444 .I /proc/scsi
3445 A directory with the
3446 .I scsi
3447 mid-level pseudo-file and various SCSI low-level
3448 driver directories,
3449 which contain a file for each SCSI host in this system, all of
3450 which give the status of some part of the SCSI IO subsystem.
3451 These files contain ASCII structures and are, therefore, readable with
3452 .BR cat (1).
3453
3454 You can also write to some of the files to reconfigure the subsystem or
3455 switch certain features on or off.
3456 .TP
3457 .I /proc/scsi/scsi
3458 This is a listing of all SCSI devices known to the kernel.
3459 The listing is similar to the one seen during bootup.
3460 scsi currently supports only the \fIadd-single-device\fP command which
3461 allows root to add a hotplugged device to the list of known devices.
3462
3463 The command
3464 .in +4n
3465 .nf
3466
3467 echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi
3468
3469 .fi
3470 .in
3471 will cause
3472 host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
3473 If there
3474 is already a device known on this address or the address is invalid, an
3475 error will be returned.
3476 .TP
3477 .I /proc/scsi/[drivername]
3478 \fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
3479 aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
3480 scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
3481 These directories show up for all drivers that registered at least one
3482 SCSI HBA.
3483 Every directory contains one file per registered host.
3484 Every host-file is named after the number the host was assigned during
3485 initialization.
3486
3487 Reading these files will usually show driver and host configuration,
3488 statistics, and so on.
3489
3490 Writing to these files allows different things on different hosts.
3491 For example, with the \fIlatency\fP and \fInolatency\fP commands,
3492 root can switch on and off command latency measurement code in the
3493 eata_dma driver.
3494 With the \fIlockup\fP and \fIunlock\fP commands,
3495 root can control bus lockups simulated by the scsi_debug driver.
3496 .TP
3497 .I /proc/self
3498 This directory refers to the process accessing the
3499 .I /proc
3500 filesystem,
3501 and is identical to the
3502 .I /proc
3503 directory named by the process ID of the same process.
3504 .TP
3505 .I /proc/slabinfo
3506 Information about kernel caches.
3507 Since Linux 2.6.16 this file is present only if the
3508 .B CONFIG_SLAB
3509 kernel configuration option is enabled.
3510 The columns in
3511 .I /proc/slabinfo
3512 are:
3513 .in +4n
3514 .nf
3515
3516 cache-name
3517 num-active-objs
3518 total-objs
3519 object-size
3520 num-active-slabs
3521 total-slabs
3522 num-pages-per-slab
3523 .fi
3524 .in
3525
3526 See
3527 .BR slabinfo (5)
3528 for details.
3529 .TP
3530 .I /proc/stat
3531 kernel/system statistics.
3532 Varies with architecture.
3533 Common
3534 entries include:
3535 .RS
3536 .TP
3537 \fIcpu 3357 0 4313 1362393\fP
3538 The amount of time, measured in units of
3539 USER_HZ (1/100ths of a second on most architectures, use
3540 .IR sysconf(_SC_CLK_TCK)
3541 to obtain the right value),
3542 .\" 1024 on Alpha and ia64
3543 that the system spent in various states:
3544 .RS
3545 .TP
3546 .I user
3547 (1) Time spent in user mode.
3548 .TP
3549 .I nice
3550 (2) Time spent in user mode with low priority (nice).
3551 .TP
3552 .I system
3553 (3) Time spent in system mode.
3554 .TP
3555 .I idle
3556 (4) Time spent in the idle task.
3557 .\" FIXME . Actually, the following info about the /proc/stat 'cpu' field
3558 .\" does not seem to be quite right (at least in 2.6.12 or 3.6):
3559 .\" the idle time in /proc/uptime does not quite match this value
3560 This value should be USER_HZ times the
3561 second entry in the
3562 .I /proc/uptime
3563 pseudo-file.
3564 .TP
3565 .IR iowait " (since Linux 2.5.41)"
3566 (5) Time waiting for I/O to complete.
3567 .TP
3568 .IR irq " (since Linux 2.6.0-test4)"
3569 (6) Time servicing interrupts.
3570 .TP
3571 .IR softirq " (since Linux 2.6.0-test4)"
3572 (7) Time servicing softirqs.
3573 .TP
3574 .IR steal " (since Linux 2.6.11)"
3575 (8) Stolen time, which is the time spent in other operating systems when
3576 running in a virtualized environment
3577 .TP
3578 .IR guest " (since Linux 2.6.24)"
3579 (9) Time spent running a virtual CPU for guest
3580 operating systems under the control of the Linux kernel.
3581 .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
3582 .TP
3583 .IR guest_nice " (since Linux 2.6.33)"
3584 .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
3585 (10) Time spent running a niced guest (virtual CPU for guest
3586 operating systems under the control of the Linux kernel).
3587 .RE
3588 .TP
3589 \fIpage 5741 1808\fP
3590 The number of pages the system paged in and the number that were paged
3591 out (from disk).
3592 .TP
3593 \fIswap 1 0\fP
3594 The number of swap pages that have been brought in and out.
3595 .TP
3596 .\" FIXME . The following is not the full picture for the 'intr' of
3597 .\" /proc/stat on 2.6:
3598 \fIintr 1462898\fP
3599 This line shows counts of interrupts serviced since boot time,
3600 for each of the possible system interrupts.
3601 The first column is the total of all interrupts serviced
3602 including unnumbered architecture specific interrupts;
3603 each subsequent column is the total for that particular numbered interrupt.
3604 Unnumbered interrupts are not shown, only summed into the total.
3605 .TP
3606 \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
3607 (major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
3608 .br
3609 (Linux 2.4 only)
3610 .TP
3611 \fIctxt 115315\fP
3612 The number of context switches that the system underwent.
3613 .TP
3614 \fIbtime 769041601\fP
3615 boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
3616 .TP
3617 \fIprocesses 86031\fP
3618 Number of forks since boot.
3619 .TP
3620 \fIprocs_running 6\fP
3621 Number of processes in runnable state.
3622 (Linux 2.5.45 onward.)
3623 .TP
3624 \fIprocs_blocked 2\fP
3625 Number of processes blocked waiting for I/O to complete.
3626 (Linux 2.5.45 onward.)
3627 .RE
3628 .TP
3629 .I /proc/swaps
3630 Swap areas in use.
3631 See also
3632 .BR swapon (8).
3633 .TP
3634 .I /proc/sys
3635 This directory (present since 1.3.57) contains a number of files
3636 and subdirectories corresponding to kernel variables.
3637 These variables can be read and sometimes modified using
3638 the \fI/proc\fP filesystem, and the (deprecated)
3639 .BR sysctl (2)
3640 system call.
3641
3642 String values may be terminated by either \(aq\\0\(aq or \(aq\\n\(aq.
3643
3644 Integer and long values may be written either in decimal or in
3645 hexadecimal notation (e.g. 0x3FFF).
3646 When writing multiple integer or long values, these may be separated
3647 by any of the following whitespace characters:
3648 \(aq\ \(aq, \(aq\\t\(aq, or \(aq\\n\(aq.
3649 Using other separators leads to the error
3650 .BR EINVAL .
3651 .TP
3652 .IR /proc/sys/abi " (since Linux 2.4.10)"
3653 This directory may contain files with application binary information.
3654 .\" On some systems, it is not present.
3655 See the Linux kernel source file
3656 .I Documentation/sysctl/abi.txt
3657 for more information.
3658 .TP
3659 .I /proc/sys/debug
3660 This directory may be empty.
3661 .TP
3662 .I /proc/sys/dev
3663 This directory contains device-specific information (e.g.,
3664 .IR dev/cdrom/info ).
3665 On
3666 some systems, it may be empty.
3667 .TP
3668 .I /proc/sys/fs
3669 This directory contains the files and subdirectories for kernel variables
3670 related to filesystems.
3671 .TP
3672 .I /proc/sys/fs/binfmt_misc
3673 Documentation for files in this directory can be found
3674 in the Linux kernel sources in
3675 .IR Documentation/binfmt_misc.txt .
3676 .TP
3677 .IR /proc/sys/fs/dentry-state " (since Linux 2.2)"
3678 This file contains information about the status of the
3679 directory cache (dcache).
3680 The file contains six numbers,
3681 .IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
3682 .I want_pages
3683 (pages requested by system) and two dummy values.
3684 .RS
3685 .IP * 2
3686 .I nr_dentry
3687 is the number of allocated dentries (dcache entries).
3688 This field is unused in Linux 2.2.
3689 .IP *
3690 .I nr_unused
3691 is the number of unused dentries.
3692 .IP *
3693 .I age_limit
3694 .\" looks like this is unused in kernels 2.2 to 2.6
3695 is the age in seconds after which dcache entries
3696 can be reclaimed when memory is short.
3697 .IP *
3698 .I want_pages
3699 .\" looks like this is unused in kernels 2.2 to 2.6
3700 is nonzero when the kernel has called shrink_dcache_pages() and the
3701 dcache isn't pruned yet.
3702 .RE
3703 .TP
3704 .I /proc/sys/fs/dir-notify-enable
3705 This file can be used to disable or enable the
3706 .I dnotify
3707 interface described in
3708 .BR fcntl (2)
3709 on a system-wide basis.
3710 A value of 0 in this file disables the interface,
3711 and a value of 1 enables it.
3712 .TP
3713 .I /proc/sys/fs/dquot-max
3714 This file shows the maximum number of cached disk quota entries.
3715 On some (2.4) systems, it is not present.
3716 If the number of free cached disk quota entries is very low and
3717 you have some awesome number of simultaneous system users,
3718 you might want to raise the limit.
3719 .TP
3720 .I /proc/sys/fs/dquot-nr
3721 This file shows the number of allocated disk quota
3722 entries and the number of free disk quota entries.
3723 .TP
3724 .IR /proc/sys/fs/epoll " (since Linux 2.6.28)"
3725 This directory contains the file
3726 .IR max_user_watches ,
3727 which can be used to limit the amount of kernel memory consumed by the
3728 .I epoll
3729 interface.
3730 For further details, see
3731 .BR epoll (7).
3732 .TP
3733 .I /proc/sys/fs/file-max
3734 This file defines
3735 a system-wide limit on the number of open files for all processes.
3736 System calls that fail when encountering this limit fail with the error
3737 .BR ENFILE .
3738 (See also
3739 .BR setrlimit (2),
3740 which can be used by a process to set the per-process limit,
3741 .BR RLIMIT_NOFILE ,
3742 on the number of files it may open.)
3743 If you get lots
3744 of error messages in the kernel log about running out of file handles
3745 (look for "VFS: file-max limit <number> reached"),
3746 try increasing this value:
3747 .br
3748
3749 .br
3750 .nf
3751 .ft CW
3752 echo 100000 > /proc/sys/fs/file-max
3753 .fi
3754 .ft
3755
3756 Privileged processes
3757 .RB ( CAP_SYS_ADMIN )
3758 can override the
3759 .I file-max
3760 limit.
3761 .TP
3762 .I /proc/sys/fs/file-nr
3763 This (read-only) file contains three numbers:
3764 the number of allocated file handles
3765 (i.e., the number of files presently opened);
3766 the number of free file handles;
3767 and the maximum number of file handles (i.e., the same value as
3768 .IR /proc/sys/fs/file-max ).
3769 If the number of allocated file handles is close to the
3770 maximum, you should consider increasing the maximum.
3771 Before Linux 2.6,
3772 the kernel allocated file handles dynamically,
3773 but it didn't free them again.
3774 Instead the free file handles were kept in a list for reallocation;
3775 the "free file handles" value indicates the size of that list.
3776 A large number of free file handles indicates that there was
3777 a past peak in the usage of open file handles.
3778 Since Linux 2.6, the kernel does deallocate freed file handles,
3779 and the "free file handles" value is always zero.
3780 .TP
3781 .IR /proc/sys/fs/inode-max " (only present until Linux 2.2)"
3782 This file contains the maximum number of in-memory inodes.
3783 This value should be 3-4 times larger
3784 than the value in
3785 .IR file-max ,
3786 since \fIstdin\fP, \fIstdout\fP
3787 and network sockets also need an inode to handle them.
3788 When you regularly run out of inodes, you need to increase this value.
3789
3790 Starting with Linux 2.4,
3791 there is no longer a static limit on the number of inodes,
3792 and this file is removed.
3793 .TP
3794 .I /proc/sys/fs/inode-nr
3795 This file contains the first two values from
3796 .IR inode-state .
3797 .TP
3798 .I /proc/sys/fs/inode-state
3799 This file
3800 contains seven numbers:
3801 .IR nr_inodes ,
3802 .IR nr_free_inodes ,
3803 .IR preshrink ,
3804 and four dummy values (always zero).
3805
3806 .I nr_inodes
3807 is the number of inodes the system has allocated.
3808 .\" This can be slightly more than
3809 .\" .I inode-max
3810 .\" because Linux allocates them one page full at a time.
3811 .I nr_free_inodes
3812 represents the number of free inodes.
3813
3814 .I preshrink
3815 is nonzero when the
3816 .I nr_inodes
3817 >
3818 .I inode-max
3819 and the system needs to prune the inode list instead of allocating more;
3820 since Linux 2.4, this field is a dummy value (always zero).
3821 .TP
3822 .IR /proc/sys/fs/inotify " (since Linux 2.6.13)"
3823 This directory contains files
3824 .IR max_queued_events ", " max_user_instances ", and " max_user_watches ,
3825 that can be used to limit the amount of kernel memory consumed by the
3826 .I inotify
3827 interface.
3828 For further details, see
3829 .BR inotify (7).
3830 .TP
3831 .I /proc/sys/fs/lease-break-time
3832 This file specifies the grace period that the kernel grants to a process
3833 holding a file lease
3834 .RB ( fcntl (2))
3835 after it has sent a signal to that process notifying it
3836 that another process is waiting to open the file.
3837 If the lease holder does not remove or downgrade the lease within
3838 this grace period, the kernel forcibly breaks the lease.
3839 .TP
3840 .I /proc/sys/fs/leases-enable
3841 This file can be used to enable or disable file leases
3842 .RB ( fcntl (2))
3843 on a system-wide basis.
3844 If this file contains the value 0, leases are disabled.
3845 A nonzero value enables leases.
3846 .TP
3847 .IR /proc/sys/fs/mqueue " (since Linux 2.6.6)"
3848 This directory contains files
3849 .IR msg_max ", " msgsize_max ", and " queues_max ,
3850 controlling the resources used by POSIX message queues.
3851 See
3852 .BR mq_overview (7)
3853 for details.
3854 .TP
3855 .IR /proc/sys/fs/nr_open " (since Linux 2.6.25)
3856 .\" commit 9cfe015aa424b3c003baba3841a60dd9b5ad319b
3857 This file imposes ceiling on the value to which the
3858 .BR RLIMIT_NOFILE
3859 resource limit can be raised (see
3860 .BR getrlimit (2)).
3861 This ceiling is enforced for both unprivileged and privileged process.
3862 The default value in this file is 1048576.
3863 (Before Linux 2.6.25, the ceiling for
3864 .BR RLIMIT_NOFILE
3865 was hard-coded to the same value.)
3866 .TP
3867 .IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid
3868 These files
3869 allow you to change the value of the fixed UID and GID.
3870 The default is 65534.
3871 Some filesystems support only 16-bit UIDs and GIDs, although in Linux
3872 UIDs and GIDs are 32 bits.
3873 When one of these filesystems is mounted
3874 with writes enabled, any UID or GID that would exceed 65535 is translated
3875 to the overflow value before being written to disk.
3876 .TP
3877 .IR /proc/sys/fs/pipe-max-size " (since Linux 2.6.35)"
3878 The value in this file defines an upper limit for raising the capacity
3879 of a pipe using the
3880 .BR fcntl (2)
3881 .B F_SETPIPE_SZ
3882 operation.
3883 This limit applies only to unprivileged processes.
3884 The default value for this file is 1,048,576.
3885 The value assigned to this file may be rounded upward,
3886 to reflect the value actually employed for a convenient implementation.
3887 To determine the rounded-up value,
3888 display the contents of this file after assigning a value to it.
3889 The minimum value that can be assigned to this file is the system page size.
3890 .TP
3891 .IR /proc/sys/fs/protected_hardlinks " (since Linux 3.6)"
3892 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
3893 When the value in this file is 0,
3894 no restrictions are placed on the creation of hard links
3895 (i.e., this is the historical behavior before Linux 3.6).
3896 When the value in this file is 1,
3897 a hard link can be created to a target file
3898 only if one of the following conditions is true:
3899 .RS
3900 .IP * 3
3901 The caller has the
3902 .BR CAP_FOWNER
3903 capability.
3904 .IP *
3905 The filesystem UID of the process creating the link matches
3906 the owner (UID) of the target file
3907 (as described in
3908 .BR credentials (7),
3909 a process's filesystem UID is normally the same as its effective UID).
3910 .IP *
3911 All of the following conditions are true:
3912 .RS 4
3913 .IP \(bu 3
3914 the target is a regular file;
3915 .IP \(bu
3916 the target file does not have its set-user-ID mode bit enabled;
3917 .IP \(bu
3918 the target file does not have both its set-group-ID and
3919 group-executable mode bits enabled; and
3920 .IP \(bu
3921 the caller has permission to read and write the target file
3922 (either via the file's permissions mask or because it has
3923 suitable capabilities).
3924 .RE
3925 .RE
3926 .IP
3927 The default value in this file is 0.
3928 Setting the value to 1
3929 prevents a longstanding class of security issues caused by
3930 hard-link-based time-of-check, time-of-use races,
3931 most commonly seen in world-writable directories such as
3932 .IR /tmp .
3933 The common method of exploiting this flaw
3934 is to cross privilege boundaries when following a given hard link
3935 (i.e., a root process follows a hard link created by another user).
3936 Additionally, on systems without separated partitions,
3937 this stops unauthorized users from "pinning" vulnerable set-user-ID and
3938 set-group-ID files against being upgraded by
3939 the administrator, or linking to special files.
3940 .TP
3941 .IR /proc/sys/fs/protected_symlinks " (since Linux 3.6)"
3942 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
3943 When the value in this file is 0,
3944 no restrictions are placed on following symbolic links
3945 (i.e., this is the historical behavior before Linux 3.6).
3946 When the value in this file is 1, symbolic links are followed only
3947 in the following circumstances:
3948 .RS
3949 .IP * 3
3950 the filesystem UID of the process following the link matches
3951 the owner (UID) of the symbolic link
3952 (as described in
3953 .BR credentials (7),
3954 a process's filesystem UID is normally the same as its effective UID);
3955 .IP *
3956 the link is not in a sticky world-writable directory; or
3957 .IP *
3958 the symbolic link and its parent directory have the same owner (UID)
3959 .RE
3960 .IP
3961 A system call that fails to follow a symbolic link
3962 because of the above restrictions returns the error
3963 .BR EACCES
3964 in
3965 .IR errno .
3966 .IP
3967 The default value in this file is 0.
3968 Setting the value to 1 avoids a longstanding class of security issues
3969 based on time-of-check, time-of-use races when accessing symbolic links.
3970 .TP
3971 .IR /proc/sys/fs/suid_dumpable " (since Linux 2.6.13)"
3972 .\" The following is based on text from Documentation/sysctl/kernel.txt
3973 The value in this file is assigned to a process's "dumpable" flag
3974 in the circumstances described in
3975 .BR prctl (2).
3976 In effect,
3977 the value in this file determines whether core dump files are
3978 produced for set-user-ID or otherwise protected/tainted binaries.
3979 Three different integer values can be specified:
3980 .RS
3981 .TP
3982 \fI0\ (default)\fP
3983 This provides the traditional (pre-Linux 2.6.13) behavior.
3984 A core dump will not be produced for a process which has
3985 changed credentials (by calling
3986 .BR seteuid (2),
3987 .BR setgid (2),
3988 or similar, or by executing a set-user-ID or set-group-ID program)
3989 or whose binary does not have read permission enabled.
3990 .TP
3991 \fI1\ ("debug")\fP
3992 All processes dump core when possible.
3993 The core dump is owned by the filesystem user ID of the dumping process
3994 and no security is applied.
3995 This is intended for system debugging situations only.
3996 Ptrace is unchecked.
3997 .TP
3998 \fI2\ ("suidsafe")\fP
3999 Any binary which normally would not be dumped (see "0" above)
4000 is dumped readable by root only.
4001 This allows the user to remove the core dump file but not to read it.
4002 For security reasons core dumps in this mode will not overwrite one
4003 another or other files.
4004 This mode is appropriate when administrators are
4005 attempting to debug problems in a normal environment.
4006 .IP
4007 Additionally, since Linux 3.6,
4008 .\" 9520628e8ceb69fa9a4aee6b57f22675d9e1b709
4009 .I /proc/sys/kernel/core_pattern
4010 must either be an absolute pathname
4011 or a pipe command, as detailed in
4012 .BR core (5).
4013 Warnings will be written to the kernel log if
4014 .I core_pattern
4015 does not follow these rules, and no core dump will be produced.
4016 .\" 54b501992dd2a839e94e76aa392c392b55080ce8
4017 .RE
4018 .TP
4019 .I /proc/sys/fs/super-max
4020 This file
4021 controls the maximum number of superblocks, and
4022 thus the maximum number of mounted filesystems the kernel
4023 can have.
4024 You need increase only
4025 .I super-max
4026 if you need to mount more filesystems than the current value in
4027 .I super-max
4028 allows you to.
4029 .TP
4030 .I /proc/sys/fs/super-nr
4031 This file
4032 contains the number of filesystems currently mounted.
4033 .TP
4034 .I /proc/sys/kernel
4035 This directory contains files controlling a range of kernel parameters,
4036 as described below.
4037 .TP
4038 .I /proc/sys/kernel/acct
4039 This file
4040 contains three numbers:
4041 .IR highwater ,
4042 .IR lowwater ,
4043 and
4044 .IR frequency .
4045 If BSD-style process accounting is enabled, these values control
4046 its behavior.
4047 If free space on filesystem where the log lives goes below
4048 .I lowwater
4049 percent, accounting suspends.
4050 If free space gets above
4051 .I highwater
4052 percent, accounting resumes.
4053 .I frequency
4054 determines
4055 how often the kernel checks the amount of free space (value is in
4056 seconds).
4057 Default values are 4, 2 and 30.
4058 That is, suspend accounting if 2% or less space is free; resume it
4059 if 4% or more space is free; consider information about amount of free space
4060 valid for 30 seconds.
4061 .TP
4062 .IR /proc/sys/kernel/auto_msgmni " (Linux 2.6.27 to 3.18)"
4063 .\" commit 9eefe520c814f6f62c5d36a2ddcd3fb99dfdb30e (introduces feature)
4064 .\" commit 0050ee059f7fc86b1df2527aaa14ed5dc72f9973 (rendered redundant)
4065 From Linux 2.6.27 to 3.18,
4066 this file was used to control recomputing of the value in
4067 .IR /proc/sys/kernel/msgmni
4068 upon the addition or removal of memory or upon IPC namespace creation/removal.
4069 Echoing "1" into this file enabled
4070 .I msgmni
4071 automatic recomputing (and triggered a recomputation of
4072 .I msgmni
4073 based on the current amount of available memory and number of IPC namespaces).
4074 Echoing "0" disabled automatic recomputing.
4075 (Automatic recomputing was also disabled if a value was explicitly assigned to
4076 .IR /proc/sys/kernel/msgmni .)
4077 The default value in
4078 .I auto_msgmni
4079 was 1.
4080
4081 Since Linux 3.19, the content of this file has no effect (because
4082 .IR msgmni
4083 .\" FIXME Must document the 3.19 'msgmni' changes.
4084 defaults to near the maximum value possible),
4085 and reads from this file always return the value "0".
4086 .TP
4087 .IR /proc/sys/kernel/cap_last_cap " (since Linux 3.2)"
4088 See
4089 .BR capabilities (7).
4090 .TP
4091 .IR /proc/sys/kernel/cap-bound " (from Linux 2.2 to 2.6.24)"
4092 This file holds the value of the kernel
4093 .I "capability bounding set"
4094 (expressed as a signed decimal number).
4095 This set is ANDed against the capabilities permitted to a process
4096 during
4097 .BR execve (2).
4098 Starting with Linux 2.6.25,
4099 the system-wide capability bounding set disappeared,
4100 and was replaced by a per-thread bounding set; see
4101 .BR capabilities (7).
4102 .TP
4103 .I /proc/sys/kernel/core_pattern
4104 See
4105 .BR core (5).
4106 .TP
4107 .I /proc/sys/kernel/core_pipe_limit
4108 See
4109 .BR core (5).
4110 .TP
4111 .I /proc/sys/kernel/core_uses_pid
4112 See
4113 .BR core (5).
4114 .TP
4115 .I /proc/sys/kernel/ctrl-alt-del
4116 This file
4117 controls the handling of Ctrl-Alt-Del from the keyboard.
4118 When the value in this file is 0, Ctrl-Alt-Del is trapped and
4119 sent to the
4120 .BR init (1)
4121 program to handle a graceful restart.
4122 When the value is greater than zero, Linux's reaction to a Vulcan
4123 Nerve Pinch (tm) will be an immediate reboot, without even
4124 syncing its dirty buffers.
4125 Note: when a program (like dosemu) has the keyboard in "raw"
4126 mode, the ctrl-alt-del is intercepted by the program before it
4127 ever reaches the kernel tty layer, and it's up to the program
4128 to decide what to do with it.
4129 .TP
4130 .IR /proc/sys/kernel/dmesg_restrict " (since Linux 2.6.37)"
4131 The value in this file determines who can see kernel syslog contents.
4132 A value of 0 in this file imposes no restrictions.
4133 If the value is 1, only privileged users can read the kernel syslog.
4134 (See
4135 .BR syslog (2)
4136 for more details.)
4137 Since Linux 3.4,
4138 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
4139 only users with the
4140 .BR CAP_SYS_ADMIN
4141 capability may change the value in this file.
4142 .TP
4143 .IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname
4144 can be used to set the NIS/YP domainname and the
4145 hostname of your box in exactly the same way as the commands
4146 .BR domainname (1)
4147 and
4148 .BR hostname (1),
4149 that is:
4150
4151 .in +4n
4152 .nf
4153 .RB "#" " echo \(aqdarkstar\(aq > /proc/sys/kernel/hostname"
4154 .RB "#" " echo \(aqmydomain\(aq > /proc/sys/kernel/domainname"
4155 .fi
4156 .in
4157
4158 has the same effect as
4159
4160 .in +4n
4161 .nf
4162 .RB "#" " hostname \(aqdarkstar\(aq"
4163 .RB "#" " domainname \(aqmydomain\(aq"
4164 .fi
4165 .in
4166
4167 Note, however, that the classic darkstar.frop.org has the
4168 hostname "darkstar" and DNS (Internet Domain Name Server)
4169 domainname "frop.org", not to be confused with the NIS (Network
4170 Information Service) or YP (Yellow Pages) domainname.
4171 These two
4172 domain names are in general different.
4173 For a detailed discussion
4174 see the
4175 .BR hostname (1)
4176 man page.
4177 .TP
4178 .I /proc/sys/kernel/hotplug
4179 This file
4180 contains the path for the hotplug policy agent.
4181 The default value in this file is
4182 .IR /sbin/hotplug .
4183 .TP
4184 .I /proc/sys/kernel/htab-reclaim
4185 (PowerPC only) If this file is set to a nonzero value,
4186 the PowerPC htab
4187 (see kernel file
4188 .IR Documentation/powerpc/ppc_htab.txt )
4189 is pruned
4190 each time the system hits the idle loop.
4191 .TP
4192 .IR /proc/sys/kernel/kptr_restrict " (since Linux 2.6.38)"
4193 .\" 455cd5ab305c90ffc422dd2e0fb634730942b257
4194 The value in this file determines whether kernel addresses are exposed via
4195 .I /proc
4196 files and other interfaces.
4197 A value of 0 in this file imposes no restrictions.
4198 If the value is 1, kernel pointers printed using the
4199 .I %pK
4200 format specifier will be replaced with zeros unless the user has the
4201 .BR CAP_SYSLOG
4202 capability.
4203 If the value is 2, kernel pointers printed using the
4204 .I %pK
4205 format specifier will be replaced with zeros regardless
4206 of the user's capabilities.
4207 The initial default value for this file was 1,
4208 but the default was changed
4209 .\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9
4210 to 0 in Linux 2.6.39.
4211 Since Linux 3.4,
4212 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
4213 only users with the
4214 .BR CAP_SYS_ADMIN
4215 capability can change the value in this file.
4216 .TP
4217 .I /proc/sys/kernel/l2cr
4218 (PowerPC only) This file
4219 contains a flag that controls the L2 cache of G3 processor
4220 boards.
4221 If 0, the cache is disabled.
4222 Enabled if nonzero.
4223 .TP
4224 .I /proc/sys/kernel/modprobe
4225 This file contains the path for the kernel module loader.
4226 The default value is
4227 .IR /sbin/modprobe .
4228 The file is present only if the kernel is built with the
4229 .B CONFIG_MODULES
4230 .RB ( CONFIG_KMOD
4231 in Linux 2.6.26 and earlier)
4232 option enabled.
4233 It is described by the Linux kernel source file
4234 .I Documentation/kmod.txt
4235 (present only in kernel 2.4 and earlier).
4236 .TP
4237 .IR /proc/sys/kernel/modules_disabled " (since Linux 2.6.31)"
4238 .\" 3d43321b7015387cfebbe26436d0e9d299162ea1
4239 .\" From Documentation/sysctl/kernel.txt
4240 A toggle value indicating if modules are allowed to be loaded
4241 in an otherwise modular kernel.
4242 This toggle defaults to off (0), but can be set true (1).
4243 Once true, modules can be neither loaded nor unloaded,
4244 and the toggle cannot be set back to false.
4245 The file is present only if the kernel is built with the
4246 .B CONFIG_MODULES
4247 option enabled.
4248 .TP
4249 .IR /proc/sys/kernel/msgmax " (since Linux 2.2)"
4250 This file defines
4251 a system-wide limit specifying the maximum number of bytes in
4252 a single message written on a System V message queue.
4253 .TP
4254 .IR /proc/sys/kernel/msgmni " (since Linux 2.4)"
4255 This file defines the system-wide limit on the number of
4256 message queue identifiers.
4257 See also
4258 .IR /proc/sys/kernel/auto_msgmni .
4259 .TP
4260 .IR /proc/sys/kernel/msgmnb " (since Linux 2.2)"
4261 This file defines a system-wide parameter used to initialize the
4262 .I msg_qbytes
4263 setting for subsequently created message queues.
4264 The
4265 .I msg_qbytes
4266 setting specifies the maximum number of bytes that may be written to the
4267 message queue.
4268 .TP
4269 .IR /proc/sys/kernel/ngroups_max " (since Linux 2.6.4)"
4270 This is a read-only file that displays the upper limit on the
4271 number of a process's group memberships.
4272 .TP
4273 .IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease
4274 These files
4275 give substrings of
4276 .IR /proc/version .
4277 .TP
4278 .IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid
4279 These files duplicate the files
4280 .I /proc/sys/fs/overflowgid
4281 and
4282 .IR /proc/sys/fs/overflowuid .
4283 .TP
4284 .I /proc/sys/kernel/panic
4285 This file gives read/write access to the kernel variable
4286 .IR panic_timeout .
4287 If this is zero, the kernel will loop on a panic; if nonzero,
4288 it indicates that the kernel should autoreboot after this number
4289 of seconds.
4290 When you use the
4291 software watchdog device driver, the recommended setting is 60.
4292 .TP
4293 .IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)"
4294 This file controls the kernel's behavior when an oops
4295 or BUG is encountered.
4296 If this file contains 0, then the system
4297 tries to continue operation.
4298 If it contains 1, then the system
4299 delays a few seconds (to give klogd time to record the oops output)
4300 and then panics.
4301 If the
4302 .I /proc/sys/kernel/panic
4303 file is also nonzero, then the machine will be rebooted.
4304 .TP
4305 .IR /proc/sys/kernel/pid_max " (since Linux 2.5.34)"
4306 This file specifies the value at which PIDs wrap around
4307 (i.e., the value in this file is one greater than the maximum PID).
4308 PIDs greater than this value are not allocated;
4309 thus, the value in this file also acts as a system-wide limit
4310 on the total number of processes and threads.
4311 The default value for this file, 32768,
4312 results in the same range of PIDs as on earlier kernels.
4313 On 32-bit platforms, 32768 is the maximum value for
4314 .IR pid_max .
4315 On 64-bit systems,
4316 .I pid_max
4317 can be set to any value up to 2^22
4318 .RB ( PID_MAX_LIMIT ,
4319 approximately 4 million).
4320 .\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit
4321 .\" platforms, but this broke /proc/[pid]
4322 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
4323 .TP
4324 .IR /proc/sys/kernel/powersave-nap " (PowerPC only)"
4325 This file contains a flag.
4326 If set, Linux-PPC will use the "nap" mode of
4327 powersaving,
4328 otherwise the "doze" mode will be used.
4329 .TP
4330 .I /proc/sys/kernel/printk
4331 See
4332 .BR syslog (2).
4333 .TP
4334 .IR /proc/sys/kernel/pty " (since Linux 2.6.4)"
4335 This directory contains two files relating to the number of UNIX 98
4336 pseudoterminals (see
4337 .BR pts (4))
4338 on the system.
4339 .TP
4340 .I /proc/sys/kernel/pty/max
4341 This file defines the maximum number of pseudoterminals.
4342 .TP
4343 .I /proc/sys/kernel/pty/nr
4344 This read-only file
4345 indicates how many pseudoterminals are currently in use.
4346 .TP
4347 .I /proc/sys/kernel/random
4348 This directory
4349 contains various parameters controlling the operation of the file
4350 .IR /dev/random .
4351 See
4352 .BR random (4)
4353 for further information.
4354 .TP
4355 .IR /proc/sys/kernel/random/uuid " (since Linux 2.4)"
4356 Each read from this read-only file returns a randomly generated 128-bit UUID,
4357 as a string in the standard UUID format.
4358 .TP
4359 .IR /proc/sys/kernel/randomize_va_space " (since Linux 2.6.12)"
4360 .\" Some further details can be found in Documentation/sysctl/kernel.txt
4361 Select the address space layout randomization (ASLR) policy for the system
4362 (on architectures that support ASLR).
4363 Three values are supported for this file:
4364 .RS
4365 .IP 0 3
4366 Turn ASLR off.
4367 This is the default for architectures that don't support ASLR,
4368 and when the kernel is booted with the
4369 .I norandmaps
4370 parameter.
4371 .IP 1
4372 Make the addresses of
4373 .BR mmap (2)
4374 allocations, the stack, and the VDSO page randomized.
4375 Among other things, this means that shared libraries will be
4376 loaded at randomized addresses.
4377 The text segment of PIE-linked binaries will also be loaded
4378 at a randomized address.
4379 This value is the default if the kernel was configured with
4380 .BR CONFIG_COMPAT_BRK .
4381 .IP 2
4382 (Since Linux 2.6.25)
4383 .\" commit c1d171a002942ea2d93b4fbd0c9583c56fce0772
4384 Also support heap randomization.
4385 This value is the default if the kernel was not configured with
4386 .BR CONFIG_COMPAT_BRK .
4387 .RE
4388 .TP
4389 .I /proc/sys/kernel/real-root-dev
4390 This file is documented in the Linux kernel source file
4391 .IR Documentation/initrd.txt .
4392 .TP
4393 .IR /proc/sys/kernel/reboot-cmd " (Sparc only) "
4394 This file seems to be a way to give an argument to the SPARC
4395 ROM/Flash boot loader.
4396 Maybe to tell it what to do after
4397 rebooting?
4398 .TP
4399 .I /proc/sys/kernel/rtsig-max
4400 (Only in kernels up to and including 2.6.7; see
4401 .BR setrlimit (2))
4402 This file can be used to tune the maximum number
4403 of POSIX real-time (queued) signals that can be outstanding
4404 in the system.
4405 .TP
4406 .I /proc/sys/kernel/rtsig-nr
4407 (Only in kernels up to and including 2.6.7.)
4408 This file shows the number POSIX real-time signals currently queued.
4409 .TP
4410 .IR /proc/sys/kernel/sched_rr_timeslice_ms " (since Linux 3.9)"
4411 See
4412 .BR sched_rr_get_interval (2).
4413 .TP
4414 .IR /proc/sys/kernel/sched_rt_period_us " (Since Linux 2.6.25)"
4415 See
4416 .BR sched (7).
4417 .TP
4418 .IR /proc/sys/kernel/sched_rt_runtime_us " (Since Linux 2.6.25)"
4419 See
4420 .BR sched (7).
4421 .TP
4422 .IR /proc/sys/kernel/sem " (since Linux 2.4)"
4423 This file contains 4 numbers defining limits for System V IPC semaphores.
4424 These fields are, in order:
4425 .RS
4426 .IP SEMMSL 8
4427 The maximum semaphores per semaphore set.
4428 .IP SEMMNS 8
4429 A system-wide limit on the number of semaphores in all semaphore sets.
4430 .IP SEMOPM 8
4431 The maximum number of operations that may be specified in a
4432 .BR semop (2)
4433 call.
4434 .IP SEMMNI 8
4435 A system-wide limit on the maximum number of semaphore identifiers.
4436 .RE
4437 .TP
4438 .I /proc/sys/kernel/sg-big-buff
4439 This file
4440 shows the size of the generic SCSI device (sg) buffer.
4441 You can't tune it just yet, but you could change it at
4442 compile time by editing
4443 .I include/scsi/sg.h
4444 and changing
4445 the value of
4446 .BR SG_BIG_BUFF .
4447 However, there shouldn't be any reason to change this value.
4448 .TP
4449 .IR /proc/sys/kernel/shm_rmid_forced " (since Linux 3.1)"
4450 .\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53
4451 .\" See also Documentation/sysctl/kernel.txt
4452 If this file is set to 1, all System V shared memory segments will
4453 be marked for destruction as soon as the number of attached processes
4454 falls to zero;
4455 in other words, it is no longer possible to create shared memory segments
4456 that exist independently of any attached process.
4457 .IP
4458 The effect is as though a
4459 .BR shmctl (2)
4460 .B IPC_RMID
4461 is performed on all existing segments as well as all segments
4462 created in the future (until this file is reset to 0).
4463 Note that existing segments that are attached to no process will be
4464 immediately destroyed when this file is set to 1.
4465 Setting this option will also destroy segments that were created,
4466 but never attached,
4467 upon termination of the process that created the segment with
4468 .BR shmget (2).
4469 .IP
4470 Setting this file to 1 provides a way of ensuring that
4471 all System V shared memory segments are counted against the
4472 resource usage and resource limits (see the description of
4473 .B RLIMIT_AS
4474 in
4475 .BR getrlimit (2))
4476 of at least one process.
4477 .IP
4478 Because setting this file to 1 produces behavior that is nonstandard
4479 and could also break existing applications,
4480 the default value in this file is 0.
4481 Only set this file to 1 if you have a good understanding
4482 of the semantics of the applications using
4483 System V shared memory on your system.
4484 .TP
4485 .IR /proc/sys/kernel/shmall " (since Linux 2.2)"
4486 This file
4487 contains the system-wide limit on the total number of pages of
4488 System V shared memory.
4489 .TP
4490 .IR /proc/sys/kernel/shmmax " (since Linux 2.2)"
4491 This file
4492 can be used to query and set the run-time limit
4493 on the maximum (System V IPC) shared memory segment size that can be
4494 created.
4495 Shared memory segments up to 1GB are now supported in the
4496 kernel.
4497 This value defaults to
4498 .BR SHMMAX .
4499 .TP
4500 .IR /proc/sys/kernel/shmmni " (since Linux 2.4)"
4501 This file
4502 specifies the system-wide maximum number of System V shared memory
4503 segments that can be created.
4504 .TP
4505 .IR /proc/sys/kernel/sysctl_writes_strict " (since Linux 3.16)"
4506 .\" commit f88083005ab319abba5d0b2e4e997558245493c8
4507 .\" commit 2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92
4508 .\" commit f4aacea2f5d1a5f7e3154e967d70cf3f711bcd61
4509 .\" commit 24fe831c17ab8149413874f2fd4e5c8a41fcd294
4510 The value in this file determines how the file offset affects
4511 the behavior of updating entries in files under
4512 .IR /proc/sys .
4513 The file has three possible values:
4514 .RS
4515 .TP 4
4516 \-1
4517 This provides legacy handling, with no printk warnings.
4518 Each
4519 .BR write (2)
4520 must fully contain the value to be written,
4521 and multiple writes on the same file descriptor
4522 will overwrite the entire value, regardless of the file position.
4523 .TP
4524 0
4525 (default) This provides the same behavior as for \-1,
4526 but printk warnings are written for processes that
4527 perform writes when the file offset is not 0.
4528 .TP
4529 1
4530 Respect the file offset when writing strings into
4531 .I /proc/sys
4532 files.
4533 Multiple writes will
4534 .I append
4535 to the value buffer.
4536 Anything written beyond the maximum length
4537 of the value buffer will be ignored.
4538 Writes to numeric
4539 .I /proc/sys
4540 entries must always be at file offset 0 and the value must be
4541 fully contained in the buffer provided to
4542 .BR write (2).
4543 .\" FIXME .
4544 .\" With /proc/sys/kernel/sysctl_writes_strict==1, writes at an
4545 .\" offset other than 0 do not generate an error. Instead, the
4546 .\" write() succeeds, but the file is left unmodified.
4547 .\" This is surprising. The behavior may change in the future.
4548 .\" See thread.gmane.org/gmane.linux.man/9197
4549 .\" From: Michael Kerrisk (man-pages <mtk.manpages@...>
4550 .\" Subject: sysctl_writes_strict documentation + an oddity?
4551 .\" Newsgroups: gmane.linux.man, gmane.linux.kernel
4552 .\" Date: 2015-05-09 08:54:11 GMT
4553 .RE
4554 .TP
4555 .I /proc/sys/kernel/sysrq
4556 This file controls the functions allowed to be invoked by the SysRq key.
4557 By default,
4558 the file contains 1 meaning that every possible SysRq request is allowed
4559 (in older kernel versions, SysRq was disabled by default,
4560 and you were required to specifically enable it at run-time,
4561 but this is not the case any more).
4562 Possible values in this file are:
4563 .RS
4564 .TP 5
4565 0
4566 Disable sysrq completely
4567 .TP
4568 1
4569 Enable all functions of sysrq
4570 .TP
4571 > 1
4572 Bit mask of allowed sysrq functions, as follows:
4573 .PD 0
4574 .RS
4575 .TP 5
4576 \ \ 2
4577 Enable control of console logging level
4578 .TP
4579 \ \ 4
4580 Enable control of keyboard (SAK, unraw)
4581 .TP
4582 \ \ 8
4583 Enable debugging dumps of processes etc.
4584 .TP
4585 \ 16
4586 Enable sync command
4587 .TP
4588 \ 32
4589 Enable remount read-only
4590 .TP
4591 \ 64
4592 Enable signaling of processes (term, kill, oom-kill)
4593 .TP
4594 128
4595 Allow reboot/poweroff
4596 .TP
4597 256
4598 Allow nicing of all real-time tasks
4599 .RE
4600 .PD
4601 .RE
4602 .IP
4603 This file is present only if the
4604 .B CONFIG_MAGIC_SYSRQ
4605 kernel configuration option is enabled.
4606 For further details see the Linux kernel source file
4607 .IR Documentation/sysrq.txt .
4608 .TP
4609 .I /proc/sys/kernel/version
4610 This file contains a string such as:
4611
4612 #5 Wed Feb 25 21:49:24 MET 1998
4613
4614 The "#5" means that
4615 this is the fifth kernel built from this source base and the
4616 date following it indicates the time the kernel was built.
4617 .TP
4618 .IR /proc/sys/kernel/threads-max " (since Linux 2.3.11)"
4619 .\" The following is based on Documentation/sysctl/kernel.txt
4620 This file specifies the system-wide limit on the number of
4621 threads (tasks) that can be created on the system.
4622
4623 Since Linux 4.1,
4624 .\" commit 230633d109e35b0a24277498e773edeb79b4a331
4625 the value that can be written to
4626 .I threads-max
4627 is bounded.
4628 The minimum value that can be written is 20.
4629 The maximum value that can be written is given by the
4630 constant
4631 .B FUTEX_TID_MASK
4632 (0x3fffffff).
4633 If a value outside of this range is written to
4634 .IR threads-max ,
4635 the error
4636 .B EINVAL
4637 occurs.
4638
4639 The value written is checked against the available RAM pages.
4640 If the thread structures would occupy too much (more than 1/8th)
4641 of the available RAM pages,
4642 .I threads-max
4643 is reduced accordingly.
4644 .TP
4645 .IR /proc/sys/kernel/yama/ptrace_scope " (since Linux 3.5)"
4646 See
4647 .BR ptrace (2).
4648 .TP
4649 .IR /proc/sys/kernel/zero-paged " (PowerPC only) "
4650 This file
4651 contains a flag.
4652 When enabled (nonzero), Linux-PPC will pre-zero pages in
4653 the idle loop, possibly speeding up get_free_pages.
4654 .TP
4655 .I /proc/sys/net
4656 This directory contains networking stuff.
4657 Explanations for some of the files under this directory can be found in
4658 .BR tcp (7)
4659 and
4660 .BR ip (7).
4661 .TP
4662 .B /proc/sys/net/core/bpf_jit_enable
4663 See
4664 .BR bpf (2).
4665 .TP
4666 .I /proc/sys/net/core/somaxconn
4667 This file defines a ceiling value for the
4668 .I backlog
4669 argument of
4670 .BR listen (2);
4671 see the
4672 .BR listen (2)
4673 manual page for details.
4674 .TP
4675 .I /proc/sys/proc
4676 This directory may be empty.
4677 .TP
4678 .I /proc/sys/sunrpc
4679 This directory supports Sun remote procedure call for network filesystem
4680 (NFS).
4681 On some systems, it is not present.
4682 .TP
4683 .I /proc/sys/vm
4684 This directory contains files for memory management tuning, buffer and
4685 cache management.
4686 .TP
4687 .IR /proc/sys/vm/compact_memory " (since Linux 2.6.35)"
4688 When 1 is written to this file, all zones are compacted such that free
4689 memory is available in contiguous blocks where possible.
4690 The effect of this action can be seen by examining
4691 .IR /proc/buddyinfo .
4692 .IP
4693 Only present if the kernel was configured with
4694 .BR CONFIG_COMPACTION .
4695 .TP
4696 .IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)"
4697 Writing to this file causes the kernel to drop clean caches, dentries, and
4698 inodes from memory, causing that memory to become free.
4699 This can be useful for memory management testing and
4700 performing reproducible filesystem benchmarks.
4701 Because writing to this file causes the benefits of caching to be lost,
4702 it can degrade overall system performance.
4703
4704 To free pagecache, use:
4705
4706 echo 1 > /proc/sys/vm/drop_caches
4707
4708 To free dentries and inodes, use:
4709
4710 echo 2 > /proc/sys/vm/drop_caches
4711
4712 To free pagecache, dentries and inodes, use:
4713
4714 echo 3 > /proc/sys/vm/drop_caches
4715
4716 Because writing to this file is a nondestructive operation and dirty objects
4717 are not freeable, the
4718 user should run
4719 .BR sync (1)
4720 first.
4721 .TP
4722 .IR /proc/sys/vm/legacy_va_layout " (since Linux 2.6.9)"
4723 .\" The following is from Documentation/filesystems/proc.txt
4724 If nonzero, this disables the new 32-bit memory-mapping layout;
4725 the kernel will use the legacy (2.4) layout for all processes.
4726 .TP
4727 .IR /proc/sys/vm/memory_failure_early_kill " (since Linux 2.6.32)"
4728 .\" The following is based on the text in Documentation/sysctl/vm.txt
4729 Control how to kill processes when an uncorrected memory error
4730 (typically a 2-bit error in a memory module)
4731 that cannot be handled by the kernel
4732 is detected in the background by hardware.
4733 In some cases (like the page still having a valid copy on disk),
4734 the kernel will handle the failure
4735 transparently without affecting any applications.
4736 But if there is no other up-to-date copy of the data,
4737 it will kill processes to prevent any data corruptions from propagating.
4738
4739 The file has one of the following values:
4740 .RS
4741 .IP 1: 4
4742 Kill all processes that have the corrupted-and-not-reloadable page mapped
4743 as soon as the corruption is detected.
4744 Note this is not supported for a few types of pages, like kernel internally
4745 allocated data or the swap cache, but works for the majority of user pages.
4746 .IP 0: 4
4747 Only unmap the corrupted page from all processes and kill only a process
4748 that tries to access it.
4749 .RE
4750 .IP
4751 The kill is performed using a
4752 .B SIGBUS
4753 signal with
4754 .I si_code
4755 set to
4756 .BR BUS_MCEERR_AO .
4757 Processes can handle this if they want to; see
4758 .BR sigaction (2)
4759 for more details.
4760
4761 This feature is active only on architectures/platforms with advanced machine
4762 check handling and depends on the hardware capabilities.
4763
4764 Applications can override the
4765 .I memory_failure_early_kill
4766 setting individually with the
4767 .BR prctl (2)
4768 .B PR_MCE_KILL
4769 operation.
4770 .IP
4771 Only present if the kernel was configured with
4772 .BR CONFIG_MEMORY_FAILURE .
4773 .TP
4774 .IR /proc/sys/vm/memory_failure_recovery " (since Linux 2.6.32)"
4775 .\" The following is based on the text in Documentation/sysctl/vm.txt
4776 Enable memory failure recovery (when supported by the platform)
4777 .RS
4778 .IP 1: 4
4779 Attempt recovery.
4780 .IP 0: 4
4781 Always panic on a memory failure.
4782 .RE
4783 .IP
4784 Only present if the kernel was configured with
4785 .BR CONFIG_MEMORY_FAILURE .
4786 .TP
4787 .IR /proc/sys/vm/oom_dump_tasks " (since Linux 2.6.25)"
4788 .\" The following is from Documentation/sysctl/vm.txt
4789 Enables a system-wide task dump (excluding kernel threads) to be
4790 produced when the kernel performs an OOM-killing.
4791 The dump includes the following information
4792 for each task (thread, process):
4793 thread ID, real user ID, thread group ID (process ID),
4794 virtual memory size, resident set size,
4795 the CPU that the task is scheduled on,
4796 oom_adj score (see the description of
4797 .IR /proc/[pid]/oom_adj ),
4798 and command name.
4799 This is helpful to determine why the OOM-killer was invoked
4800 and to identify the rogue task that caused it.
4801
4802 If this contains the value zero, this information is suppressed.
4803 On very large systems with thousands of tasks,
4804 it may not be feasible to dump the memory state information for each one.
4805 Such systems should not be forced to incur a performance penalty in
4806 OOM situations when the information may not be desired.
4807
4808 If this is set to nonzero, this information is shown whenever the
4809 OOM-killer actually kills a memory-hogging task.
4810
4811 The default value is 0.
4812 .TP
4813 .IR /proc/sys/vm/oom_kill_allocating_task " (since Linux 2.6.24)"
4814 .\" The following is from Documentation/sysctl/vm.txt
4815 This enables or disables killing the OOM-triggering task in
4816 out-of-memory situations.
4817
4818 If this is set to zero, the OOM-killer will scan through the entire
4819 tasklist and select a task based on heuristics to kill.
4820 This normally selects a rogue memory-hogging task that
4821 frees up a large amount of memory when killed.
4822
4823 If this is set to nonzero, the OOM-killer simply kills the task that
4824 triggered the out-of-memory condition.
4825 This avoids a possibly expensive tasklist scan.
4826
4827 If
4828 .I /proc/sys/vm/panic_on_oom
4829 is nonzero, it takes precedence over whatever value is used in
4830 .IR /proc/sys/vm/oom_kill_allocating_task .
4831
4832 The default value is 0.
4833 .TP
4834 .IR /proc/sys/vm/overcommit_kbytes " (since Linux 3.14)"
4835 .\" commit 49f0ce5f92321cdcf741e35f385669a421013cb7
4836 This writable file provides an alternative to
4837 .IR /proc/sys/vm/overcommit_ratio
4838 for controlling the
4839 .I CommitLimit
4840 when
4841 .IR /proc/sys/vm/overcommit_memory
4842 has the value 2.
4843 It allows the amount of memory overcommitting to be specified as
4844 an absolute value (in kB),
4845 rather than as a percentage, as is done with
4846 .IR overcommit_ratio .
4847 This allows for finer-grained control of
4848 .IR CommitLimit
4849 on systems with extremely large memory sizes.
4850
4851 Only one of
4852 .IR overcommit_kbytes
4853 or
4854 .IR overcommit_ratio
4855 can have an effect:
4856 if
4857 .IR overcommit_kbytes
4858 has a nonzero value, then it is used to calculate
4859 .IR CommitLimit ,
4860 otherwise
4861 .IR overcommit_ratio
4862 is used.
4863 Writing a value to either of these files causes the
4864 value in the other file to be set to zero.
4865 .TP
4866 .I /proc/sys/vm/overcommit_memory
4867 This file contains the kernel virtual memory accounting mode.
4868 Values are:
4869 .RS
4870 .IP
4871 0: heuristic overcommit (this is the default)
4872 .br
4873 1: always overcommit, never check
4874 .br
4875 2: always check, never overcommit
4876 .RE
4877 .IP
4878 In mode 0, calls of
4879 .BR mmap (2)
4880 with
4881 .B MAP_NORESERVE
4882 are not checked, and the default check is very weak,
4883 leading to the risk of getting a process "OOM-killed".
4884 Under Linux 2.4, any nonzero value implies mode 1.
4885
4886 In mode 2 (available since Linux 2.6), the total virtual address space
4887 that can be allocated
4888 .RI ( CommitLimit
4889 in
4890 .IR /proc/meminfo )
4891 is calculated as
4892
4893 CommitLimit = (total_RAM - total_huge_TLB) *
4894 overcommit_ratio / 100 + total_swap
4895
4896 where:
4897 .RS 12
4898 .IP * 3
4899 .I total_RAM
4900 is the total amount of RAM on the system;
4901 .IP *
4902 .I total_huge_TLB
4903 is the amount of memory set aside for huge pages;
4904 .IP *
4905 .I overcommit_ratio
4906 is the value in
4907 .IR /proc/sys/vm/overcommit_ratio ;
4908 and
4909 .IP *
4910 .I total_swap
4911 is the amount of swap space.
4912 .RE
4913 .IP
4914 For example, on a system with 16GB of physical RAM, 16GB
4915 of swap, no space dedicated to huge pages, and an
4916 .I overcommit_ratio
4917 of 50, this formula yields a
4918 .I CommitLimit
4919 of 24GB.
4920
4921 Since Linux 3.14, if the value in
4922 .I /proc/sys/vm/overcommit_kbytes
4923 is nonzero, then
4924 .I CommitLimit
4925 is instead calculated as:
4926
4927 CommitLimit = overcommit_kbytes + total_swap
4928 .TP
4929 .IR /proc/sys/vm/overcommit_ratio " (since Linux 2.6.0)"
4930 This writable file defines a percentage by which memory
4931 can be overcommitted.
4932 The default value in the file is 50.
4933 See the description of
4934 .IR /proc/sys/vm/overcommit_memory .
4935 .TP
4936 .IR /proc/sys/vm/panic_on_oom " (since Linux 2.6.18)"
4937 .\" The following is adapted from Documentation/sysctl/vm.txt
4938 This enables or disables a kernel panic in
4939 an out-of-memory situation.
4940
4941 If this file is set to the value 0,
4942 the kernel's OOM-killer will kill some rogue process.
4943 Usually, the OOM-killer is able to kill a rogue process and the
4944 system will survive.
4945
4946 If this file is set to the value 1,
4947 then the kernel normally panics when out-of-memory happens.
4948 However, if a process limits allocations to certain nodes
4949 using memory policies
4950 .RB ( mbind (2)
4951 .BR MPOL_BIND )
4952 or cpusets
4953 .RB ( cpuset (7))
4954 and those nodes reach memory exhaustion status,
4955 one process may be killed by the OOM-killer.
4956 No panic occurs in this case:
4957 because other nodes' memory may be free,
4958 this means the system as a whole may not have reached
4959 an out-of-memory situation yet.
4960
4961 If this file is set to the value 2,
4962 the kernel always panics when an out-of-memory condition occurs.
4963
4964 The default value is 0.
4965 1 and 2 are for failover of clustering.
4966 Select either according to your policy of failover.
4967 .TP
4968 .IR /proc/sys/vm/swappiness
4969 .\" The following is from Documentation/sysctl/vm.txt
4970 The value in this file controls how aggressively the kernel will swap
4971 memory pages.
4972 Higher values increase aggressiveness, lower values
4973 decrease aggressiveness.
4974 The default value is 60.
4975 .TP
4976 .IR /proc/sysrq-trigger " (since Linux 2.4.21)"
4977 Writing a character to this file triggers the same SysRq function as
4978 typing ALT-SysRq-<character> (see the description of
4979 .IR /proc/sys/kernel/sysrq ).
4980 This file is normally writable only by
4981 .IR root .
4982 For further details see the Linux kernel source file
4983 .IR Documentation/sysrq.txt .
4984 .TP
4985 .I /proc/sysvipc
4986 Subdirectory containing the pseudo-files
4987 .IR msg ", " sem " and " shm "."
4988 These files list the System V Interprocess Communication (IPC) objects
4989 (respectively: message queues, semaphores, and shared memory)
4990 that currently exist on the system,
4991 providing similar information to that available via
4992 .BR ipcs (1).
4993 These files have headers and are formatted (one IPC object per line)
4994 for easy understanding.
4995 .BR svipc (7)
4996 provides further background on the information shown by these files.
4997 .TP
4998 .IR /proc/thread-self " (since Linux 3.17)"
4999 .\" commit 0097875bd41528922fb3bb5f348c53f17e00e2fd
5000 This directory refers to the thread accessing the
5001 .I /proc
5002 filesystem,
5003 and is identical to the
5004 .I /proc/self/task/[tid]
5005 directory named by the process thread ID
5006 .RI ( [tid] )
5007 of the same thread.
5008 .TP
5009 .IR /proc/timer_list " (since Linux 2.6.21)"
5010 .\" commit 289f480af87e45f7a6de6ba9b4c061c2e259fe98
5011 This read-only file exposes a list of all currently pending
5012 (high-resolution) timers,
5013 all clock-event sources, and their parameters in a human-readable form.
5014 .TP
5015 .IR /proc/timer_stats " (since Linux 2.6.21)"
5016 .\" commit 82f67cd9fca8c8762c15ba7ed0d5747588c1e221
5017 .\" Date: Fri Feb 16 01:28:13 2007 -0800
5018 .\" Text largely derived from Documentation/timers/timer_stats.txt
5019 This is a debugging facility to make timer (ab)use in a Linux
5020 system visible to kernel and user-space developers.
5021 It can be used by kernel and user-space developers to verify that
5022 their code does not make undue use of timers.
5023 The goal is to avoid unnecessary wakeups,
5024 thereby optimizing power consumption.
5025
5026 If enabled in the kernel
5027 .RB ( CONFIG_TIMER_STATS ),
5028 but not used,
5029 it has almost zero runtime overhead and a relatively small
5030 data-structure overhead.
5031 Even if collection is enabled at runtime, overhead is low:
5032 all the locking is per-CPU and lookup is hashed.
5033
5034 The
5035 .I /proc/timer_stats
5036 file is used both to control sampling facility and to read out the
5037 sampled information.
5038
5039 The timer_stats functionality is inactive on bootup.
5040 A sampling period can be started using the following command:
5041
5042 # echo 1 > /proc/timer_stats
5043
5044 The following command stops a sampling period:
5045
5046 # echo 0 > /proc/timer_stats
5047
5048 The statistics can be retrieved by:
5049
5050 $ cat /proc/timer_stats
5051
5052 While sampling is enabled, each readout from
5053 .I /proc/timer_stats
5054 will see
5055 newly updated statistics.
5056 Once sampling is disabled, the sampled information
5057 is kept until a new sample period is started.
5058 This allows multiple readouts.
5059
5060 Sample output from
5061 .IR /proc/timer_stats :
5062
5063 .nf
5064 .RS -4
5065 .RB $ " cat /proc/timer_stats"
5066 Timer Stats Version: v0.3
5067 Sample period: 1.764 s
5068 Collection: active
5069 255, 0 swapper/3 hrtimer_start_range_ns (tick_sched_timer)
5070 71, 0 swapper/1 hrtimer_start_range_ns (tick_sched_timer)
5071 58, 0 swapper/0 hrtimer_start_range_ns (tick_sched_timer)
5072 4, 1694 gnome-shell mod_delayed_work_on (delayed_work_timer_fn)
5073 17, 7 rcu_sched rcu_gp_kthread (process_timeout)
5074 \&...
5075 1, 4911 kworker/u16:0 mod_delayed_work_on (delayed_work_timer_fn)
5076 1D, 2522 kworker/0:0 queue_delayed_work_on (delayed_work_timer_fn)
5077 1029 total events, 583.333 events/sec
5078 .fi
5079 .RE
5080 .IP
5081 The output columns are:
5082 .RS
5083 .IP * 3
5084 a count of the number of events,
5085 optionally (since Linux 2.6.23) followed by the letter \(aqD\(aq
5086 .\" commit c5c061b8f9726bc2c25e19dec227933a13d1e6b7 deferrable timers
5087 if this is a deferrable timer;
5088 .IP *
5089 the PID of the process that initialized the timer;
5090 .IP *
5091 the name of the process that initialized the timer;
5092 .IP *
5093 the function where the timer was initialized; and
5094 .IP *
5095 (in parentheses)
5096 the callback function that is associated with the timer.
5097 .RE
5098 .TP
5099 .I /proc/tty
5100 Subdirectory containing the pseudo-files and subdirectories for
5101 tty drivers and line disciplines.
5102 .TP
5103 .I /proc/uptime
5104 This file contains two numbers: the uptime of the system (seconds),
5105 and the amount of time spent in idle process (seconds).
5106 .TP
5107 .I /proc/version
5108 This string identifies the kernel version that is currently running.
5109 It includes the contents of
5110 .IR /proc/sys/kernel/ostype ,
5111 .I /proc/sys/kernel/osrelease
5112 and
5113 .IR /proc/sys/kernel/version .
5114 For example:
5115 .nf
5116 .in -2
5117 .ft CW
5118 Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994
5119 .ft
5120 .in +2
5121 .fi
5122 .\" FIXME 2.6.13 seems to have /proc/vmcore implemented; document this
5123 .\" See Documentation/kdump/kdump.txt
5124 .\" commit 666bfddbe8b8fd4fd44617d6c55193d5ac7edb29
5125 .\" Needs CONFIG_VMCORE
5126 .\"
5127 .TP
5128 .IR /proc/vmstat " (since Linux 2.6.0)"
5129 This file displays various virtual memory statistics.
5130 Each line of this file contains a single name-value pair,
5131 delimited by white space.
5132 Some files are present only if the kernel was configured with
5133 suitable options.
5134 (In some cases, the options required for particular files have changed
5135 across kernel versions, so they are not listed here.
5136 Details can be found by consulting the kernel source code.)
5137 The following fields may be present:
5138 .\" FIXME We need explanations for each of these fields...
5139 .RS
5140 .TP
5141 .IR nr_free_pages " (since Linux 2.6.31)"
5142 .\" commit d23ad42324cc4378132e51f2fc5c9ba6cbe75182
5143 .TP
5144 .IR nr_alloc_batch " (since Linux 3.12)"
5145 .\" commit 81c0a2bb515fd4daae8cab64352877480792b515
5146 .TP
5147 .IR nr_inactive_anon " (since Linux 2.6.28)"
5148 .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
5149 .TP
5150 .IR nr_active_anon " (since Linux 2.6.28)"
5151 .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
5152 .TP
5153 .IR nr_inactive_file " (since Linux 2.6.28)"
5154 .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
5155 .TP
5156 .IR nr_active_file " (since Linux 2.6.28)"
5157 .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db
5158 .TP
5159 .IR nr_unevictable " (since Linux 2.6.28)"
5160 .\" commit 7b854121eb3e5ba0241882ff939e2c485228c9c5
5161 .TP
5162 .IR nr_mlock " (since Linux 2.6.28)"
5163 .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
5164 .TP
5165 .IR nr_anon_pages " (since Linux 2.6.18)"
5166 .\" commit f3dbd34460ff54962d3e3244b6bcb7f5295356e6
5167 .TP
5168 .IR nr_mapped " (since Linux 2.6.0)"
5169 .TP
5170 .IR nr_file_pages " (since Linux 2.6.18)"
5171 .\" commit 347ce434d57da80fd5809c0c836f206a50999c26
5172 .TP
5173 .IR nr_dirty " (since Linux 2.6.0)"
5174 .TP
5175 .IR nr_writeback " (since Linux 2.6.0)"
5176 .TP
5177 .IR nr_slab_reclaimable " (since Linux 2.6.19)"
5178 .\" commit 972d1a7b140569084439a81265a0f15b74e924e0
5179 .\" Linux 2.6.0 had nr_slab
5180 .TP
5181 .IR nr_slab_unreclaimable " (since Linux 2.6.19)"
5182 .\" commit 972d1a7b140569084439a81265a0f15b74e924e0
5183 .TP
5184 .IR nr_page_table_pages " (since Linux 2.6.0)"
5185 .TP
5186 .IR nr_kernel_stack " (since Linux 2.6.32)"
5187 .\" commit c6a7f5728a1db45d30df55a01adc130b4ab0327c
5188 Amount of memory allocated to kernel stacks.
5189 .TP
5190 .IR nr_unstable " (since Linux 2.6.0)"
5191 .TP
5192 .IR nr_bounce " (since Linux 2.6.12)"
5193 .\" commit edfbe2b0038723e5699ab22695ccd62b5542a5c1
5194 .TP
5195 .IR nr_vmscan_write " (since Linux 2.6.19)"
5196 .\" commit e129b5c23c2b471d47f1c5d2b8b193fc2034af43
5197 .TP
5198 .IR nr_vmscan_immediate_reclaim " (since Linux 3.2)"
5199 .\" commit 49ea7eb65e7c5060807fb9312b1ad4c3eab82e2c
5200 .TP
5201 .IR nr_writeback_temp " (since Linux 2.6.26)"
5202 .\" commit fc3ba692a4d19019387c5acaea63131f9eab05dd
5203 .TP
5204 .IR nr_isolated_anon " (since Linux 2.6.32)"
5205 .\" commit a731286de62294b63d8ceb3c5914ac52cc17e690
5206 .TP
5207 .IR nr_isolated_file " (since Linux 2.6.32)"
5208 .\" commit a731286de62294b63d8ceb3c5914ac52cc17e690
5209 .TP
5210 .IR nr_shmem " (since Linux 2.6.32)"
5211 .\" commit 4b02108ac1b3354a22b0d83c684797692efdc395
5212 Pages used by shmem and tmpfs.
5213 .TP
5214 .IR nr_dirtied " (since Linux 2.6.37)"
5215 .\" commit ea941f0e2a8c02ae876cd73deb4e1557248f258c
5216 .TP
5217 .IR nr_written " (since Linux 2.6.37)"
5218 .\" commit ea941f0e2a8c02ae876cd73deb4e1557248f258c
5219 .TP
5220 .IR nr_pages_scanned " (since Linux 3.17)"
5221 .\" commit 0d5d823ab4e608ec7b52ac4410de4cb74bbe0edd
5222 .TP
5223 .IR numa_hit " (since Linux 2.6.18)"
5224 .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
5225 .\" Present only if the kernel was configured with
5226 .\" .BR CONFIG_NUMA .
5227 .TP
5228 .IR numa_miss " (since Linux 2.6.18)"
5229 .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
5230 .\" Present only if the kernel was configured with
5231 .\" .BR CONFIG_NUMA .
5232 .TP
5233 .IR numa_foreign " (since Linux 2.6.18)"
5234 .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
5235 .\" Present only if the kernel was configured with
5236 .\" .BR CONFIG_NUMA .
5237 .TP
5238 .IR numa_interleave " (since Linux 2.6.18)"
5239 .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
5240 .\" Present only if the kernel was configured with
5241 .\" .BR CONFIG_NUMA .
5242 .TP
5243 .IR numa_local " (since Linux 2.6.18)"
5244 .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
5245 .\" Present only if the kernel was configured with
5246 .\" .BR CONFIG_NUMA .
5247 .TP
5248 .IR numa_other " (since Linux 2.6.18)"
5249 .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5
5250 .\" Present only if the kernel was configured with
5251 .\" .BR CONFIG_NUMA .
5252 .TP
5253 .IR workingset_refault " (since Linux 3.15)"
5254 .\" commit a528910e12ec7ee203095eb1711468a66b9b60b0
5255 .\" Present only if the kernel was configured with
5256 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5257 .TP
5258 .IR workingset_activate " (since Linux 3.15)"
5259 .\" commit a528910e12ec7ee203095eb1711468a66b9b60b0
5260 .\" Present only if the kernel was configured with
5261 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5262 .TP
5263 .IR workingset_nodereclaim " (since Linux 3.15)"
5264 .\" commit 449dd6984d0e47643c04c807f609dd56d48d5bcc
5265 .\" Present only if the kernel was configured with
5266 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5267 .TP
5268 .IR nr_anon_transparent_hugepages " (since Linux 2.6.38)"
5269 .\" Present only if the kernel was configured with
5270 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5271 .TP
5272 .IR nr_free_cma " (since Linux 3.7)"
5273 .\" commit d1ce749a0db12202b711d1aba1d29e823034648d
5274 Number of free CMA (Contiguous Memory Allocator) pages.
5275 .\" Present only if the kernel was configured with
5276 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5277 .TP
5278 .IR nr_dirty_threshold " (since Linux 2.6.37)"
5279 .\" commit 79da826aee6a10902ef411bc65864bd02102fa83
5280 .\" Present only if the kernel was configured with
5281 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5282 .TP
5283 .IR nr_dirty_background_threshold " (since Linux 2.6.37)"
5284 .\" commit 79da826aee6a10902ef411bc65864bd02102fa83
5285 .\" Present only if the kernel was configured with
5286 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5287 .TP
5288 .IR pgpgin " (since Linux 2.6.0)"
5289 .\" Present only if the kernel was configured with
5290 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5291 .TP
5292 .IR pgpgout " (since Linux 2.6.0)"
5293 .\" Present only if the kernel was configured with
5294 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5295 .TP
5296 .IR pswpin " (since Linux 2.6.0)"
5297 .\" Present only if the kernel was configured with
5298 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5299 .TP
5300 .IR pswpout " (since Linux 2.6.0)"
5301 .\" Present only if the kernel was configured with
5302 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5303 .TP
5304 .IR pgalloc_dma " (since Linux 2.6.5)"
5305 .\" Linux 2.6.0 had pgalloc
5306 .\" Present only if the kernel was configured with
5307 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5308 .TP
5309 .IR pgalloc_dma32 " (since Linux 2.6.16)"
5310 .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
5311 .\" Present only if the kernel was configured with
5312 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5313 .TP
5314 .IR pgalloc_normal " (since Linux 2.6.5)"
5315 .\" Present only if the kernel was configured with
5316 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5317 .TP
5318 .IR pgalloc_high " (since Linux 2.6.5)"
5319 .\" Present only if the kernel was configured with
5320 .\" .BR CONFIG_VM_EVENT_COUNTERS
5321 .\" and
5322 .\" .BR CONFIG_HIGHMEM .
5323 .TP
5324 .IR pgalloc_movable " (since Linux 2.6.23)"
5325 .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
5326 .\" Present only if the kernel was configured with
5327 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5328 .TP
5329 .IR pgfree " (since Linux 2.6.0)"
5330 .\" Present only if the kernel was configured with
5331 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5332 .TP
5333 .IR pgactivate " (since Linux 2.6.0)"
5334 .\" Present only if the kernel was configured with
5335 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5336 .TP
5337 .IR pgdeactivate " (since Linux 2.6.0)"
5338 .\" Present only if the kernel was configured with
5339 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5340 .TP
5341 .IR pgfault " (since Linux 2.6.0)"
5342 .\" Present only if the kernel was configured with
5343 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5344 .TP
5345 .IR pgmajfault " (since Linux 2.6.0)"
5346 .\" Present only if the kernel was configured with
5347 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5348 .TP
5349 .IR pgrefill_dma " (since Linux 2.6.5)"
5350 .\" Linux 2.6.0 had pgrefill
5351 .\" Present only if the kernel was configured with
5352 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5353 .TP
5354 .IR pgrefill_dma32 " (since Linux 2.6.16)"
5355 .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
5356 .\" Present only if the kernel was configured with
5357 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5358 .TP
5359 .IR pgrefill_normal " (since Linux 2.6.5)"
5360 .\" Present only if the kernel was configured with
5361 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5362 .TP
5363 .IR pgrefill_high " (since Linux 2.6.5)"
5364 .\" Present only if the kernel was configured with
5365 .\" .BR CONFIG_VM_EVENT_COUNTERS
5366 .\" and
5367 .\" .BR CONFIG_HIGHMEM .
5368 .TP
5369 .IR pgrefill_movable " (since Linux 2.6.23)"
5370 .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
5371 .\" Present only if the kernel was configured with
5372 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5373 .\" Formerly there were
5374 .\" pgsteal_high
5375 .\" pgsteal_normal
5376 .\" pgsteal_dma32
5377 .\" pgsteal_dma
5378 .\" These were split out into pgsteal_kswapd* and pgsteal_direct*
5379 .\" in commit 904249aa68010c8e223263c922fcbb840a3f42e4
5380 .TP
5381 .IR pgsteal_kswapd_dma " (since Linux 3.4)"
5382 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5383 .\" Linux 2.6.0 had pgsteal
5384 .\" Present only if the kernel was configured with
5385 .\" .\" .BR CONFIG_VM_EVENT_COUNTERS .
5386 .TP
5387 .IR pgsteal_kswapd_dma32 " (since Linux 3.4)"
5388 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5389 .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
5390 .\" Present only if the kernel was configured with
5391 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5392 .TP
5393 .IR pgsteal_kswapd_normal " (since Linux 3.4)"
5394 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5395 .\" Present only if the kernel was configured with
5396 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5397 .TP
5398 .IR pgsteal_kswapd_high " (since Linux 3.4)"
5399 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5400 .\" Present only if the kernel was configured with
5401 .\" .BR CONFIG_VM_EVENT_COUNTERS
5402 .\" and
5403 .\" .BR CONFIG_HIGHMEM .
5404 .TP
5405 .IR pgsteal_kswapd_movable " (since Linux 3.4)"
5406 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5407 .\" Present only if the kernel was configured with
5408 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5409 .TP
5410 .IR pgsteal_direct_dma
5411 .\" Present only if the kernel was configured with
5412 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5413 .TP
5414 .IR pgsteal_direct_dma32 " (since Linux 3.4)"
5415 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5416 .\" Present only if the kernel was configured with
5417 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5418 .TP
5419 .IR pgsteal_direct_normal " (since Linux 3.4)"
5420 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5421 .\" Present only if the kernel was configured with
5422 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5423 .TP
5424 .IR pgsteal_direct_high " (since Linux 3.4)"
5425 .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4
5426 .\" Present only if the kernel was configured with
5427 .\" .BR CONFIG_VM_EVENT_COUNTERS
5428 .\" and
5429 .\" .BR CONFIG_HIGHMEM .
5430 .TP
5431 .IR pgsteal_direct_movable " (since Linux 2.6.23)"
5432 .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
5433 .\" Present only if the kernel was configured with
5434 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5435 .TP
5436 .IR pgscan_kswapd_dma
5437 .\" Linux 2.6.0 had pgscan
5438 .\" Present only if the kernel was configured with
5439 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5440 .TP
5441 .IR pgscan_kswapd_dma32 " (since Linux 2.6.16)"
5442 .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
5443 .\" Present only if the kernel was configured with
5444 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5445 .TP
5446 .IR pgscan_kswapd_normal " (since Linux 2.6.5)"
5447 .\" Present only if the kernel was configured with
5448 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5449 .TP
5450 .IR pgscan_kswapd_high
5451 .\" Present only if the kernel was configured with
5452 .\" .BR CONFIG_VM_EVENT_COUNTERS
5453 .\" and
5454 .\" .BR CONFIG_HIGHMEM .
5455 .TP
5456 .IR pgscan_kswapd_movable " (since Linux 2.6.23)"
5457 .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
5458 .\" Present only if the kernel was configured with
5459 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5460 .TP
5461 .IR pgscan_direct_dma
5462 .\" Present only if the kernel was configured with
5463 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5464 .TP
5465 .IR pgscan_direct_dma32 " (since Linux 2.6.16)"
5466 .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e
5467 .\" Present only if the kernel was configured with
5468 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5469 .TP
5470 .IR pgscan_direct_normal
5471 .\" Present only if the kernel was configured with
5472 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5473 .TP
5474 .IR pgscan_direct_high
5475 .\" Present only if the kernel was configured with
5476 .\" .BR CONFIG_VM_EVENT_COUNTERS
5477 .\" and
5478 .\" .BR CONFIG_HIGHMEM .
5479 .TP
5480 .IR pgscan_direct_movable " (since Linux 2.6.23)"
5481 .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf
5482 .\" Present only if the kernel was configured with
5483 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5484 .TP
5485 .IR pgscan_direct_throttle " (since Linux 3.6)"
5486 .\" commit 68243e76ee343d63c6cf76978588a885951e2818
5487 .\" Present only if the kernel was configured with
5488 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5489 .TP
5490 .IR zone_reclaim_failed " (since linux 2.6.31)"
5491 .\" commit 24cf72518c79cdcda486ed26074ff8151291cf65
5492 .\" Present only if the kernel was configured with
5493 .\" .BR CONFIG_VM_EVENT_COUNTERS
5494 .\" and
5495 .\" .BR CONFIG_NUMA .
5496 .TP
5497 .IR pginodesteal " (since linux 2.6.0)"
5498 .\" Present only if the kernel was configured with
5499 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5500 .TP
5501 .IR slabs_scanned " (since linux 2.6.5)"
5502 .\" Present only if the kernel was configured with
5503 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5504 .TP
5505 .IR kswapd_inodesteal " (since linux 2.6.0)"
5506 .\" Present only if the kernel was configured with
5507 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5508 .TP
5509 .IR kswapd_low_wmark_hit_quickly " (since 2.6.33)"
5510 .\" commit bb3ab596832b920c703d1aea1ce76d69c0f71fb7
5511 .\" Present only if the kernel was configured with
5512 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5513 .TP
5514 .IR kswapd_high_wmark_hit_quickly " (since 2.6.33)"
5515 .\" commit bb3ab596832b920c703d1aea1ce76d69c0f71fb7
5516 .\" Present only if the kernel was configured with
5517 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5518 .TP
5519 .IR pageoutrun " (since Linux 2.6.0)"
5520 .\" Present only if the kernel was configured with
5521 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5522 .TP
5523 .IR allocstall " (since Linux 2.6.0)"
5524 .\" Present only if the kernel was configured with
5525 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5526 .TP
5527 .IR pgrotated " (since Linux 2.6.0)"
5528 .\" Present only if the kernel was configured with
5529 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5530 .TP
5531 .IR drop_pagecache " (since Linux 3.15)"
5532 .\" commit 5509a5d27b971a90b940e148ca9ca53312e4fa7a
5533 .\" Present only if the kernel was configured with
5534 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5535 .TP
5536 .IR drop_slab " (since Linux 3.15)"
5537 .\" commit 5509a5d27b971a90b940e148ca9ca53312e4fa7a
5538 .\" Present only if the kernel was configured with
5539 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5540 .TP
5541 .IR numa_pte_updates " (since Linux 3.8)"
5542 .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
5543 .\" Present only if the kernel was configured with
5544 .\" .BR CONFIG_VM_EVENT_COUNTERS
5545 .\" and
5546 .\" .BR CONFIG_NUMA_BALANCING .
5547 .TP
5548 .IR numa_huge_pte_updates " (since Linux 3.13)"
5549 .\" commit 72403b4a0fbdf433c1fe0127e49864658f6f6468
5550 .\" Present only if the kernel was configured with
5551 .\" .BR CONFIG_VM_EVENT_COUNTERS
5552 .\" and
5553 .\" .BR CONFIG_NUMA_BALANCING .
5554 .TP
5555 .IR numa_hint_faults " (since Linux 3.8)"
5556 .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
5557 .\" Present only if the kernel was configured with
5558 .\" .BR CONFIG_VM_EVENT_COUNTERS
5559 .\" and
5560 .\" .BR CONFIG_NUMA_BALANCING .
5561 .TP
5562 .IR numa_hint_faults_local " (since Linux 3.8)"
5563 .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
5564 .\" Present only if the kernel was configured with
5565 .\" .BR CONFIG_VM_EVENT_COUNTERS
5566 .\" and
5567 .\" .BR CONFIG_NUMA_BALANCING .
5568 .TP
5569 .IR numa_pages_migrated " (since Linux 3.8)"
5570 .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f
5571 .\" Present only if the kernel was configured with
5572 .\" .BR CONFIG_VM_EVENT_COUNTERS
5573 .\" and
5574 .\" .BR CONFIG_NUMA_BALANCING
5575 .\" and
5576 .\" .BR CONFIG_NUMA_BALANCING .
5577 .TP
5578 .IR pgmigrate_success " (since Linux 3.8)"
5579 .\" commit 5647bc293ab15f66a7b1cda850c5e9d162a6c7c2
5580 .\" Present only if the kernel was configured with
5581 .\" .BR CONFIG_VM_EVENT_COUNTERS
5582 .\" and
5583 .\" .BR CONFIG_MIGRATION .
5584 .TP
5585 .IR pgmigrate_fail " (since Linux 3.8)"
5586 .\" commit 5647bc293ab15f66a7b1cda850c5e9d162a6c7c2
5587 .\" Present only if the kernel was configured with
5588 .\" .BR CONFIG_VM_EVENT_COUNTERS
5589 .\" and
5590 .\" .BR CONFIG_MIGRATION .
5591 .TP
5592 .IR compact_migrate_scanned " (since Linux 3.8)"
5593 .\" commit 397487db696cae0b026a474a5cd66f4e372995e6
5594 .\" Linux 3.8 dropped compact_blocks_moved, compact_pages_moved, and
5595 .\" compact_pagemigrate_failed
5596 .\" Present only if the kernel was configured with
5597 .\" .BR CONFIG_VM_EVENT_COUNTERS
5598 .\" and
5599 .\" .BR CONFIG_COMPACTION .
5600 .TP
5601 .IR compact_free_scanned " (since Linux 3.8)"
5602 .\" commit 397487db696cae0b026a474a5cd66f4e372995e6
5603 .\" Present only if the kernel was configured with
5604 .\" .BR CONFIG_VM_EVENT_COUNTERS
5605 .\" and
5606 .\" .BR CONFIG_COMPACTION .
5607 .TP
5608 .IR compact_isolated " (since Linux 3.8)"
5609 .\" commit 397487db696cae0b026a474a5cd66f4e372995e6
5610 .\" Present only if the kernel was configured with
5611 .\" .BR CONFIG_VM_EVENT_COUNTERS
5612 .\" and
5613 .\" .BR CONFIG_COMPACTION .
5614 .TP
5615 .IR compact_stall " (since Linux 2.6.35)"
5616 .\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
5617 See the kernel source file
5618 .IR Documentation/vm/transhuge.txt .
5619 .\" Present only if the kernel was configured with
5620 .\" .BR CONFIG_VM_EVENT_COUNTERS
5621 .\" and
5622 .\" .BR CONFIG_COMPACTION .
5623 .TP
5624 .IR compact_fail " (since Linux 2.6.35)"
5625 .\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
5626 See the kernel source file
5627 .IR Documentation/vm/transhuge.txt .
5628 .\" Present only if the kernel was configured with
5629 .\" .BR CONFIG_VM_EVENT_COUNTERS
5630 .\" and
5631 .\" .BR CONFIG_COMPACTION .
5632 .TP
5633 .IR compact_success " (since Linux 2.6.35)"
5634 .\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
5635 See the kernel source file
5636 .IR Documentation/vm/transhuge.txt .
5637 .\" Present only if the kernel was configured with
5638 .\" .BR CONFIG_VM_EVENT_COUNTERS
5639 .\" and
5640 .\" .BR CONFIG_COMPACTION .
5641 .TP
5642 .IR htlb_buddy_alloc_success " (since Linux 2.6.26)"
5643 .\" commit 3b1163006332302117b1b2acf226d4014ff46525
5644 .\" Present only if the kernel was configured with
5645 .\" .BR CONFIG_VM_EVENT_COUNTERS
5646 .\" and
5647 .\" .BR CONFIG_HUGETLB_PAGE .
5648 .TP
5649 .IR htlb_buddy_alloc_fail " (since Linux 2.6.26)"
5650 .\" commit 3b1163006332302117b1b2acf226d4014ff46525
5651 .\" Present only if the kernel was configured with
5652 .\" .BR CONFIG_VM_EVENT_COUNTERS
5653 .\" and
5654 .\" .BR CONFIG_HUGETLB_PAGE .
5655 .TP
5656 .IR unevictable_pgs_culled " (since Linux 2.6.28)"
5657 .\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa
5658 .\" Present only if the kernel was configured with
5659 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5660 .TP
5661 .IR unevictable_pgs_scanned " (since Linux 2.6.28)"
5662 .\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa
5663 .\" Present only if the kernel was configured with
5664 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5665 .TP
5666 .IR unevictable_pgs_rescued " (since Linux 2.6.28)"
5667 .\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa
5668 .\" Present only if the kernel was configured with
5669 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5670 .TP
5671 .IR unevictable_pgs_mlocked " (since Linux 2.6.28)"
5672 .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
5673 .\" Present only if the kernel was configured with
5674 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5675 .TP
5676 .IR unevictable_pgs_munlocked " (since Linux 2.6.28)"
5677 .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
5678 .\" Present only if the kernel was configured with
5679 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5680 .TP
5681 .IR unevictable_pgs_cleared " (since Linux 2.6.28)"
5682 .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
5683 .\" Present only if the kernel was configured with
5684 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5685 .TP
5686 .IR unevictable_pgs_stranded " (since Linux 2.6.28)"
5687 .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820
5688 .\" Present only if the kernel was configured with
5689 .\" .BR CONFIG_VM_EVENT_COUNTERS .
5690 .\" Linux 3.7 removed unevictable_pgs_mlockfreed
5691 .TP
5692 .IR thp_fault_alloc " (since Linux 2.6.39)"
5693 .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
5694 See the kernel source file
5695 .IR Documentation/vm/transhuge.txt .
5696 .\" Present only if the kernel was configured with
5697 .\" .BR CONFIG_VM_EVENT_COUNTERS
5698 .\" and
5699 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5700 .TP
5701 .IR thp_fault_fallback " (since Linux 2.6.39)"
5702 .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
5703 See the kernel source file
5704 .IR Documentation/vm/transhuge.txt .
5705 .\" Present only if the kernel was configured with
5706 .\" .BR CONFIG_VM_EVENT_COUNTERS
5707 .\" and
5708 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5709 .TP
5710 .IR thp_collapse_alloc " (since Linux 2.6.39)"
5711 .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
5712 See the kernel source file
5713 .IR Documentation/vm/transhuge.txt .
5714 .\" Present only if the kernel was configured with
5715 .\" .BR CONFIG_VM_EVENT_COUNTERS
5716 .\" and
5717 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5718 .TP
5719 .IR thp_collapse_alloc_failed " (since Linux 2.6.39)"
5720 .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
5721 See the kernel source file
5722 .IR Documentation/vm/transhuge.txt .
5723 .\" Present only if the kernel was configured with
5724 .\" .BR CONFIG_VM_EVENT_COUNTERS
5725 .\" and
5726 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5727 .TP
5728 .IR thp_split " (since Linux 2.6.39)"
5729 .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145
5730 See the kernel source file
5731 .IR Documentation/vm/transhuge.txt .
5732 .\" Present only if the kernel was configured with
5733 .\" .BR CONFIG_VM_EVENT_COUNTERS
5734 .\" and
5735 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5736 .TP
5737 .IR thp_zero_page_alloc " (since Linux 3.8)"
5738 .\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76
5739 See the kernel source file
5740 .IR Documentation/vm/transhuge.txt .
5741 .\" Present only if the kernel was configured with
5742 .\" .BR CONFIG_VM_EVENT_COUNTERS
5743 .\" and
5744 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5745 .TP
5746 .IR thp_zero_page_alloc_failed " (since Linux 3.8)"
5747 .\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76
5748 See the kernel source file
5749 .IR Documentation/vm/transhuge.txt .
5750 .\" Present only if the kernel was configured with
5751 .\" .BR CONFIG_VM_EVENT_COUNTERS
5752 .\" and
5753 .\" .BR CONFIG_TRANSPARENT_HUGEPAGE .
5754 .TP
5755 .IR balloon_inflate " (since Linux 3.18)"
5756 .\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938
5757 .\" Present only if the kernel was configured with
5758 .\" .BR CONFIG_VM_EVENT_COUNTERS
5759 .\" and
5760 .\" .BR CONFIG_MEMORY_BALLOON .
5761 .TP
5762 .IR balloon_deflate " (since Linux 3.18)"
5763 .\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938
5764 .\" Present only if the kernel was configured with
5765 .\" .BR CONFIG_VM_EVENT_COUNTERS
5766 .\" and
5767 .\" .BR CONFIG_MEMORY_BALLOON .
5768 .TP
5769 .IR balloon_migrate " (since Linux 3.18)"
5770 .\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938
5771 .\" Present only if the kernel was configured with
5772 .\" .BR CONFIG_VM_EVENT_COUNTERS ,
5773 .\" .BR CONFIG_MEMORY_BALLOON ,
5774 .\" and
5775 .\" .BR CONFIG_BALLOON_COMPACTION .
5776 .TP
5777 .IR nr_tlb_remote_flush " (since Linux 3.12)"
5778 .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
5779 .\" Present only if the kernel was configured with
5780 .\" .BR CONFIG_DEBUG_TLBFLUSH
5781 .\" and
5782 .\" .BR CONFIG_SMP .
5783 .TP
5784 .IR nr_tlb_remote_flush_received " (since Linux 3.12)"
5785 .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
5786 .\" Present only if the kernel was configured with
5787 .\" .BR CONFIG_DEBUG_TLBFLUSH
5788 .\" and
5789 .\" .BR CONFIG_SMP .
5790 .TP
5791 .IR nr_tlb_local_flush_all " (since Linux 3.12)"
5792 .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
5793 .\" Present only if the kernel was configured with
5794 .\" .BR CONFIG_DEBUG_TLBFLUSH .
5795 .TP
5796 .IR nr_tlb_local_flush_one " (since Linux 3.12)"
5797 .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211
5798 .\" Present only if the kernel was configured with
5799 .\" .BR CONFIG_DEBUG_TLBFLUSH .
5800 .TP
5801 .IR vmacache_find_calls " (since Linux 3.16)"
5802 .\" commit 4f115147ff802267d0aa41e361c5aa5bd933d896
5803 .\" Present only if the kernel was configured with
5804 .\" .BR CONFIG_DEBUG_VM_VMACACHE .
5805 .TP
5806 .IR vmacache_find_hits " (since Linux 3.16)"
5807 .\" commit 4f115147ff802267d0aa41e361c5aa5bd933d896
5808 .\" Present only if the kernel was configured with
5809 .\" .BR CONFIG_DEBUG_VM_VMACACHE .
5810 .TP
5811 .IR vmacache_full_flushes " (since Linux 3.19)"
5812 .\" commit f5f302e21257ebb0c074bbafc37606c26d28cc3d
5813 .\" Present only if the kernel was configured with
5814 .\" .BR CONFIG_DEBUG_VM_VMACACHE .
5815 .RE
5816 .TP
5817 .IR /proc/zoneinfo " (since Linux 2.6.13)"
5818 This file display information about memory zones.
5819 This is useful for analyzing virtual memory behavior.
5820 .\" FIXME more should be said about /proc/zoneinfo
5821 .SH NOTES
5822 Many strings (i.e., the environment and command line) are in
5823 the internal format, with subfields terminated by null bytes (\(aq\\0\(aq),
5824 so you
5825 may find that things are more readable if you use \fIod \-c\fP or \fItr
5826 "\\000" "\\n"\fP to read them.
5827 Alternatively, \fIecho \`cat <file>\`\fP works well.
5828
5829 This manual page is incomplete, possibly inaccurate, and is the kind
5830 of thing that needs to be updated very often.
5831 .\" .SH ACKNOWLEDGEMENTS
5832 .\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on
5833 .\" kernel source documentation files written by Rik van Riel.
5834 .SH SEE ALSO
5835 .BR cat (1),
5836 .BR dmesg (1),
5837 .BR find (1),
5838 .BR free (1),
5839 .BR init (1),
5840 .BR ps (1),
5841 .BR tr (1),
5842 .BR uptime (1),
5843 .BR chroot (2),
5844 .BR mmap (2),
5845 .BR readlink (2),
5846 .BR syslog (2),
5847 .BR slabinfo (5),
5848 .BR hier (7),
5849 .BR namespaces (7),
5850 .BR time (7),
5851 .BR arp (8),
5852 .BR hdparm (8),
5853 .BR ifconfig (8),
5854 .BR lsmod (8),
5855 .BR lspci (8),
5856 .BR mount (8),
5857 .BR netstat (8),
5858 .BR procinfo (8),
5859 .BR route (8),
5860 .BR sysctl (8)
5861
5862 The Linux kernel source files:
5863 .IR Documentation/filesystems/proc.txt
5864 .IR Documentation/sysctl/fs.txt ,
5865 .IR Documentation/sysctl/kernel.txt ,
5866 .IR Documentation/sysctl/net.txt ,
5867 and
5868 .IR Documentation/sysctl/vm.txt .