]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
nscd.conf.5: spfix
[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
MK
8.\"
9.\" This is free documentation; you can redistribute it and/or
10.\" modify it under the terms of the GNU General Public License as
11.\" published by the Free Software Foundation; either version 2 of
12.\" the License, or (at your option) any later version.
13.\"
14.\" The GNU General Public License's references to "object code"
15.\" and "executables" are to be interpreted as the output of any
16.\" document formatting or typesetting system, including
17.\" intermediate and printed output.
18.\"
19.\" This manual is distributed in the hope that it will be useful,
20.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
21.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22.\" GNU General Public License for more details.
23.\"
24.\" You should have received a copy of the GNU General Public
25.\" License along with this manual; if not, write to the Free
26.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
27.\" USA.
28.\"
29.\" Modified 1995-05-17 by faith@cs.unc.edu
30.\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com).
31.\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl
32.\" Modified 2001-12-16 by rwhron@earthlink.net
33.\" Modified 2002-07-13 by jbelton@shaw.ca
34.\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25
c11b1abf 35.\" by Michael Kerrisk <mtk.manpages@gmail.com>
5d6d14a0
MK
36.\" 2004-11-17, mtk -- updated notes on /proc/loadavg
37.\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8
568105c6
MK
38.\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list
39.\" 2005-05-12, mtk, updated 'stat'
6d64ca9c 40.\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/*
363f747c
MK
41.\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable
42.\" 2005-09-19, mtk, added /proc/zoneinfo
b4e9ee8f 43.\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7.
69119dc7
MK
44.\" 2008-06-05, mtk, Added /proc/[pid]/oom_score, /proc/[pid]/oom_adj,
45.\" /proc/[pid]/limits, /proc/[pid]/mountinfo, /proc/[pid]/mountstats,
46.\" and /proc/[pid]/fdinfo/*.
47.\" 2008-06-19, mtk, Documented /proc/[pid]/status.
cc2d5c36 48.\" 2008-07-15, mtk, added /proc/config.gz
363f747c 49.\"
c533af9d 50.\" FIXME 2.6.13 seems to have /proc/vmcore implemented
c13182ef
MK
51.\" in the source code, but there is no option available under
52.\" 'make xconfig'; eventually this should be fixed, and then info
53.\" from the patch-2.6.13 and change log could be used to write an
c533af9d 54.\" entry in this man page.
cc2d5c36 55.\" Needs CONFIG_VMCORE
8cf9de1b 56.\"
c13182ef
MK
57.\" FIXME cross check against Documentation/filesystems/proc.txt
58.\" to see what information could be imported from that file
c533af9d 59.\" into this file.
fea681da 60.\"
055024ed 61.TH PROC 5 2012-08-18 "Linux" "Linux Programmer's Manual"
fea681da 62.SH NAME
24d01c53 63proc \- process information pseudo-file system
fea681da
MK
64.SH DESCRIPTION
65The
66.I proc
24d01c53 67file system is a pseudo-file system which is used as an interface to
c13182ef
MK
68kernel data structures.
69It is commonly mounted at
fea681da 70.IR /proc .
c13182ef 71Most of it is read-only, but some files allow kernel variables to be
fea681da
MK
72changed.
73.LP
743638fd
MK
74The following outline gives a quick tour through the
75.I /proc
76hierarchy.
fea681da
MK
77.PD 1
78.TP
69119dc7 79.I /proc/[pid]
fea681da
MK
80There is a numerical subdirectory for each running process; the
81subdirectory is named by the process ID.
82Each such subdirectory contains the following
83pseudo-files and directories.
69119dc7
MK
84.\" FIXME Describe /proc/[pid]/attr and
85.\" /proc/[pid]/task/[tid]/attr
b4e9ee8f
MK
86.\" This is a directory
87.\" Added in ???
88.\" CONFIG_SECURITY
89.\"
fea681da 90.TP
69119dc7 91.IR /proc/[pid]/auxv " (since 2.6.0-test7)"
857f1942 92This contains the contents of the ELF interpreter information passed
c13182ef 93to the process at exec time.
857f1942 94The format is one \fIunsigned long\fP ID
c13182ef 95plus one \fIunsigned long\fP value for each entry.
857f1942 96The last entry contains two zeros.
b5d204d0 97.TP
8d708d6b 98.IR /proc/[pid]/cgroup " (since Linux 2.6.24)"
b5d204d0
MK
99.\" Info in Documentation/cgroups/cgroups.txt
100This file describes control groups to which the process/task belongs.
101For each cgroup hierarchy there is one entry containing
102colon-separated fields of the form:
103.nf
104.ft CW
105
106 5:cpuacct,cpu,cpuset:/daemons
107.ft
108.fi
109.IP
110The colon-separated fields are, from left to right:
111.RS 11
112.IP 1. 3
113hierarchy ID number
114.IP 2.
115set of subsystems bound to the hierarchy
116.IP 3.
117control group in the hierarchy to which the process belongs
118.RE
119.IP
120This file is only present if the
121.B CONFIG_CGROUPS
122kernel configuration option is enabled.
b4e9ee8f 123.\"
69119dc7 124.\" FIXME Describe /proc/[pid]/clear_refs
b4e9ee8f
MK
125.\" Added in 2.6.22
126.\" "Clears page referenced bits shown in smaps output"
127.\" write-only
128.\" CONFIG_PROC_PAGE_MONITOR
857f1942 129.TP
69119dc7 130.I /proc/[pid]/cmdline
b447cd58
MK
131This holds the complete command line for the process,
132unless the process is a zombie.
133.\" In 2.3.26, this also used to be true if the process was swapped out.
134In the latter case, there is nothing in this file:
75b94dc3 135that is, a read on this file will return 0 characters.
b447cd58 136The command-line arguments appear in this file as a set of
6596d270
MK
137strings separated by null bytes (\(aq\\0\(aq),
138with a further null byte after the last string.
fea681da 139.TP
69119dc7 140.IR /proc/[pid]/coredump_filter " (since kernel 2.6.23)"
b4e9ee8f
MK
141See
142.BR core (5).
5c411b17 143.TP
69119dc7
MK
144.IR /proc/[pid]/cpuset " (since kernel 2.6.12)"
145.\" and/proc/[pid]/task/[tid]/cpuset
5c411b17
MK
146See
147.BR cpuset (7).
b4e9ee8f 148.TP
69119dc7 149.I /proc/[pid]/cwd
c13182ef 150This is a symbolic link to the current working directory of the process.
59a40ed7
MK
151To find out the current working directory of process 20,
152for instance, you can do this:
fea681da 153
59a40ed7 154.in +4n
fea681da 155.nf
b43a3b30 156.RB "$" " cd /proc/20/cwd; /bin/pwd"
fea681da 157.fi
59a40ed7 158.in
fea681da 159
c13182ef
MK
160Note that the
161.I pwd
e7b489f0 162command is often a shell built-in, and might
c13182ef 163not work properly.
743638fd
MK
164In
165.BR bash (1),
166you may use
167.IR "pwd\ \-P" .
afcaf646
MK
168
169.\" The following was still true as at kernel 2.6.13
c13182ef
MK
170In a multithreaded process, the contents of this symbolic link
171are not available if the main thread has already terminated
afcaf646 172(typically by calling
59a40ed7 173.BR pthread_exit (3)).
fea681da 174.TP
69119dc7 175.I /proc/[pid]/environ
fea681da 176This file contains the environment for the process.
f81fb444 177The entries are separated by null bytes (\(aq\\0\(aq),
b4e9ee8f 178and there may be a null byte at the end.
fea681da 179Thus, to print out the environment of process 1, you would do:
a08ea57c 180.in +4n
fea681da 181.nf
a08ea57c 182
fea681da 183.ft CW
b43a3b30 184.RB "$" " (cat /proc/1/environ; echo) | tr \(aq\e000\(aq \(aq\en\(aq"
fea681da
MK
185.fi
186.ft P
a08ea57c 187.in
fea681da 188.TP
69119dc7 189.I /proc/[pid]/exe
fea681da 190Under Linux 2.2 and later, this file is a symbolic link
2d7195b8 191containing the actual pathname of the executed command.
c13182ef
MK
192This symbolic link can be dereferenced normally; attempting to open
193it will open the executable.
194You can even type
69119dc7 195.I /proc/[pid]/exe
c13182ef 196to run another copy of the same executable as is being run by
69119dc7 197process [pid].
afcaf646 198.\" The following was still true as at kernel 2.6.13
c13182ef
MK
199In a multithreaded process, the contents of this symbolic link
200are not available if the main thread has already terminated
afcaf646
MK
201(typically by calling
202.BR pthread_exit (3)).
fea681da
MK
203
204Under Linux 2.0 and earlier
69119dc7 205.I /proc/[pid]/exe
c13182ef
MK
206is a pointer to the binary which was executed,
207and appears as a symbolic link.
208A
fea681da
MK
209.BR readlink (2)
210call on this file under Linux 2.0 returns a string in the format:
211
59a40ed7 212 [device]:inode
fea681da
MK
213
214For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
215MFM, etc. drives) minor 01 (first partition on the first drive).
216
217.BR find (1)
59a40ed7
MK
218with the
219.I \-inum
220option can be used to locate the file.
fea681da 221.TP
69119dc7 222.I /proc/[pid]/fd
fea681da
MK
223This is a subdirectory containing one entry for each file which the
224process has open, named by its file descriptor, and which is a
c13182ef
MK
225symbolic link to the actual file.
226Thus, 0 is standard input, 1 standard output, 2 standard error, etc.
fea681da 227
afcaf646
MK
228.\" The following was still true as at kernel 2.6.13
229In a multithreaded process, the contents of this directory
c13182ef 230are not available if the main thread has already terminated
afcaf646
MK
231(typically by calling
232.BR pthread_exit (3)).
233
59a40ed7
MK
234Programs that will take a filename as a command-line argument,
235but will not take input from standard input if no argument is supplied,
236or that write to a file named as a command-line argument,
237but will not send their output to standard output
238if no argument is supplied, can nevertheless be made to use
239standard input or standard out using
69119dc7 240.IR /proc/[pid]/fd .
59a40ed7
MK
241For example, assuming that
242.I \-i
243is the flag designating an input file and
244.I \-o
245is the flag designating an output file:
a08ea57c 246.in +4n
fea681da
MK
247.nf
248
b43a3b30 249.RB "$" " foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ..."
fea681da 250.fi
a08ea57c
MK
251.in
252
fea681da
MK
253and you have a working filter.
254.\" The following is not true in my tests (MTK):
255.\" Note that this will not work for
256.\" programs that seek on their files, as the files in the fd directory
257.\" are not seekable.
258
59a40ed7
MK
259.I /proc/self/fd/N
260is approximately the same as
261.I /dev/fd/N
008f1ecc 262in some UNIX and UNIX-like systems.
c13182ef 263Most Linux MAKEDEV scripts symbolically link
59a40ed7
MK
264.I /dev/fd
265to
266.IR /proc/self/fd ,
267in fact.
268
269Most systems provide symbolic links
270.IR /dev/stdin ,
271.IR /dev/stdout ,
272and
273.IR /dev/stderr ,
274which respectively link to the files
275.IR 0 ,
276.IR 1 ,
277and
278.IR 2
279in
280.IR /proc/self/fd .
281Thus the example command above could be written as:
282.in +4n
283.nf
284
b43a3b30 285.RB "$" " foobar \-i /dev/stdin \-o /dev/stdout ..."
59a40ed7
MK
286.fi
287.in
69119dc7 288.\" FIXME Describe /proc/[pid]/loginuid
b877b392 289.\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
b4e9ee8f
MK
290.\" CONFIG_AUDITSYSCALL
291.TP
69119dc7 292.IR /proc/[pid]/fdinfo/ " (since kernel 2.6.22)"
b4e9ee8f
MK
293This is a subdirectory containing one entry for each file which the
294process has open, named by its file descriptor.
295The contents of each file can be read to obtain information
296about the corresponding file descriptor, for example:
297.in +4n
298.nf
299
b43a3b30 300.RB "$" " cat /proc/12015/fdinfo/4"
b4e9ee8f
MK
301pos: 1000
302flags: 01002002
303.fi
304.in
305
306The
307.I pos
308field is a decimal number showing the current file offset.
309The
310.I flags
311field is an octal number that displays the
312file access mode and file status flags (see
313.BR open (2)).
314
315The files in this directory are readable only by the owner of the process.
69119dc7 316.\" FIXME document /proc/[pid]/io
b4e9ee8f 317.\" .TP
69119dc7 318.\" .IR /proc/[pid]/io " (since kernel 2.6.20)"
b4e9ee8f 319.TP
69119dc7 320.IR /proc/[pid]/limits " (since kernel 2.6.24)"
b4e9ee8f
MK
321This file displays the soft limit, hard limit, and units of measurement
322for each of the process's resource limits (see
59a40ed7 323.BR getrlimit (2)).
b4e9ee8f 324The file is protected to only allow reading by the real UID of the process.
fea681da 325.TP
69119dc7 326.I /proc/[pid]/maps
fea681da
MK
327A file containing the currently mapped memory regions and their access
328permissions.
329
330The format is:
331
332.nf
333.ft CW
3bc960c2
MK
334address perms offset dev inode pathname
33508048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
33608056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm
fea681da 33708058000-0805b000 rwxp 00000000 00:00 0
3bc960c2
MK
33840000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so
33940013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so
3404001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
34140135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so
fea681da
MK
3424013e000-40142000 rw-p 00000000 00:00 0
343bffff000-c0000000 rwxp 00000000 00:00 0
344.ft
345.fi
fea681da 346
59a40ed7
MK
347where "address" is the address space in the process that it occupies,
348"perms" is a set of permissions:
fea681da
MK
349
350.nf
351.in +5
352r = read
353w = write
354x = execute
355s = shared
356p = private (copy on write)
357.fi
358.in
359
59a40ed7
MK
360"offset" is the offset into the file/whatever, "dev" is the device
361(major:minor), and "inode" is the inode on that device.
3620 indicates that no inode is associated with the memory region,
363as the case would be with BSS (uninitialized data).
fea681da
MK
364
365Under Linux 2.0 there is no field giving pathname.
366.TP
69119dc7 367.I /proc/[pid]/mem
fea681da
MK
368This file can be used to access the pages of a process's memory through
369.BR open (2),
370.BR read (2),
371and
ccb2bb0d 372.BR lseek (2).
b4e9ee8f 373.TP
69119dc7 374.IR /proc/[pid]/mountinfo " (since Linux 2.6.26)"
b4e9ee8f
MK
375.\" This info adapted from Documentation/filesystems/proc.txt
376This file contains information about mount points.
377It contains lines of the form:
378.nf
379.ft CW
b4e9ee8f
MK
380
38136 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
382(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
b4e9ee8f
MK
383.ft
384.fi
385.IP
386The numbers in parentheses are labels for the descriptions below:
3bc960c2 387.RS 7
b4e9ee8f
MK
388.TP 5
389(1)
390mount ID: unique identifier of the mount (may be reused after
391.BR umount (2)).
392.TP
393(2)
394parent ID: ID of parent mount (or of self for the top of the mount tree).
395.TP
396(3)
397major:minor: value of
398.I st_dev
399for files on file system (see
400.BR stat (2)).
401.TP
402(4)
403root: root of the mount within the file system.
404.TP
405(5)
406mount point: mount point relative to the process's root.
407.TP
408(6)
409mount options: per-mount options.
410.TP
411(7)
412optional fields: zero or more fields of the form "tag[:value]".
413.TP
414(8)
415separator: marks the end of the optional fields.
416.TP
417(9)
418file system type: name of file system in the form "type[.subtype]".
419.TP
420(10)
421mount source: file system-specific information or "none".
422.TP
423(11)
424super options: per-super block options.
425.RE
426.IP
427Parsers should ignore all unrecognized optional fields.
428Currently the possible optional fields are:
429.RS 12
430.TP 18
431shared:X
432mount is shared in peer group X
433.TP
434master:X
435mount is slave to peer group X
436.TP
437propagate_from:X
438mount is slave and receives propagation from peer group X (*)
439.TP
440unbindable
441mount is unbindable
442.RE
443.IP
444(*) X is the closest dominant peer group under the process's root.
445If X is the immediate master of the mount,
446or if there is no dominant peer group under the same root,
447then only the "master:X" field is present
448and not the "propagate_from:X" field.
449
450For more information on mount propagation see:
451.I Documentation/filesystems/sharedsubtree.txt
452in the kernel source tree.
453.TP
cea61382
MK
454.IR /proc/[pid]/mounts " (since Linux 2.4.19)"
455This is a list of all the file systems currently mounted in the
732e54dd 456process's mount namespace.
cea61382
MK
457The format of this file is documented in
458.BR fstab (5).
459Since kernel version 2.6.15, this file is pollable:
460after opening the file for reading, a change in this file
461(i.e., a file system mount or unmount) causes
462.BR select (2)
463to mark the file descriptor as readable, and
464.BR poll (2)
465and
466.BR epoll_wait (2)
467mark the file as having an error condition.
468.TP
69119dc7 469.IR /proc/[pid]/mountstats " (since Linux 2.6.17)"
783a6233 470This file exports information (statistics, configuration information)
b4e9ee8f
MK
471about the mount points in the process's name space.
472Lines in this file have the form:
473.nf
474
475device /dev/sda7 mounted on /home with fstype ext3 [statistics]
476( 1 ) ( 2 ) (3 ) (4)
477.fi
478.IP
479The fields in each line are:
3bc960c2 480.RS 7
b4e9ee8f
MK
481.TP 5
482(1)
483The name of the mounted device
484(or "nodevice" if there is no corresponding device).
485.TP
486(2)
487The mount point within the file system tree.
488.TP
489(3)
490The file system type.
491.TP
492(4)
493Optional statistics and configuration information.
494Currently (as at Linux 2.6.26), only NFS file systems export
495information via this field.
496.RE
497.IP
498This file is only readable by the owner of the process.
b4e9ee8f 499.TP
b4a185e5 500.IR /proc/[pid]/ns/ " (since Linux 3.0)"
2c4201f0 501.\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
b4a185e5
EB
502This is a subdirectory containing one entry for each namespace that
503supports being manipulated by
80e63655
MK
504.BR setns (2).
505For information about namespaces, see
506.BR clone (2).
b4a185e5
EB
507.TP
508.IR /proc/[pid]/ns/ipc " (since Linux 3.0)"
80e63655
MK
509Bind mounting this file (see
510.BR mount (2))
511to somewhere else in the filesystem keeps
c409c4ff 512the IPC namespace of the process specified by
b4a185e5 513.I pid
80e63655 514alive even if all processes currently in the namespace terminate.
b4a185e5 515
80e63655 516Opening this file returns a file handle for the IPC namespace
b4a185e5 517of the process specified by
80e63655
MK
518.IR pid .
519As long as this file descriptor remains open,
520the IPC namespace will remain alive,
521even if all processes in the namespace terminate.
522The file descriptor can be passed to
523.BR setns (2).
b4a185e5
EB
524.TP
525.IR /proc/[pid]/ns/net " (since Linux 3.0)"
80e63655
MK
526Bind mounting this file (see
527.BR mount (2))
528to somewhere else in the filesystem keeps
c409c4ff 529the network namespace of the process specified by
b4a185e5 530.I pid
80e63655 531alive even if all processes in the namespace terminate.
b4a185e5 532
80e63655 533Opening this file returns a file handle for the network namespace
b4a185e5 534of the process specified by
80e63655
MK
535.IR pid .
536As long as this file descriptor remains open,
537the network namespace will remain alive,
538even if all processes in the namespace terminate.
539The file descriptor can be passed to
540.BR setns (2).
b4a185e5
EB
541.TP
542.IR /proc/[pid]/ns/uts " (since Linux 3.0)"
80e63655
MK
543Bind mounting this file (see
544.BR mount (2))
545to somewhere else in the filesystem keeps
c409c4ff 546the UTS namespace of the process specified by
b4a185e5 547.I pid
80e63655 548alive even if all processes currently in the namespace terminate.
b4a185e5 549
80e63655 550Opening this file returns a file handle for the UTS namespace
b4a185e5 551of the process specified by
80e63655
MK
552.IR pid .
553As long as this file descriptor remains open,
554the UTS namespace will remain alive,
555even if all processes in the namespace terminate.
556The file descriptor can be passed to
557.BR setns (2).
b4a185e5 558.TP
69119dc7 559.IR /proc/[pid]/numa_maps " (since Linux 2.6.14)"
610f75cc
MK
560See
561.BR numa (7).
7388733a 562.TP
69119dc7 563.IR /proc/[pid]/oom_adj " (since Linux 2.6.11)"
b4e9ee8f 564This file can be used to adjust the score used to select which process
0425de01 565should be killed in an out-of-memory (OOM) situation.
b4e9ee8f
MK
566The kernel uses this value for a bit-shift operation of the process's
567.IR oom_score
568value:
5b8dbfd4
MK
569valid values are in the range \-16 to +15,
570plus the special value \-17,
b4e9ee8f
MK
571which disables OOM-killing altogether for this process.
572A positive score increases the likelihood of this
573process being killed by the OOM-killer;
574a negative score decreases the likelihood.
575The default value for this file is 0;
576a new process inherits its parent's
577.I oom_adj
578setting.
579A process must be privileged
580.RB ( CAP_SYS_RESOURCE )
581to update this file.
582.TP
69119dc7 583.IR /proc/[pid]/oom_score " (since Linux 2.6.11)"
b4e9ee8f
MK
584.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
585This file displays the current score that the kernel gives to
586this process for the purpose of selecting a process
587for the OOM-killer.
588A higher score means that the process is more likely to be
589selected by the OOM-killer.
590The basis for this score is the amount of memory used by the process,
591with increases (+) or decreases (\-) for factors including:
592.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
593.RS
594.IP * 2
595whether the process creates a lot of children using
596.BR fork (2)
597(+);
598.IP *
599whether the process has been running a long time,
600or has used a lot of CPU time (\-);
601.IP *
602whether the process has a low nice value (i.e., > 0) (+);
603.IP *
604whether the process is privileged (\-); and
605.\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
606.IP *
607whether the process is making direct hardware access (\-).
608.\" More precisely, if it has CAP_SYS_RAWIO
609.RE
610.IP
611The
612.I oom_score
613also reflects the bit-shift adjustment specified by the
614.I oom_adj
615setting for the process.
69119dc7 616.\" FIXME Describe /proc/[pid]/pagemap
b4e9ee8f
MK
617.\" Added in 2.6.25
618.\" CONFIG_PROC_PAGE_MONITOR
fea681da 619.TP
69119dc7 620.I /proc/[pid]/root
008f1ecc 621UNIX and Linux support the idea of a per-process root of the
24d01c53 622file system, set by the
fea681da 623.BR chroot (2)
c13182ef
MK
624system call.
625This file is a symbolic link that points to the process's
fea681da 626root directory, and behaves as exe, fd/*, etc. do.
afcaf646
MK
627
628.\" The following was still true as at kernel 2.6.13
c13182ef
MK
629In a multithreaded process, the contents of this symbolic link
630are not available if the main thread has already terminated
afcaf646
MK
631(typically by calling
632.BR pthread_exit (3)).
69119dc7 633.\" FIXME Describe /proc/[pid]/seccomp
6aefb6df 634.\" Added in 2.6.12
69119dc7 635.\" FIXME Describe /proc/[pid]/sessionid
b4e9ee8f
MK
636.\" Added in 2.6.25; read-only; only readable by real UID
637.\" CONFIG_AUDITSYSCALL
69119dc7 638.\" FIXME Describe /proc/[pid]/sched
b4e9ee8f
MK
639.\" Added in 2.6.23
640.\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
641.\" Displays various scheduling parameters
642.\" This file can be written, to reset stats
69119dc7
MK
643.\" FIXME Describe /proc/[pid]/schedstats and
644.\" /proc/[pid]/task/[tid]/schedstats
b4e9ee8f
MK
645.\" Added in 2.6.9
646.\" CONFIG_SCHEDSTATS
fea681da 647.TP
69119dc7 648.IR /proc/[pid]/smaps " (since Linux 2.6.14)"
b4e9ee8f 649.\" CONFIG_PROC_PAGE_MONITOR
b07b19c4 650This file shows memory consumption for each of the process's mappings.
59a40ed7 651For each of mappings there is a series of lines such as the following:
a08ea57c 652.in +4n
b07b19c4
MK
653.nf
654
65508048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
656Size: 464 kB
657Rss: 424 kB
658Shared_Clean: 424 kB
659Shared_Dirty: 0 kB
660Private_Clean: 0 kB
661Private_Dirty: 0 kB
662
663.fi
a08ea57c 664.in
b07b19c4
MK
665The first of these lines shows the same information as is displayed
666for the mapping in
69119dc7 667.IR /proc/[pid]/maps .
b07b19c4
MK
668The remaining lines show the size of the mapping,
669the amount of the mapping that is currently resident in RAM,
c7ce200d
VN
670the number of clean and dirty shared pages in the mapping,
671and the number of clean and dirty private pages in the mapping.
b07b19c4 672
097585ed
MK
673This file is only present if the
674.B CONFIG_MMU
675kernel configuration
b07b19c4
MK
676option is enabled.
677.TP
69119dc7 678.I /proc/[pid]/stat
c13182ef
MK
679Status information about the process.
680This is used by
681.BR ps (1).
682It is defined in
fea681da
MK
683.IR /usr/src/linux/fs/proc/array.c "."
684
685The fields, in order, with their proper
686.BR scanf (3)
687format specifiers, are:
688.RS
59a40ed7 689.TP 12
fea681da 690\fIpid\fP %d
357cf3fe 691The process ID.
fea681da
MK
692.TP
693\fIcomm\fP %s
c13182ef
MK
694The filename of the executable, in parentheses.
695This is visible whether or not the executable is swapped out.
fea681da
MK
696.TP
697\fIstate\fP %c
698One character from the string "RSDZTW" where R is running, S is
699sleeping in an interruptible wait, D is waiting in uninterruptible
700disk sleep, Z is zombie, T is traced or stopped (on a signal),
701and W is paging.
702.TP
703\fIppid\fP %d
704The PID of the parent.
705.TP
706\fIpgrp\fP %d
707The process group ID of the process.
708.TP
709\fIsession\fP %d
710The session ID of the process.
711.TP
fea681da 712\fItty_nr\fP %d
59a40ed7
MK
713The controlling terminal of the process.
714(The minor device number is contained in the combination of bits
71531 to 20 and 7 to 0;
b97deb97 716the major device number is in bits 15 to 8.)
fea681da
MK
717.TP
718\fItpgid\fP %d
719.\" This field and following, up to and including wchan added 0.99.1
59a40ed7
MK
720The ID of the foreground process group of the controlling
721terminal of the process.
fea681da 722.TP
2ebfeb1b 723\fIflags\fP %u (%lu before Linux 2.6.22)
c13182ef
MK
724The kernel flags word of the process.
725For bit meanings,
00702acc
MK
726see the PF_* defines in the kernel source file
727.IR include/linux/sched.h .
fea681da
MK
728Details depend on the kernel version.
729.TP
730\fIminflt\fP %lu
731The number of minor faults the process has made which have not
732required loading a memory page from disk.
733.TP
59a40ed7 734.\" field 11
fea681da
MK
735\fIcminflt\fP %lu
736The number of minor faults that the process's
737waited-for children have made.
738.TP
739\fImajflt\fP %lu
740The number of major faults the process has made which have
741required loading a memory page from disk.
742.TP
743\fIcmajflt\fP %lu
744The number of major faults that the process's
745waited-for children have made.
746.TP
747\fIutime\fP %lu
7a017e24
MK
748Amount of time that this process has been scheduled in user mode,
749measured in clock ticks (divide by
67914165 750.IR sysconf(_SC_CLK_TCK) ).
a1c9dc59
MK
751This includes guest time, \fIguest_time\fP
752(time spent running a virtual CPU, see below),
753so that applications that are not aware of the guest time field
754do not lose that time from their calculations.
fea681da
MK
755.TP
756\fIstime\fP %lu
7a017e24
MK
757Amount of time that this process has been scheduled in kernel mode,
758measured in clock ticks (divide by
67914165 759.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
760.TP
761\fIcutime\fP %ld
7a017e24
MK
762Amount of time that this process's
763waited-for children have been scheduled in user mode,
764measured in clock ticks (divide by
67914165 765.IR sysconf(_SC_CLK_TCK) ).
c13182ef 766(See also
fea681da 767.BR times (2).)
a1c9dc59
MK
768This includes guest time, \fIcguest_time\fP
769(time spent running a virtual CPU, see below).
fea681da
MK
770.TP
771\fIcstime\fP %ld
7a017e24
MK
772Amount of time that this process's
773waited-for children have been scheduled in kernel mode,
774measured in clock ticks (divide by
67914165 775.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
776.TP
777\fIpriority\fP %ld
59a40ed7
MK
778(Explanation for Linux 2.6)
779For processes running a real-time scheduling policy
780.RI ( policy
781below; see
782.BR sched_setscheduler (2)),
783this is the negated scheduling priority, minus one;
784that is, a number in the range \-2 to \-100,
785corresponding to real-time priorities 1 to 99.
786For processes running under a non-real-time scheduling policy,
787this is the raw nice value
788.RB ( setpriority (2))
789as represented in the kernel.
790The kernel stores nice values as numbers
791in the range 0 (high) to 39 (low),
792corresponding to the user-visible nice range of \-20 to 19.
793
794Before Linux 2.6, this was a scaled value based on
795the scheduler weighting given to this process.
796.\" And back in kernel 1.2 days things were different again.
fea681da
MK
797.TP
798\fInice\fP %ld
59a40ed7
MK
799The nice value (see
800.BR setpriority (2)),
801a value in the range 19 (low priority) to \-20 (high priority).
802.\" Back in kernel 1.2 days things were different.
fea681da
MK
803.TP
804.\" .TP
805.\" \fIcounter\fP %ld
806.\" The current maximum size in jiffies of the process's next timeslice,
807.\" or what is currently left of its current timeslice, if it is the
808.\" currently running process.
809.\" .TP
810.\" \fItimeout\fP %u
811.\" The time in jiffies of the process's next timeout.
0e94f77b
MK
812.\" timeout was removed sometime around 2.1/2.2
813\fInum_threads\fP %ld
2ebfeb1b 814Number of threads in this process (since Linux 2.6).
bb83d1b9 815Before kernel 2.6, this field was hard coded to 0 as a placeholder
0e94f77b 816for an earlier removed field.
fea681da 817.TP
59a40ed7 818.\" field 21
fea681da 819\fIitrealvalue\fP %ld
8bd58774
MK
820The time in jiffies before the next
821.B SIGALRM
822is sent to the process due to an interval timer.
0e94f77b
MK
823Since kernel 2.6.17, this field is no longer maintained,
824and is hard coded as 0.
fea681da 825.TP
0e94f77b 826\fIstarttime\fP %llu (was %lu before Linux 2.6)
055024ed
MK
827The time the process started after system boot.
828In kernels before Linux 2.6, this value was expressed in jiffies.
829Since Linux 2.6, the value is expressed in clock ticks (divide by
830.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
831.TP
832\fIvsize\fP %lu
833Virtual memory size in bytes.
834.TP
835\fIrss\fP %ld
59a40ed7 836Resident Set Size: number of pages the process has in real memory.
c13182ef 837This is just the pages which
5fab2e7c 838count toward text, data, or stack space.
c13182ef 839This does not include pages
fea681da
MK
840which have not been demand-loaded in, or which are swapped out.
841.TP
59a40ed7
MK
842\fIrsslim\fP %lu
843Current soft limit in bytes on the rss of the process;
844see the description of
845.B RLIMIT_RSS
846in
2b5407af 847.BR getrlimit (2).
fea681da
MK
848.TP
849\fIstartcode\fP %lu
850The address above which program text can run.
851.TP
852\fIendcode\fP %lu
853The address below which program text can run.
854.TP
855\fIstartstack\fP %lu
59a40ed7 856The address of the start (i.e., bottom) of the stack.
fea681da
MK
857.TP
858\fIkstkesp\fP %lu
59a40ed7 859The current value of ESP (stack pointer), as found in the
fea681da
MK
860kernel stack page for the process.
861.TP
862\fIkstkeip\fP %lu
863The current EIP (instruction pointer).
864.TP
59a40ed7 865.\" field 31
fea681da 866\fIsignal\fP %lu
59a40ed7
MK
867The bitmap of pending signals, displayed as a decimal number.
868Obsolete, because it does not provide information on real-time signals; use
69119dc7 869.I /proc/[pid]/status
59a40ed7 870instead.
fea681da
MK
871.TP
872\fIblocked\fP %lu
59a40ed7
MK
873The bitmap of blocked signals, displayed as a decimal number.
874Obsolete, because it does not provide information on real-time signals; use
69119dc7 875.I /proc/[pid]/status
59a40ed7 876instead.
fea681da
MK
877.TP
878\fIsigignore\fP %lu
59a40ed7
MK
879The bitmap of ignored signals, displayed as a decimal number.
880Obsolete, because it does not provide information on real-time signals; use
69119dc7 881.I /proc/[pid]/status
59a40ed7 882instead.
fea681da
MK
883.TP
884\fIsigcatch\fP %lu
59a40ed7
MK
885The bitmap of caught signals, displayed as a decimal number.
886Obsolete, because it does not provide information on real-time signals; use
69119dc7 887.I /proc/[pid]/status
59a40ed7 888instead.
fea681da
MK
889.TP
890\fIwchan\fP %lu
c13182ef
MK
891This is the "channel" in which the process is waiting.
892It is the
fea681da 893address of a system call, and can be looked up in a namelist if you
c13182ef 894need a textual name.
9a67332e
MK
895(If you have an up-to-date
896.IR /etc/psdatabase ,
897then
4d9b6984 898try \fIps \-l\fP to see the WCHAN field in action.)
fea681da
MK
899.TP
900\fInswap\fP %lu
0e94f77b 901.\" nswap was added in 2.0
4d9b6984 902Number of pages swapped (not maintained).
fea681da
MK
903.TP
904\fIcnswap\fP %lu
0e94f77b 905.\" cnswap was added in 2.0
4d9b6984 906Cumulative \fInswap\fP for child processes (not maintained).
fea681da 907.TP
2ebfeb1b 908\fIexit_signal\fP %d (since Linux 2.1.22)
fea681da
MK
909Signal to be sent to parent when we die.
910.TP
2ebfeb1b 911\fIprocessor\fP %d (since Linux 2.2.8)
fea681da 912CPU number last executed on.
568105c6 913.TP
2ebfeb1b 914\fIrt_priority\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
59a40ed7
MK
915Real-time scheduling priority, a number in the range 1 to 99 for
916processes scheduled under a real-time policy,
917or 0, for non-real-time processes (see
568105c6
MK
918.BR sched_setscheduler (2)).
919.TP
59a40ed7 920.\" field 41
2ebfeb1b 921\fIpolicy\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
568105c6
MK
922Scheduling policy (see
923.BR sched_setscheduler (2)).
cd60dedd 924Decode using the SCHED_* constants in
59a40ed7 925.IR linux/sched.h .
167450d6 926.TP
2ebfeb1b 927\fIdelayacct_blkio_ticks\fP %llu (since Linux 2.6.18)
0e94f77b 928Aggregated block I/O delays, measured in clock ticks (centiseconds).
14c06953
MK
929.TP
930\fIguest_time\fP %lu (since Linux 2.6.24)
931Guest time of the process (time spent running a virtual CPU
7a017e24 932for a guest operating system), measured in clock ticks (divide by
67914165 933.IR sysconf(_SC_CLK_TCK) ).
14c06953
MK
934.TP
935\fIcguest_time\fP %ld (since Linux 2.6.24)
7a017e24 936Guest time of the process's children, measured in clock ticks (divide by
67914165 937.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
938.RE
939.TP
69119dc7 940.I /proc/[pid]/statm
59a40ed7 941Provides information about memory usage, measured in pages.
c13182ef 942The columns are:
a08ea57c
MK
943.in +4n
944.nf
945
946size total program size
69119dc7 947 (same as VmSize in \fI/proc/[pid]/status\fP)
a08ea57c 948resident resident set size
69119dc7 949 (same as VmRSS in \fI/proc/[pid]/status\fP)
59a40ed7 950share shared pages (from shared mappings)
a08ea57c 951text text (code)
59a40ed7
MK
952.\" (not including libs; broken, includes data segment)
953lib library (unused in Linux 2.6)
954data data + stack
955.\" (including libs; broken, includes library text)
a08ea57c
MK
956dt dirty pages (unused in Linux 2.6)
957.fi
958.in
fea681da 959.TP
69119dc7 960.I /proc/[pid]/status
fea681da 961Provides much of the information in
69119dc7 962.I /proc/[pid]/stat
fea681da 963and
69119dc7 964.I /proc/[pid]/statm
fea681da 965in a format that's easier for humans to parse.
16b5f7ba
MK
966Here's an example:
967.in +4n
968.nf
969
b43a3b30 970.RB "$" " cat /proc/$$/status"
16b5f7ba
MK
971Name: bash
972State: S (sleeping)
973Tgid: 3515
974Pid: 3515
975PPid: 3452
976TracerPid: 0
977Uid: 1000 1000 1000 1000
978Gid: 100 100 100 100
979FDSize: 256
980Groups: 16 33 100
981VmPeak: 9136 kB
982VmSize: 7896 kB
983VmLck: 0 kB
984VmHWM: 7572 kB
985VmRSS: 6316 kB
986VmData: 5224 kB
987VmStk: 88 kB
988VmExe: 572 kB
989VmLib: 1708 kB
990VmPTE: 20 kB
991Threads: 1
992SigQ: 0/3067
993SigPnd: 0000000000000000
994ShdPnd: 0000000000000000
995SigBlk: 0000000000010000
996SigIgn: 0000000000384004
997SigCgt: 000000004b813efb
998CapInh: 0000000000000000
999CapPrm: 0000000000000000
1000CapEff: 0000000000000000
1001CapBnd: ffffffffffffffff
1002Cpus_allowed: 00000001
1003Cpus_allowed_list: 0
1004Mems_allowed: 1
1005Mems_allowed_list: 0
1006voluntary_ctxt_switches: 150
1007nonvoluntary_ctxt_switches: 545
1008.fi
1009.in
1010.IP
1011The fields are as follows:
1012.RS
1013.IP * 2
1014.IR Name :
1015Command run by this process.
1016.IP *
1017.IR State :
4175f999
MK
1018Current state of the process.
1019One of
16b5f7ba
MK
1020"R (running)",
1021"S (sleeping)",
1022"D (disk sleep)",
1023"T (stopped)",
1024"T (tracing stop)",
1025"Z (zombie)",
1026or
1027"X (dead)".
1028.IP *
1029.IR Tgid :
1030Thread group ID (i.e., Process ID).
1031.IP *
1032.IR Pid :
1033Thread ID (see
1034.BR gettid (2)).
1035.IP *
a1bc91d5
MK
1036.IR PPid :
1037PID of parent process.
1038.IP *
16b5f7ba
MK
1039.IR TracerPid :
1040PID of process tracing this process (0 if not being traced).
1041.IP *
1042.IR Uid ", " Gid :
1043Real, effective, saved set, and file system UIDs (GIDs).
1044.IP *
1045.IR FDSize :
1046Number of file descriptor slots currently allocated.
1047.IP *
1048.IR Groups :
1049Supplementary group list.
1050.IP *
1051.IR VmPeak :
1052Peak virtual memory size.
1053.IP *
1054.IR VmSize :
1055Virtual memory size.
1056.IP *
1057.IR VmLck :
fde39195
MK
1058Locked memory size (see
1059.BR mlock (3)).
16b5f7ba
MK
1060.IP *
1061.IR VmHWM :
1062Peak resident set size ("high water mark").
1063.IP *
1064.IR VmRSS :
1065Resident set size.
1066.IP *
1067.IR VmData ", " VmStk ", " VmExe :
1068Size of data, stack, and text segments.
1069.IP *
1070.IR VmLib :
1071Shared library code size.
1072.IP *
1073.IR VmPTE :
1074Page table entries size (since Linux 2.6.10).
1075.IP *
1076.IR Threads :
1077Number of threads in process containing this thread.
1078.IP *
6ee625eb
MK
1079.IR SigQ :
1080This field contains two slash-separated numbers that relate to
1081queued signals for the real user ID of this process.
1082The first of these is the number of currently queued
1083signals for this real user ID, and the second is the
1084resource limit on the number of queued signals for this process
1085(see the description of
1086.BR RLIMIT_SIGPENDING
1087in
1088.BR getrlimit (2)).
1089.IP *
16b5f7ba
MK
1090.IR SigPnd ", " ShdPnd :
1091Number of signals pending for thread and for process as a whole (see
1092.BR pthreads (7)
1093and
1094.BR signal (7)).
1095.IP *
1096.IR SigBlk ", " SigIgn ", " SigCgt :
1097Masks indicating signals being blocked, ignored, and caught (see
1098.BR signal (7)).
1099.IP *
1100.IR CapInh ", " CapPrm ", " CapEff :
1101Masks of capabilities enabled in inheritable, permitted, and effective sets
1102(see
1103.BR capabilities (7)).
1104.IP *
1105.IR CapBnd :
1106Capability Bounding set
1107(since kernel 2.6.26, see
1108.BR capabilities (7)).
1109.IP *
1110.IR Cpus_allowed :
1111Mask of CPUs on which this process may run
1112(since Linux 2.6.24, see
1113.BR cpuset (7)).
1114.IP *
1115.IR Cpus_allowed_list :
1116Same as previous, but in "list format"
1117(since Linux 2.6.26, see
1118.BR cpuset (7)).
1119.IP *
1120.IR Mems_allowed :
1121Mask of memory nodes allowed to this process
1122(since Linux 2.6.24, see
1123.BR cpuset (7)).
1124.IP *
1125.IR Mems_allowed_list :
1126Same as previous, but in "list format"
1127(since Linux 2.6.26, see
1128.BR cpuset (7)).
1129.IP *
1130.IR voluntary_context_switches ", " nonvoluntary_context_switches :
1131Number of voluntary and involuntary context switches (since Linux 2.6.23).
1132.RE
fea681da 1133.TP
69119dc7 1134.IR /proc/[pid]/task " (since Linux 2.6.0-test6)"
afcaf646
MK
1135This is a directory that contains one subdirectory
1136for each thread in the process.
69119dc7
MK
1137The name of each subdirectory is the numerical thread ID
1138.RI ( [tid] )
1139of the thread (see
afcaf646
MK
1140.BR gettid (2)).
1141Within each of these subdirectories, there is a set of
1142files with the same names and contents as under the
69119dc7 1143.I /proc/[pid]
afcaf646
MK
1144directories.
1145For attributes that are shared by all threads, the contents for
1146each of the files under the
69119dc7 1147.I task/[tid]
afcaf646 1148subdirectories will be the same as in the corresponding
c13182ef 1149file in the parent
69119dc7 1150.I /proc/[pid]
afcaf646 1151directory
c13182ef 1152(e.g., in a multithreaded process, all of the
69119dc7 1153.I task/[tid]/cwd
c13182ef 1154files will have the same value as the
69119dc7 1155.I /proc/[pid]/cwd
c13182ef 1156file in the parent directory, since all of the threads in a process
afcaf646
MK
1157share a working directory).
1158For attributes that are distinct for each thread,
c13182ef 1159the corresponding files under
69119dc7 1160.I task/[tid]
afcaf646 1161may have different values (e.g., various fields in each of the
69119dc7 1162.I task/[tid]/status
afcaf646
MK
1163files may be different for each thread).
1164
1165.\" The following was still true as at kernel 2.6.13
1166In a multithreaded process, the contents of the
69119dc7 1167.I /proc/[pid]/task
c13182ef 1168directory are not available if the main thread has already terminated
afcaf646
MK
1169(typically by calling
1170.BR pthread_exit (3)).
1171.TP
fea681da 1172.I /proc/apm
097585ed
MK
1173Advanced power management version and battery information when
1174.B CONFIG_APM
1175is defined at kernel compilation time.
fea681da
MK
1176.TP
1177.I /proc/bus
1178Contains subdirectories for installed busses.
1179.TP
1180.I /proc/bus/pccard
59a40ed7 1181Subdirectory for PCMCIA devices when
097585ed
MK
1182.B CONFIG_PCMCIA
1183is set at kernel compilation time.
fea681da
MK
1184.TP
1185.I /proc/bus/pccard/drivers
1186.TP
1187.I /proc/bus/pci
c13182ef 1188Contains various bus subdirectories and pseudo-files containing
59a40ed7 1189information about PCI busses, installed devices, and device
c13182ef
MK
1190drivers.
1191Some of these files are not ASCII.
fea681da
MK
1192.TP
1193.I /proc/bus/pci/devices
59a40ed7 1194Information about PCI devices.
c13182ef 1195They may be accessed through
fea681da
MK
1196.BR lspci (8)
1197and
1198.BR setpci (8).
1199.TP
1200.I /proc/cmdline
c13182ef
MK
1201Arguments passed to the Linux kernel at boot time.
1202Often done via a boot manager such as
59a40ed7
MK
1203.BR lilo (8)
1204or
1205.BR grub (8).
f6e524c4
MK
1206.TP
1207.IR /proc/config.gz " (since Linux 2.6)"
1208This file exposes the configuration options that were used
c3d9780d 1209to build the currently running kernel,
f6e524c4
MK
1210in the same format as they would be shown in the
1211.I .config
1212file that resulted when configuring the kernel (using
1213.IR "make xconfig" ,
1214.IR "make config" ,
1215or similar).
1216The file contents are compressed; view or search them using
1217.BR zcat (1),
1218.BR zgrep (1),
1219etc.
1220As long as no changes have been made to the following file,
250e01ec
MK
1221the contents of
1222.I /proc/config.gz
1223are the same as those provided by :
f6e524c4
MK
1224.in +4n
1225.nf
1226
c3074d70 1227cat /lib/modules/$(uname \-r)/build/.config
f6e524c4
MK
1228.fi
1229.in
250e01ec
MK
1230.IP
1231.I /proc/config.gz
1232is only provided if the kernel is configured with
250e01ec 1233.BR CONFIG_IKCONFIG_PROC .
fea681da
MK
1234.TP
1235.I /proc/cpuinfo
1236This is a collection of CPU and system architecture dependent items,
1237for each supported architecture a different list.
1238Two common entries are \fIprocessor\fP which gives CPU number and
c13182ef
MK
1239\fIbogomips\fP; a system constant that is calculated
1240during kernel initialization.
1241SMP machines have information for
fea681da
MK
1242each CPU.
1243.TP
1244.I /proc/devices
c13182ef
MK
1245Text listing of major numbers and device groups.
1246This can be used by MAKEDEV scripts for consistency with the kernel.
fea681da
MK
1247.TP
1248.IR /proc/diskstats " (since Linux 2.5.69)"
1249This file contains disk I/O statistics for each disk device.
1250See the kernel source file
1251.I Documentation/iostats.txt
1252for further information.
1253.TP
1254.I /proc/dma
c13182ef 1255This is a list of the registered \fIISA\fP DMA (direct memory access)
fea681da
MK
1256channels in use.
1257.TP
1258.I /proc/driver
1259Empty subdirectory.
1260.TP
1261.I /proc/execdomains
1262List of the execution domains (ABI personalities).
1263.TP
1264.I /proc/fb
097585ed
MK
1265Frame buffer information when
1266.B CONFIG_FB
1267is defined during kernel compilation.
fea681da
MK
1268.TP
1269.I /proc/filesystems
24d01c53
MK
1270A text listing of the file systems which are supported by the kernel,
1271namely file systems which were compiled into the kernel or whose kernel
6387216b
MK
1272modules are currently loaded.
1273(See also
fb477da2 1274.BR filesystems (5).)
24d01c53 1275If a file system is marked with "nodev",
809d0164 1276this means that it does not require a block device to be mounted
24d01c53 1277(e.g., virtual file system, network file system).
809d0164
MK
1278
1279Incidentally, this file may be used by
1280.BR mount (8)
24d01c53
MK
1281when no file system is specified and it didn't manage to determine the
1282file system type.
1283Then file systems contained in this file are tried
809d0164 1284(excepted those that are marked with "nodev").
fea681da
MK
1285.TP
1286.I /proc/fs
1287Empty subdirectory.
1288.TP
1289.I /proc/ide
1290This directory
59a40ed7
MK
1291exists on systems with the IDE bus.
1292There are directories for each IDE channel and attached device.
c13182ef 1293Files include:
fea681da 1294
a08ea57c 1295.in +4n
fea681da
MK
1296.nf
1297cache buffer size in KB
1298capacity number of sectors
1299driver driver version
1300geometry physical and logical geometry
9fdfa163 1301identify in hexadecimal
fea681da
MK
1302media media type
1303model manufacturer's model number
1304settings drive settings
9fdfa163
MK
1305smart_thresholds in hexadecimal
1306smart_values in hexadecimal
fea681da 1307.fi
a08ea57c 1308.in
fea681da 1309
c13182ef 1310The
fea681da
MK
1311.BR hdparm (8)
1312utility provides access to this information in a friendly format.
1313.TP
1314.I /proc/interrupts
23ec6ff0
MK
1315This is used to record the number of interrupts per CPU per IO device.
1316Since Linux 2.6.24,
1317for the i386 and x86_64 architectures, at least, this also includes
1318interrupts internal to the system (that is, not associated with a device
1319as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt),
1320and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling
1321interrupt), CAL (remote function call interrupt), and possibly others.
1322Very easy to read formatting, done in ASCII.
fea681da
MK
1323.TP
1324.I /proc/iomem
1325I/O memory map in Linux 2.4.
1326.TP
1327.I /proc/ioports
c13182ef 1328This is a list of currently registered Input-Output port regions that
fea681da
MK
1329are in use.
1330.TP
1331.IR /proc/kallsyms " (since Linux 2.5.71)"
1332This holds the kernel exported symbol definitions used by the
1333.BR modules (X)
1334tools to dynamically link and bind loadable modules.
1335In Linux 2.5.47 and earlier, a similar file with slightly different syntax
1336was named
1337.IR ksyms .
1338.TP
1339.I /proc/kcore
1340This file represents the physical memory of the system and is stored
c13182ef
MK
1341in the ELF core file format.
1342With this pseudo-file, and an unstripped
9a67332e
MK
1343kernel
1344.RI ( /usr/src/linux/vmlinux )
1345binary, GDB can be used to
fea681da
MK
1346examine the current state of any kernel data structures.
1347
1348The total length of the file is the size of physical memory (RAM) plus
13494KB.
1350.TP
1351.I /proc/kmsg
1352This file can be used instead of the
1353.BR syslog (2)
c13182ef
MK
1354system call to read kernel messages.
1355A process must have superuser
fea681da 1356privileges to read this file, and only one process should read this
c13182ef
MK
1357file.
1358This file should not be read if a syslog process is running
fea681da
MK
1359which uses the
1360.BR syslog (2)
1361system call facility to log kernel messages.
1362
1363Information in this file is retrieved with the
c4517613 1364.BR dmesg (1)
fea681da
MK
1365program.
1366.TP
1367.IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
1368See
1369.IR /proc/kallsyms .
1370.TP
1371.I /proc/loadavg
6b05dc38
MK
1372The first three fields in this file are load average figures
1373giving the number of jobs in the run queue (state R)
fea681da
MK
1374or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
1375They are the same as the load average numbers given by
1376.BR uptime (1)
1377and other programs.
6b05dc38 1378The fourth field consists of two numbers separated by a slash (/).
78fc91ec
EDB
1379The first of these is the number of currently runnable kernel
1380scheduling entities (processes, threads).
6b05dc38
MK
1381The value after the slash is the number of kernel scheduling entities
1382that currently exist on the system.
1383The fifth field is the PID of the process that was most
1384recently created on the system.
fea681da
MK
1385.TP
1386.I /proc/locks
1387This file shows current file locks
1388.RB ( flock "(2) and " fcntl (2))
1389and leases
1390.RB ( fcntl (2)).
1391.TP
89dd5f8a 1392.IR /proc/malloc " (only up to and including Linux 2.2)"
59a40ed7 1393.\" It looks like this only ever did something back in 1.0 days
097585ed 1394This file is only present if
89dd5f8a 1395.B CONFIG_DEBUG_MALLOC
097585ed 1396was defined during compilation.
fea681da
MK
1397.TP
1398.I /proc/meminfo
77b802ec
MK
1399This file reports statistics about memory usage on the system.
1400It is used by
fea681da
MK
1401.BR free (1)
1402to report the amount of free and used memory (both physical and swap)
1403on the system as well as the shared memory and buffers used by the
1404kernel.
fea681da 1405.TP
aa341984
MK
1406.I /proc/modules
1407A text list of the modules that have been loaded by the system.
1408See also
1409.BR lsmod (8).
1410.TP
fea681da 1411.I /proc/mounts
c1eea65a
MK
1412Before kernel 2.4.19, this file was a list
1413of all the file systems currently mounted on the system.
732e54dd 1414With the introduction of per-process mount namespaces in
c1eea65a
MK
1415Linux 2.4.19, this file became a link to
1416.IR /proc/self/mounts ,
732e54dd 1417which lists the mount points of the process's own mount namespace.
fea681da 1418The format of this file is documented in
31e9a9ec 1419.BR fstab (5).
fea681da 1420.TP
fea681da 1421.I /proc/mtrr
c13182ef 1422Memory Type Range Registers.
cfe70b66
IV
1423See the kernel source file
1424.I Documentation/mtrr.txt
fea681da
MK
1425for details.
1426.TP
1427.I /proc/net
1428various net pseudo-files, all of which give the status of some part of
c13182ef
MK
1429the networking layer.
1430These files contain ASCII structures and are,
59a40ed7
MK
1431therefore, readable with
1432.BR cat (1).
c13182ef 1433However, the standard
fea681da
MK
1434.BR netstat (8)
1435suite provides much cleaner access to these files.
1436.TP
1437.I /proc/net/arp
1438This holds an ASCII readable dump of the kernel ARP table used for
c13182ef 1439address resolutions.
01d0a447 1440It will show both dynamically learned and preprogrammed ARP entries.
c13182ef 1441The format is:
fea681da
MK
1442
1443.nf
1444.ft CW
1445.in 8n
1446IP address HW type Flags HW address Mask Device
1447192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
1448192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
1449.ft
1450.fi
1451.in
1452
6c04f928 1453Here "IP address" is the IPv4 address of the machine and the "HW type"
c13182ef
MK
1454is the hardware type of the address from RFC\ 826.
1455The flags are the internal
9a67332e
MK
1456flags of the ARP structure (as defined in
1457.IR /usr/include/linux/if_arp.h )
1458and
6c04f928 1459the "HW address" is the data link layer mapping for that IP address if
fea681da
MK
1460it is known.
1461.TP
1462.I /proc/net/dev
c13182ef
MK
1463The dev pseudo-file contains network device status information.
1464This gives
1465the number of received and sent packets, the number of errors and
fea681da 1466collisions
c13182ef
MK
1467and other basic statistics.
1468These are used by the
fea681da 1469.BR ifconfig (8)
c13182ef
MK
1470program to report device status.
1471The format is:
fea681da
MK
1472
1473.nf
1474.ft CW
1475.in 1n
1476Inter-| Receive | Transmit
1477 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
1478 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
1479 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
1480 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
1481 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
1482.in
1483.ft
1484.fi
1485.\" .TP
1486.\" .I /proc/net/ipx
1487.\" No information.
1488.\" .TP
1489.\" .I /proc/net/ipx_route
1490.\" No information.
1491.TP
1492.I /proc/net/dev_mcast
1493Defined in
1494.IR /usr/src/linux/net/core/dev_mcast.c :
1495.nf
1496.in +5
9fdfa163 1497indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
14982 eth0 1 0 01005e000001
14993 eth1 1 0 01005e000001
15004 eth2 1 0 01005e000001
1501.in
1502.fi
1503.TP
1504.I /proc/net/igmp
c13182ef
MK
1505Internet Group Management Protocol.
1506Defined in
fea681da
MK
1507.IR /usr/src/linux/net/core/igmp.c .
1508.TP
1509.I /proc/net/rarp
1510This file uses the same format as the
1511.I arp
1512file and contains the current reverse mapping database used to provide
1513.BR rarp (8)
c13182ef
MK
1514reverse address lookup services.
1515If RARP is not configured into the
fea681da
MK
1516kernel,
1517this file will not be present.
1518.TP
1519.I /proc/net/raw
c13182ef
MK
1520Holds a dump of the RAW socket table.
1521Much of the information is not of
fea681da 1522use
c13182ef 1523apart from debugging.
6c04f928 1524The "sl" value is the kernel hash slot for the
fea681da 1525socket,
6c04f928
MK
1526the "local_address" is the local address and protocol number pair.
1527\&"St" is
c13182ef
MK
1528the internal status of the socket.
1529The "tx_queue" and "rx_queue" are the
fea681da 1530outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1531The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
fdc196f5
MK
1532The "uid"
1533field holds the effective UID of the creator of the socket.
fea681da
MK
1534.\" .TP
1535.\" .I /proc/net/route
1536.\" No information, but looks similar to
1537.\" .BR route (8).
1538.TP
1539.I /proc/net/snmp
c13182ef 1540This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
fea681da 1541management
763f0e47 1542information bases for an SNMP agent.
fea681da
MK
1543.TP
1544.I /proc/net/tcp
c13182ef
MK
1545Holds a dump of the TCP socket table.
1546Much of the information is not
1547of use apart from debugging.
1548The "sl" value is the kernel hash slot
6beb1671
MK
1549for the socket, the "local_address" is the local address and port number pair.
1550The "rem_address" is the remote address and port number pair
6c04f928
MK
1551(if connected).
1552\&"St" is the internal status of the socket.
1553The "tx_queue" and "rx_queue" are the
fea681da 1554outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1555The "tr", "tm\->when", and "rexmits" fields hold internal information of
fdc196f5
MK
1556the kernel socket state and are only useful for debugging.
1557The "uid"
1558field holds the effective UID of the creator of the socket.
fea681da
MK
1559.TP
1560.I /proc/net/udp
c13182ef
MK
1561Holds a dump of the UDP socket table.
1562Much of the information is not of
1563use apart from debugging.
1564The "sl" value is the kernel hash slot for the
6beb1671
MK
1565socket, the "local_address" is the local address and port number pair.
1566The "rem_address" is the remote address and port number pair
fea681da
MK
1567(if connected). "St" is the internal status of the socket.
1568The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
c13182ef 1569in terms of kernel memory usage.
94e9d9fe 1570The "tr", "tm\->when", and "rexmits" fields
c13182ef 1571are not used by UDP.
fdc196f5
MK
1572The "uid"
1573field holds the effective UID of the creator of the socket.
fea681da
MK
1574The format is:
1575
1576.nf
1577.ft CW
1578.in 1n
94e9d9fe 1579sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
fea681da
MK
1580 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1581 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1582 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
1583.in
1584.ft
1585.fi
1586.TP
1587.I /proc/net/unix
008f1ecc 1588Lists the UNIX domain sockets present within the system and their
c13182ef
MK
1589status.
1590The format is:
fea681da
MK
1591.nf
1592.sp .5
1593.ft CW
1594Num RefCount Protocol Flags Type St Path
1595 0: 00000002 00000000 00000000 0001 03
1596 1: 00000001 00000000 00010000 0001 01 /dev/printer
1597.ft
1598.sp .5
1599.fi
1600
6c04f928
MK
1601Here "Num" is the kernel table slot number, "RefCount" is the number
1602of users of the socket, "Protocol" is currently always 0, "Flags"
fea681da 1603represent the internal kernel flags holding the status of the
c13182ef 1604socket.
008f1ecc 1605Currently, type is always "1" (UNIX domain datagram sockets are
6c04f928
MK
1606not yet supported in the kernel).
1607\&"St" is the internal state of the
fea681da
MK
1608socket and Path is the bound path (if any) of the socket.
1609.TP
1610.I /proc/partitions
1611Contains major and minor numbers of each partition as well as number
1612of blocks and partition name.
1613.TP
1614.I /proc/pci
1615This is a listing of all PCI devices found during kernel initialization
1616and their configuration.
2990d781 1617
59a40ed7
MK
1618This file has been deprecated in favor of a new
1619.I /proc
2990d781
MK
1620interface for PCI
1621.RI ( /proc/bus/pci ).
1622It became optional in Linux 2.2 (available with
1623.B CONFIG_PCI_OLD_PROC
1624set at kernel compilation).
24b74457 1625It became once more nonoptionally enabled in Linux 2.4.
2990d781
MK
1626Next, it was deprecated in Linux 2.6 (still available with
1627.B CONFIG_PCI_LEGACY_PROC
1628set), and finally removed altogether since Linux 2.6.17.
b4e9ee8f
MK
1629.\" FIXME /proc/sched_debug
1630.\" .TP
1631.\" .IR /proc/sched_debug " (since Linux 2.6.23)"
69119dc7 1632.\" See also /proc/[pid]/sched
fea681da
MK
1633.TP
1634.I /proc/scsi
59a40ed7
MK
1635A directory with the
1636.I scsi
1637mid-level pseudo-file and various SCSI low-level
2990d781
MK
1638driver directories,
1639which contain a file for each SCSI host in this system, all of
c13182ef
MK
1640which give the status of some part of the SCSI IO subsystem.
1641These files contain ASCII structures and are, therefore, readable with
2990d781 1642.BR cat (1).
fea681da 1643
c13182ef 1644You can also write to some of the files to reconfigure the subsystem or
59a40ed7 1645switch certain features on or off.
fea681da
MK
1646.TP
1647.I /proc/scsi/scsi
c13182ef 1648This is a listing of all SCSI devices known to the kernel.
59a40ed7 1649The listing is similar to the one seen during bootup.
c13182ef 1650scsi currently supports only the \fIadd-single-device\fP command which
59a40ed7
MK
1651allows root to add a hotplugged device to the list of known devices.
1652
1653The command
1654.in +4n
1655.nf
1656
1657echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi
fea681da 1658
59a40ed7
MK
1659.fi
1660.in
c13182ef
MK
1661will cause
1662host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
1663If there
fea681da
MK
1664is already a device known on this address or the address is invalid, an
1665error will be returned.
1666.TP
1667.I /proc/scsi/[drivername]
c13182ef
MK
1668\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
1669aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
1670scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
1671These directories show up for all drivers that registered at least one
59a40ed7 1672SCSI HBA.
c13182ef 1673Every directory contains one file per registered host.
59a40ed7 1674Every host-file is named after the number the host was assigned during
c13182ef 1675initialization.
fea681da 1676
c13182ef 1677Reading these files will usually show driver and host configuration,
59a40ed7 1678statistics, etc.
fea681da
MK
1679
1680Writing to these files allows different things on different hosts.
1681For example, with the \fIlatency\fP and \fInolatency\fP commands,
1682root can switch on and off command latency measurement code in the
c13182ef
MK
1683eata_dma driver.
1684With the \fIlockup\fP and \fIunlock\fP commands,
1685root can control bus lockups simulated by the scsi_debug driver.
fea681da
MK
1686.TP
1687.I /proc/self
59a40ed7
MK
1688This directory refers to the process accessing the
1689.I /proc
1690file system,
1691and is identical to the
1692.I /proc
1693directory named by the process ID of the same process.
fea681da
MK
1694.TP
1695.I /proc/slabinfo
c13182ef 1696Information about kernel caches.
821643a8
MK
1697Since Linux 2.6.16 this file is only present if the
1698.B CONFIG_SLAB
1699kernel configuration option is enabled.
350038ff 1700The columns in
38f76cd2 1701.I /proc/slabinfo
350038ff 1702are:
a08ea57c 1703.in +4n
fea681da 1704.nf
a08ea57c 1705
fea681da
MK
1706cache-name
1707num-active-objs
1708total-objs
1709object-size
1710num-active-slabs
1711total-slabs
1712num-pages-per-slab
1713.fi
a08ea57c
MK
1714.in
1715
c13182ef 1716See
fea681da
MK
1717.BR slabinfo (5)
1718for details.
1719.TP
1720.I /proc/stat
c13182ef
MK
1721kernel/system statistics.
1722Varies with architecture.
1723Common
fea681da
MK
1724entries include:
1725.RS
1726.TP
1727\fIcpu 3357 0 4313 1362393\fP
bfbfcd18 1728The amount of time, measured in units of
268f000b
MK
1729USER_HZ (1/100ths of a second on most architectures, use
1730.IR sysconf(_SC_CLK_TCK)
1731to obtain the right value),
b81087ab 1732.\" 1024 on Alpha and ia64
bfbfcd18
MK
1733that the system spent in user mode,
1734user mode with low priority (nice), system mode, and the
1735idle task, respectively.
b09b8526 1736.\" FIXME Actually, the following info about the /proc/stat 'cpu' field
777f5a9e 1737.\" does not seem to be quite right (at least in 2.6.12)
bfbfcd18 1738The last value should be USER_HZ times the
fea681da 1739second entry in the uptime pseudo-file.
ca92ce95 1740
bfbfcd18
MK
1741In Linux 2.6 this line includes three additional columns:
1742.I iowait
1743\- time waiting for I/O to complete (since 2.5.41);
1744.I irq
1745\- time servicing interrupts (since 2.6.0-test4);
1746.I softirq
1747\- time servicing softirqs (since 2.6.0-test4).
ca92ce95 1748
9de1f6cc
MK
1749Since Linux 2.6.11, there is an eighth column,
1750.I steal
1751\- stolen time, which is the time spent in other operating systems when
1752running in a virtualized environment
14c06953
MK
1753
1754Since Linux 2.6.24, there is a ninth column,
1755.IR guest ,
1756which is the time spent running a virtual CPU for guest
afef1764 1757operating systems under the control of the Linux kernel.
14c06953 1758.\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
fea681da
MK
1759.TP
1760\fIpage 5741 1808\fP
1761The number of pages the system paged in and the number that were paged
1762out (from disk).
1763.TP
1764\fIswap 1 0\fP
1765The number of swap pages that have been brought in and out.
1766.TP
c13182ef 1767.\" FIXME The following is not the full picture for the 'intr' of
777f5a9e 1768.\" /proc/stat on 2.6:
fea681da 1769\fIintr 1462898\fP
bfbfcd18
MK
1770This line shows counts of interrupts serviced since boot time,
1771for each of the possible system interrupts.
1772The first column is the total of all interrupts serviced;
1773each subsequent column is the total for a particular interrupt.
fea681da
MK
1774.TP
1775\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
636297e9 1776(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
bfbfcd18
MK
1777.br
1778(Linux 2.4 only)
fea681da
MK
1779.TP
1780\fIctxt 115315\fP
1781The number of context switches that the system underwent.
1782.TP
1783\fIbtime 769041601\fP
f49c451a 1784boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
fea681da
MK
1785.TP
1786\fIprocesses 86031\fP
1787Number of forks since boot.
bfbfcd18
MK
1788.TP
1789\fIprocs_running 6\fP
1790Number of processes in runnable state.
5fab2e7c 1791(Linux 2.5.45 onward.)
bfbfcd18
MK
1792.TP
1793\fIprocs_blocked 2\fP
1794Number of processes blocked waiting for I/O to complete.
5fab2e7c 1795(Linux 2.5.45 onward.)
fea681da
MK
1796.RE
1797.TP
1798.I /proc/swaps
c13182ef
MK
1799Swap areas in use.
1800See also
fea681da
MK
1801.BR swapon (8).
1802.TP
1803.I /proc/sys
1804This directory (present since 1.3.57) contains a number of files
1805and subdirectories corresponding to kernel variables.
1806These variables can be read and sometimes modified using
5a2ff571 1807the \fI/proc\fP file system, and the (deprecated)
fea681da 1808.BR sysctl (2)
c13182ef 1809system call.
fea681da 1810.TP
6ab7c0aa 1811.IR /proc/sys/abi " (since Linux 2.4.10)"
fea681da 1812This directory may contain files with application binary information.
6ab7c0aa
MK
1813.\" On some systems, it is not present.
1814See the kernel source file
1815.I Documentation/sysctl/abi.txt
1816for more information.
fea681da
MK
1817.TP
1818.I /proc/sys/debug
1819This directory may be empty.
1820.TP
1821.I /proc/sys/dev
e2badfdf 1822This directory contains device-specific information (e.g.,
9a67332e 1823.IR dev/cdrom/info ).
fea681da
MK
1824On
1825some systems, it may be empty.
1826.TP
1827.I /proc/sys/fs
49236d3c
MK
1828This directory contains the files and subdirectories for kernel variables
1829related to file systems.
fea681da
MK
1830.TP
1831.I /proc/sys/fs/binfmt_misc
c13182ef 1832Documentation for files in this directory can be found
b877b392 1833in the kernel sources in
fea681da
MK
1834.IR Documentation/binfmt_misc.txt .
1835.TP
59a40ed7
MK
1836.IR /proc/sys/fs/dentry-state " (since Linux 2.2)"
1837This file contains information about the status of the
1838directory cache (dcache).
1839The file contains six numbers,
c13182ef 1840.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
59a40ed7 1841.I want_pages
fea681da 1842(pages requested by system) and two dummy values.
59a40ed7
MK
1843.RS
1844.IP * 2
1845.I nr_dentry
1846is the number of allocated dentries (dcache entries).
1847This field is unused in Linux 2.2.
1848.IP *
1849.I nr_unused
1850is the number of unused dentries.
1851.IP *
1852.I age_limit
1853.\" looks like this is unused in kernels 2.2 to 2.6
1854is the age in seconds after which dcache entries
1855can be reclaimed when memory is short.
1856.IP *
1857.I want_pages
1858.\" looks like this is unused in kernels 2.2 to 2.6
c7094399 1859is nonzero when the kernel has called shrink_dcache_pages() and the
fea681da 1860dcache isn't pruned yet.
59a40ed7 1861.RE
fea681da
MK
1862.TP
1863.I /proc/sys/fs/dir-notify-enable
1864This file can be used to disable or enable the
1865.I dnotify
1866interface described in
1867.BR fcntl (2)
1868on a system-wide basis.
1869A value of 0 in this file disables the interface,
1870and a value of 1 enables it.
1871.TP
1872.I /proc/sys/fs/dquot-max
1873This file shows the maximum number of cached disk quota entries.
1874On some (2.4) systems, it is not present.
1875If the number of free cached disk quota entries is very low and
1876you have some awesome number of simultaneous system users,
1877you might want to raise the limit.
1878.TP
1879.I /proc/sys/fs/dquot-nr
1880This file shows the number of allocated disk quota
1881entries and the number of free disk quota entries.
1882.TP
24cb4a4b 1883.IR /proc/sys/fs/epoll " (since Linux 2.6.28)"
242b46af
MK
1884This directory contains the file
1885.IR max_user_watches ,
24cb4a4b
MK
1886which can be used to limit the amount of kernel memory consumed by the
1887.I epoll
1888interface.
1889For further details, see