]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
proc.5: ffix
[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.\"
f9313d01 61.TH PROC 5 2012-10-27 "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
31a6818e 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
66a9882e 452in the Linux kernel source tree.
b4e9ee8f 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,
66a9882e 726see the PF_* defines in the Linux kernel source file
00702acc 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.
66a9882e 1250See the Linux kernel source file
fea681da
MK
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.
3ba3d5b1
MK
1405Each line of the file consists of a parameter name, followed by a colon,
1406the value of the parameter, and an option unit of measurement (e.g., "kB").
1407The list below describes the parameter names and
1408the format specifier required to read the field value.
1409Except as noted below,
1410all of the fields have been present since at least Linux 2.6.0.
1411Some fileds are only displayed if the kernel was configured
1412with various options; those dependencies are noted in the list.
1413.RS
1414.TP
1415.IR MemTotal " %lu"
1416Total usable RAM (i.e. physical RAM minus a few reserved
1417bits and the kernel binary code)
1418.TP
1419.IR MemFree " %lu"
7bccb7d4
DP
1420The sum of
1421.IR LowFree + HighFree .
3ba3d5b1
MK
1422.TP
1423.IR Buffers " %lu"
1424Relatively temporary storage for raw disk blocks
1425shouldn't get tremendously large (20MB or so).
1426.TP
1427.IR Cached " %lu"
1428In-memory cache for files read from the disk (the page cache).
1429Doesn't include
1430.IR SwapCached .
1431.TP
1432.IR SwapCached " %lu"
1433Memory that once was swapped out, is swapped back in but
1434still also is in the swap file.
1435(Iy memory pressure memory is high, these pages
1436don't need to be swapped out again because they are already
1437in the swapfile.
1438This saves I/O.)
1439.TP
1440.IR Active " %lu"
1441Memory that has been used more recently and usually not
1442reclaimed unless absolutely necessary.
1443.TP
1444.IR Inactive " %lu"
1445Memory which has been less recently used.
1446It is more eligible to be reclaimed for other purposes.
1447.TP
1448.IR Active(anon) " %lu (since Linux 2.6.28)"
1449[To be documented.]
1450.TP
1451.IR Inactive(anon) " %lu (since Linux 2.6.28)"
1452[To be documented.]
1453.TP
1454.IR Active(file) " %lu (since Linux 2.6.28)"
1455[To be documented.]
1456.TP
1457.IR Inactive(file) " %lu (since Linux 2.6.28)"
1458[To be documented.]
1459.TP
1460.IR Unevictable " %lu (since Linux 2.6.28)"
1461(From Linux 2.6.28 to 2.6.30,
1462\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
1463[To be documented.]
1464.TP
1465.IR Mlock " %lu (since Linux 2.6.28)"
1466(From Linux 2.6.28 to 2.6.30,
1467\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
1468[To be documented.]
1469.TP
1470.IR HighTotal " %lu"
1471(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1472Total amount of highmem.
1473Highmem is all memory above ~860MB of physical memory
1474Highmem areas are for use by user-space programs,
1475or for the page cache.
1476The kernel must use tricks to access
1477this memory, making it slower to access than lowmem.
1478.TP
1479.IR HighFree " %lu
1480(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1481Amount of free highmem.
1482.TP
1483.IR LowTotal " %lu
1484(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1485Total amount of lowmem.
1486Lowmem is memory which can be used for everything that
1487highmem can be used for, but it is also available for the
1488kernel's use for its own data structures.
1489Among many other things,
7bccb7d4
DP
1490it is where everything from the
1491.I Slab
1492is allocated.
3ba3d5b1
MK
1493Bad things happen when you're out of lowmem.
1494.TP
1495.IR LowFree " %lu
1496(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1497Amount of free lowmem.
1498.TP
1499.IR MmapCopy " %lu (since Linux 2.6.29)"
1500(\fBCONFIG_MMU is required.)
1501[To be documented.]
1502.TP
1503.IR SwapTotal " %lu"
1504Total amount of swap space available.
1505.TP
1506.IR SwapFree " %lu"
1507Memory which has been evicted from RAM,
1508and is temporarily on the disk.
1509.TP
1510.IR Dirty " %lu"
1511Memory which is waiting to get written back to the disk.
1512.TP
1513.IR Writeback " %lu"
1514Memory which is actively being written back to the disk.
1515.TP
1516.IR AnonPages " %lu (since Linux 2.6.18)"
1517Non-file backed pages mapped into user-space page tables.
1518.TP
1519.IR Mapped " %lu"
1520Files which have been mmaped, such as libraries.
1521.TP
1522.IR Shmem " %lu (since Linux 2.6.32)"
1523[To be documented.]
1524.TP
1525.IR Slab " %lu"
1526In-kernel data structures cache.
1527.TP
1528.IR SReclaimable " %lu (since Linux 2.6.19)"
7bccb7d4
DP
1529Part of
1530.IR Slab ,
1531that might be reclaimed, such as caches.
3ba3d5b1
MK
1532.TP
1533.IR SUnreclaim " %lu (since Linux 2.6.19)"
7bccb7d4
DP
1534Part of
1535.IR Slab ,
1536that cannot be reclaimed on memory pressure.
3ba3d5b1
MK
1537.TP
1538.IR KernelStack " %lu (since Linux 2.6.32)"
1539Amount of memory allocated to kernel stacks.
1540.TP
1541.IR PageTables " %lu (since Linux 2.6.18)"
1542Amount of memory dedicated to the lowest level of page tables.
1543.TP
1544.IR Quicklists " %lu (since Linux 2.6.27)"
1545(\fBCONFIG_QUICKLIST\fP is required.)
1546[To be documented.]
1547.TP
1548.IR NFS_Unstable " %lu (since Linux 2.6.18)"
1549NFS pages sent to the server, but not yet committed to stable storage.
1550.TP
1551.IR Bounce " %lu (since Linux 2.6.18)"
1552Memory used for block device "bounce buffers".
1553.TP
1554.IR WritebackTmp " %lu (since Linux 2.6.26)"
1555Memory used by FUSE for temporary writeback buffers.
1556.TP
1557.IR CommitLimit " %lu (since Linux 2.6.10)"
1558Based on the overcommit ratio ('vm.overcommit_ratio'),
1559this is the total amount of memory currently available to
1560be allocated on the system. This limit is only adhered to
1561if strict overcommit accounting is enabled (mode 2 in
1562.IR /proc/sys/vm/overcommit_ratio ).
1563The
1564.I CommitLimit
1565is calculated using the following formula:
1566
1567 CommitLimit = (overcommit_ratio * Physical RAM) + Swap
1568
1569For example, on a system with 1GB of physical RAM and 7GB
1570of swap with a
1571.I overcommit_ratio
1572of 30, this formula yields a
1573.I CommitLimit
1574of 7.3G.
1575For more details, see the memory overcommit documentation
1576in the kerenl source file
1577.IR Documentation/vm/overcommit-accounting .
1578.TP
1579.IR Committed_AS " %lu"
1580The amount of memory presently allocated on the system.
1581The committed memory is a sum of all of the memory which
1582has been allocated by processes, even if it has not been
1583"used" by them as of yet.
1584A process which allocates 1GB of memory (using
1585.BR malloc (3)
1586or similar), but only touches 300MB of that memory will only show up
1587as using 300MB of memory even if it has the address space
1588allocated for the entire 1GB.
1589This 1GB is memory which has been "committed" to by the VM
1590and can be used at any time by the allocating application.
1591With strict overcommit enabled on the system (mode 2
1592.IR /proc/sys/vm/overcommit__memory ),
1593allocations which would exceed the
1594.I CommitLimit
1595(detailed above) will not be permitted.
1596This is useful if one needs to guarantee that processes will not
1597fail due to lack of memory once that memory has been successfully allocated.
1598.TP
1599.IR VmallocTotal " %lu"
1600Total size of vmalloc memory area.
1601.TP
1602.IR VmallocUsed " %lu"
1603Amount of vmalloc area which is used.
1604.TP
1605.IR VmallocChunk " %lu"
1606Largest contiguous block of vmalloc area which is free.
1607.TP
1608.IR HardwareCorrupted " %lu (since Linux 2.6.32)"
1609(\fBCONFIG_MEMORY_FAILURE\fP is required.)
1610[To be documented.]
1611.TP
1612.IR AnonHugePages " %lu (since Linux 2.6.38)"
1613(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
7fac88a9 1614Non-file backed huge pages mapped into user-space page tables.
3ba3d5b1
MK
1615.TP
1616.IR HugePages_Total " %lu"
1617(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1618The size of the pool of huge pages.
1619.TP
1620.IR HugePages_Free " %lu"
1621(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1622The number of huge pages in the pool that are not yet allocated.
1623.TP
1624.IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
1625(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1626This is the number of huge pages for
1627which a commitment to allocate from the pool has been made,
1628but no allocation has yet been made.
1629These reserved huge pages
1630guarantee that an application will be able to allocate a
1631huge page from the pool of huge pages at fault time.
1632.TP
1633.IR HugePages_Surp " %lu (since Linux 2.56.24)"
1634(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1635This is the number of huge pages in
1636the pool above the value in
1637.IR /proc/sys/vm/nr_hugepages .
1638The maximum number of surplus huge pages is controlled by
1639.IR /proc/sys/vm/nr_overcommit_hugepages .
1640.TP
1641.IR Hugepagesize " %lu"
1642(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1643The size of huge pages.
1644.RE
fea681da 1645.TP
aa341984
MK
1646.I /proc/modules
1647A text list of the modules that have been loaded by the system.
1648See also
1649.BR lsmod (8).
1650.TP
fea681da 1651.I /proc/mounts
c1eea65a
MK
1652Before kernel 2.4.19, this file was a list
1653of all the file systems currently mounted on the system.
732e54dd 1654With the introduction of per-process mount namespaces in
c1eea65a
MK
1655Linux 2.4.19, this file became a link to
1656.IR /proc/self/mounts ,
732e54dd 1657which lists the mount points of the process's own mount namespace.
fea681da 1658The format of this file is documented in
31e9a9ec 1659.BR fstab (5).
fea681da 1660.TP
fea681da 1661.I /proc/mtrr
c13182ef 1662Memory Type Range Registers.
66a9882e 1663See the Linux kernel source file
cfe70b66 1664.I Documentation/mtrr.txt
fea681da
MK
1665for details.
1666.TP
1667.I /proc/net
1668various net pseudo-files, all of which give the status of some part of
c13182ef
MK
1669the networking layer.
1670These files contain ASCII structures and are,
59a40ed7
MK
1671therefore, readable with
1672.BR cat (1).
c13182ef 1673However, the standard
fea681da
MK
1674.BR netstat (8)
1675suite provides much cleaner access to these files.
1676.TP
1677.I /proc/net/arp
1678This holds an ASCII readable dump of the kernel ARP table used for
c13182ef 1679address resolutions.
01d0a447 1680It will show both dynamically learned and preprogrammed ARP entries.
c13182ef 1681The format is:
fea681da
MK
1682
1683.nf
1684.ft CW
1685.in 8n
1686IP address HW type Flags HW address Mask Device
1687192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
1688192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
1689.ft
1690.fi
1691.in
1692
6c04f928 1693Here "IP address" is the IPv4 address of the machine and the "HW type"
c13182ef
MK
1694is the hardware type of the address from RFC\ 826.
1695The flags are the internal
9a67332e
MK
1696flags of the ARP structure (as defined in
1697.IR /usr/include/linux/if_arp.h )
1698and
6c04f928 1699the "HW address" is the data link layer mapping for that IP address if
fea681da
MK
1700it is known.
1701.TP
1702.I /proc/net/dev
c13182ef
MK
1703The dev pseudo-file contains network device status information.
1704This gives
1705the number of received and sent packets, the number of errors and
fea681da 1706collisions
c13182ef
MK
1707and other basic statistics.
1708These are used by the
fea681da 1709.BR ifconfig (8)
c13182ef
MK
1710program to report device status.
1711The format is:
fea681da
MK
1712
1713.nf
1714.ft CW
1715.in 1n
1716Inter-| Receive | Transmit
1717 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
1718 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
1719 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
1720 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
1721 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
1722.in
1723.ft
1724.fi
1725.\" .TP
1726.\" .I /proc/net/ipx
1727.\" No information.
1728.\" .TP
1729.\" .I /proc/net/ipx_route
1730.\" No information.
1731.TP
1732.I /proc/net/dev_mcast
1733Defined in
1734.IR /usr/src/linux/net/core/dev_mcast.c :
1735.nf
1736.in +5
9fdfa163 1737indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
17382 eth0 1 0 01005e000001
17393 eth1 1 0 01005e000001
17404 eth2 1 0 01005e000001
1741.in
1742.fi
1743.TP
1744.I /proc/net/igmp
c13182ef
MK
1745Internet Group Management Protocol.
1746Defined in
fea681da
MK
1747.IR /usr/src/linux/net/core/igmp.c .
1748.TP
1749.I /proc/net/rarp
1750This file uses the same format as the
1751.I arp
1752file and contains the current reverse mapping database used to provide
1753.BR rarp (8)
c13182ef
MK
1754reverse address lookup services.
1755If RARP is not configured into the
fea681da
MK
1756kernel,
1757this file will not be present.
1758.TP
1759.I /proc/net/raw
c13182ef
MK
1760Holds a dump of the RAW socket table.
1761Much of the information is not of
fea681da 1762use
c13182ef 1763apart from debugging.
6c04f928 1764The "sl" value is the kernel hash slot for the
fea681da 1765socket,
6c04f928
MK
1766the "local_address" is the local address and protocol number pair.
1767\&"St" is
c13182ef
MK
1768the internal status of the socket.
1769The "tx_queue" and "rx_queue" are the
fea681da 1770outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1771The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
fdc196f5
MK
1772The "uid"
1773field holds the effective UID of the creator of the socket.
fea681da
MK
1774.\" .TP
1775.\" .I /proc/net/route
1776.\" No information, but looks similar to
1777.\" .BR route (8).
1778.TP
1779.I /proc/net/snmp
c13182ef 1780This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
fea681da 1781management
763f0e47 1782information bases for an SNMP agent.
fea681da
MK
1783.TP
1784.I /proc/net/tcp
c13182ef
MK
1785Holds a dump of the TCP socket table.
1786Much of the information is not
1787of use apart from debugging.
1788The "sl" value is the kernel hash slot
6beb1671
MK
1789for the socket, the "local_address" is the local address and port number pair.
1790The "rem_address" is the remote address and port number pair
6c04f928
MK
1791(if connected).
1792\&"St" is the internal status of the socket.
1793The "tx_queue" and "rx_queue" are the
fea681da 1794outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1795The "tr", "tm\->when", and "rexmits" fields hold internal information of
fdc196f5
MK
1796the kernel socket state and are only useful for debugging.
1797The "uid"
1798field holds the effective UID of the creator of the socket.
fea681da
MK
1799.TP
1800.I /proc/net/udp
c13182ef
MK
1801Holds a dump of the UDP socket table.
1802Much of the information is not of
1803use apart from debugging.
1804The "sl" value is the kernel hash slot for the
6beb1671
MK
1805socket, the "local_address" is the local address and port number pair.
1806The "rem_address" is the remote address and port number pair
fea681da
MK
1807(if connected). "St" is the internal status of the socket.
1808The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
c13182ef 1809in terms of kernel memory usage.
94e9d9fe 1810The "tr", "tm\->when", and "rexmits" fields
c13182ef 1811are not used by UDP.
fdc196f5
MK
1812The "uid"
1813field holds the effective UID of the creator of the socket.
fea681da
MK
1814The format is:
1815
1816.nf
1817.ft CW
1818.in 1n
94e9d9fe 1819sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
fea681da
MK
1820 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1821 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1822 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
1823.in
1824.ft
1825.fi
1826.TP
1827.I /proc/net/unix
008f1ecc 1828Lists the UNIX domain sockets present within the system and their
c13182ef
MK
1829status.
1830The format is:
fea681da
MK
1831.nf
1832.sp .5
1833.ft CW
1834Num RefCount Protocol Flags Type St Path
1835 0: 00000002 00000000 00000000 0001 03
1836 1: 00000001 00000000 00010000 0001 01 /dev/printer
1837.ft
1838.sp .5
1839.fi
1840
6c04f928
MK
1841Here "Num" is the kernel table slot number, "RefCount" is the number
1842of users of the socket, "Protocol" is currently always 0, "Flags"
fea681da 1843represent the internal kernel flags holding the status of the
c13182ef 1844socket.
008f1ecc 1845Currently, type is always "1" (UNIX domain datagram sockets are
6c04f928
MK
1846not yet supported in the kernel).
1847\&"St" is the internal state of the
fea681da
MK
1848socket and Path is the bound path (if any) of the socket.
1849.TP
1850.I /proc/partitions
1851Contains major and minor numbers of each partition as well as number
1852of blocks and partition name.
1853.TP
1854.I /proc/pci
1855This is a listing of all PCI devices found during kernel initialization
1856and their configuration.
2990d781 1857
59a40ed7
MK
1858This file has been deprecated in favor of a new
1859.I /proc
2990d781
MK
1860interface for PCI
1861.RI ( /proc/bus/pci ).
1862It became optional in Linux 2.2 (available with
1863.B CONFIG_PCI_OLD_PROC
1864set at kernel compilation).
24b74457 1865It became once more nonoptionally enabled in Linux 2.4.
2990d781
MK
1866Next, it was deprecated in Linux 2.6 (still available with
1867.B CONFIG_PCI_LEGACY_PROC
1868set), and finally removed altogether since Linux 2.6.17.
b4e9ee8f
MK
1869.\" FIXME /proc/sched_debug
1870.\" .TP
1871.\" .IR /proc/sched_debug " (since Linux 2.6.23)"
69119dc7 1872.\" See also /proc/[pid]/sched
fea681da
MK
1873.TP
1874.I /proc/scsi
59a40ed7
MK
1875A directory with the
1876.I scsi
1877mid-level pseudo-file and various SCSI low-level
2990d781
MK
1878driver directories,
1879which contain a file for each SCSI host in this system, all of
c13182ef
MK
1880which give the status of some part of the SCSI IO subsystem.
1881These files contain ASCII structures and are, therefore, readable with
2990d781 1882.BR cat (1).
fea681da 1883
c13182ef 1884You can also write to some of the files to reconfigure the subsystem or
59a40ed7 1885switch certain features on or off.
fea681da
MK
1886.TP
1887.I /proc/scsi/scsi
c13182ef 1888This is a listing of all SCSI devices known to the kernel.
59a40ed7 1889The listing is similar to the one seen during bootup.
c13182ef 1890scsi currently supports only the \fIadd-single-device\fP command which
59a40ed7
MK
1891allows root to add a hotplugged device to the list of known devices.
1892
1893The command
1894.in +4n
1895.nf
1896
1897echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi
fea681da 1898
59a40ed7
MK
1899.fi
1900.in
c13182ef
MK
1901will cause
1902host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
1903If there
fea681da
MK
1904is already a device known on this address or the address is invalid, an
1905error will be returned.
1906.TP
1907.I /proc/scsi/[drivername]
c13182ef
MK
1908\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
1909aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
1910scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
1911These directories show up for all drivers that registered at least one
59a40ed7 1912SCSI HBA.
c13182ef 1913Every directory contains one file per registered host.
59a40ed7 1914Every host-file is named after the number the host was assigned during
c13182ef 1915initialization.
fea681da 1916
c13182ef 1917Reading these files will usually show driver and host configuration,
59a40ed7 1918statistics, etc.
fea681da
MK
1919
1920Writing to these files allows different things on different hosts.
1921For example, with the \fIlatency\fP and \fInolatency\fP commands,
1922root can switch on and off command latency measurement code in the
c13182ef
MK
1923eata_dma driver.
1924With the \fIlockup\fP and \fIunlock\fP commands,
1925root can control bus lockups simulated by the scsi_debug driver.
fea681da
MK
1926.TP
1927.I /proc/self
59a40ed7
MK
1928This directory refers to the process accessing the
1929.I /proc
1930file system,
1931and is identical to the
1932.I /proc
1933directory named by the process ID of the same process.
fea681da
MK
1934.TP
1935.I /proc/slabinfo
c13182ef 1936Information about kernel caches.
821643a8
MK
1937Since Linux 2.6.16 this file is only present if the
1938.B CONFIG_SLAB
1939kernel configuration option is enabled.
350038ff 1940The columns in
38f76cd2 1941.I /proc/slabinfo
350038ff 1942are:
a08ea57c 1943.in +4n
fea681da 1944.nf
a08ea57c 1945
fea681da
MK
1946cache-name
1947num-active-objs
1948total-objs
1949object-size
1950num-active-slabs
1951total-slabs
1952num-pages-per-slab
1953.fi
a08ea57c
MK
1954.in
1955
c13182ef 1956See
fea681da
MK
1957.BR slabinfo (5)
1958for details.
1959.TP
1960.I /proc/stat
c13182ef
MK
1961kernel/system statistics.
1962Varies with architecture.
1963Common
fea681da
MK
1964entries include:
1965.RS
1966.TP
1967\fIcpu 3357 0 4313 1362393\fP
bfbfcd18 1968The amount of time, measured in units of
268f000b
MK
1969USER_HZ (1/100ths of a second on most architectures, use
1970.IR sysconf(_SC_CLK_TCK)
1971to obtain the right value),
b81087ab 1972.\" 1024 on Alpha and ia64
bfbfcd18
MK
1973that the system spent in user mode,
1974user mode with low priority (nice), system mode, and the
1975idle task, respectively.
b09b8526 1976.\" FIXME Actually, the following info about the /proc/stat 'cpu' field
777f5a9e 1977.\" does not seem to be quite right (at least in 2.6.12)
bfbfcd18 1978The last value should be USER_HZ times the
fea681da 1979second entry in the uptime pseudo-file.
ca92ce95 1980
bfbfcd18
MK
1981In Linux 2.6 this line includes three additional columns:
1982.I iowait
1983\- time waiting for I/O to complete (since 2.5.41);
1984.I irq
1985\- time servicing interrupts (since 2.6.0-test4);
1986.I softirq
1987\- time servicing softirqs (since 2.6.0-test4).
ca92ce95 1988
9de1f6cc
MK
1989Since Linux 2.6.11, there is an eighth column,
1990.I steal
1991\- stolen time, which is the time spent in other operating systems when
1992running in a virtualized environment
14c06953
MK
1993
1994Since Linux 2.6.24, there is a ninth column,
1995.IR guest ,
1996which is the time spent running a virtual CPU for guest
afef1764 1997operating systems under the control of the Linux kernel.
14c06953 1998.\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
fea681da
MK
1999.TP
2000\fIpage 5741 1808\fP
2001The number of pages the system paged in and the number that were paged
2002out (from disk).
2003.TP
2004\fIswap 1 0\fP
2005The number of swap pages that have been brought in and out.
2006.TP
c13182ef 2007.\" FIXME The following is not the full picture for the 'intr' of
777f5a9e 2008.\" /proc/stat on 2.6:
fea681da 2009\fIintr 1462898\fP
bfbfcd18
MK
2010This line shows counts of interrupts serviced since boot time,
2011for each of the possible system interrupts.
2012The first column is the total of all interrupts serviced;
2013each subsequent column is the total for a particular interrupt.
fea681da
MK
2014.TP
2015\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
636297e9 2016(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
bfbfcd18
MK
2017.br
2018(Linux 2.4 only)
fea681da
MK
2019.TP
2020\fIctxt 115315\fP
2021The number of context switches that the system underwent.
2022.TP
2023\fIbtime 769041601\fP
f49c451a 2024boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
fea681da
MK
2025.TP
2026\fIprocesses 86031\fP
2027Number of forks since boot.
bfbfcd18
MK
2028.TP
2029\fIprocs_running 6\fP
2030Number of processes in runnable state.
5fab2e7c 2031(Linux 2.5.45 onward.)
bfbfcd18
MK
2032.TP
2033\fIprocs_blocked 2\fP
2034Number of processes blocked waiting for I/O to complete.
5fab2e7c 2035(Linux 2.5.45 onward.)
fea681da
MK
2036.RE
2037.TP
2038.I /proc/swaps
c13182ef
MK
2039Swap areas in use.
2040See also
fea681da
MK
2041.BR swapon (8).
2042.TP
2043.I /proc/sys
2044This directory (present since 1.3.57) contains a number of files
2045and subdirectories corresponding to kernel variables.
2046These variables can be read and sometimes modified using
5a2ff571 2047the \fI/proc\fP file system, and the (deprecated)
fea681da 2048.BR sysctl (2)
c13182ef 2049system call.
fea681da 2050.TP
6ab7c0aa 2051.IR /proc/sys/abi " (since Linux 2.4.10)"
fea681da 2052This directory may contain files with application binary information.
6ab7c0aa 2053.\" On some systems, it is not present.
66a9882e 2054See the Linux kernel source file
6ab7c0aa
MK
2055.I Documentation/sysctl/abi.txt
2056for more information.
fea681da
MK
2057.TP
2058.I /proc/sys/debug
2059This directory may be empty.
2060.TP
2061.I /proc/sys/dev
e2badfdf 2062This directory contains device-specific information (e.g.,
9a67332e 2063.IR dev/cdrom/info ).
fea681da
MK
2064On
2065some systems, it may be empty.
2066.TP
2067.I /proc/sys/fs
49236d3c
MK
2068This directory contains the files and subdirectories for kernel variables
2069related to file systems.
fea681da
MK
2070.TP
2071.I /proc/sys/fs/binfmt_misc
c13182ef 2072Documentation for files in this directory can be found
66a9882e 2073in the Linux kernel sources in
fea681da
MK
2074.IR Documentation/binfmt_misc.txt .
2075.TP
59a40ed7
MK
2076.IR /proc/sys/fs/dentry-state " (since Linux 2.2)"
2077This file contains information about the status of the
2078directory cache (dcache).
2079The file contains six numbers,
c13182ef 2080.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
59a40ed7 2081.I want_pages
fea681da 2082(pages requested by system) and two dummy values.
59a40ed7
MK
2083.RS
2084.IP * 2
2085.I nr_dentry
2086is the number of allocated dentries (dcache entries).
2087This field is unused in Linux 2.2.
2088.IP *
2089.I nr_unused
2090is the number of unused dentries.
2091.IP *
2092.I age_limit
2093.\" looks like this is unused in kernels 2.2 to 2.6
2094is the age in seconds after which dcache entries
2095can be reclaimed when memory is short.
2096.IP *
2097.I want_pages
2098.\" looks like this is unused in kernels 2.2 to 2.6
c7094399 2099is nonzero when the kernel has called shrink_dcache_pages() and the
fea681da 2100dcache isn't pruned yet.
59a40ed7 2101.RE
fea681da
MK
2102.TP
2103.I /proc/sys/fs/dir-notify-enable
2104This file can be used to disable or enable the
2105.I dnotify
2106interface described in
2107.BR fcntl (2)
2108on a system-wide basis.
2109A value of 0 in this file disables the interface,
2110and a value of 1 enables it.
2111.TP
2112.I /proc/sys/fs/dquot-max
2113This file shows the maximum number of cached disk quota entries.
2114On some (2.4) systems, it is not present.
2115If the number of free cached disk quota entries is very low and
2116you have some awesome number of simultaneous system users,
2117you might want to raise the limit.
2118.TP
2119.I /proc/sys/fs/dquot-nr
2120This file shows the number of allocated disk quota
2121entries and the number of free disk quota entries.
2122.TP
24cb4a4b 2123.IR /proc/sys/fs/epoll " (since Linux 2.6.28)"
242b46af
MK
2124This directory contains the file
2125.IR max_user_watches ,
24cb4a4b
MK
2126which can be used to limit the amount of kernel memory consumed by the
2127.I epoll
2128interface.
2129For further details, see