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