]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
proc.5: Update /proc/PID/stat 'state' field documentation
[thirdparty/man-pages.git] / man5 / proc.5
CommitLineData
fea681da 1.\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com)
b4e9ee8f 2.\" and Copyright (C) 2002-2008 Michael Kerrisk <mtk.manpages@gmail.com>
fea681da
MK
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
c11b1abf 7.\" Michael Kerrisk <mtk.manpages@gmail.com>
fea681da 8.\"
1dd72f9c 9.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
fea681da
MK
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
c715f741
MK
26.\" License along with this manual; if not, see
27.\" <http://www.gnu.org/licenses/>.
6a8d8745 28.\" %%%LICENSE_END
fea681da
MK
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
c11b1abf 36.\" by Michael Kerrisk <mtk.manpages@gmail.com>
5d6d14a0
MK
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
568105c6
MK
39.\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list
40.\" 2005-05-12, mtk, updated 'stat'
6d64ca9c 41.\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/*
363f747c
MK
42.\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable
43.\" 2005-09-19, mtk, added /proc/zoneinfo
b4e9ee8f 44.\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7.
69119dc7
MK
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.
cc2d5c36 49.\" 2008-07-15, mtk, added /proc/config.gz
363f747c 50.\"
c533af9d 51.\" FIXME 2.6.13 seems to have /proc/vmcore implemented
c13182ef
MK
52.\" in the source code, but there is no option available under
53.\" 'make xconfig'; eventually this should be fixed, and then info
54.\" from the patch-2.6.13 and change log could be used to write an
c533af9d 55.\" entry in this man page.
cc2d5c36 56.\" Needs CONFIG_VMCORE
8cf9de1b 57.\"
c13182ef
MK
58.\" FIXME cross check against Documentation/filesystems/proc.txt
59.\" to see what information could be imported from that file
c533af9d 60.\" into this file.
fea681da 61.\"
c77eace5 62.TH PROC 5 2014-07-08 "Linux" "Linux Programmer's Manual"
fea681da 63.SH NAME
9ee4a2b6 64proc \- process information pseudo-filesystem
fea681da
MK
65.SH DESCRIPTION
66The
67.I proc
ac8727b6 68filesystem is a pseudo-filesystem which provides an interface to
c13182ef
MK
69kernel data structures.
70It is commonly mounted at
fea681da 71.IR /proc .
c13182ef 72Most of it is read-only, but some files allow kernel variables to be
fea681da
MK
73changed.
74.LP
ac8727b6 75The following list describes many of the files and directories under the
743638fd
MK
76.I /proc
77hierarchy.
fea681da
MK
78.PD 1
79.TP
69119dc7 80.I /proc/[pid]
fea681da
MK
81There is a numerical subdirectory for each running process; the
82subdirectory is named by the process ID.
83Each such subdirectory contains the following
84pseudo-files and directories.
69119dc7 85.\" FIXME Describe /proc/[pid]/attr and
b3fb99e8
MK
86.\" /proc/[pid]/task/[tid]/attr
87.\" This is a directory
88.\" Added in 2.6.0
89.\" CONFIG_SECURITY
90.\" https://lwn.net/Articles/28222/
91.\" http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml
92.\"
93.\" fscreate, current, prev, and exec present in Linux 2.6.0
94.\" keycreate added in Linux 2.6.18
95.\" commit 4eb582cf1fbd7b9e5f466e3718a59c957e75254e
96.\" /Documentation/keys.txt
97.\" sockcreate added in Linux 2.6.18
98.\" commit 42c3e03ef6b298813557cdb997bd6db619cd65a2
99.\"
100.\" FIXME Describe /proc/[pid]/autogroup
101.\" 2.6.38
102.\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a
103.\" CONFIG_SCHED_AUTOGROUP
b4e9ee8f 104.\"
fea681da 105.TP
69119dc7 106.IR /proc/[pid]/auxv " (since 2.6.0-test7)"
857f1942 107This contains the contents of the ELF interpreter information passed
c13182ef 108to the process at exec time.
857f1942 109The format is one \fIunsigned long\fP ID
c13182ef 110plus one \fIunsigned long\fP value for each entry.
857f1942 111The last entry contains two zeros.
4c69c692
MK
112See also
113.BR getauxval (3).
b5d204d0 114.TP
8d708d6b 115.IR /proc/[pid]/cgroup " (since Linux 2.6.24)"
b5d204d0
MK
116.\" Info in Documentation/cgroups/cgroups.txt
117This file describes control groups to which the process/task belongs.
118For each cgroup hierarchy there is one entry containing
119colon-separated fields of the form:
120.nf
121.ft CW
122
123 5:cpuacct,cpu,cpuset:/daemons
124.ft
125.fi
126.IP
127The colon-separated fields are, from left to right:
128.RS 11
129.IP 1. 3
130hierarchy ID number
131.IP 2.
132set of subsystems bound to the hierarchy
133.IP 3.
134control group in the hierarchy to which the process belongs
135.RE
136.IP
90878f7c 137This file is present only if the
b5d204d0
MK
138.B CONFIG_CGROUPS
139kernel configuration option is enabled.
76e0451c
MK
140.TP
141.IR /proc/[pid]/clear_refs " (since Linux 2.6.22)"
142.\" commit b813e931b4c8235bb42e301096ea97dbdee3e8fe (2.6.22)
143.\" commit 398499d5f3613c47f2143b8c54a04efb5d7a6da9 (2.6.32)
144.\" commit 040fa02077de01c7e08fa75be6125e4ca5636011 (3.11)
b4e9ee8f 145.\"
b4e9ee8f 146.\" "Clears page referenced bits shown in smaps output"
76e0451c
MK
147.\" write-only, writable only by the owner of the process
148
149This is a write-only file, writable only by owner of the process.
150
151The following values may be written to the file:
152.RS
153.TP
1541 (since Linux 2.6.22)
155.\" Internally: CLEAR_REFS_ALL
156Reset the PG_Referenced and ACCESSED/YOUNG
157bits for all the pages associated with the process.
158(Before kernel 2.6.32, writing any nonzero value to this file
159had this effect.)
160.TP
1612 (since Linux 2.6.32)
162.\" Internally: CLEAR_REFS_ANON
163Reset the PG_Referenced and ACCESSED/YOUNG
164bits for all anonymous pages associated with the process.
165.TP
1663 (since Linux 2.6.32)
167.\" Internally: CLEAR_REFS_MAPPED
168Reset the PG_Referenced and ACCESSED/YOUNG
169bits for all file-mapped pages associated with the process.
170.RE
171.IP
172Clearing the PG_Referenced and ACCESSED/YOUNG bits provides a method
173to measure approximately how much memory a process is using.
322d49fb 174One first inspects the values in the "Referenced" fields
76e0451c
MK
175for the VMAs shown in
176.IR /proc/[pid]/smaps
177to get an idea of the memory footprint of the
178process.
179One then clears the PG_Referenced and ACCESSED/YOUNG bits
180and, after some measured time interval,
322d49fb 181once again inspects the values in the "Referenced" fields
76e0451c
MK
182to get an idea of the change in memory footprint of the
183process during the measured interval.
184If one is interested only in inspecting the selected mapping types,
185then the value 2 or 3 can be used instead of 1.
186
187A further value can be written to affect a different bit:
188.RS
189.TP
1904 (since Linux 3.11)
191Clear the soft-dirty bit for all the pages associated with the process.
192.\" Internally: CLEAR_REFS_SOFT_DIRTY
193This is used (in conjunction with
194.IR /proc/[pid]/pagemap )
195by the check-point restore system to discover which pages of a process
196have been dirtied since the file
197.IR /proc/[pid]/clear_refs
198was written to.
199.RE
200.IP
201Writing any value to
202.IR /proc/[pid]/clear_refs
203other than those listed above has no effect.
204
205The
206.IR /proc/[pid]/clear_refs
207file is present only if the
208.B CONFIG_PROC_PAGE_MONITOR
209kernel configuration option is enabled.
857f1942 210.TP
69119dc7 211.I /proc/[pid]/cmdline
6975c16e 212This read-only file holds the complete command line for the process,
b447cd58
MK
213unless the process is a zombie.
214.\" In 2.3.26, this also used to be true if the process was swapped out.
215In the latter case, there is nothing in this file:
75b94dc3 216that is, a read on this file will return 0 characters.
b447cd58 217The command-line arguments appear in this file as a set of
6596d270
MK
218strings separated by null bytes (\(aq\\0\(aq),
219with a further null byte after the last string.
32d7ef00
MK
220.TP
221.IR /proc/[pid]/comm " (since Linux 2.6.33)"
222.\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
223This file exposes the process's
224.I comm
225value\(emthat is, the command name associated with the process.
226Different threads in the same process may have different
227.I comm
228values, accessible via
229.IR /proc/[pid]/task/[tid]/comm .
230A thread may modify its
231.I comm
232value, or that of any of other thread in the same thread group (see
233the discussion of
234.B CLONE_THREAD
235in
236.BR clone (2)),
237by writing to the file
238.IR /proc/self/task/[tid]/comm .
239Strings longer than
240.B TASK_COMM_LEN
241(16) characters are silently truncated.
242
243This file provides a superset of the
244.BR prctl (2)
245.B PR_SET_NAME
246and
247.B PR_GET_NAME
248operations, and is employed by
249.BR pthread_setname_np (3)
250when used to rename threads other than the caller.
fea681da 251.TP
69119dc7 252.IR /proc/[pid]/coredump_filter " (since kernel 2.6.23)"
b4e9ee8f
MK
253See
254.BR core (5).
5c411b17 255.TP
69119dc7 256.IR /proc/[pid]/cpuset " (since kernel 2.6.12)"
b3fb99e8 257.\" and /proc/[pid]/task/[tid]/cpuset
5c411b17
MK
258See
259.BR cpuset (7).
b4e9ee8f 260.TP
69119dc7 261.I /proc/[pid]/cwd
c13182ef 262This is a symbolic link to the current working directory of the process.
59a40ed7
MK
263To find out the current working directory of process 20,
264for instance, you can do this:
fea681da 265
59a40ed7 266.in +4n
fea681da 267.nf
b43a3b30 268.RB "$" " cd /proc/20/cwd; /bin/pwd"
fea681da 269.fi
59a40ed7 270.in
fea681da 271
c13182ef
MK
272Note that the
273.I pwd
e7b489f0 274command is often a shell built-in, and might
c13182ef 275not work properly.
743638fd
MK
276In
277.BR bash (1),
278you may use
279.IR "pwd\ \-P" .
afcaf646
MK
280
281.\" The following was still true as at kernel 2.6.13
c13182ef
MK
282In a multithreaded process, the contents of this symbolic link
283are not available if the main thread has already terminated
afcaf646 284(typically by calling
59a40ed7 285.BR pthread_exit (3)).
fea681da 286.TP
69119dc7 287.I /proc/[pid]/environ
fea681da 288This file contains the environment for the process.
f81fb444 289The entries are separated by null bytes (\(aq\\0\(aq),
b4e9ee8f 290and there may be a null byte at the end.
fea681da 291Thus, to print out the environment of process 1, you would do:
a08ea57c 292.in +4n
fea681da 293.nf
a08ea57c 294
fea681da 295.ft CW
13912780 296.RB "$" " strings /proc/1/environ"
fea681da
MK
297.fi
298.ft P
a08ea57c 299.in
fea681da 300.TP
69119dc7 301.I /proc/[pid]/exe
fea681da 302Under Linux 2.2 and later, this file is a symbolic link
2d7195b8 303containing the actual pathname of the executed command.
c13182ef
MK
304This symbolic link can be dereferenced normally; attempting to open
305it will open the executable.
306You can even type
69119dc7 307.I /proc/[pid]/exe
c13182ef 308to run another copy of the same executable as is being run by
69119dc7 309process [pid].
afcaf646 310.\" The following was still true as at kernel 2.6.13
c13182ef
MK
311In a multithreaded process, the contents of this symbolic link
312are not available if the main thread has already terminated
afcaf646
MK
313(typically by calling
314.BR pthread_exit (3)).
fea681da 315
eb9a0b2f 316Under Linux 2.0 and earlier,
69119dc7 317.I /proc/[pid]/exe
c13182ef
MK
318is a pointer to the binary which was executed,
319and appears as a symbolic link.
320A
fea681da
MK
321.BR readlink (2)
322call on this file under Linux 2.0 returns a string in the format:
323
59a40ed7 324 [device]:inode
fea681da
MK
325
326For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
327MFM, etc. drives) minor 01 (first partition on the first drive).
328
329.BR find (1)
59a40ed7
MK
330with the
331.I \-inum
332option can be used to locate the file.
fea681da 333.TP
d4529654 334.I /proc/[pid]/fd/
fea681da
MK
335This is a subdirectory containing one entry for each file which the
336process has open, named by its file descriptor, and which is a
c13182ef 337symbolic link to the actual file.
f78ed33a 338Thus, 0 is standard input, 1 standard output, 2 standard error, and so on.
fea681da 339
f75715e0
MK
340For file descriptors for pipes and sockets,
341the entries will be symbolic links whose content is the
342file type with the inode.
d4529654
MF
343A
344.BR readlink (2)
345call on this file returns a string in the format:
f75715e0 346
d4529654 347 type:[inode]
f75715e0
MK
348
349For example,
350.I socket:[2248868]
351will be a socket and its inode is 2248868.
352For sockets, that inode can be used to find more information
353in one of the files under
d4529654
MF
354.IR /proc/net/ .
355
2b7a2ac5
MK
356For file descriptors that have no corresponding inode
357(e.g., file descriptors produced by
358.BR epoll_create (2),
359.BR eventfd (2),
360.BR inotify_init (2),
361.BR signalfd (2),
362and
363.BR timerfd (2)),
364the entry will be a symbolic link with contents of the form
365
366 anon_inode:<file-type>
367
368In some cases, the
369.I file-type
370is surrounded by square brackets.
371
372For example, an epoll file descriptor will have a symbolic link
373whose content is the string
374.IR "anon_inode:[eventpoll]" .
375
d4529654 376.\"The following was still true as at kernel 2.6.13
afcaf646 377In a multithreaded process, the contents of this directory
c13182ef 378are not available if the main thread has already terminated
afcaf646
MK
379(typically by calling
380.BR pthread_exit (3)).
381
59a40ed7
MK
382Programs that will take a filename as a command-line argument,
383but will not take input from standard input if no argument is supplied,
384or that write to a file named as a command-line argument,
385but will not send their output to standard output
386if no argument is supplied, can nevertheless be made to use
387standard input or standard out using
69119dc7 388.IR /proc/[pid]/fd .
59a40ed7
MK
389For example, assuming that
390.I \-i
391is the flag designating an input file and
392.I \-o
393is the flag designating an output file:
a08ea57c 394.in +4n
fea681da
MK
395.nf
396
b43a3b30 397.RB "$" " foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ..."
fea681da 398.fi
a08ea57c
MK
399.in
400
fea681da
MK
401and you have a working filter.
402.\" The following is not true in my tests (MTK):
403.\" Note that this will not work for
404.\" programs that seek on their files, as the files in the fd directory
405.\" are not seekable.
406
59a40ed7
MK
407.I /proc/self/fd/N
408is approximately the same as
409.I /dev/fd/N
008f1ecc 410in some UNIX and UNIX-like systems.
c13182ef 411Most Linux MAKEDEV scripts symbolically link
59a40ed7
MK
412.I /dev/fd
413to
414.IR /proc/self/fd ,
415in fact.
416
417Most systems provide symbolic links
418.IR /dev/stdin ,
419.IR /dev/stdout ,
420and
421.IR /dev/stderr ,
422which respectively link to the files
423.IR 0 ,
424.IR 1 ,
425and
426.IR 2
427in
428.IR /proc/self/fd .
429Thus the example command above could be written as:
430.in +4n
431.nf
432
b43a3b30 433.RB "$" " foobar \-i /dev/stdin \-o /dev/stdout ..."
59a40ed7
MK
434.fi
435.in
69ab425e
MK
436.\" FIXME Describe /proc/[pid]/loginuid
437.\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
438.\" CONFIG_AUDITSYSCALL
439.TP
440.IR /proc/[pid]/fdinfo/ " (since kernel 2.6.22)"
441This is a subdirectory containing one entry for each file which the
442process has open, named by its file descriptor.
443The contents of each file can be read to obtain information
444about the corresponding file descriptor, for example:
445.in +4n
446.nf
447
448.RB "$" " cat /proc/12015/fdinfo/4"
449pos: 1000
450flags: 01002002
451.fi
452.in
453
454The
455.I pos
456field is a decimal number showing the current file offset.
457The
458.I flags
459field is an octal number that displays the
460file access mode and file status flags (see
461.BR open (2)).
462
463The files in this directory are readable only by the owner of the process.
43a8bfc6
MK
464.\" FIXME
465.\" Certain file types include additional info; see
466.\" Documentation/filesystems/proc.txt
467.\"
468.\" Especially interesting is this:
469.\"
470.\" commit ab49bdecc3ebb46ab661f5f05d5c5ea9606406c6
471.\" Author: Cyrill Gorcunov <gorcunov@openvz.org>
472.\" Date: Mon Dec 17 16:05:06 2012 -0800
473.\"
fa1d49a6 474.\" Basically, the /proc/PID/fdinfo/ entry for an inotify FD
43a8bfc6
MK
475.\" includes the file handles for all watched FDs
476.\"
0ca2fc4d
PS
477.TP
478.IR /proc/[pid]/io " (since kernel 2.6.20)"
68f11066
MK
479.\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2
480This file contains I/O statistics for the process, for example:
0ca2fc4d
PS
481.in +4n
482.nf
483
484.RB "#" " cat /proc/3828/io"
485rchar: 323934931
486wchar: 323929600
487syscr: 632687
488syscw: 632675
489read_bytes: 0
490write_bytes: 323932160
491cancelled_write_bytes: 0
492.fi
493.in
494
495The fields are as follows:
496.RS
68f11066
MK
497.TP
498.IR rchar ": characters read"
0ca2fc4d
PS
499The number of bytes which this task has caused to be read from storage.
500This is simply the sum of bytes which this process passed to
501.BR read (2)
68f11066 502and similar system calls.
11256884 503It includes things such as terminal I/O and
68f11066
MK
504is unaffected by whether or not actual
505physical disk I/O was required (the read might have been satisfied from
0ca2fc4d 506pagecache).
68f11066
MK
507.TP
508.IR wchar ": characters written"
0ca2fc4d
PS
509The number of bytes which this task has caused, or shall cause to be written
510to disk.
511Similar caveats apply here as with
512.IR rchar .
68f11066
MK
513.TP
514.IR syscr ": read syscalls"
515Attempt to count the number of read I/O operations\(emthat is,
516system calls such as
0ca2fc4d
PS
517.BR read (2)
518and
519.BR pread (2).
68f11066
MK
520.TP
521.IR syscw ": write syscalls"
522Attempt to count the number of write I/O operations\(emthat is,
523system calls such as
0ca2fc4d
PS
524.BR write (2)
525and
526.BR pwrite (2).
68f11066
MK
527.TP
528.IR read_bytes ": bytes read"
0ca2fc4d
PS
529Attempt to count the number of bytes which this process really did cause to
530be fetched from the storage layer.
531This is accurate for block-backed filesystems.
68f11066
MK
532.TP
533.IR write_bytes ": bytes written"
0ca2fc4d
PS
534Attempt to count the number of bytes which this process caused to be sent to
535the storage layer.
68f11066 536.TP
0ca2fc4d 537.IR cancelled_write_bytes :
0ca2fc4d
PS
538The big inaccuracy here is truncate.
539If a process writes 1MB to a file and then deletes the file,
540it will in fact perform no writeout.
541But it will have been accounted as having caused 1MB of write.
68f11066 542In other words: this field represents the number of bytes which this process
0ca2fc4d 543caused to not happen, by truncating pagecache.
68f11066 544A task can cause "negative" I/O too.
0ca2fc4d 545If this task truncates some dirty pagecache,
68f11066
MK
546some I/O which another task has been accounted for
547(in its
548.IR write_bytes )
549will not be happening.
550.RE
0ca2fc4d
PS
551.IP
552.IR Note :
68f11066 553In the current implementation, things are a bit racy on 32-bit systems:
0ca2fc4d
PS
554if process A reads process B's
555.I /proc/[pid]/io
68f11066 556while process B is updating one of these 64-bit counters,
0ca2fc4d 557process A could see an intermediate result.
69ab425e
MK
558.TP
559.IR /proc/[pid]/limits " (since kernel 2.6.24)"
560This file displays the soft limit, hard limit, and units of measurement
561for each of the process's resource limits (see
562.BR getrlimit (2)).
563Up to and including Linux 2.6.35,
564this file is protected to allow reading only by the real UID of the process.
565Since Linux 2.6.36,
566.\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589
567this file is readable by all users on the system.
b4f89985
PE
568.TP
569.IR /proc/[pid]/map_files/ " (since kernel 3.3)
18cdd0ac
MK
570.\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e
571This subdirectory contains entries corresponding to memory-mapped
b4f89985
PE
572files (see
573.BR mmap (2)).
18cdd0ac
MK
574Entries are named by memory region start and end
575address pair (expressed as hexadecimal numbers),
576and are symbolic links to the mapped files themselves.
577Here is an example, with the output wrapped and reformatted to fit on an 80-column display:
b4f89985
PE
578.in +4n
579.nf
580
7d2e6d74 581.RB "$" " ls -l /proc/self/map_files/"
18cdd0ac
MK
582lr\-\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:31
583 3252e00000\-3252e20000 \-> /usr/lib64/ld-2.15.so
b4f89985
PE
584\&...
585.fi
586.in
587
588Although these entries are present for memory regions that were
d6a56978 589mapped with the
b4f89985 590.BR MAP_FILE
18cdd0ac 591flag, the way anonymous shared memory (regions created with the
b4f89985
PE
592.B MAP_ANON | MAP_SHARED
593flags)
594is implemented in Linux
18cdd0ac
MK
595means that such regions also appear on this directory.
596Here is an example where the target file is the deleted
597.I /dev/zero
598one:
b4f89985
PE
599.in +4n
600.nf
601
602.RB
18cdd0ac
MK
603lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33
604 7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted)
b4f89985
PE
605.fi
606.in
607
608This directory appears only if the
609.B CONFIG_CHECKPOINT_RESTORE
610kernel configuration option is enabled.
fea681da 611.TP
69119dc7 612.I /proc/[pid]/maps
fea681da
MK
613A file containing the currently mapped memory regions and their access
614permissions.
bbf9f397
MK
615See
616.BR mmap (2)
617for some further information about memory mappings.
fea681da 618
dd0c3b96 619The format of the file is:
fea681da 620
21781757 621.in -7n
fea681da
MK
622.nf
623.ft CW
fea681da 624.ft
21781757
MK
625.I "address perms offset dev inode pathname"
62600400000-00452000 r-xp 00000000 08:02 173521 /usr/bin/dbus-daemon
62700651000-00652000 r--p 00051000 08:02 173521 /usr/bin/dbus-daemon
62800652000-00655000 rw-p 00052000 08:02 173521 /usr/bin/dbus-daemon
62900e03000-00e24000 rw-p 00000000 00:00 0 [heap]
63000e24000-011f7000 rw-p 00000000 00:00 0 [heap]
182090db 631\&...
21781757
MK
63235b1800000-35b1820000 r-xp 00000000 08:02 135522 /usr/lib64/ld-2.15.so
63335b1a1f000-35b1a20000 r--p 0001f000 08:02 135522 /usr/lib64/ld-2.15.so
63435b1a20000-35b1a21000 rw-p 00020000 08:02 135522 /usr/lib64/ld-2.15.so
7d2e6d74 63535b1a21000-35b1a22000 rw-p 00000000 00:00 0
21781757
MK
63635b1c00000-35b1dac000 r-xp 00000000 08:02 135870 /usr/lib64/libc-2.15.so
63735b1dac000-35b1fac000 ---p 001ac000 08:02 135870 /usr/lib64/libc-2.15.so
63835b1fac000-35b1fb0000 r--p 001ac000 08:02 135870 /usr/lib64/libc-2.15.so
63935b1fb0000-35b1fb2000 rw-p 001b0000 08:02 135870 /usr/lib64/libc-2.15.so
182090db 640\&...
21781757 641f2c6ff8c000-7f2c7078c000 rw-p 00000000 00:00 0 [stack:986]
182090db 642\&...
21781757
MK
6437fffb2c0d000-7fffb2c2e000 rw-p 00000000 00:00 0 [stack]
6447fffb2d48000-7fffb2d49000 r-xp 00000000 00:00 0 [vdso]
fea681da 645.fi
21781757 646.in
fea681da 647
7d2e6d74 648The
3eb8c588
MK
649.I address
650field is the address space in the process that the mapping occupies.
651The
652.I perms
653field is a set of permissions:
fea681da
MK
654
655.nf
656.in +5
657r = read
658w = write
659x = execute
660s = shared
661p = private (copy on write)
662.fi
663.in
664
3eb8c588
MK
665The
666.I offset
b844cf04 667field is the offset into the file/whatever;
3eb8c588
MK
668.I dev
669is the device
dd0c3b96 670(major:minor);
3eb8c588
MK
671.I inode
672is the inode on that device.
59a40ed7 6730 indicates that no inode is associated with the memory region,
16e64bae 674as would be the case with BSS (uninitialized data).
fea681da 675
3eb8c588
MK
676The
677.I pathname
678field will usually be the file that is backing the mapping.
491ea6f1 679For ELF files,
3eb8c588
MK
680you can easily coordinate with the
681.I offset
682field by looking at the
491ea6f1
MK
683Offset field in the ELF program headers
684.RI ( "readelf\ \-l" ).
37d32c38 685
491ea6f1 686There are additional helpful pseudo-paths:
61b0b1f4
MK
687.RS 12
688.TP
689.IR [stack]
16e64bae 690The initial process's (also known as the main thread's) stack.
61b0b1f4 691.TP
3eb8c588 692.IR [stack:<tid>] " (since Linux 3.4)"
a60894c5 693.\" commit b76437579d1344b612cf1851ae610c636cec7db0
61b0b1f4 694A thread's stack (where the
3eb8c588 695.IR <tid>
61b0b1f4 696is a thread ID).
491ea6f1 697It corresponds to the
3eb8c588 698.IR /proc/[pid]/task/[tid]/
37d32c38 699path.
61b0b1f4 700.TP
7d2e6d74 701.IR [vdso]
61b0b1f4
MK
702The virtual dynamically linked shared object.
703.TP
7d2e6d74 704.IR [heap]
61b0b1f4
MK
705The process's heap.
706.in
61b0b1f4
MK
707.RE
708.IP
3eb8c588
MK
709If the
710.I pathname
711field is blank,
491ea6f1 712this is an anonymous mapping as obtained via the
37d32c38 713.BR mmap (2)
491ea6f1 714function.
61b0b1f4
MK
715There is no easy way to coordinate this back to a process's source,
716short of running it through
491ea6f1
MK
717.BR gdb (1),
718.BR strace (1),
719or similar.
37d32c38 720
eb9a0b2f 721Under Linux 2.0, there is no field giving pathname.
fea681da 722.TP
69119dc7 723.I /proc/[pid]/mem
fea681da
MK
724This file can be used to access the pages of a process's memory through
725.BR open (2),
726.BR read (2),
727and
ccb2bb0d 728.BR lseek (2).
b4e9ee8f 729.TP
69119dc7 730.IR /proc/[pid]/mountinfo " (since Linux 2.6.26)"
b4e9ee8f
MK
731.\" This info adapted from Documentation/filesystems/proc.txt
732This file contains information about mount points.
733It contains lines of the form:
734.nf
735.ft CW
b4e9ee8f
MK
736
73736 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
738(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
b4e9ee8f
MK
739.ft
740.fi
741.IP
742The numbers in parentheses are labels for the descriptions below:
3bc960c2 743.RS 7
b4e9ee8f
MK
744.TP 5
745(1)
746mount ID: unique identifier of the mount (may be reused after
747.BR umount (2)).
748.TP
749(2)
750parent ID: ID of parent mount (or of self for the top of the mount tree).
751.TP
752(3)
753major:minor: value of
754.I st_dev
9ee4a2b6 755for files on filesystem (see
b4e9ee8f
MK
756.BR stat (2)).
757.TP
758(4)
9ee4a2b6 759root: root of the mount within the filesystem.
b4e9ee8f
MK
760.TP
761(5)
762mount point: mount point relative to the process's root.
763.TP
764(6)
765mount options: per-mount options.
766.TP
767(7)
768optional fields: zero or more fields of the form "tag[:value]".
769.TP
770(8)
771separator: marks the end of the optional fields.
772.TP
773(9)
9ee4a2b6 774filesystem type: name of filesystem in the form "type[.subtype]".
b4e9ee8f
MK
775.TP
776(10)
9ee4a2b6 777mount source: filesystem-specific information or "none".
b4e9ee8f
MK
778.TP
779(11)
68d86eac 780super options: per-superblock options.
b4e9ee8f
MK
781.RE
782.IP
783Parsers should ignore all unrecognized optional fields.
784Currently the possible optional fields are:
785.RS 12
786.TP 18
787shared:X
788mount is shared in peer group X
789.TP
790master:X
791mount is slave to peer group X
792.TP
793propagate_from:X
794mount is slave and receives propagation from peer group X (*)
795.TP
796unbindable
797mount is unbindable
798.RE
799.IP
800(*) X is the closest dominant peer group under the process's root.
801If X is the immediate master of the mount,
802or if there is no dominant peer group under the same root,
803then only the "master:X" field is present
804and not the "propagate_from:X" field.
805
806For more information on mount propagation see:
807.I Documentation/filesystems/sharedsubtree.txt
66a9882e 808in the Linux kernel source tree.
b4e9ee8f 809.TP
cea61382 810.IR /proc/[pid]/mounts " (since Linux 2.4.19)"
9ee4a2b6 811This is a list of all the filesystems currently mounted in the
732e54dd 812process's mount namespace.
cea61382
MK
813The format of this file is documented in
814.BR fstab (5).
815Since kernel version 2.6.15, this file is pollable:
816after opening the file for reading, a change in this file
9ee4a2b6 817(i.e., a filesystem mount or unmount) causes
cea61382
MK
818.BR select (2)
819to mark the file descriptor as readable, and
820.BR poll (2)
821and
822.BR epoll_wait (2)
823mark the file as having an error condition.
824.TP
69119dc7 825.IR /proc/[pid]/mountstats " (since Linux 2.6.17)"
783a6233 826This file exports information (statistics, configuration information)
b4e9ee8f
MK
827about the mount points in the process's name space.
828Lines in this file have the form:
829.nf
830
831device /dev/sda7 mounted on /home with fstype ext3 [statistics]
832( 1 ) ( 2 ) (3 ) (4)
833.fi
834.IP
835The fields in each line are:
3bc960c2 836.RS 7
b4e9ee8f
MK
837.TP 5
838(1)
839The name of the mounted device
840(or "nodevice" if there is no corresponding device).
841.TP
842(2)
9ee4a2b6 843The mount point within the filesystem tree.
b4e9ee8f
MK
844.TP
845(3)
9ee4a2b6 846The filesystem type.
b4e9ee8f
MK
847.TP
848(4)
849Optional statistics and configuration information.
9ee4a2b6 850Currently (as at Linux 2.6.26), only NFS filesystems export
b4e9ee8f
MK
851information via this field.
852.RE
853.IP
90878f7c 854This file is readable only by the owner of the process.
b4e9ee8f 855.TP
b4a185e5 856.IR /proc/[pid]/ns/ " (since Linux 3.0)"
2c4201f0 857.\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
b4a185e5
EB
858This is a subdirectory containing one entry for each namespace that
859supports being manipulated by
80e63655
MK
860.BR setns (2).
861For information about namespaces, see
862.BR clone (2).
b4a185e5
EB
863.TP
864.IR /proc/[pid]/ns/ipc " (since Linux 3.0)"
80e63655
MK
865Bind mounting this file (see
866.BR mount (2))
867to somewhere else in the filesystem keeps
c409c4ff 868the IPC namespace of the process specified by
b4a185e5 869.I pid
80e63655 870alive even if all processes currently in the namespace terminate.
b4a185e5 871
80e63655 872Opening this file returns a file handle for the IPC namespace
b4a185e5 873of the process specified by
80e63655
MK
874.IR pid .
875As long as this file descriptor remains open,
876the IPC namespace will remain alive,
877even if all processes in the namespace terminate.
878The file descriptor can be passed to
879.BR setns (2).
b4a185e5
EB
880.TP
881.IR /proc/[pid]/ns/net " (since Linux 3.0)"
80e63655
MK
882Bind mounting this file (see
883.BR mount (2))
884to somewhere else in the filesystem keeps
c409c4ff 885the network namespace of the process specified by
b4a185e5 886.I pid
80e63655 887alive even if all processes in the namespace terminate.
b4a185e5 888
80e63655 889Opening this file returns a file handle for the network namespace
b4a185e5 890of the process specified by
80e63655
MK
891.IR pid .
892As long as this file descriptor remains open,
893the network namespace will remain alive,
894even if all processes in the namespace terminate.
895The file descriptor can be passed to
896.BR setns (2).
b4a185e5
EB
897.TP
898.IR /proc/[pid]/ns/uts " (since Linux 3.0)"
80e63655
MK
899Bind mounting this file (see
900.BR mount (2))
901to somewhere else in the filesystem keeps
c409c4ff 902the UTS namespace of the process specified by
b4a185e5 903.I pid
80e63655 904alive even if all processes currently in the namespace terminate.
b4a185e5 905
80e63655 906Opening this file returns a file handle for the UTS namespace
b4a185e5 907of the process specified by
80e63655
MK
908.IR pid .
909As long as this file descriptor remains open,
910the UTS namespace will remain alive,
911even if all processes in the namespace terminate.
912The file descriptor can be passed to
913.BR setns (2).
b4a185e5 914.TP
69119dc7 915.IR /proc/[pid]/numa_maps " (since Linux 2.6.14)"
610f75cc
MK
916See
917.BR numa (7).
7388733a 918.TP
69119dc7 919.IR /proc/[pid]/oom_adj " (since Linux 2.6.11)"
b4e9ee8f 920This file can be used to adjust the score used to select which process
0425de01 921should be killed in an out-of-memory (OOM) situation.
b4e9ee8f
MK
922The kernel uses this value for a bit-shift operation of the process's
923.IR oom_score
924value:
5b8dbfd4
MK
925valid values are in the range \-16 to +15,
926plus the special value \-17,
b4e9ee8f
MK
927which disables OOM-killing altogether for this process.
928A positive score increases the likelihood of this
929process being killed by the OOM-killer;
930a negative score decreases the likelihood.
de8e9cc1 931.IP
b4e9ee8f
MK
932The default value for this file is 0;
933a new process inherits its parent's
934.I oom_adj
935setting.
936A process must be privileged
937.RB ( CAP_SYS_RESOURCE )
938to update this file.
f2c8b197
MK
939.IP
940Since Linux 2.6.36, use of this file is deprecated in favor of
941.IR /proc/[pid]/oom_score_adj .
b4e9ee8f 942.TP
69119dc7 943.IR /proc/[pid]/oom_score " (since Linux 2.6.11)"
b4e9ee8f
MK
944.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
945This file displays the current score that the kernel gives to
946this process for the purpose of selecting a process
947for the OOM-killer.
948A higher score means that the process is more likely to be
949selected by the OOM-killer.
950The basis for this score is the amount of memory used by the process,
951with increases (+) or decreases (\-) for factors including:
952.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
953.RS
954.IP * 2
955whether the process creates a lot of children using
956.BR fork (2)
957(+);
958.IP *
959whether the process has been running a long time,
960or has used a lot of CPU time (\-);
961.IP *
962whether the process has a low nice value (i.e., > 0) (+);
963.IP *
964whether the process is privileged (\-); and
965.\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
966.IP *
967whether the process is making direct hardware access (\-).
968.\" More precisely, if it has CAP_SYS_RAWIO
969.RE
970.IP
971The
972.I oom_score
f2c8b197
MK
973also reflects the adjustment specified by the
974.I oom_score_adj
975or
b4e9ee8f
MK
976.I oom_adj
977setting for the process.
f2c8b197
MK
978.TP
979.IR /proc/[pid]/oom_score_adj " (since Linux 2.6.36)"
980.\" Text taken from 3.7 Documentation/filesystems/proc.txt
981This file can be used to adjust the badness heuristic used to select which
982process gets killed in out-of-memory conditions.
983
984The badness heuristic assigns a value to each candidate task ranging from 0
985(never kill) to 1000 (always kill) to determine which process is targeted.
986The units are roughly a proportion along that range of
987allowed memory the process may allocate from,
988based on an estimation of its current memory and swap use.
989For example, if a task is using all allowed memory,
990its badness score will be 1000.
991If it is using half of its allowed memory, its score will be 500.
992
993There is an additional factor included in the badness score: root
994processes are given 3% extra memory over other tasks.
995
996The amount of "allowed" memory depends on the context
0633f951 997in which the OOM-killer was called.
f2c8b197
MK
998If it is due to the memory assigned to the allocating task's cpuset
999being exhausted,
1000the allowed memory represents the set of mems assigned to that
1001cpuset (see
1002.BR cpuset (7)).
1003If it is due to a mempolicy's node(s) being exhausted,
1004the allowed memory represents the set of mempolicy nodes.
1005If it is due to a memory limit (or swap limit) being reached,
1006the allowed memory is that configured limit.
1007Finally, if it is due to the entire system being out of memory, the
1008allowed memory represents all allocatable resources.
1009
1010The value of
0633f951 1011.I oom_score_adj
f2c8b197
MK
1012is added to the badness score before it
1013is used to determine which task to kill.
1014Acceptable values range from \-1000
1015(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).
0633f951 1016This allows user space to control the preference for OOM-killing,
f2c8b197 1017ranging from always preferring a certain
0633f951 1018task or completely disabling it from OOM-killing.
f2c8b197 1019The lowest possible value, \-1000, is
0633f951 1020equivalent to disabling OOM-killing entirely for that task,
f2c8b197
MK
1021since it will always report a badness score of 0.
1022
1023Consequently, it is very simple for user space to define
1024the amount of memory to consider for each task.
1025Setting a
1026.I oom_score_adj
1027value of +500, for example,
1028is roughly equivalent to allowing the remainder of tasks sharing the
1029same system, cpuset, mempolicy, or memory controller resources
1030to use at least 50% more memory.
1031A value of \-500, on the other hand, would be roughly
1032equivalent to discounting 50% of the task's
1033allowed memory from being considered as scoring against the task.
1034
0633f951 1035For backward compatibility with previous kernels,
f2c8b197
MK
1036.I /proc/[pid]/oom_adj
1037can still be used to tune the badness score.
1038Its value is
9f1b9726 1039scaled linearly with
f2c8b197
MK
1040.IR oom_score_adj .
1041
1042Writing to
1043.IR /proc/[pid]/oom_score_adj
1044or
1045.IR /proc/[pid]/oom_adj
1046will change the other with its scaled value.
b0aa1e51
MK
1047.TP
1048.IR /proc/[pid]/pagemap " (since Linux 2.6.25)"
1049This file shows the mapping of each of the process's virtual pages
1050into physical page frames or swap area.
1051It contains one 64-bit value for each virtual page,
1052with the bits set as follows:
1053.RS 12
1054.TP
105563
1056If set, the page is present in RAM.
1057.TP
105862
1059If set, the page is in swap space
1060.TP
106161 (since Linux 3.5)
1062The page is a file-mapped page or a shared anonymous page.
1063.TP
106460-56 (since Linux 3.11)
1065Zero
1066.\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f
1067.TP
106855 (Since Linux 3.11)
1069PTE is soft-dirty
1070(see the kernel source file
1071.IR Documentation/vm/soft-dirty.txt ).
1072.TP
107354-0
1074If the page is present in RAM (bit 63), then these bits
1075provide the page frame number, which can be used to index
1076.IR /proc/kpageflags
1077and
1078.IR /proc/kpagecount .
1079If the page is present in swap (bit 62),
1080then bits 4-0 give the swap type, and bits 54-5 encode the swap offset.
1081.RE
1082.IP
1083Before Linux 3.11, bits 60-55 were
1084used to encode the base-2 log of the page size.
1085.IP
1086To employ
1087.IR /proc/[pid]/pagemap
1088efficiently, use
1089.IR /proc/[pid]/maps
1090to determine which areas of memory are actually mapped and seek
1091to skip over unmapped regions.
1092.IP
1093The
1094.IR /proc/[pid]/pagemap
1095file is present only if the
1096.B CONFIG_PROC_PAGE_MONITOR
1097kernel configuration option is enabled.
7c2905d1
MK
1098.TP
1099.IR /proc/[pid]/personality " (since Linux 2.6.28)"
1100.\" commit 478307230810d7e2a753ed220db9066dfdf88718
1101This read-only file exposes the process's execution domain, as set by
1102.BR personality (2).
1103The value is displayed in hexadecimal notation.
fea681da 1104.TP
69119dc7 1105.I /proc/[pid]/root
008f1ecc 1106UNIX and Linux support the idea of a per-process root of the
9ee4a2b6 1107filesystem, set by the
fea681da 1108.BR chroot (2)
c13182ef
MK
1109system call.
1110This file is a symbolic link that points to the process's
14d70713
MK
1111root directory, and behaves in the same way as
1112.IR exe ,
1113and
1114.IR fd/* .
afcaf646
MK
1115
1116.\" The following was still true as at kernel 2.6.13
c13182ef
MK
1117In a multithreaded process, the contents of this symbolic link
1118are not available if the main thread has already terminated
afcaf646
MK
1119(typically by calling
1120.BR pthread_exit (3)).
69119dc7 1121.\" FIXME Describe /proc/[pid]/seccomp
6aefb6df 1122.\" Added in 2.6.12
69119dc7 1123.\" FIXME Describe /proc/[pid]/sessionid
b4e9ee8f 1124.\" Added in 2.6.25; read-only; only readable by real UID
b3fb99e8 1125.\" commit 1e0bd7550ea9cf474b1ad4c6ff5729a507f75fdc
b4e9ee8f 1126.\" CONFIG_AUDITSYSCALL
69119dc7 1127.\" FIXME Describe /proc/[pid]/sched
b4e9ee8f
MK
1128.\" Added in 2.6.23
1129.\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
1130.\" Displays various scheduling parameters
1131.\" This file can be written, to reset stats
b3fb99e8
MK
1132.\" The set of fields exposed by this file have changed
1133.\" significantly over time.
1134.\" commit 43ae34cb4cd650d1eb4460a8253a8e747ba052ac
1135.\"
69119dc7
MK
1136.\" FIXME Describe /proc/[pid]/schedstats and
1137.\" /proc/[pid]/task/[tid]/schedstats
b4e9ee8f
MK
1138.\" Added in 2.6.9
1139.\" CONFIG_SCHEDSTATS
fea681da 1140.TP
69119dc7 1141.IR /proc/[pid]/smaps " (since Linux 2.6.14)"
b07b19c4 1142This file shows memory consumption for each of the process's mappings.
1f0add28 1143For each mapping there is a series of lines such as the following:
a08ea57c 1144.in +4n
b07b19c4
MK
1145.nf
1146
1f0add28 114700400000-0048a000 r-xp 00000000 fd:03 960637 /bin/bash
95fe794d
PG
1148Size: 552 kB
1149Rss: 460 kB
1150Pss: 100 kB
1151Shared_Clean: 452 kB
1152Shared_Dirty: 0 kB
1153Private_Clean: 8 kB
1154Private_Dirty: 0 kB
1155Referenced: 460 kB
1156Anonymous: 0 kB
1157AnonHugePages: 0 kB
1158Swap: 0 kB
1159KernelPageSize: 4 kB
1160MMUPageSize: 4 kB
1161Locked: 0 kB
b07b19c4
MK
1162
1163.fi
a08ea57c 1164.in
b07b19c4
MK
1165The first of these lines shows the same information as is displayed
1166for the mapping in
69119dc7 1167.IR /proc/[pid]/maps .
b07b19c4 1168The remaining lines show the size of the mapping,
95fe794d
PG
1169the amount of the mapping that is currently resident in RAM ("Rss"),
1170the process' proportional share of this mapping ("Pss"),
1f0add28 1171the number of clean and dirty shared pages in the mapping,
c7ce200d 1172and the number of clean and dirty private pages in the mapping.
95fe794d 1173"Referenced" indicates the amount of memory currently marked as
1f0add28
MK
1174referenced or accessed.
1175"Anonymous" shows the amount of memory
1176that does not belong to any file.
1177"Swap" shows how much
95fe794d
PG
1178would-be-anonymous memory is also used, but out on swap.
1179
d6a56978 1180The "KernelPageSize" entry is the page size used by the kernel to back a VMA.
1f0add28
MK
1181This matches the size used by the MMU in the majority of cases.
1182However, one counter-example occurs on PPC64 kernels
1183whereby a kernel using 64K as a base page size may still use 4K
1184pages for the MMU on older processors.
1185To distinguish, this
1186patch reports "MMUPageSize" as the page size used by the MMU.
95fe794d
PG
1187
1188The "Locked" indicates whether the mapping is locked in memory
1189or not.
1190
1191"VmFlags" field represents the kernel flags associated with
1f0add28
MK
1192the particular virtual memory area in two letter encoded manner.
1193The codes are the following:
1194
95fe794d 1195 rd - readable
1f0add28 1196 wr - writable
95fe794d
PG
1197 ex - executable
1198 sh - shared
1199 mr - may read
1200 mw - may write
1201 me - may execute
1202 ms - may share
723e333c 1203 gd - stack segment grows down
95fe794d
PG
1204 pf - pure PFN range
1205 dw - disabled write to the mapped file
1206 lo - pages are locked in memory
1207 io - memory mapped I/O area
1208 sr - sequential read advise provided
1209 rr - random read advise provided
1210 dc - do not copy area on fork
1211 de - do not expand area on remapping
1212 ac - area is accountable
1213 nr - swap space is not reserved for the area
1214 ht - area uses huge tlb pages
1215 nl - non-linear mapping
1216 ar - architecture specific flag
1217 dd - do not include area into core dump
1218 sd - soft-dirty flag
1219 mm - mixed map area
1220 hg - huge page advise flag
1221 nh - no-huge page advise flag
b5408a0f 1222 mg - mergeable advise flag
b07b19c4 1223
e618d945
MK
1224The
1225.IR /proc/[pid]/smaps
1226file is present only if the
1227.B CONFIG_PROC_PAGE_MONITOR
1228kernel configuration option is enabled.
b07b19c4 1229.TP
67aac6fb
MK
1230.IR /proc/[pid]/stack " (since Linux 2.6.29)"
1231.\" 2ec220e27f5040aec1e88901c1b6ea3d135787ad
1232This file provides a symbolic trace of the function calls in this
1233process's kernel stack.
1234This file is provided only if the kernel was built with the
1235.B CONFIG_STACKTRACE
1236configuration option.
1237.TP
69119dc7 1238.I /proc/[pid]/stat
c13182ef
MK
1239Status information about the process.
1240This is used by
1241.BR ps (1).
082bf5b8
MK
1242It is defined in the kernel source file
1243.IR fs/proc/array.c "."
fea681da
MK
1244
1245The fields, in order, with their proper
1246.BR scanf (3)
1247format specifiers, are:
1248.RS
62e4a418
MK
1249.TP 10
1250(1) \fIpid\fP \ %d
1251.br
1252The process ID.
fea681da 1253.TP
62e4a418
MK
1254(2) \fIcomm\fP \ %s
1255The filename of the executable, in parentheses.
c13182ef 1256This is visible whether or not the executable is swapped out.
fea681da 1257.TP
62e4a418 1258(3) \fIstate\fP \ %c
31293f37
MK
1259One of the following characters, indicating process state:
1260.RS
1261.IP R 3
1262Running
1263.IP S
1264Sleeping in an interruptible wait
1265.IP D
1266Waiting in uninterruptible
1267disk sleep
1268.IP Z
1269Zombie
1270.IP T
1271Stopped (on a signal) or (before Linux 2.6.33) trace stopped
1272.IP t
1273.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
1274Tracing stop (Linux 2.6.33 onward)
1275.IP W
1276Paging (only before Linux 2.6.0)
1277.IP X
1278Dead (from Linux 2.6.0 onward)
1279.IP x
1280.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
1281Dead (Linux 2.6.33 to
1282.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
12833.13 only)
1284.IP K
1285.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
1286Wakekill (Linux 2.6.33 to
1287.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
12883.13 only)
1289.IP W
1290.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
1291Waking (Linux 2.6.33 to
1292.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
12933.13 only)
1294.IP P
1295.\" commit f2530dc71cf0822f90bb63ea4600caaef33a66bb
1296Parked (Linux 3.9 to
1297.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
12983.13 only)
1299.RE
fea681da 1300.TP
62e4a418 1301(4) \fIppid\fP \ %d
e0fdc57c 1302The PID of the parent of this process.
fea681da 1303.TP
62e4a418
MK
1304(5) \fIpgrp\fP \ %d
1305The process group ID of the process.
fea681da 1306.TP
62e4a418
MK
1307(6) \fIsession\fP \ %d
1308The session ID of the process.
fea681da 1309.TP
62e4a418
MK
1310(7) \fItty_nr\fP \ %d
1311The controlling terminal of the process.
59a40ed7
MK
1312(The minor device number is contained in the combination of bits
131331 to 20 and 7 to 0;
b97deb97 1314the major device number is in bits 15 to 8.)
fea681da 1315.TP
62e4a418 1316(8) \fItpgid\fP \ %d
fea681da 1317.\" This field and following, up to and including wchan added 0.99.1
62e4a418 1318The ID of the foreground process group of the controlling
59a40ed7 1319terminal of the process.
fea681da 1320.TP
62e4a418
MK
1321(9) \fIflags\fP \ %u
1322The kernel flags word of the process.
c13182ef 1323For bit meanings,
66a9882e 1324see the PF_* defines in the Linux kernel source file
00702acc 1325.IR include/linux/sched.h .
fea681da 1326Details depend on the kernel version.
62e4a418
MK
1327
1328The format for this field was %lu before Linux 2.6.
fea681da 1329.TP
62e4a418
MK
1330(1) \fIminflt\fP \ %lu
1331The number of minor faults the process has made which have not
fea681da
MK
1332required loading a memory page from disk.
1333.TP
62e4a418
MK
1334(11) \fIcminflt\fP \ %lu
1335The number of minor faults that the process's
fea681da
MK
1336waited-for children have made.
1337.TP
62e4a418
MK
1338(12) \fImajflt\fP \ %lu
1339The number of major faults the process has made which have
fea681da
MK
1340required loading a memory page from disk.
1341.TP
62e4a418
MK
1342(13) \fIcmajflt\fP \ %lu
1343The number of major faults that the process's
fea681da
MK
1344waited-for children have made.
1345.TP
62e4a418
MK
1346(14) \fIutime\fP \ %lu
1347Amount of time that this process has been scheduled in user mode,
7a017e24 1348measured in clock ticks (divide by
67914165 1349.IR sysconf(_SC_CLK_TCK) ).
a1c9dc59
MK
1350This includes guest time, \fIguest_time\fP
1351(time spent running a virtual CPU, see below),
1352so that applications that are not aware of the guest time field
1353do not lose that time from their calculations.
fea681da 1354.TP
62e4a418
MK
1355(15) \fIstime\fP \ %lu
1356Amount of time that this process has been scheduled in kernel mode,
7a017e24 1357measured in clock ticks (divide by
67914165 1358.IR sysconf(_SC_CLK_TCK) ).
fea681da 1359.TP
62e4a418
MK
1360(16) \fIcutime\fP \ %ld
1361Amount of time that this process's
7a017e24
MK
1362waited-for children have been scheduled in user mode,
1363measured in clock ticks (divide by
67914165 1364.IR sysconf(_SC_CLK_TCK) ).
c13182ef 1365(See also
fea681da 1366.BR times (2).)
a1c9dc59
MK
1367This includes guest time, \fIcguest_time\fP
1368(time spent running a virtual CPU, see below).
fea681da 1369.TP
62e4a418
MK
1370(17) \fIcstime\fP \ %ld
1371Amount of time that this process's
7a017e24
MK
1372waited-for children have been scheduled in kernel mode,
1373measured in clock ticks (divide by
67914165 1374.IR sysconf(_SC_CLK_TCK) ).
fea681da 1375.TP
62e4a418
MK
1376(18) \fIpriority\fP \ %ld
1377(Explanation for Linux 2.6)
59a40ed7
MK
1378For processes running a real-time scheduling policy
1379.RI ( policy
1380below; see
1381.BR sched_setscheduler (2)),
1382this is the negated scheduling priority, minus one;
1383that is, a number in the range \-2 to \-100,
1384corresponding to real-time priorities 1 to 99.
1385For processes running under a non-real-time scheduling policy,
1386this is the raw nice value
1387.RB ( setpriority (2))
1388as represented in the kernel.
1389The kernel stores nice values as numbers
1390in the range 0 (high) to 39 (low),
1391corresponding to the user-visible nice range of \-20 to 19.
1392
1393Before Linux 2.6, this was a scaled value based on
1394the scheduler weighting given to this process.
1395.\" And back in kernel 1.2 days things were different again.
fea681da 1396.TP
62e4a418
MK
1397(19) \fInice\fP \ %ld
1398The nice value (see
59a40ed7
MK
1399.BR setpriority (2)),
1400a value in the range 19 (low priority) to \-20 (high priority).
1401.\" Back in kernel 1.2 days things were different.
fea681da
MK
1402.\" .TP
1403.\" \fIcounter\fP %ld
1404.\" The current maximum size in jiffies of the process's next timeslice,
1405.\" or what is currently left of its current timeslice, if it is the
1406.\" currently running process.
1407.\" .TP
1408.\" \fItimeout\fP %u
1409.\" The time in jiffies of the process's next timeout.
0e94f77b 1410.\" timeout was removed sometime around 2.1/2.2
aa610245 1411.TP
62e4a418
MK
1412(20) \fInum_threads\fP \ %ld
1413Number of threads in this process (since Linux 2.6).
bb83d1b9 1414Before kernel 2.6, this field was hard coded to 0 as a placeholder
0e94f77b 1415for an earlier removed field.
fea681da 1416.TP
62e4a418
MK
1417(21) \fIitrealvalue\fP \ %ld
1418The time in jiffies before the next
8bd58774
MK
1419.B SIGALRM
1420is sent to the process due to an interval timer.
0e94f77b
MK
1421Since kernel 2.6.17, this field is no longer maintained,
1422and is hard coded as 0.
fea681da 1423.TP
62e4a418
MK
1424(22) \fIstarttime\fP \ %llu
1425The time the process started after system boot.
055024ed
MK
1426In kernels before Linux 2.6, this value was expressed in jiffies.
1427Since Linux 2.6, the value is expressed in clock ticks (divide by
1428.IR sysconf(_SC_CLK_TCK) ).
62e4a418
MK
1429
1430The format for this field was %lu before Linux 2.6.
fea681da 1431.TP
62e4a418
MK
1432(23) \fIvsize\fP \ %lu
1433Virtual memory size in bytes.
fea681da 1434.TP
62e4a418
MK
1435(24) \fIrss\fP \ %ld
1436Resident Set Size: number of pages the process has in real memory.
c13182ef 1437This is just the pages which
5fab2e7c 1438count toward text, data, or stack space.
c13182ef 1439This does not include pages
fea681da
MK
1440which have not been demand-loaded in, or which are swapped out.
1441.TP
62e4a418
MK
1442(25) \fIrsslim\fP \ %lu
1443Current soft limit in bytes on the rss of the process;
59a40ed7
MK
1444see the description of
1445.B RLIMIT_RSS
1446in
2b5407af 1447.BR getrlimit (2).
fea681da 1448.TP
62e4a418
MK
1449(26) \fIstartcode\fP \ %lu
1450The address above which program text can run.
fea681da 1451.TP
62e4a418
MK
1452(27) \fIendcode\fP \ %lu
1453The address below which program text can run.
fea681da 1454.TP
62e4a418
MK
1455(28) \fIstartstack\fP \ %lu
1456The address of the start (i.e., bottom) of the stack.
fea681da 1457.TP
62e4a418
MK
1458(29) \fIkstkesp\fP \ %lu
1459The current value of ESP (stack pointer), as found in the
fea681da
MK
1460kernel stack page for the process.
1461.TP
62e4a418
MK
1462(30) \fIkstkeip\fP \ %lu
1463The current EIP (instruction pointer).
fea681da 1464.TP
62e4a418
MK
1465(31) \fIsignal\fP \ %lu
1466The bitmap of pending signals, displayed as a decimal number.
59a40ed7 1467Obsolete, because it does not provide information on real-time signals; use
69119dc7 1468.I /proc/[pid]/status
59a40ed7 1469instead.
fea681da 1470.TP
62e4a418
MK
1471(32) \fIblocked\fP \ %lu
1472The bitmap of blocked signals, displayed as a decimal number.
59a40ed7 1473Obsolete, because it does not provide information on real-time signals; use
69119dc7 1474.I /proc/[pid]/status
59a40ed7 1475instead.
fea681da 1476.TP
62e4a418
MK
1477(33) \fIsigignore\fP \ %lu
1478The bitmap of ignored signals, displayed as a decimal number.
59a40ed7 1479Obsolete, because it does not provide information on real-time signals; use
69119dc7 1480.I /proc/[pid]/status
59a40ed7 1481instead.
fea681da 1482.TP
62e4a418
MK
1483(34) \fIsigcatch\fP \ %lu
1484The bitmap of caught signals, displayed as a decimal number.
59a40ed7 1485Obsolete, because it does not provide information on real-time signals; use
69119dc7 1486.I /proc/[pid]/status
59a40ed7 1487instead.
fea681da 1488.TP
62e4a418
MK
1489(35) \fIwchan\fP \ %lu
1490This is the "channel" in which the process is waiting.
2054f761
MK
1491It is the address of a location in the kernel where the process is sleeping.
1492The corresponding symbolic name can be found in
1493.IR /proc/[pid]/wchan .
fea681da 1494.TP
62e4a418 1495(36) \fInswap\fP \ %lu
0633f951 1496.\" nswap was added in 2.0
4d9b6984 1497Number of pages swapped (not maintained).
fea681da 1498.TP
62e4a418 1499(37) \fIcnswap\fP \ %lu
0633f951 1500.\" cnswap was added in 2.0
4d9b6984 1501Cumulative \fInswap\fP for child processes (not maintained).
fea681da 1502.TP
62e4a418
MK
1503(38) \fIexit_signal\fP \ %d \ (since Linux 2.1.22)
1504Signal to be sent to parent when we die.
fea681da 1505.TP
62e4a418
MK
1506(39) \fIprocessor\fP \ %d \ (since Linux 2.2.8)
1507CPU number last executed on.
568105c6 1508.TP
62e4a418
MK
1509(40) \fIrt_priority\fP \ %u \ (since Linux 2.5.19)
1510Real-time scheduling priority, a number in the range 1 to 99 for
59a40ed7
MK
1511processes scheduled under a real-time policy,
1512or 0, for non-real-time processes (see
568105c6
MK
1513.BR sched_setscheduler (2)).
1514.TP
62e4a418
MK
1515(41) \fIpolicy\fP \ %u \ (since Linux 2.5.19)
1516Scheduling policy (see
568105c6 1517.BR sched_setscheduler (2)).
cd60dedd 1518Decode using the SCHED_* constants in
59a40ed7 1519.IR linux/sched.h .
62e4a418
MK
1520
1521The format for this field was %lu before Linux 2.6.22.
167450d6 1522.TP
62e4a418
MK
1523(42) \fIdelayacct_blkio_ticks\fP \ %llu \ (since Linux 2.6.18)
1524Aggregated block I/O delays, measured in clock ticks (centiseconds).
14c06953 1525.TP
62e4a418
MK
1526(43) \fIguest_time\fP \ %lu \ (since Linux 2.6.24)
1527Guest time of the process (time spent running a virtual CPU
7a017e24 1528for a guest operating system), measured in clock ticks (divide by
67914165 1529.IR sysconf(_SC_CLK_TCK) ).
14c06953 1530.TP
62e4a418
MK
1531(44) \fIcguest_time\fP \ %ld \ (since Linux 2.6.24)
1532Guest time of the process's children, measured in clock ticks (divide by
67914165 1533.IR sysconf(_SC_CLK_TCK) ).
fea681da 1534.TP
62e4a418 1535(45) \fIstart_data\fP \ %lu \ (since Linux 3.3)
0be30a54 1536.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
62e4a418 1537Address above which program initialized and
426bc8d7 1538uninitialized (BSS) data are placed.
12449ae3 1539.TP
62e4a418 1540(46) \fIend_data\fP \ %lu \ (since Linux 3.3)
0be30a54 1541.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
62e4a418 1542Address below which program initialized and
426bc8d7 1543uninitialized (BSS) data are placed.
12449ae3 1544.TP
62e4a418 1545(47) \fIstart_brk\fP \ %lu \ (since Linux 3.3)
0be30a54 1546.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
62e4a418 1547Address above which program heap can be expanded with
426bc8d7 1548.BR brk (2).
12449ae3 1549.TP
62e4a418 1550(48) \fIarg_start\fP \ %lu \ (since Linux 3.5)
0be30a54 1551.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
62e4a418 1552Address above which program command-line arguments
426bc8d7
MK
1553.RI ( argv )
1554are placed.
12449ae3 1555.TP
62e4a418 1556(49) \fIarg_end\fP \ %lu \ (since Linux 3.5)
0be30a54 1557.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
62e4a418 1558Address below program command-line arguments
426bc8d7
MK
1559.RI ( argv )
1560are placed.
12449ae3 1561.TP
62e4a418 1562(50) \fIenv_start\fP \ %lu \ (since Linux 3.5)
0be30a54 1563.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
62e4a418 1564Address above which program environment is placed.
12449ae3 1565.TP
62e4a418 1566(51) \fIenv_end\fP \ %lu \ (since Linux 3.5)
0be30a54 1567.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
62e4a418 1568Address below which program environment is placed.
12449ae3 1569.TP
62e4a418 1570(52) \fIexit_code\fP \ %d \ (since Linux 3.5)
0be30a54 1571.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
62e4a418 1572The thread's exit status in the form reported by
426bc8d7 1573.BR waitpid (2).
12449ae3 1574.RE
1575.TP
69119dc7 1576.I /proc/[pid]/statm
59a40ed7 1577Provides information about memory usage, measured in pages.
c13182ef 1578The columns are:
a08ea57c
MK
1579.in +4n
1580.nf
1581
cb42fb56 1582size (1) total program size
69119dc7 1583 (same as VmSize in \fI/proc/[pid]/status\fP)
cb42fb56 1584resident (2) resident set size
69119dc7 1585 (same as VmRSS in \fI/proc/[pid]/status\fP)
cb42fb56
MK
1586share (3) shared pages (i.e., backed by a file)
1587text (4) text (code)
59a40ed7 1588.\" (not including libs; broken, includes data segment)
cb42fb56
MK
1589lib (5) library (unused in Linux 2.6)
1590data (6) data + stack
59a40ed7 1591.\" (including libs; broken, includes library text)
cb42fb56 1592dt (7) dirty pages (unused in Linux 2.6)
a08ea57c
MK
1593.fi
1594.in
fea681da 1595.TP
69119dc7 1596.I /proc/[pid]/status
fea681da 1597Provides much of the information in
69119dc7 1598.I /proc/[pid]/stat
fea681da 1599and
69119dc7 1600.I /proc/[pid]/statm
fea681da 1601in a format that's easier for humans to parse.
16b5f7ba
MK
1602Here's an example:
1603.in +4n
1604.nf
1605
b43a3b30 1606.RB "$" " cat /proc/$$/status"
16b5f7ba
MK
1607Name: bash
1608State: S (sleeping)
1609Tgid: 3515
1610Pid: 3515
1611PPid: 3452
1612TracerPid: 0
1613Uid: 1000 1000 1000 1000
1614Gid: 100 100 100 100
1615FDSize: 256
1616Groups: 16 33 100
1617VmPeak: 9136 kB
1618VmSize: 7896 kB
1619VmLck: 0 kB
1620VmHWM: 7572 kB
1621VmRSS: 6316 kB
1622VmData: 5224 kB
1623VmStk: 88 kB
1624VmExe: 572 kB
1625VmLib: 1708 kB
1626VmPTE: 20 kB
1627Threads: 1
1628SigQ: 0/3067
1629SigPnd: 0000000000000000
1630ShdPnd: 0000000000000000
1631SigBlk: 0000000000010000
1632SigIgn: 0000000000384004
1633SigCgt: 000000004b813efb
1634CapInh: 0000000000000000
1635CapPrm: 0000000000000000
1636CapEff: 0000000000000000
1637CapBnd: ffffffffffffffff
1638Cpus_allowed: 00000001
1639Cpus_allowed_list: 0
1640Mems_allowed: 1
1641Mems_allowed_list: 0
1642voluntary_ctxt_switches: 150
1643nonvoluntary_ctxt_switches: 545
1644.fi
1645.in
1646.IP
1647The fields are as follows:
1648.RS
1649.IP * 2
1650.IR Name :
1651Command run by this process.
1652.IP *
1653.IR State :
4175f999
MK
1654Current state of the process.
1655One of
16b5f7ba
MK
1656"R (running)",
1657"S (sleeping)",
1658"D (disk sleep)",
1659"T (stopped)",
1660"T (tracing stop)",
1661"Z (zombie)",
1662or
1663"X (dead)".
1664.IP *
1665.IR Tgid :
1666Thread group ID (i.e., Process ID).
1667.IP *
1668.IR Pid :
1669Thread ID (see
1670.BR gettid (2)).
1671.IP *
a1bc91d5
MK
1672.IR PPid :
1673PID of parent process.
1674.IP *
16b5f7ba
MK
1675.IR TracerPid :
1676PID of process tracing this process (0 if not being traced).
1677.IP *
1678.IR Uid ", " Gid :
9ee4a2b6 1679Real, effective, saved set, and filesystem UIDs (GIDs).
16b5f7ba
MK
1680.IP *
1681.IR FDSize :
1682Number of file descriptor slots currently allocated.
1683.IP *
1684.IR Groups :
1685Supplementary group list.
1686.IP *
1687.IR VmPeak :
1688Peak virtual memory size.
1689.IP *
1690.IR VmSize :
1691Virtual memory size.
1692.IP *
1693.IR VmLck :
fde39195
MK
1694Locked memory size (see
1695.BR mlock (3)).
16b5f7ba
MK
1696.IP *
1697.IR VmHWM :
1698Peak resident set size ("high water mark").
1699.IP *
1700.IR VmRSS :
1701Resident set size.
1702.IP *
1703.IR VmData ", " VmStk ", " VmExe :
1704Size of data, stack, and text segments.
1705.IP *
1706.IR VmLib :
1707Shared library code size.
1708.IP *
1709.IR VmPTE :
1710Page table entries size (since Linux 2.6.10).
1711.IP *
1712.IR Threads :
1713Number of threads in process containing this thread.
1714.IP *
6ee625eb
MK
1715.IR SigQ :
1716This field contains two slash-separated numbers that relate to
1717queued signals for the real user ID of this process.
1718The first of these is the number of currently queued
1719signals for this real user ID, and the second is the
1720resource limit on the number of queued signals for this process
1721(see the description of
1722.BR RLIMIT_SIGPENDING
1723in
1724.BR getrlimit (2)).
1725.IP *
16b5f7ba
MK
1726.IR SigPnd ", " ShdPnd :
1727Number of signals pending for thread and for process as a whole (see
1728.BR pthreads (7)
1729and
1730.BR signal (7)).
1731.IP *
1732.IR SigBlk ", " SigIgn ", " SigCgt :
1733Masks indicating signals being blocked, ignored, and caught (see
1734.BR signal (7)).
1735.IP *
1736.IR CapInh ", " CapPrm ", " CapEff :
1737Masks of capabilities enabled in inheritable, permitted, and effective sets
1738(see
1739.BR capabilities (7)).
1740.IP *
1741.IR CapBnd :
1742Capability Bounding set
1743(since kernel 2.6.26, see
1744.BR capabilities (7)).
1745.IP *
1746.IR Cpus_allowed :
1747Mask of CPUs on which this process may run
1748(since Linux 2.6.24, see
1749.BR cpuset (7)).
1750.IP *
1751.IR Cpus_allowed_list :
1752Same as previous, but in "list format"
1753(since Linux 2.6.26, see
1754.BR cpuset (7)).
1755.IP *
1756.IR Mems_allowed :
1757Mask of memory nodes allowed to this process
1758(since Linux 2.6.24, see
1759.BR cpuset (7)).
1760.IP *
1761.IR Mems_allowed_list :
1762Same as previous, but in "list format"
1763(since Linux 2.6.26, see
1764.BR cpuset (7)).
1765.IP *
7c82878a 1766.IR voluntary_ctxt_switches ", " nonvoluntary_ctxt_switches :
16b5f7ba
MK
1767Number of voluntary and involuntary context switches (since Linux 2.6.23).
1768.RE
afb7b014
MK
1769.TP
1770.IR /proc/[pid]/syscall " (since Linux 2.6.27)"
1771.\" commit ebcb67341fee34061430f3367f2e507e52ee051b
1772This file exposes the system call number and argument registers for the
1773system call currently being executed by the process,
1774followed by the values of the stack pointer and program counter registers.
1775The values of all six argument registers are exposed,
1776although most system calls use fewer registers.
1777
1778If the process is blocked, but not in a system call,
1779then the file displays -1 in place of the system call number,
1780followed by just the values of the stack pointer and program counter.
1781If process is not blocked, then file contains just the string "running".
1782
1783This file is present only if the kernel was configured with
1784.BR CONFIG_HAVE_ARCH_TRACEHOOK .
fea681da 1785.TP
69119dc7 1786.IR /proc/[pid]/task " (since Linux 2.6.0-test6)"
afcaf646
MK
1787This is a directory that contains one subdirectory
1788for each thread in the process.
69119dc7
MK
1789The name of each subdirectory is the numerical thread ID
1790.RI ( [tid] )
1791of the thread (see
afcaf646
MK
1792.BR gettid (2)).
1793Within each of these subdirectories, there is a set of
1794files with the same names and contents as under the
69119dc7 1795.I /proc/[pid]
afcaf646
MK
1796directories.
1797For attributes that are shared by all threads, the contents for
1798each of the files under the
69119dc7 1799.I task/[tid]
afcaf646 1800subdirectories will be the same as in the corresponding
c13182ef 1801file in the parent
69119dc7 1802.I /proc/[pid]
afcaf646 1803directory
c13182ef 1804(e.g., in a multithreaded process, all of the
69119dc7 1805.I task/[tid]/cwd
c13182ef 1806files will have the same value as the
69119dc7 1807.I /proc/[pid]/cwd
c13182ef 1808file in the parent directory, since all of the threads in a process
afcaf646
MK
1809share a working directory).
1810For attributes that are distinct for each thread,
c13182ef 1811the corresponding files under
69119dc7 1812.I task/[tid]
afcaf646 1813may have different values (e.g., various fields in each of the
69119dc7 1814.I task/[tid]/status
afcaf646
MK
1815files may be different for each thread).
1816
1817.\" The following was still true as at kernel 2.6.13
1818In a multithreaded process, the contents of the
69119dc7 1819.I /proc/[pid]/task
c13182ef 1820directory are not available if the main thread has already terminated
afcaf646
MK
1821(typically by calling
1822.BR pthread_exit (3)).
1823.TP
2054f761
MK
1824.IR /proc/[pid]/wchan " (since Linux 2.6.0)"
1825The symbolic name corresponding to the location
1826in the kernel where the process is sleeping.
1827.TP
fea681da 1828.I /proc/apm
097585ed
MK
1829Advanced power management version and battery information when
1830.B CONFIG_APM
1831is defined at kernel compilation time.
fea681da
MK
1832.TP
1833.I /proc/bus
1834Contains subdirectories for installed busses.
1835.TP
1836.I /proc/bus/pccard
59a40ed7 1837Subdirectory for PCMCIA devices when
097585ed
MK
1838.B CONFIG_PCMCIA
1839is set at kernel compilation time.
fea681da 1840.TP
1509ca0e
MK
1841.IR /proc/[pid]/timers " (since Linux 3.10)"
1842.\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5
1843.\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0
1844A list of the POSIX timers for this process.
9d54c087 1845Each timer is listed with a line that started with the string "ID:".
1509ca0e
MK
1846For example:
1847
1848.in +4n
1849.nf
1850ID: 1
1851signal: 60/00007fff86e452a8
1852notify: signal/pid.2634
1853ClockID: 0
1854ID: 0
1855signal: 60/00007fff86e452a8
1856notify: signal/pid.2634
1857ClockID: 1
1858.fi
1859.in
1860
1861The lines shown for each timer have the following meanings:
1862.RS
1863.TP
1864.I ID
1865The ID for this timer.
1866This is not the same as the timer ID returned by
1867.BR timer_create (2);
1868rather, it is the same kernel-internal ID that is available via the
1869.I si_timerid
1870field of the
1871.IR siginfo_t
1872structure (see
1873.BR sigaction (2)).
1874.TP
1875.I signal
1876This is the signal number that this timer uses to deliver notifications
1877followed by a slash, and then the
1878.I sigev_value.sival_ptr
1879value supplied to the signal handler.
1880Valid only for timers that notify via a signal.
1881.TP
1882.I notify
1883The part before the slash specifies the mechanism
1884that this timer uses to deliver notifications,
1885and is one of "thread", "signal", or "none".
1886Immediately following the slash is either the string "tid" for timers
1887with
1888.B SIGEV_THREAD_ID
1889notification, or "pid" for timers that notify by other mechanisms.
1890Following the "." is the PID of the process that will be delivered
1891a signal if the timer delivers notifications via a signal.
1892.TP
1893.I ClockID
1894This field identifies the clock that the timer uses for measuring time.
1895For most clocks, this is a number that matches one of the user-space
1896.BR CLOCK_*
9d54c087 1897constants exposed via
1509ca0e
MK
1898.IR <time.h> .
1899.B CLOCK_PROCESS_CPUTIME_ID
1900timers display with a value of -6
1901in this field.
1902.B CLOCK_THREAD_CPUTIME_ID
1903timers display with a value of -2
1904in this field.
1905.RE
1906.TP
fea681da
MK
1907.I /proc/bus/pccard/drivers
1908.TP
1909.I /proc/bus/pci
c13182ef 1910Contains various bus subdirectories and pseudo-files containing
59a40ed7 1911information about PCI busses, installed devices, and device
c13182ef
MK
1912drivers.
1913Some of these files are not ASCII.
fea681da
MK
1914.TP
1915.I /proc/bus/pci/devices
59a40ed7 1916Information about PCI devices.
c13182ef 1917They may be accessed through
fea681da
MK
1918.BR lspci (8)
1919and
1920.BR setpci (8).
1921.TP
1922.I /proc/cmdline
c13182ef
MK
1923Arguments passed to the Linux kernel at boot time.
1924Often done via a boot manager such as
59a40ed7
MK
1925.BR lilo (8)
1926or
1927.BR grub (8).
f6e524c4
MK
1928.TP
1929.IR /proc/config.gz " (since Linux 2.6)"
1930This file exposes the configuration options that were used
c3d9780d 1931to build the currently running kernel,
f6e524c4
MK
1932in the same format as they would be shown in the
1933.I .config
1934file that resulted when configuring the kernel (using
1935.IR "make xconfig" ,
1936.IR "make config" ,
1937or similar).
1938The file contents are compressed; view or search them using
f78ed33a
MK
1939.BR zcat (1)
1940and
1941.BR zgrep (1).
f6e524c4 1942As long as no changes have been made to the following file,
250e01ec
MK
1943the contents of
1944.I /proc/config.gz
1945are the same as those provided by :
f6e524c4
MK
1946.in +4n
1947.nf
1948
c3074d70 1949cat /lib/modules/$(uname \-r)/build/.config
f6e524c4
MK
1950.fi
1951.in
250e01ec
MK
1952.IP
1953.I /proc/config.gz
90878f7c 1954is provided only if the kernel is configured with
250e01ec 1955.BR CONFIG_IKCONFIG_PROC .
fea681da
MK
1956.TP
1957.I /proc/cpuinfo
1958This is a collection of CPU and system architecture dependent items,
1959for each supported architecture a different list.
1960Two common entries are \fIprocessor\fP which gives CPU number and
c13182ef
MK
1961\fIbogomips\fP; a system constant that is calculated
1962during kernel initialization.
1963SMP machines have information for
fea681da 1964each CPU.
a091f002
MK
1965The
1966.BR lscpu (1)
1967command gathers its information from this file.
fea681da
MK
1968.TP
1969.I /proc/devices
c13182ef
MK
1970Text listing of major numbers and device groups.
1971This can be used by MAKEDEV scripts for consistency with the kernel.
fea681da
MK
1972.TP
1973.IR /proc/diskstats " (since Linux 2.5.69)"
1974This file contains disk I/O statistics for each disk device.
66a9882e 1975See the Linux kernel source file
fea681da
MK
1976.I Documentation/iostats.txt
1977for further information.
1978.TP
1979.I /proc/dma
c13182ef 1980This is a list of the registered \fIISA\fP DMA (direct memory access)
fea681da
MK
1981channels in use.
1982.TP
1983.I /proc/driver
1984Empty subdirectory.
1985.TP
1986.I /proc/execdomains
1987List of the execution domains (ABI personalities).
1988.TP
1989.I /proc/fb
097585ed
MK
1990Frame buffer information when
1991.B CONFIG_FB
1992is defined during kernel compilation.
fea681da
MK
1993.TP
1994.I /proc/filesystems
9ee4a2b6
MK
1995A text listing of the filesystems which are supported by the kernel,
1996namely filesystems which were compiled into the kernel or whose kernel
6387216b
MK
1997modules are currently loaded.
1998(See also
fb477da2 1999.BR filesystems (5).)
9ee4a2b6 2000If a filesystem is marked with "nodev",
809d0164 2001this means that it does not require a block device to be mounted
9ee4a2b6 2002(e.g., virtual filesystem, network filesystem).
809d0164
MK
2003
2004Incidentally, this file may be used by
2005.BR mount (8)
9ee4a2b6
MK
2006when no filesystem is specified and it didn't manage to determine the
2007filesystem type.
2008Then filesystems contained in this file are tried
809d0164 2009(excepted those that are marked with "nodev").
fea681da
MK
2010.TP
2011.I /proc/fs
df352acc 2012.\" FIXME Much more needs to be said about /proc/fs
91085d85 2013.\"
df352acc
MK
2014Contains subdirectories that in turn contain files
2015with information about (certain) mounted filesystems.
fea681da
MK
2016.TP
2017.I /proc/ide
2018This directory
59a40ed7
MK
2019exists on systems with the IDE bus.
2020There are directories for each IDE channel and attached device.
c13182ef 2021Files include:
fea681da 2022
a08ea57c 2023.in +4n
fea681da
MK
2024.nf
2025cache buffer size in KB
2026capacity number of sectors
2027driver driver version
2028geometry physical and logical geometry
9fdfa163 2029identify in hexadecimal
fea681da
MK
2030media media type
2031model manufacturer's model number
2032settings drive settings
9fdfa163
MK
2033smart_thresholds in hexadecimal
2034smart_values in hexadecimal
fea681da 2035.fi
a08ea57c 2036.in
fea681da 2037
c13182ef 2038The
fea681da
MK
2039.BR hdparm (8)
2040utility provides access to this information in a friendly format.
2041.TP
2042.I /proc/interrupts
23ec6ff0
MK
2043This is used to record the number of interrupts per CPU per IO device.
2044Since Linux 2.6.24,
2045for the i386 and x86_64 architectures, at least, this also includes
2046interrupts internal to the system (that is, not associated with a device
2047as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt),
2048and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling
2049interrupt), CAL (remote function call interrupt), and possibly others.
2050Very easy to read formatting, done in ASCII.
fea681da
MK
2051.TP
2052.I /proc/iomem
2053I/O memory map in Linux 2.4.
2054.TP
2055.I /proc/ioports
c13182ef 2056This is a list of currently registered Input-Output port regions that
fea681da
MK
2057are in use.
2058.TP
2059.IR /proc/kallsyms " (since Linux 2.5.71)"
2060This holds the kernel exported symbol definitions used by the
2061.BR modules (X)
2062tools to dynamically link and bind loadable modules.
2063In Linux 2.5.47 and earlier, a similar file with slightly different syntax
2064was named
2065.IR ksyms .
2066.TP
2067.I /proc/kcore
2068This file represents the physical memory of the system and is stored
c13182ef
MK
2069in the ELF core file format.
2070With this pseudo-file, and an unstripped
9a67332e
MK
2071kernel
2072.RI ( /usr/src/linux/vmlinux )
2073binary, GDB can be used to
fea681da
MK
2074examine the current state of any kernel data structures.
2075
2076The total length of the file is the size of physical memory (RAM) plus
20774KB.
2078.TP
2079.I /proc/kmsg
2080This file can be used instead of the
2081.BR syslog (2)
c13182ef
MK
2082system call to read kernel messages.
2083A process must have superuser
fea681da 2084privileges to read this file, and only one process should read this
c13182ef
MK
2085file.
2086This file should not be read if a syslog process is running
fea681da
MK
2087which uses the
2088.BR syslog (2)
2089system call facility to log kernel messages.
2090
2091Information in this file is retrieved with the
c4517613 2092.BR dmesg (1)
fea681da
MK
2093program.
2094.TP
ff56ac8b
MK
2095.IR /proc/kpagecount " (since Linux 2.6.25)"
2096This file contains a 64-bit count of the number of
2097times each physical page frame is mapped,
2098indexed by page frame number (see the discussion of
2099.IR /proc/[pid]/pagemap ).
2100.IP
2101The
2102.IR /proc/kpagecount
2103file is present only if the
2104.B CONFIG_PROC_PAGE_MONITOR
59d566a9
MK
2105kernel configuration option is enabled.
2106.TP
2107.IR /proc/kpageflags " (since Linux 2.6.25)"
2108This file contains 64-bit masks corresponding to each physical page frame;
2109it is indexed by page frame number (see the discussion of
2110.IR /proc/[pid]/pagemap ).
2111The bits are as follows:
2112
2113 0 - KPF_LOCKED
2114 1 - KPF_ERROR
2115 2 - KPF_REFERENCED
2116 3 - KPF_UPTODATE
2117 4 - KPF_DIRTY
2118 5 - KPF_LRU
2119 6 - KPF_ACTIVE
2120 7 - KPF_SLAB
2121 8 - KPF_WRITEBACK
2122 9 - KPF_RECLAIM
2123 10 - KPF_BUDDY
2124 11 - KPF_MMAP (since Linux 2.6.31)
2125 12 - KPF_ANON (since Linux 2.6.31)
2126 13 - KPF_SWAPCACHE (since Linux 2.6.31)
2127 14 - KPF_SWAPBACKED (since Linux 2.6.31)
2128 15 - KPF_COMPOUND_HEAD (since Linux 2.6.31)
2129 16 - KPF_COMPOUND_TAIL (since Linux 2.6.31)
2130 16 - KPF_HUGE (since Linux 2.6.31)
2131 18 - KPF_UNEVICTABLE (since Linux 2.6.31)
2132 19 - KPF_HWPOISON (since Linux 2.6.31)
2133 20 - KPF_NOPAGE (since Linux 2.6.31)
2134 21 - KPF_KSM (since Linux 2.6.32)
2135 22 - KPF_THP (since Linux 3.4)
2136
2137For further details on the meanings of these bits,
2138see the kernel source file
2139.IR Documentation/vm/pagemap.txt .
2140Before kernel 2.6.29,
2141.\" commit ad3bdefe877afb47480418fdb05ecd42842de65e
2142.\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110
2143.BR KPF_WRITEBACK ,
2144.BR KPF_RECLAIM ,
2145.BR KPF_BUDDY ,
2146and
2147.BR KPF_LOCKED
2148did not report correctly.
2149.IP
2150The
2151.IR /proc/kpageflags
2152file is present only if the
2153.B CONFIG_PROC_PAGE_MONITOR
ff56ac8b
MK
2154kernel configuration option is enabled.
2155.TP
fea681da
MK
2156.IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
2157See
2158.IR /proc/kallsyms .
2159.TP
2160.I /proc/loadavg
6b05dc38
MK
2161The first three fields in this file are load average figures
2162giving the number of jobs in the run queue (state R)
fea681da
MK
2163or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
2164They are the same as the load average numbers given by
2165.BR uptime (1)
2166and other programs.
6b05dc38 2167The fourth field consists of two numbers separated by a slash (/).
78fc91ec
EDB
2168The first of these is the number of currently runnable kernel
2169scheduling entities (processes, threads).
6b05dc38
MK
2170The value after the slash is the number of kernel scheduling entities
2171that currently exist on the system.
2172The fifth field is the PID of the process that was most
2173recently created on the system.
fea681da
MK
2174.TP
2175.I /proc/locks
2176This file shows current file locks
2177.RB ( flock "(2) and " fcntl (2))
2178and leases
2179.RB ( fcntl (2)).
2180.TP
89dd5f8a 2181.IR /proc/malloc " (only up to and including Linux 2.2)"
59a40ed7 2182.\" It looks like this only ever did something back in 1.0 days
90878f7c 2183This file is present only if
89dd5f8a 2184.B CONFIG_DEBUG_MALLOC
097585ed 2185was defined during compilation.
fea681da
MK
2186.TP
2187.I /proc/meminfo
77b802ec
MK
2188This file reports statistics about memory usage on the system.
2189It is used by
fea681da
MK
2190.BR free (1)
2191to report the amount of free and used memory (both physical and swap)
2192on the system as well as the shared memory and buffers used by the
2193kernel.
3ba3d5b1
MK
2194Each line of the file consists of a parameter name, followed by a colon,
2195the value of the parameter, and an option unit of measurement (e.g., "kB").
2196The list below describes the parameter names and
2197the format specifier required to read the field value.
2198Except as noted below,
2199all of the fields have been present since at least Linux 2.6.0.
86cf87d7 2200Some fields are displayed only if the kernel was configured
3ba3d5b1
MK
2201with various options; those dependencies are noted in the list.
2202.RS
2203.TP
2204.IR MemTotal " %lu"
449dd4e2 2205Total usable RAM (i.e., physical RAM minus a few reserved
99e91586 2206bits and the kernel binary code).
3ba3d5b1
MK
2207.TP
2208.IR MemFree " %lu"
7bccb7d4
DP
2209The sum of
2210.IR LowFree + HighFree .
3ba3d5b1
MK
2211.TP
2212.IR Buffers " %lu"
99e91586 2213Relatively temporary storage for raw disk blocks that
3ba3d5b1
MK
2214shouldn't get tremendously large (20MB or so).
2215.TP
2216.IR Cached " %lu"
2217In-memory cache for files read from the disk (the page cache).
2218Doesn't include
2219.IR SwapCached .
2220.TP
2221.IR SwapCached " %lu"
2222Memory that once was swapped out, is swapped back in but
2223still also is in the swap file.
fa1d2749 2224(If memory pressure is high, these pages
3ba3d5b1 2225don't need to be swapped out again because they are already
99e91586 2226in the swap file.
3ba3d5b1
MK
2227This saves I/O.)
2228.TP
2229.IR Active " %lu"
2230Memory that has been used more recently and usually not
2231reclaimed unless absolutely necessary.
2232.TP
2233.IR Inactive " %lu"
2234Memory which has been less recently used.
2235It is more eligible to be reclaimed for other purposes.
2236.TP
2237.IR Active(anon) " %lu (since Linux 2.6.28)"
2238[To be documented.]
2239.TP
2240.IR Inactive(anon) " %lu (since Linux 2.6.28)"
2241[To be documented.]
2242.TP
2243.IR Active(file) " %lu (since Linux 2.6.28)"
2244[To be documented.]
2245.TP
2246.IR Inactive(file) " %lu (since Linux 2.6.28)"
2247[To be documented.]
2248.TP
2249.IR Unevictable " %lu (since Linux 2.6.28)"
2250(From Linux 2.6.28 to 2.6.30,
2251\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
2252[To be documented.]
2253.TP
46fbfc07 2254.IR Mlocked " %lu (since Linux 2.6.28)"
3ba3d5b1
MK
2255(From Linux 2.6.28 to 2.6.30,
2256\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
2257[To be documented.]
2258.TP
2259.IR HighTotal " %lu"
2260(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2261Total amount of highmem.
99e91586 2262Highmem is all memory above ~860MB of physical memory.
3ba3d5b1
MK
2263Highmem areas are for use by user-space programs,
2264or for the page cache.
2265The kernel must use tricks to access
2266this memory, making it slower to access than lowmem.
2267.TP
2268.IR HighFree " %lu
2269(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2270Amount of free highmem.
2271.TP
2272.IR LowTotal " %lu
2273(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2274Total amount of lowmem.
2275Lowmem is memory which can be used for everything that
2276highmem can be used for, but it is also available for the
2277kernel's use for its own data structures.
2278Among many other things,
99e91586 2279it is where everything from
7bccb7d4
DP
2280.I Slab
2281is allocated.
3ba3d5b1
MK
2282Bad things happen when you're out of lowmem.
2283.TP
2284.IR LowFree " %lu
2285(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
2286Amount of free lowmem.
2287.TP
2288.IR MmapCopy " %lu (since Linux 2.6.29)"
99e91586
DP
2289.RB ( CONFIG_MMU
2290is required.)
3ba3d5b1
MK
2291[To be documented.]
2292.TP
2293.IR SwapTotal " %lu"
2294Total amount of swap space available.
2295.TP
2296.IR SwapFree " %lu"
c16d4f25 2297Amount of swap space that is currently unused.
3ba3d5b1
MK
2298.TP
2299.IR Dirty " %lu"
2300Memory which is waiting to get written back to the disk.
2301.TP
2302.IR Writeback " %lu"
2303Memory which is actively being written back to the disk.
2304.TP
2305.IR AnonPages " %lu (since Linux 2.6.18)"
2306Non-file backed pages mapped into user-space page tables.
2307.TP
2308.IR Mapped " %lu"
fda70f5b
MK
2309Files which have been mapped into memory (with
2310.BR mmap (2)),
2311such as libraries.
3ba3d5b1
MK
2312.TP
2313.IR Shmem " %lu (since Linux 2.6.32)"
2314[To be documented.]
2315.TP
2316.IR Slab " %lu"
2317In-kernel data structures cache.
2318.TP
2319.IR SReclaimable " %lu (since Linux 2.6.19)"
7bccb7d4
DP
2320Part of
2321.IR Slab ,
2322that might be reclaimed, such as caches.
3ba3d5b1
MK
2323.TP
2324.IR SUnreclaim " %lu (since Linux 2.6.19)"
7bccb7d4
DP
2325Part of
2326.IR Slab ,
2327that cannot be reclaimed on memory pressure.
3ba3d5b1
MK
2328.TP
2329.IR KernelStack " %lu (since Linux 2.6.32)"
2330Amount of memory allocated to kernel stacks.
2331.TP
2332.IR PageTables " %lu (since Linux 2.6.18)"
2333Amount of memory dedicated to the lowest level of page tables.
2334.TP
2335.IR Quicklists " %lu (since Linux 2.6.27)"
2336(\fBCONFIG_QUICKLIST\fP is required.)
2337[To be documented.]
2338.TP
2339.IR NFS_Unstable " %lu (since Linux 2.6.18)"
2340NFS pages sent to the server, but not yet committed to stable storage.
2341.TP
2342.IR Bounce " %lu (since Linux 2.6.18)"
2343Memory used for block device "bounce buffers".
2344.TP
2345.IR WritebackTmp " %lu (since Linux 2.6.26)"
2346Memory used by FUSE for temporary writeback buffers.
2347.TP
2348.IR CommitLimit " %lu (since Linux 2.6.10)"
cd7b6c40
MK
2349This is the total amount of memory currently available to
2350be allocated on the system, expressed in kilobytes.
90878f7c
MK
2351This limit is adhered to
2352only if strict overcommit accounting is enabled (mode 2 in
cd7b6c40
MK
2353.IR /proc/sys/vm/overcommit_memory ).
2354The limit is calculated according to the formula described under
2355.IR /proc/sys/vm/overcommit_memory .
2356For further details, see the kernel source file
3ba3d5b1
MK
2357.IR Documentation/vm/overcommit-accounting .
2358.TP
2359.IR Committed_AS " %lu"
2360The amount of memory presently allocated on the system.
2361The committed memory is a sum of all of the memory which
2362has been allocated by processes, even if it has not been
2363"used" by them as of yet.
2364A process which allocates 1GB of memory (using
2365.BR malloc (3)
33a0ccb2 2366or similar), but touches only 300MB of that memory will show up
90878f7c 2367as using only 300MB of memory even if it has the address space
3ba3d5b1 2368allocated for the entire 1GB.
cd7b6c40 2369
3ba3d5b1
MK
2370This 1GB is memory which has been "committed" to by the VM
2371and can be used at any time by the allocating application.
cd7b6c40
MK
2372With strict overcommit enabled on the system (mode 2 in
2373IR /proc/sys/vm/overcommit_memory ),
3ba3d5b1
MK
2374allocations which would exceed the
2375.I CommitLimit
cd7b6c40 2376will not be permitted.
3ba3d5b1
MK
2377This is useful if one needs to guarantee that processes will not
2378fail due to lack of memory once that memory has been successfully allocated.
2379.TP
2380.IR VmallocTotal " %lu"
2381Total size of vmalloc memory area.
2382.TP
2383.IR VmallocUsed " %lu"
2384Amount of vmalloc area which is used.
2385.TP
2386.IR VmallocChunk " %lu"
2387Largest contiguous block of vmalloc area which is free.
2388.TP
2389.IR HardwareCorrupted " %lu (since Linux 2.6.32)"
2390(\fBCONFIG_MEMORY_FAILURE\fP is required.)
2391[To be documented.]
2392.TP
2393.IR AnonHugePages " %lu (since Linux 2.6.38)"
2394(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
7fac88a9 2395Non-file backed huge pages mapped into user-space page tables.
3ba3d5b1
MK
2396.TP
2397.IR HugePages_Total " %lu"
2398(\fBCONFIG_HUGETLB_PAGE\fP is required.)
2399The size of the pool of huge pages.
2400.TP
2401.IR HugePages_Free " %lu"
2402(\fBCONFIG_HUGETLB_PAGE\fP is required.)
2403The number of huge pages in the pool that are not yet allocated.
2404.TP
2405.IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
2406(\fBCONFIG_HUGETLB_PAGE\fP is required.)
2407This is the number of huge pages for
2408which a commitment to allocate from the pool has been made,
2409but no allocation has yet been made.
2410These reserved huge pages
2411guarantee that an application will be able to allocate a
2412huge page from the pool of huge pages at fault time.
2413.TP
aa8a6b4f 2414.IR HugePages_Surp " %lu (since Linux 2.6.24)"
3ba3d5b1
MK
2415(\fBCONFIG_HUGETLB_PAGE\fP is required.)
2416This is the number of huge pages in
2417the pool above the value in
2418.IR /proc/sys/vm/nr_hugepages .
2419The maximum number of surplus huge pages is controlled by
2420.IR /proc/sys/vm/nr_overcommit_hugepages .
2421.TP
2422.IR Hugepagesize " %lu"
2423(\fBCONFIG_HUGETLB_PAGE\fP is required.)
2424The size of huge pages.
2425.RE
fea681da 2426.TP
aa341984
MK
2427.I /proc/modules
2428A text list of the modules that have been loaded by the system.
2429See also
2430.BR lsmod (8).
2431.TP
fea681da 2432.I /proc/mounts
c1eea65a 2433Before kernel 2.4.19, this file was a list
9ee4a2b6 2434of all the filesystems currently mounted on the system.
732e54dd 2435With the introduction of per-process mount namespaces in
c1eea65a
MK
2436Linux 2.4.19, this file became a link to
2437.IR /proc/self/mounts ,
732e54dd 2438which lists the mount points of the process's own mount namespace.
fea681da 2439The format of this file is documented in
31e9a9ec 2440.BR fstab (5).
fea681da 2441.TP
fea681da 2442.I /proc/mtrr
c13182ef 2443Memory Type Range Registers.
66a9882e 2444See the Linux kernel source file
cfe70b66 2445.I Documentation/mtrr.txt
fea681da
MK
2446for details.
2447.TP
2448.I /proc/net
2449various net pseudo-files, all of which give the status of some part of
c13182ef
MK
2450the networking layer.
2451These files contain ASCII structures and are,
59a40ed7
MK
2452therefore, readable with
2453.BR cat (1).
c13182ef 2454However, the standard
fea681da
MK
2455.BR netstat (8)
2456suite provides much cleaner access to these files.
2457.TP
2458.I /proc/net/arp
2459This holds an ASCII readable dump of the kernel ARP table used for
c13182ef 2460address resolutions.
01d0a447 2461It will show both dynamically learned and preprogrammed ARP entries.
c13182ef 2462The format is:
fea681da
MK
2463
2464.nf
2465.ft CW
2466.in 8n
2467IP address HW type Flags HW address Mask Device
2468192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
2469192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
2470.ft
2471.fi
2472.in
2473
6c04f928 2474Here "IP address" is the IPv4 address of the machine and the "HW type"
c13182ef
MK
2475is the hardware type of the address from RFC\ 826.
2476The flags are the internal
9a67332e
MK
2477flags of the ARP structure (as defined in
2478.IR /usr/include/linux/if_arp.h )
2479and
6c04f928 2480the "HW address" is the data link layer mapping for that IP address if
fea681da
MK
2481it is known.
2482.TP
2483.I /proc/net/dev
c13182ef
MK
2484The dev pseudo-file contains network device status information.
2485This gives
2486the number of received and sent packets, the number of errors and
fea681da 2487collisions
c13182ef
MK
2488and other basic statistics.
2489These are used by the
fea681da 2490.BR ifconfig (8)
c13182ef
MK
2491program to report device status.
2492The format is:
fea681da
MK
2493
2494.nf
2495.ft CW
2496.in 1n
2497Inter-| Receive | Transmit
2498 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
2499 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
2500 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
2501 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
2502 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
2503.in
2504.ft
2505.fi
2506.\" .TP
2507.\" .I /proc/net/ipx
2508.\" No information.
2509.\" .TP
2510.\" .I /proc/net/ipx_route
2511.\" No information.
2512.TP
2513.I /proc/net/dev_mcast
2514Defined in
2515.IR /usr/src/linux/net/core/dev_mcast.c :
2516.nf
2517.in +5
9fdfa163 2518indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
25192 eth0 1 0 01005e000001
25203 eth1 1 0 01005e000001
25214 eth2 1 0 01005e000001
2522.in
2523.fi
2524.TP
2525.I /proc/net/igmp
c13182ef
MK
2526Internet Group Management Protocol.
2527Defined in
fea681da
MK
2528.IR /usr/src/linux/net/core/igmp.c .
2529.TP
2530.I /proc/net/rarp
2531This file uses the same format as the
2532.I arp
2533file and contains the current reverse mapping database used to provide
2534.BR rarp (8)
c13182ef
MK
2535reverse address lookup services.
2536If RARP is not configured into the
fea681da
MK
2537kernel,
2538this file will not be present.
2539.TP
2540.I /proc/net/raw
c13182ef
MK
2541Holds a dump of the RAW socket table.
2542Much of the information is not of
fea681da 2543use
c13182ef 2544apart from debugging.
6c04f928 2545The "sl" value is the kernel hash slot for the
fea681da 2546socket,
6c04f928
MK
2547the "local_address" is the local address and protocol number pair.
2548\&"St" is
c13182ef
MK
2549the internal status of the socket.
2550The "tx_queue" and "rx_queue" are the
fea681da 2551outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 2552The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
fdc196f5
MK
2553The "uid"
2554field holds the effective UID of the creator of the socket.
fea681da
MK
2555.\" .TP
2556.\" .I /proc/net/route
2557.\" No information, but looks similar to
2558.\" .BR route (8).
2559.TP
2560.I /proc/net/snmp
c13182ef 2561This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
fea681da 2562management
763f0e47 2563information bases for an SNMP agent.
fea681da
MK
2564.TP
2565.I /proc/net/tcp
c13182ef
MK
2566Holds a dump of the TCP socket table.
2567Much of the information is not
2568of use apart from debugging.
2569The "sl" value is the kernel hash slot
6beb1671
MK
2570for the socket, the "local_address" is the local address and port number pair.
2571The "rem_address" is the remote address and port number pair
6c04f928
MK
2572(if connected).
2573\&"St" is the internal status of the socket.
2574The "tx_queue" and "rx_queue" are the
fea681da 2575outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 2576The "tr", "tm\->when", and "rexmits" fields hold internal information of
fdc196f5
MK
2577the kernel socket state and are only useful for debugging.
2578The "uid"
2579field holds the effective UID of the creator of the socket.
fea681da
MK
2580.TP
2581.I /proc/net/udp
c13182ef
MK
2582Holds a dump of the UDP socket table.
2583Much of the information is not of
2584use apart from debugging.
2585The "sl" value is the kernel hash slot for the
6beb1671
MK
2586socket, the "local_address" is the local address and port number pair.
2587The "rem_address" is the remote address and port number pair
fea681da
MK
2588(if connected). "St" is the internal status of the socket.
2589The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
c13182ef 2590in terms of kernel memory usage.
94e9d9fe 2591The "tr", "tm\->when", and "rexmits" fields
c13182ef 2592are not used by UDP.
fdc196f5
MK
2593The "uid"
2594field holds the effective UID of the creator of the socket.
fea681da
MK
2595The format is:
2596
2597.nf
2598.ft CW
2599.in 1n
94e9d9fe 2600sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
fea681da
MK
2601 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
2602 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
2603 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
2604.in
2605.ft
2606.fi
2607.TP
2608.I /proc/net/unix
008f1ecc 2609Lists the UNIX domain sockets present within the system and their
c13182ef
MK
2610status.
2611The format is:
fea681da
MK
2612.nf
2613.sp .5
2614.ft CW
2615Num RefCount Protocol Flags Type St Path
2616 0: 00000002 00000000 00000000 0001 03
2617 1: 00000001 00000000 00010000 0001 01 /dev/printer
2618.ft
2619.sp .5
2620.fi
2621
6c04f928
MK
2622Here "Num" is the kernel table slot number, "RefCount" is the number
2623of users of the socket, "Protocol" is currently always 0, "Flags"
fea681da 2624represent the internal kernel flags holding the status of the
c13182ef 2625socket.
008f1ecc 2626Currently, type is always "1" (UNIX domain datagram sockets are
6c04f928
MK
2627not yet supported in the kernel).
2628\&"St" is the internal state of the
fea681da
MK
2629socket and Path is the bound path (if any) of the socket.
2630.TP
2631.I /proc/partitions
f042d149
MK
2632Contains the major and minor numbers of each partition as well as the number
2633of 1024-byte blocks and the partition name.
fea681da
MK
2634.TP
2635.I /proc/pci
2636This is a listing of all PCI devices found during kernel initialization
2637and their configuration.
2990d781 2638
59a40ed7
MK
2639This file has been deprecated in favor of a new
2640.I /proc
2990d781
MK
2641interface for PCI
2642.RI ( /proc/bus/pci ).
2643It became optional in Linux 2.2 (available with
2644.B CONFIG_PCI_OLD_PROC
2645set at kernel compilation).
24b74457 2646It became once more nonoptionally enabled in Linux 2.4.
2990d781
MK
2647Next, it was deprecated in Linux 2.6 (still available with
2648.B CONFIG_PCI_LEGACY_PROC
2649set), and finally removed altogether since Linux 2.6.17.
b4e9ee8f
MK
2650.\" FIXME /proc/sched_debug
2651.\" .TP
2652.\" .IR /proc/sched_debug " (since Linux 2.6.23)"
69119dc7 2653.\" See also /proc/[pid]/sched
caea7868
MK
2654.TP
2655.IR /proc/profile " (since Linux 2.4)"
2656This file is present only if the kernel was booted with the
2657.I profile=1
2658command-line option.
2659It exposes kernel profiling information in a binary format for use by
2660.BR readprofile (1).
2661Writing (e.g., an empty string) to this file resets the profiling counters;
2662on some architectures,
2663writing a binary integer "profiling multiplier" of size
2664.IR sizeof(int)
8a3ac89a 2665sets the profiling interrupt frequency.
fea681da
MK
2666.TP
2667.I /proc/scsi
59a40ed7
MK
2668A directory with the
2669.I scsi
2670mid-level pseudo-file and various SCSI low-level
2990d781
MK
2671driver directories,
2672which contain a file for each SCSI host in this system, all of
c13182ef
MK
2673which give the status of some part of the SCSI IO subsystem.
2674These files contain ASCII structures and are, therefore, readable with
2990d781 2675.BR cat (1).
fea681da 2676
c13182ef 2677You can also write to some of the files to reconfigure the subsystem or
59a40ed7 2678switch certain features on or off.
fea681da
MK
2679.TP
2680.I /proc/scsi/scsi
c13182ef 2681This is a listing of all SCSI devices known to the kernel.
59a40ed7 2682The listing is similar to the one seen during bootup.
c13182ef 2683scsi currently supports only the \fIadd-single-device\fP command which
59a40ed7
MK
2684allows root to add a hotplugged device to the list of known devices.
2685
2686The command
2687.in +4n
2688.nf
2689
2690echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi
fea681da 2691
59a40ed7
MK
2692.fi
2693.in
c13182ef
MK
2694will cause
2695host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
2696If there
fea681da
MK
2697is already a device known on this address or the address is invalid, an
2698error will be returned.
2699.TP
2700.I /proc/scsi/[drivername]
c13182ef
MK
2701\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
2702aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
2703scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
2704These directories show up for all drivers that registered at least one
59a40ed7 2705SCSI HBA.
c13182ef 2706Every directory contains one file per registered host.
59a40ed7 2707Every host-file is named after the number the host was assigned during
c13182ef 2708initialization.
fea681da 2709
c13182ef 2710Reading these files will usually show driver and host configuration,
f78ed33a 2711statistics, and so on.
fea681da
MK
2712
2713Writing to these files allows different things on different hosts.
2714For example, with the \fIlatency\fP and \fInolatency\fP commands,
2715root can switch on and off command latency measurement code in the
c13182ef
MK
2716eata_dma driver.
2717With the \fIlockup\fP and \fIunlock\fP commands,
2718root can control bus lockups simulated by the scsi_debug driver.
fea681da
MK
2719.TP
2720.I /proc/self
59a40ed7
MK
2721This directory refers to the process accessing the
2722.I /proc
9ee4a2b6 2723filesystem,
59a40ed7
MK
2724and is identical to the
2725.I /proc
2726directory named by the process ID of the same process.
fea681da
MK
2727.TP
2728.I /proc/slabinfo
c13182ef 2729Information about kernel caches.
90878f7c 2730Since Linux 2.6.16 this file is present only if the
821643a8
MK
2731.B CONFIG_SLAB
2732kernel configuration option is enabled.
350038ff 2733The columns in
38f76cd2 2734.I /proc/slabinfo
350038ff 2735are:
a08ea57c 2736.in +4n
fea681da 2737.nf
a08ea57c 2738
fea681da
MK
2739cache-name
2740num-active-objs
2741total-objs
2742object-size
2743num-active-slabs
2744total-slabs
2745num-pages-per-slab
2746.fi
a08ea57c
MK
2747.in
2748
c13182ef 2749See
fea681da
MK
2750.BR slabinfo (5)
2751for details.
2752.TP
2753.I /proc/stat
c13182ef
MK
2754kernel/system statistics.
2755Varies with architecture.
2756Common
fea681da
MK
2757entries include:
2758.RS
2759.TP
2760\fIcpu 3357 0 4313 1362393\fP
bfbfcd18 2761The amount of time, measured in units of
268f000b
MK
2762USER_HZ (1/100ths of a second on most architectures, use
2763.IR sysconf(_SC_CLK_TCK)
2764to obtain the right value),
b81087ab 2765.\" 1024 on Alpha and ia64
ae3b8047
MK
2766that the system spent in various states:
2767.RS
2768.TP
2769.I user
ea0841f6 2770(1) Time spent in user mode.
ae3b8047
MK
2771.TP
2772.I nice
0633f951 2773(2) Time spent in user mode with low priority (nice).
9f1b9726 2774.TP
ae3b8047 2775.I system
0633f951 2776(3) Time spent in system mode.
ae3b8047
MK
2777.TP
2778.I idle
ea0841f6 2779(4) Time spent in the idle task.
b09b8526 2780.\" FIXME Actually, the following info about the /proc/stat 'cpu' field
e04a1f93
MK
2781.\" does not seem to be quite right (at least in 2.6.12 or 3.6):
2782.\" the idle time in /proc/uptime does not quite match this value
2783This value should be USER_HZ times the
4cb1deb7
MK
2784second entry in the
2785.I /proc/uptime
2786pseudo-file.
ae3b8047
MK
2787.TP
2788.IR iowait " (since Linux 2.5.41)"
ea0841f6 2789(5) Time waiting for I/O to complete.
ae3b8047
MK
2790.TP
2791.IR irq " (since Linux 2.6.0-test4)"
ea0841f6 2792(6) Time servicing interrupts.
ae3b8047 2793.TP
0633f951 2794.IR softirq " (since Linux 2.6.0-test4)"
ea0841f6 2795(7) Time servicing softirqs.
ae3b8047
MK
2796.TP
2797.IR steal " (since Linux 2.6.11)"
ea0841f6 2798(8) Stolen time, which is the time spent in other operating systems when
9de1f6cc 2799running in a virtualized environment
ae3b8047
MK
2800.TP
2801.IR guest " (since Linux 2.6.24)"
0633f951 2802(9) Time spent running a virtual CPU for guest
afef1764 2803operating systems under the control of the Linux kernel.
14c06953 2804.\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
d4fd4120
MK
2805.TP
2806.IR guest_nice " (since Linux 2.6.33)"
2807.\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
2808(10) Time spent running a niced guest (virtual CPU for guest
2809operating systems under the control of the Linux kernel).
ae3b8047 2810.RE
fea681da
MK
2811.TP
2812\fIpage 5741 1808\fP
2813The number of pages the system paged in and the number that were paged
2814out (from disk).
2815.TP
2816\fIswap 1 0\fP
2817The number of swap pages that have been brought in and out.
2818.TP
c13182ef 2819.\" FIXME The following is not the full picture for the 'intr' of
777f5a9e 2820.\" /proc/stat on 2.6:
fea681da 2821\fIintr 1462898\fP
bfbfcd18
MK
2822This line shows counts of interrupts serviced since boot time,
2823for each of the possible system interrupts.
d63ff76e 2824The first column is the total of all interrupts serviced
d6a56978
MK
2825including unnumbered architecture specific interrupts;
2826each subsequent column is the total for that particular numbered interrupt.
d63ff76e 2827Unnumbered interrupts are not shown, only summed into the total.
fea681da
MK
2828.TP
2829\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
636297e9 2830(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
bfbfcd18
MK
2831.br
2832(Linux 2.4 only)
fea681da
MK
2833.TP
2834\fIctxt 115315\fP
2835The number of context switches that the system underwent.
2836.TP
2837\fIbtime 769041601\fP
f49c451a 2838boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
fea681da
MK
2839.TP
2840\fIprocesses 86031\fP
2841Number of forks since boot.
bfbfcd18
MK
2842.TP
2843\fIprocs_running 6\fP
2844Number of processes in runnable state.
5fab2e7c 2845(Linux 2.5.45 onward.)
bfbfcd18
MK
2846.TP
2847\fIprocs_blocked 2\fP
2848Number of processes blocked waiting for I/O to complete.
5fab2e7c 2849(Linux 2.5.45 onward.)
fea681da
MK
2850.RE
2851.TP
2852.I /proc/swaps
c13182ef
MK
2853Swap areas in use.
2854See also
fea681da
MK
2855.BR swapon (8).
2856.TP
2857.I /proc/sys
2858This directory (present since 1.3.57) contains a number of files
2859and subdirectories corresponding to kernel variables.
2860These variables can be read and sometimes modified using
9ee4a2b6 2861the \fI/proc\fP filesystem, and the (deprecated)
fea681da 2862.BR sysctl (2)
c13182ef 2863system call.
fea681da 2864.TP
6ab7c0aa 2865.IR /proc/sys/abi " (since Linux 2.4.10)"
fea681da 2866This directory may contain files with application binary information.
6ab7c0aa 2867.\" On some systems, it is not present.
66a9882e 2868See the Linux kernel source file
6ab7c0aa
MK
2869.I Documentation/sysctl/abi.txt
2870for more information.
fea681da
MK
2871.TP
2872.I /proc/sys/debug
2873This directory may be empty.
2874.TP
2875.I /proc/sys/dev
e2badfdf 2876This directory contains device-specific information (e.g.,
9a67332e 2877.IR dev/cdrom/info ).
fea681da
MK
2878On
2879some systems, it may be empty.
2880.TP
2881.I /proc/sys/fs
49236d3c 2882This directory contains the files and subdirectories for kernel variables
9ee4a2b6 2883related to filesystems.
fea681da
MK
2884.TP
2885.I /proc/sys/fs/binfmt_misc
c13182ef 2886Documentation for files in this directory can be found
66a9882e 2887in the Linux kernel sources in
fea681da
MK
2888.IR Documentation/binfmt_misc.txt .
2889.TP
59a40ed7
MK
2890.IR /proc/sys/fs/dentry-state " (since Linux 2.2)"
2891This file contains information about the status of the
2892directory cache (dcache).
2893The file contains six numbers,
c13182ef 2894.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
59a40ed7 2895.I want_pages
fea681da 2896(pages requested by system) and two dummy values.
59a40ed7
MK
2897.RS
2898.IP * 2
2899.I nr_dentry
2900is the number of allocated dentries (dcache entries).
2901This field is unused in Linux 2.2.
2902.IP *
2903.I nr_unused
2904is the number of unused dentries.
2905.IP *
2906.I age_limit
2907.\" looks like this is unused in kernels 2.2 to 2.6
2908is the age in seconds after which dcache entries
2909can be reclaimed when memory is short.
2910.IP *
2911.I want_pages
2912.\" looks like this is unused in kernels 2.2 to 2.6
c7094399 2913is nonzero when the kernel has called shrink_dcache_pages() and the
fea681da 2914dcache isn't pruned yet.
59a40ed7 2915.RE
fea681da
MK
2916.TP
2917.I /proc/sys/fs/dir-notify-enable
2918This file can be used to disable or enable the
2919.I dnotify
2920interface described in
2921.BR fcntl (2)
2922on a system-wide basis.
2923A value of 0 in this file disables the interface,
2924and a value of 1 enables it.
2925.TP
2926.I /proc/sys/fs/dquot-max
2927This file shows the maximum number of cached disk quota entries.
2928On some (2.4) systems, it is not present.
2929If the number of free cached disk quota entries is very low and
2930you have some awesome number of simultaneous system users,
2931you might want to raise the limit.
2932.TP
2933.I /proc/sys/fs/dquot-nr
2934This file shows the number of allocated disk quota
2935entries and the number of free disk quota entries.
2936.TP
24cb4a4b 2937.IR /proc/sys/fs/epoll " (since Linux 2.6.28)"
242b46af
MK
2938This directory contains the file
2939.IR max_user_watches ,
24cb4a4b
MK
2940which can be used to limit the amount of kernel memory consumed by the
2941.I epoll
2942interface.
2943For further details, see