]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
sysctl.2: ERRORS: EACCES as a synonym for EPRM
[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.\"
e1282f17 61.TH PROC 5 2012-11-24 "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)).
e1282f17
MK
324Up to and including Linux 2.6.35,
325this file is protected to only allow reading by the real UID of the process.
326Since Linux 2.6.36,
327.\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589
328this file is readable file is readable
329by all users on the system.
fea681da 330.TP
69119dc7 331.I /proc/[pid]/maps
fea681da
MK
332A file containing the currently mapped memory regions and their access
333permissions.
334
335The format is:
336
337.nf
338.ft CW
3bc960c2
MK
339address perms offset dev inode pathname
34008048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
34108056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm
fea681da 34208058000-0805b000 rwxp 00000000 00:00 0
3bc960c2
MK
34340000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so
34440013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so
3454001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
34640135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so
fea681da
MK
3474013e000-40142000 rw-p 00000000 00:00 0
348bffff000-c0000000 rwxp 00000000 00:00 0
349.ft
350.fi
fea681da 351
59a40ed7
MK
352where "address" is the address space in the process that it occupies,
353"perms" is a set of permissions:
fea681da
MK
354
355.nf
356.in +5
357r = read
358w = write
359x = execute
360s = shared
361p = private (copy on write)
362.fi
363.in
364
59a40ed7
MK
365"offset" is the offset into the file/whatever, "dev" is the device
366(major:minor), and "inode" is the inode on that device.
3670 indicates that no inode is associated with the memory region,
368as the case would be with BSS (uninitialized data).
fea681da
MK
369
370Under Linux 2.0 there is no field giving pathname.
371.TP
69119dc7 372.I /proc/[pid]/mem
fea681da
MK
373This file can be used to access the pages of a process's memory through
374.BR open (2),
375.BR read (2),
376and
ccb2bb0d 377.BR lseek (2).
b4e9ee8f 378.TP
69119dc7 379.IR /proc/[pid]/mountinfo " (since Linux 2.6.26)"
b4e9ee8f
MK
380.\" This info adapted from Documentation/filesystems/proc.txt
381This file contains information about mount points.
382It contains lines of the form:
383.nf
384.ft CW
b4e9ee8f
MK
385
38636 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
387(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
b4e9ee8f
MK
388.ft
389.fi
390.IP
391The numbers in parentheses are labels for the descriptions below:
3bc960c2 392.RS 7
b4e9ee8f
MK
393.TP 5
394(1)
395mount ID: unique identifier of the mount (may be reused after
396.BR umount (2)).
397.TP
398(2)
399parent ID: ID of parent mount (or of self for the top of the mount tree).
400.TP
401(3)
402major:minor: value of
403.I st_dev
404for files on file system (see
405.BR stat (2)).
406.TP
407(4)
408root: root of the mount within the file system.
409.TP
410(5)
411mount point: mount point relative to the process's root.
412.TP
413(6)
414mount options: per-mount options.
415.TP
416(7)
417optional fields: zero or more fields of the form "tag[:value]".
418.TP
419(8)
420separator: marks the end of the optional fields.
421.TP
422(9)
423file system type: name of file system in the form "type[.subtype]".
424.TP
425(10)
426mount source: file system-specific information or "none".
427.TP
428(11)
429super options: per-super block options.
430.RE
431.IP
432Parsers should ignore all unrecognized optional fields.
433Currently the possible optional fields are:
434.RS 12
435.TP 18
436shared:X
437mount is shared in peer group X
438.TP
439master:X
440mount is slave to peer group X
441.TP
442propagate_from:X
443mount is slave and receives propagation from peer group X (*)
444.TP
445unbindable
446mount is unbindable
447.RE
448.IP
449(*) X is the closest dominant peer group under the process's root.
450If X is the immediate master of the mount,
451or if there is no dominant peer group under the same root,
452then only the "master:X" field is present
453and not the "propagate_from:X" field.
454
455For more information on mount propagation see:
456.I Documentation/filesystems/sharedsubtree.txt
66a9882e 457in the Linux kernel source tree.
b4e9ee8f 458.TP
cea61382
MK
459.IR /proc/[pid]/mounts " (since Linux 2.4.19)"
460This is a list of all the file systems currently mounted in the
732e54dd 461process's mount namespace.
cea61382
MK
462The format of this file is documented in
463.BR fstab (5).
464Since kernel version 2.6.15, this file is pollable:
465after opening the file for reading, a change in this file
466(i.e., a file system mount or unmount) causes
467.BR select (2)
468to mark the file descriptor as readable, and
469.BR poll (2)
470and
471.BR epoll_wait (2)
472mark the file as having an error condition.
473.TP
69119dc7 474.IR /proc/[pid]/mountstats " (since Linux 2.6.17)"
783a6233 475This file exports information (statistics, configuration information)
b4e9ee8f
MK
476about the mount points in the process's name space.
477Lines in this file have the form:
478.nf
479
480device /dev/sda7 mounted on /home with fstype ext3 [statistics]
481( 1 ) ( 2 ) (3 ) (4)
482.fi
483.IP
484The fields in each line are:
3bc960c2 485.RS 7
b4e9ee8f
MK
486.TP 5
487(1)
488The name of the mounted device
489(or "nodevice" if there is no corresponding device).
490.TP
491(2)
492The mount point within the file system tree.
493.TP
494(3)
495The file system type.
496.TP
497(4)
498Optional statistics and configuration information.
499Currently (as at Linux 2.6.26), only NFS file systems export
500information via this field.
501.RE
502.IP
503This file is only readable by the owner of the process.
b4e9ee8f 504.TP
b4a185e5 505.IR /proc/[pid]/ns/ " (since Linux 3.0)"
2c4201f0 506.\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
b4a185e5
EB
507This is a subdirectory containing one entry for each namespace that
508supports being manipulated by
80e63655
MK
509.BR setns (2).
510For information about namespaces, see
511.BR clone (2).
b4a185e5
EB
512.TP
513.IR /proc/[pid]/ns/ipc " (since Linux 3.0)"
80e63655
MK
514Bind mounting this file (see
515.BR mount (2))
516to somewhere else in the filesystem keeps
c409c4ff 517the IPC namespace of the process specified by
b4a185e5 518.I pid
80e63655 519alive even if all processes currently in the namespace terminate.
b4a185e5 520
80e63655 521Opening this file returns a file handle for the IPC namespace
b4a185e5 522of the process specified by
80e63655
MK
523.IR pid .
524As long as this file descriptor remains open,
525the IPC namespace will remain alive,
526even if all processes in the namespace terminate.
527The file descriptor can be passed to
528.BR setns (2).
b4a185e5
EB
529.TP
530.IR /proc/[pid]/ns/net " (since Linux 3.0)"
80e63655
MK
531Bind mounting this file (see
532.BR mount (2))
533to somewhere else in the filesystem keeps
c409c4ff 534the network namespace of the process specified by
b4a185e5 535.I pid
80e63655 536alive even if all processes in the namespace terminate.
b4a185e5 537
80e63655 538Opening this file returns a file handle for the network namespace
b4a185e5 539of the process specified by
80e63655
MK
540.IR pid .
541As long as this file descriptor remains open,
542the network namespace will remain alive,
543even if all processes in the namespace terminate.
544The file descriptor can be passed to
545.BR setns (2).
b4a185e5
EB
546.TP
547.IR /proc/[pid]/ns/uts " (since Linux 3.0)"
80e63655
MK
548Bind mounting this file (see
549.BR mount (2))
550to somewhere else in the filesystem keeps
c409c4ff 551the UTS namespace of the process specified by
b4a185e5 552.I pid
80e63655 553alive even if all processes currently in the namespace terminate.
b4a185e5 554
80e63655 555Opening this file returns a file handle for the UTS namespace
b4a185e5 556of the process specified by
80e63655
MK
557.IR pid .
558As long as this file descriptor remains open,
559the UTS namespace will remain alive,
560even if all processes in the namespace terminate.
561The file descriptor can be passed to
562.BR setns (2).
b4a185e5 563.TP
69119dc7 564.IR /proc/[pid]/numa_maps " (since Linux 2.6.14)"
610f75cc
MK
565See
566.BR numa (7).
7388733a 567.TP
69119dc7 568.IR /proc/[pid]/oom_adj " (since Linux 2.6.11)"
b4e9ee8f 569This file can be used to adjust the score used to select which process
0425de01 570should be killed in an out-of-memory (OOM) situation.
b4e9ee8f
MK
571The kernel uses this value for a bit-shift operation of the process's
572.IR oom_score
573value:
5b8dbfd4
MK
574valid values are in the range \-16 to +15,
575plus the special value \-17,
b4e9ee8f
MK
576which disables OOM-killing altogether for this process.
577A positive score increases the likelihood of this
578process being killed by the OOM-killer;
579a negative score decreases the likelihood.
580The default value for this file is 0;
581a new process inherits its parent's
582.I oom_adj
583setting.
584A process must be privileged
585.RB ( CAP_SYS_RESOURCE )
586to update this file.
587.TP
69119dc7 588.IR /proc/[pid]/oom_score " (since Linux 2.6.11)"
b4e9ee8f
MK
589.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
590This file displays the current score that the kernel gives to
591this process for the purpose of selecting a process
592for the OOM-killer.
593A higher score means that the process is more likely to be
594selected by the OOM-killer.
595The basis for this score is the amount of memory used by the process,
596with increases (+) or decreases (\-) for factors including:
597.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
598.RS
599.IP * 2
600whether the process creates a lot of children using
601.BR fork (2)
602(+);
603.IP *
604whether the process has been running a long time,
605or has used a lot of CPU time (\-);
606.IP *
607whether the process has a low nice value (i.e., > 0) (+);
608.IP *
609whether the process is privileged (\-); and
610.\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
611.IP *
612whether the process is making direct hardware access (\-).
613.\" More precisely, if it has CAP_SYS_RAWIO
614.RE
615.IP
616The
617.I oom_score
618also reflects the bit-shift adjustment specified by the
619.I oom_adj
620setting for the process.
69119dc7 621.\" FIXME Describe /proc/[pid]/pagemap
b4e9ee8f
MK
622.\" Added in 2.6.25
623.\" CONFIG_PROC_PAGE_MONITOR
fea681da 624.TP
69119dc7 625.I /proc/[pid]/root
008f1ecc 626UNIX and Linux support the idea of a per-process root of the
24d01c53 627file system, set by the
fea681da 628.BR chroot (2)
c13182ef
MK
629system call.
630This file is a symbolic link that points to the process's
fea681da 631root directory, and behaves as exe, fd/*, etc. do.
afcaf646
MK
632
633.\" The following was still true as at kernel 2.6.13
c13182ef
MK
634In a multithreaded process, the contents of this symbolic link
635are not available if the main thread has already terminated
afcaf646
MK
636(typically by calling
637.BR pthread_exit (3)).
69119dc7 638.\" FIXME Describe /proc/[pid]/seccomp
6aefb6df 639.\" Added in 2.6.12
69119dc7 640.\" FIXME Describe /proc/[pid]/sessionid
b4e9ee8f
MK
641.\" Added in 2.6.25; read-only; only readable by real UID
642.\" CONFIG_AUDITSYSCALL
69119dc7 643.\" FIXME Describe /proc/[pid]/sched
b4e9ee8f
MK
644.\" Added in 2.6.23
645.\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
646.\" Displays various scheduling parameters
647.\" This file can be written, to reset stats
69119dc7
MK
648.\" FIXME Describe /proc/[pid]/schedstats and
649.\" /proc/[pid]/task/[tid]/schedstats
b4e9ee8f
MK
650.\" Added in 2.6.9
651.\" CONFIG_SCHEDSTATS
fea681da 652.TP
69119dc7 653.IR /proc/[pid]/smaps " (since Linux 2.6.14)"
b4e9ee8f 654.\" CONFIG_PROC_PAGE_MONITOR
b07b19c4 655This file shows memory consumption for each of the process's mappings.
59a40ed7 656For each of mappings there is a series of lines such as the following:
a08ea57c 657.in +4n
b07b19c4
MK
658.nf
659
66008048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
661Size: 464 kB
662Rss: 424 kB
663Shared_Clean: 424 kB
664Shared_Dirty: 0 kB
665Private_Clean: 0 kB
666Private_Dirty: 0 kB
667
668.fi
a08ea57c 669.in
b07b19c4
MK
670The first of these lines shows the same information as is displayed
671for the mapping in
69119dc7 672.IR /proc/[pid]/maps .
b07b19c4
MK
673The remaining lines show the size of the mapping,
674the amount of the mapping that is currently resident in RAM,
c7ce200d
VN
675the number of clean and dirty shared pages in the mapping,
676and the number of clean and dirty private pages in the mapping.
b07b19c4 677
097585ed
MK
678This file is only present if the
679.B CONFIG_MMU
680kernel configuration
b07b19c4
MK
681option is enabled.
682.TP
69119dc7 683.I /proc/[pid]/stat
c13182ef
MK
684Status information about the process.
685This is used by
686.BR ps (1).
687It is defined in
fea681da
MK
688.IR /usr/src/linux/fs/proc/array.c "."
689
690The fields, in order, with their proper
691.BR scanf (3)
692format specifiers, are:
693.RS
59a40ed7 694.TP 12
fea681da 695\fIpid\fP %d
357cf3fe 696The process ID.
fea681da
MK
697.TP
698\fIcomm\fP %s
c13182ef
MK
699The filename of the executable, in parentheses.
700This is visible whether or not the executable is swapped out.
fea681da
MK
701.TP
702\fIstate\fP %c
703One character from the string "RSDZTW" where R is running, S is
704sleeping in an interruptible wait, D is waiting in uninterruptible
705disk sleep, Z is zombie, T is traced or stopped (on a signal),
706and W is paging.
707.TP
708\fIppid\fP %d
709The PID of the parent.
710.TP
711\fIpgrp\fP %d
712The process group ID of the process.
713.TP
714\fIsession\fP %d
715The session ID of the process.
716.TP
fea681da 717\fItty_nr\fP %d
59a40ed7
MK
718The controlling terminal of the process.
719(The minor device number is contained in the combination of bits
72031 to 20 and 7 to 0;
b97deb97 721the major device number is in bits 15 to 8.)
fea681da
MK
722.TP
723\fItpgid\fP %d
724.\" This field and following, up to and including wchan added 0.99.1
59a40ed7
MK
725The ID of the foreground process group of the controlling
726terminal of the process.
fea681da 727.TP
2ebfeb1b 728\fIflags\fP %u (%lu before Linux 2.6.22)
c13182ef
MK
729The kernel flags word of the process.
730For bit meanings,
66a9882e 731see the PF_* defines in the Linux kernel source file
00702acc 732.IR include/linux/sched.h .
fea681da
MK
733Details depend on the kernel version.
734.TP
735\fIminflt\fP %lu
736The number of minor faults the process has made which have not
737required loading a memory page from disk.
738.TP
59a40ed7 739.\" field 11
fea681da
MK
740\fIcminflt\fP %lu
741The number of minor faults that the process's
742waited-for children have made.
743.TP
744\fImajflt\fP %lu
745The number of major faults the process has made which have
746required loading a memory page from disk.
747.TP
748\fIcmajflt\fP %lu
749The number of major faults that the process's
750waited-for children have made.
751.TP
752\fIutime\fP %lu
7a017e24
MK
753Amount of time that this process has been scheduled in user mode,
754measured in clock ticks (divide by
67914165 755.IR sysconf(_SC_CLK_TCK) ).
a1c9dc59
MK
756This includes guest time, \fIguest_time\fP
757(time spent running a virtual CPU, see below),
758so that applications that are not aware of the guest time field
759do not lose that time from their calculations.
fea681da
MK
760.TP
761\fIstime\fP %lu
7a017e24
MK
762Amount of time that this process has been scheduled in kernel mode,
763measured in clock ticks (divide by
67914165 764.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
765.TP
766\fIcutime\fP %ld
7a017e24
MK
767Amount of time that this process's
768waited-for children have been scheduled in user mode,
769measured in clock ticks (divide by
67914165 770.IR sysconf(_SC_CLK_TCK) ).
c13182ef 771(See also
fea681da 772.BR times (2).)
a1c9dc59
MK
773This includes guest time, \fIcguest_time\fP
774(time spent running a virtual CPU, see below).
fea681da
MK
775.TP
776\fIcstime\fP %ld
7a017e24
MK
777Amount of time that this process's
778waited-for children have been scheduled in kernel mode,
779measured in clock ticks (divide by
67914165 780.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
781.TP
782\fIpriority\fP %ld
59a40ed7
MK
783(Explanation for Linux 2.6)
784For processes running a real-time scheduling policy
785.RI ( policy
786below; see
787.BR sched_setscheduler (2)),
788this is the negated scheduling priority, minus one;
789that is, a number in the range \-2 to \-100,
790corresponding to real-time priorities 1 to 99.
791For processes running under a non-real-time scheduling policy,
792this is the raw nice value
793.RB ( setpriority (2))
794as represented in the kernel.
795The kernel stores nice values as numbers
796in the range 0 (high) to 39 (low),
797corresponding to the user-visible nice range of \-20 to 19.
798
799Before Linux 2.6, this was a scaled value based on
800the scheduler weighting given to this process.
801.\" And back in kernel 1.2 days things were different again.
fea681da
MK
802.TP
803\fInice\fP %ld
59a40ed7
MK
804The nice value (see
805.BR setpriority (2)),
806a value in the range 19 (low priority) to \-20 (high priority).
807.\" Back in kernel 1.2 days things were different.
fea681da
MK
808.TP
809.\" .TP
810.\" \fIcounter\fP %ld
811.\" The current maximum size in jiffies of the process's next timeslice,
812.\" or what is currently left of its current timeslice, if it is the
813.\" currently running process.
814.\" .TP
815.\" \fItimeout\fP %u
816.\" The time in jiffies of the process's next timeout.
0e94f77b
MK
817.\" timeout was removed sometime around 2.1/2.2
818\fInum_threads\fP %ld
2ebfeb1b 819Number of threads in this process (since Linux 2.6).
bb83d1b9 820Before kernel 2.6, this field was hard coded to 0 as a placeholder
0e94f77b 821for an earlier removed field.
fea681da 822.TP
59a40ed7 823.\" field 21
fea681da 824\fIitrealvalue\fP %ld
8bd58774
MK
825The time in jiffies before the next
826.B SIGALRM
827is sent to the process due to an interval timer.
0e94f77b
MK
828Since kernel 2.6.17, this field is no longer maintained,
829and is hard coded as 0.
fea681da 830.TP
0e94f77b 831\fIstarttime\fP %llu (was %lu before Linux 2.6)
055024ed
MK
832The time the process started after system boot.
833In kernels before Linux 2.6, this value was expressed in jiffies.
834Since Linux 2.6, the value is expressed in clock ticks (divide by
835.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
836.TP
837\fIvsize\fP %lu
838Virtual memory size in bytes.
839.TP
840\fIrss\fP %ld
59a40ed7 841Resident Set Size: number of pages the process has in real memory.
c13182ef 842This is just the pages which
5fab2e7c 843count toward text, data, or stack space.
c13182ef 844This does not include pages
fea681da
MK
845which have not been demand-loaded in, or which are swapped out.
846.TP
59a40ed7
MK
847\fIrsslim\fP %lu
848Current soft limit in bytes on the rss of the process;
849see the description of
850.B RLIMIT_RSS
851in
2b5407af 852.BR getrlimit (2).
fea681da
MK
853.TP
854\fIstartcode\fP %lu
855The address above which program text can run.
856.TP
857\fIendcode\fP %lu
858The address below which program text can run.
859.TP
860\fIstartstack\fP %lu
59a40ed7 861The address of the start (i.e., bottom) of the stack.
fea681da
MK
862.TP
863\fIkstkesp\fP %lu
59a40ed7 864The current value of ESP (stack pointer), as found in the
fea681da
MK
865kernel stack page for the process.
866.TP
867\fIkstkeip\fP %lu
868The current EIP (instruction pointer).
869.TP
59a40ed7 870.\" field 31
fea681da 871\fIsignal\fP %lu
59a40ed7
MK
872The bitmap of pending signals, displayed as a decimal number.
873Obsolete, because it does not provide information on real-time signals; use
69119dc7 874.I /proc/[pid]/status
59a40ed7 875instead.
fea681da
MK
876.TP
877\fIblocked\fP %lu
59a40ed7
MK
878The bitmap of blocked signals, displayed as a decimal number.
879Obsolete, because it does not provide information on real-time signals; use
69119dc7 880.I /proc/[pid]/status
59a40ed7 881instead.
fea681da
MK
882.TP
883\fIsigignore\fP %lu
59a40ed7
MK
884The bitmap of ignored signals, displayed as a decimal number.
885Obsolete, because it does not provide information on real-time signals; use
69119dc7 886.I /proc/[pid]/status
59a40ed7 887instead.
fea681da
MK
888.TP
889\fIsigcatch\fP %lu
59a40ed7
MK
890The bitmap of caught signals, displayed as a decimal number.
891Obsolete, because it does not provide information on real-time signals; use
69119dc7 892.I /proc/[pid]/status
59a40ed7 893instead.
fea681da
MK
894.TP
895\fIwchan\fP %lu
c13182ef
MK
896This is the "channel" in which the process is waiting.
897It is the
fea681da 898address of a system call, and can be looked up in a namelist if you
c13182ef 899need a textual name.
9a67332e
MK
900(If you have an up-to-date
901.IR /etc/psdatabase ,
902then
4d9b6984 903try \fIps \-l\fP to see the WCHAN field in action.)
fea681da
MK
904.TP
905\fInswap\fP %lu
0e94f77b 906.\" nswap was added in 2.0
4d9b6984 907Number of pages swapped (not maintained).
fea681da
MK
908.TP
909\fIcnswap\fP %lu
0e94f77b 910.\" cnswap was added in 2.0
4d9b6984 911Cumulative \fInswap\fP for child processes (not maintained).
fea681da 912.TP
2ebfeb1b 913\fIexit_signal\fP %d (since Linux 2.1.22)
fea681da
MK
914Signal to be sent to parent when we die.
915.TP
2ebfeb1b 916\fIprocessor\fP %d (since Linux 2.2.8)
fea681da 917CPU number last executed on.
568105c6 918.TP
2ebfeb1b 919\fIrt_priority\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
59a40ed7
MK
920Real-time scheduling priority, a number in the range 1 to 99 for
921processes scheduled under a real-time policy,
922or 0, for non-real-time processes (see
568105c6
MK
923.BR sched_setscheduler (2)).
924.TP
59a40ed7 925.\" field 41
2ebfeb1b 926\fIpolicy\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
568105c6
MK
927Scheduling policy (see
928.BR sched_setscheduler (2)).
cd60dedd 929Decode using the SCHED_* constants in
59a40ed7 930.IR linux/sched.h .
167450d6 931.TP
2ebfeb1b 932\fIdelayacct_blkio_ticks\fP %llu (since Linux 2.6.18)
0e94f77b 933Aggregated block I/O delays, measured in clock ticks (centiseconds).
14c06953
MK
934.TP
935\fIguest_time\fP %lu (since Linux 2.6.24)
936Guest time of the process (time spent running a virtual CPU
7a017e24 937for a guest operating system), measured in clock ticks (divide by
67914165 938.IR sysconf(_SC_CLK_TCK) ).
14c06953
MK
939.TP
940\fIcguest_time\fP %ld (since Linux 2.6.24)
7a017e24 941Guest time of the process's children, measured in clock ticks (divide by
67914165 942.IR sysconf(_SC_CLK_TCK) ).
fea681da
MK
943.RE
944.TP
69119dc7 945.I /proc/[pid]/statm
59a40ed7 946Provides information about memory usage, measured in pages.
c13182ef 947The columns are:
a08ea57c
MK
948.in +4n
949.nf
950
951size total program size
69119dc7 952 (same as VmSize in \fI/proc/[pid]/status\fP)
a08ea57c 953resident resident set size
69119dc7 954 (same as VmRSS in \fI/proc/[pid]/status\fP)
59a40ed7 955share shared pages (from shared mappings)
a08ea57c 956text text (code)
59a40ed7
MK
957.\" (not including libs; broken, includes data segment)
958lib library (unused in Linux 2.6)
959data data + stack
960.\" (including libs; broken, includes library text)
a08ea57c
MK
961dt dirty pages (unused in Linux 2.6)
962.fi
963.in
fea681da 964.TP
69119dc7 965.I /proc/[pid]/status
fea681da 966Provides much of the information in
69119dc7 967.I /proc/[pid]/stat
fea681da 968and
69119dc7 969.I /proc/[pid]/statm
fea681da 970in a format that's easier for humans to parse.
16b5f7ba
MK
971Here's an example:
972.in +4n
973.nf
974
b43a3b30 975.RB "$" " cat /proc/$$/status"
16b5f7ba
MK
976Name: bash
977State: S (sleeping)
978Tgid: 3515
979Pid: 3515
980PPid: 3452
981TracerPid: 0
982Uid: 1000 1000 1000 1000
983Gid: 100 100 100 100
984FDSize: 256
985Groups: 16 33 100
986VmPeak: 9136 kB
987VmSize: 7896 kB
988VmLck: 0 kB
989VmHWM: 7572 kB
990VmRSS: 6316 kB
991VmData: 5224 kB
992VmStk: 88 kB
993VmExe: 572 kB
994VmLib: 1708 kB
995VmPTE: 20 kB
996Threads: 1
997SigQ: 0/3067
998SigPnd: 0000000000000000
999ShdPnd: 0000000000000000
1000SigBlk: 0000000000010000
1001SigIgn: 0000000000384004
1002SigCgt: 000000004b813efb
1003CapInh: 0000000000000000
1004CapPrm: 0000000000000000
1005CapEff: 0000000000000000
1006CapBnd: ffffffffffffffff
1007Cpus_allowed: 00000001
1008Cpus_allowed_list: 0
1009Mems_allowed: 1
1010Mems_allowed_list: 0
1011voluntary_ctxt_switches: 150
1012nonvoluntary_ctxt_switches: 545
1013.fi
1014.in
1015.IP
1016The fields are as follows:
1017.RS
1018.IP * 2
1019.IR Name :
1020Command run by this process.
1021.IP *
1022.IR State :
4175f999
MK
1023Current state of the process.
1024One of
16b5f7ba
MK
1025"R (running)",
1026"S (sleeping)",
1027"D (disk sleep)",
1028"T (stopped)",
1029"T (tracing stop)",
1030"Z (zombie)",
1031or
1032"X (dead)".
1033.IP *
1034.IR Tgid :
1035Thread group ID (i.e., Process ID).
1036.IP *
1037.IR Pid :
1038Thread ID (see
1039.BR gettid (2)).
1040.IP *
a1bc91d5
MK
1041.IR PPid :
1042PID of parent process.
1043.IP *
16b5f7ba
MK
1044.IR TracerPid :
1045PID of process tracing this process (0 if not being traced).
1046.IP *
1047.IR Uid ", " Gid :
1048Real, effective, saved set, and file system UIDs (GIDs).
1049.IP *
1050.IR FDSize :
1051Number of file descriptor slots currently allocated.
1052.IP *
1053.IR Groups :
1054Supplementary group list.
1055.IP *
1056.IR VmPeak :
1057Peak virtual memory size.
1058.IP *
1059.IR VmSize :
1060Virtual memory size.
1061.IP *
1062.IR VmLck :
fde39195
MK
1063Locked memory size (see
1064.BR mlock (3)).
16b5f7ba
MK
1065.IP *
1066.IR VmHWM :
1067Peak resident set size ("high water mark").
1068.IP *
1069.IR VmRSS :
1070Resident set size.
1071.IP *
1072.IR VmData ", " VmStk ", " VmExe :
1073Size of data, stack, and text segments.
1074.IP *
1075.IR VmLib :
1076Shared library code size.
1077.IP *
1078.IR VmPTE :
1079Page table entries size (since Linux 2.6.10).
1080.IP *
1081.IR Threads :
1082Number of threads in process containing this thread.
1083.IP *
6ee625eb
MK
1084.IR SigQ :
1085This field contains two slash-separated numbers that relate to
1086queued signals for the real user ID of this process.
1087The first of these is the number of currently queued
1088signals for this real user ID, and the second is the
1089resource limit on the number of queued signals for this process
1090(see the description of
1091.BR RLIMIT_SIGPENDING
1092in
1093.BR getrlimit (2)).
1094.IP *
16b5f7ba
MK
1095.IR SigPnd ", " ShdPnd :
1096Number of signals pending for thread and for process as a whole (see
1097.BR pthreads (7)
1098and
1099.BR signal (7)).
1100.IP *
1101.IR SigBlk ", " SigIgn ", " SigCgt :
1102Masks indicating signals being blocked, ignored, and caught (see
1103.BR signal (7)).
1104.IP *
1105.IR CapInh ", " CapPrm ", " CapEff :
1106Masks of capabilities enabled in inheritable, permitted, and effective sets
1107(see
1108.BR capabilities (7)).
1109.IP *
1110.IR CapBnd :
1111Capability Bounding set
1112(since kernel 2.6.26, see
1113.BR capabilities (7)).
1114.IP *
1115.IR Cpus_allowed :
1116Mask of CPUs on which this process may run
1117(since Linux 2.6.24, see
1118.BR cpuset (7)).
1119.IP *
1120.IR Cpus_allowed_list :
1121Same as previous, but in "list format"
1122(since Linux 2.6.26, see
1123.BR cpuset (7)).
1124.IP *
1125.IR Mems_allowed :
1126Mask of memory nodes allowed to this process
1127(since Linux 2.6.24, see
1128.BR cpuset (7)).
1129.IP *
1130.IR Mems_allowed_list :
1131Same as previous, but in "list format"
1132(since Linux 2.6.26, see
1133.BR cpuset (7)).
1134.IP *
1135.IR voluntary_context_switches ", " nonvoluntary_context_switches :
1136Number of voluntary and involuntary context switches (since Linux 2.6.23).
1137.RE
fea681da 1138.TP
69119dc7 1139.IR /proc/[pid]/task " (since Linux 2.6.0-test6)"
afcaf646
MK
1140This is a directory that contains one subdirectory
1141for each thread in the process.
69119dc7
MK
1142The name of each subdirectory is the numerical thread ID
1143.RI ( [tid] )
1144of the thread (see
afcaf646
MK
1145.BR gettid (2)).
1146Within each of these subdirectories, there is a set of
1147files with the same names and contents as under the
69119dc7 1148.I /proc/[pid]
afcaf646
MK
1149directories.
1150For attributes that are shared by all threads, the contents for
1151each of the files under the
69119dc7 1152.I task/[tid]
afcaf646 1153subdirectories will be the same as in the corresponding
c13182ef 1154file in the parent
69119dc7 1155.I /proc/[pid]
afcaf646 1156directory
c13182ef 1157(e.g., in a multithreaded process, all of the
69119dc7 1158.I task/[tid]/cwd
c13182ef 1159files will have the same value as the
69119dc7 1160.I /proc/[pid]/cwd
c13182ef 1161file in the parent directory, since all of the threads in a process
afcaf646
MK
1162share a working directory).
1163For attributes that are distinct for each thread,
c13182ef 1164the corresponding files under
69119dc7 1165.I task/[tid]
afcaf646 1166may have different values (e.g., various fields in each of the
69119dc7 1167.I task/[tid]/status
afcaf646
MK
1168files may be different for each thread).
1169
1170.\" The following was still true as at kernel 2.6.13
1171In a multithreaded process, the contents of the
69119dc7 1172.I /proc/[pid]/task
c13182ef 1173directory are not available if the main thread has already terminated
afcaf646
MK
1174(typically by calling
1175.BR pthread_exit (3)).
1176.TP
fea681da 1177.I /proc/apm
097585ed
MK
1178Advanced power management version and battery information when
1179.B CONFIG_APM
1180is defined at kernel compilation time.
fea681da
MK
1181.TP
1182.I /proc/bus
1183Contains subdirectories for installed busses.
1184.TP
1185.I /proc/bus/pccard
59a40ed7 1186Subdirectory for PCMCIA devices when
097585ed
MK
1187.B CONFIG_PCMCIA
1188is set at kernel compilation time.
fea681da
MK
1189.TP
1190.I /proc/bus/pccard/drivers
1191.TP
1192.I /proc/bus/pci
c13182ef 1193Contains various bus subdirectories and pseudo-files containing
59a40ed7 1194information about PCI busses, installed devices, and device
c13182ef
MK
1195drivers.
1196Some of these files are not ASCII.
fea681da
MK
1197.TP
1198.I /proc/bus/pci/devices
59a40ed7 1199Information about PCI devices.
c13182ef 1200They may be accessed through
fea681da
MK
1201.BR lspci (8)
1202and
1203.BR setpci (8).
1204.TP
1205.I /proc/cmdline
c13182ef
MK
1206Arguments passed to the Linux kernel at boot time.
1207Often done via a boot manager such as
59a40ed7
MK
1208.BR lilo (8)
1209or
1210.BR grub (8).
f6e524c4
MK
1211.TP
1212.IR /proc/config.gz " (since Linux 2.6)"
1213This file exposes the configuration options that were used
c3d9780d 1214to build the currently running kernel,
f6e524c4
MK
1215in the same format as they would be shown in the
1216.I .config
1217file that resulted when configuring the kernel (using
1218.IR "make xconfig" ,
1219.IR "make config" ,
1220or similar).
1221The file contents are compressed; view or search them using
1222.BR zcat (1),
1223.BR zgrep (1),
1224etc.
1225As long as no changes have been made to the following file,
250e01ec
MK
1226the contents of
1227.I /proc/config.gz
1228are the same as those provided by :
f6e524c4
MK
1229.in +4n
1230.nf
1231
c3074d70 1232cat /lib/modules/$(uname \-r)/build/.config
f6e524c4
MK
1233.fi
1234.in
250e01ec
MK
1235.IP
1236.I /proc/config.gz
1237is only provided if the kernel is configured with
250e01ec 1238.BR CONFIG_IKCONFIG_PROC .
fea681da
MK
1239.TP
1240.I /proc/cpuinfo
1241This is a collection of CPU and system architecture dependent items,
1242for each supported architecture a different list.
1243Two common entries are \fIprocessor\fP which gives CPU number and
c13182ef
MK
1244\fIbogomips\fP; a system constant that is calculated
1245during kernel initialization.
1246SMP machines have information for
fea681da
MK
1247each CPU.
1248.TP
1249.I /proc/devices
c13182ef
MK
1250Text listing of major numbers and device groups.
1251This can be used by MAKEDEV scripts for consistency with the kernel.
fea681da
MK
1252.TP
1253.IR /proc/diskstats " (since Linux 2.5.69)"
1254This file contains disk I/O statistics for each disk device.
66a9882e 1255See the Linux kernel source file
fea681da
MK
1256.I Documentation/iostats.txt
1257for further information.
1258.TP
1259.I /proc/dma
c13182ef 1260This is a list of the registered \fIISA\fP DMA (direct memory access)
fea681da
MK
1261channels in use.
1262.TP
1263.I /proc/driver
1264Empty subdirectory.
1265.TP
1266.I /proc/execdomains
1267List of the execution domains (ABI personalities).
1268.TP
1269.I /proc/fb
097585ed
MK
1270Frame buffer information when
1271.B CONFIG_FB
1272is defined during kernel compilation.
fea681da
MK
1273.TP
1274.I /proc/filesystems
24d01c53
MK
1275A text listing of the file systems which are supported by the kernel,
1276namely file systems which were compiled into the kernel or whose kernel
6387216b
MK
1277modules are currently loaded.
1278(See also
fb477da2 1279.BR filesystems (5).)
24d01c53 1280If a file system is marked with "nodev",
809d0164 1281this means that it does not require a block device to be mounted
24d01c53 1282(e.g., virtual file system, network file system).
809d0164
MK
1283
1284Incidentally, this file may be used by
1285.BR mount (8)
24d01c53
MK
1286when no file system is specified and it didn't manage to determine the
1287file system type.
1288Then file systems contained in this file are tried
809d0164 1289(excepted those that are marked with "nodev").
fea681da
MK
1290.TP
1291.I /proc/fs
1292Empty subdirectory.
1293.TP
1294.I /proc/ide
1295This directory
59a40ed7
MK
1296exists on systems with the IDE bus.
1297There are directories for each IDE channel and attached device.
c13182ef 1298Files include:
fea681da 1299
a08ea57c 1300.in +4n
fea681da
MK
1301.nf
1302cache buffer size in KB
1303capacity number of sectors
1304driver driver version
1305geometry physical and logical geometry
9fdfa163 1306identify in hexadecimal
fea681da
MK
1307media media type
1308model manufacturer's model number
1309settings drive settings
9fdfa163
MK
1310smart_thresholds in hexadecimal
1311smart_values in hexadecimal
fea681da 1312.fi
a08ea57c 1313.in
fea681da 1314
c13182ef 1315The
fea681da
MK
1316.BR hdparm (8)
1317utility provides access to this information in a friendly format.
1318.TP
1319.I /proc/interrupts
23ec6ff0
MK
1320This is used to record the number of interrupts per CPU per IO device.
1321Since Linux 2.6.24,
1322for the i386 and x86_64 architectures, at least, this also includes
1323interrupts internal to the system (that is, not associated with a device
1324as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt),
1325and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling
1326interrupt), CAL (remote function call interrupt), and possibly others.
1327Very easy to read formatting, done in ASCII.
fea681da
MK
1328.TP
1329.I /proc/iomem
1330I/O memory map in Linux 2.4.
1331.TP
1332.I /proc/ioports
c13182ef 1333This is a list of currently registered Input-Output port regions that
fea681da
MK
1334are in use.
1335.TP
1336.IR /proc/kallsyms " (since Linux 2.5.71)"
1337This holds the kernel exported symbol definitions used by the
1338.BR modules (X)
1339tools to dynamically link and bind loadable modules.
1340In Linux 2.5.47 and earlier, a similar file with slightly different syntax
1341was named
1342.IR ksyms .
1343.TP
1344.I /proc/kcore
1345This file represents the physical memory of the system and is stored
c13182ef
MK
1346in the ELF core file format.
1347With this pseudo-file, and an unstripped
9a67332e
MK
1348kernel
1349.RI ( /usr/src/linux/vmlinux )
1350binary, GDB can be used to
fea681da
MK
1351examine the current state of any kernel data structures.
1352
1353The total length of the file is the size of physical memory (RAM) plus
13544KB.
1355.TP
1356.I /proc/kmsg
1357This file can be used instead of the
1358.BR syslog (2)
c13182ef
MK
1359system call to read kernel messages.
1360A process must have superuser
fea681da 1361privileges to read this file, and only one process should read this
c13182ef
MK
1362file.
1363This file should not be read if a syslog process is running
fea681da
MK
1364which uses the
1365.BR syslog (2)
1366system call facility to log kernel messages.
1367
1368Information in this file is retrieved with the
c4517613 1369.BR dmesg (1)
fea681da
MK
1370program.
1371.TP
1372.IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
1373See
1374.IR /proc/kallsyms .
1375.TP
1376.I /proc/loadavg
6b05dc38
MK
1377The first three fields in this file are load average figures
1378giving the number of jobs in the run queue (state R)
fea681da
MK
1379or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
1380They are the same as the load average numbers given by
1381.BR uptime (1)
1382and other programs.
6b05dc38 1383The fourth field consists of two numbers separated by a slash (/).
78fc91ec
EDB
1384The first of these is the number of currently runnable kernel
1385scheduling entities (processes, threads).
6b05dc38
MK
1386The value after the slash is the number of kernel scheduling entities
1387that currently exist on the system.
1388The fifth field is the PID of the process that was most
1389recently created on the system.
fea681da
MK
1390.TP
1391.I /proc/locks
1392This file shows current file locks
1393.RB ( flock "(2) and " fcntl (2))
1394and leases
1395.RB ( fcntl (2)).
1396.TP
89dd5f8a 1397.IR /proc/malloc " (only up to and including Linux 2.2)"
59a40ed7 1398.\" It looks like this only ever did something back in 1.0 days
097585ed 1399This file is only present if
89dd5f8a 1400.B CONFIG_DEBUG_MALLOC
097585ed 1401was defined during compilation.
fea681da
MK
1402.TP
1403.I /proc/meminfo
77b802ec
MK
1404This file reports statistics about memory usage on the system.
1405It is used by
fea681da
MK
1406.BR free (1)
1407to report the amount of free and used memory (both physical and swap)
1408on the system as well as the shared memory and buffers used by the
1409kernel.
3ba3d5b1
MK
1410Each line of the file consists of a parameter name, followed by a colon,
1411the value of the parameter, and an option unit of measurement (e.g., "kB").
1412The list below describes the parameter names and
1413the format specifier required to read the field value.
1414Except as noted below,
1415all of the fields have been present since at least Linux 2.6.0.
1416Some fileds are only displayed if the kernel was configured
1417with various options; those dependencies are noted in the list.
1418.RS
1419.TP
1420.IR MemTotal " %lu"
1421Total usable RAM (i.e. physical RAM minus a few reserved
99e91586 1422bits and the kernel binary code).
3ba3d5b1
MK
1423.TP
1424.IR MemFree " %lu"
7bccb7d4
DP
1425The sum of
1426.IR LowFree + HighFree .
3ba3d5b1
MK
1427.TP
1428.IR Buffers " %lu"
99e91586 1429Relatively temporary storage for raw disk blocks that
3ba3d5b1
MK
1430shouldn't get tremendously large (20MB or so).
1431.TP
1432.IR Cached " %lu"
1433In-memory cache for files read from the disk (the page cache).
1434Doesn't include
1435.IR SwapCached .
1436.TP
1437.IR SwapCached " %lu"
1438Memory that once was swapped out, is swapped back in but
1439still also is in the swap file.
fa1d2749 1440(If memory pressure is high, these pages
3ba3d5b1 1441don't need to be swapped out again because they are already
99e91586 1442in the swap file.
3ba3d5b1
MK
1443This saves I/O.)
1444.TP
1445.IR Active " %lu"
1446Memory that has been used more recently and usually not
1447reclaimed unless absolutely necessary.
1448.TP
1449.IR Inactive " %lu"
1450Memory which has been less recently used.
1451It is more eligible to be reclaimed for other purposes.
1452.TP
1453.IR Active(anon) " %lu (since Linux 2.6.28)"
1454[To be documented.]
1455.TP
1456.IR Inactive(anon) " %lu (since Linux 2.6.28)"
1457[To be documented.]
1458.TP
1459.IR Active(file) " %lu (since Linux 2.6.28)"
1460[To be documented.]
1461.TP
1462.IR Inactive(file) " %lu (since Linux 2.6.28)"
1463[To be documented.]
1464.TP
1465.IR Unevictable " %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
46fbfc07 1470.IR Mlocked " %lu (since Linux 2.6.28)"
3ba3d5b1
MK
1471(From Linux 2.6.28 to 2.6.30,
1472\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
1473[To be documented.]
1474.TP
1475.IR HighTotal " %lu"
1476(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1477Total amount of highmem.
99e91586 1478Highmem is all memory above ~860MB of physical memory.
3ba3d5b1
MK
1479Highmem areas are for use by user-space programs,
1480or for the page cache.
1481The kernel must use tricks to access
1482this memory, making it slower to access than lowmem.
1483.TP
1484.IR HighFree " %lu
1485(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1486Amount of free highmem.
1487.TP
1488.IR LowTotal " %lu
1489(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1490Total amount of lowmem.
1491Lowmem is memory which can be used for everything that
1492highmem can be used for, but it is also available for the
1493kernel's use for its own data structures.
1494Among many other things,
99e91586 1495it is where everything from
7bccb7d4
DP
1496.I Slab
1497is allocated.
3ba3d5b1
MK
1498Bad things happen when you're out of lowmem.
1499.TP
1500.IR LowFree " %lu
1501(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
1502Amount of free lowmem.
1503.TP
1504.IR MmapCopy " %lu (since Linux 2.6.29)"
99e91586
DP
1505.RB ( CONFIG_MMU
1506is required.)
3ba3d5b1
MK
1507[To be documented.]
1508.TP
1509.IR SwapTotal " %lu"
1510Total amount of swap space available.
1511.TP
1512.IR SwapFree " %lu"
c16d4f25 1513Amount of swap space that is currently unused.
3ba3d5b1
MK
1514.TP
1515.IR Dirty " %lu"
1516Memory which is waiting to get written back to the disk.
1517.TP
1518.IR Writeback " %lu"
1519Memory which is actively being written back to the disk.
1520.TP
1521.IR AnonPages " %lu (since Linux 2.6.18)"
1522Non-file backed pages mapped into user-space page tables.
1523.TP
1524.IR Mapped " %lu"
1525Files which have been mmaped, such as libraries.
1526.TP
1527.IR Shmem " %lu (since Linux 2.6.32)"
1528[To be documented.]
1529.TP
1530.IR Slab " %lu"
1531In-kernel data structures cache.
1532.TP
1533.IR SReclaimable " %lu (since Linux 2.6.19)"
7bccb7d4
DP
1534Part of
1535.IR Slab ,
1536that might be reclaimed, such as caches.
3ba3d5b1
MK
1537.TP
1538.IR SUnreclaim " %lu (since Linux 2.6.19)"
7bccb7d4
DP
1539Part of
1540.IR Slab ,
1541that cannot be reclaimed on memory pressure.
3ba3d5b1
MK
1542.TP
1543.IR KernelStack " %lu (since Linux 2.6.32)"
1544Amount of memory allocated to kernel stacks.
1545.TP
1546.IR PageTables " %lu (since Linux 2.6.18)"
1547Amount of memory dedicated to the lowest level of page tables.
1548.TP
1549.IR Quicklists " %lu (since Linux 2.6.27)"
1550(\fBCONFIG_QUICKLIST\fP is required.)
1551[To be documented.]
1552.TP
1553.IR NFS_Unstable " %lu (since Linux 2.6.18)"
1554NFS pages sent to the server, but not yet committed to stable storage.
1555.TP
1556.IR Bounce " %lu (since Linux 2.6.18)"
1557Memory used for block device "bounce buffers".
1558.TP
1559.IR WritebackTmp " %lu (since Linux 2.6.26)"
1560Memory used by FUSE for temporary writeback buffers.
1561.TP
1562.IR CommitLimit " %lu (since Linux 2.6.10)"
1563Based on the overcommit ratio ('vm.overcommit_ratio'),
1564this is the total amount of memory currently available to
1565be allocated on the system. This limit is only adhered to
1566if strict overcommit accounting is enabled (mode 2 in
1567.IR /proc/sys/vm/overcommit_ratio ).
1568The
1569.I CommitLimit
1570is calculated using the following formula:
1571
1572 CommitLimit = (overcommit_ratio * Physical RAM) + Swap
1573
1574For example, on a system with 1GB of physical RAM and 7GB
1575of swap with a
1576.I overcommit_ratio
1577of 30, this formula yields a
1578.I CommitLimit
99e91586 1579of 7.3GB.
3ba3d5b1 1580For more details, see the memory overcommit documentation
99e91586 1581in the kernel source file
3ba3d5b1
MK
1582.IR Documentation/vm/overcommit-accounting .
1583.TP
1584.IR Committed_AS " %lu"
1585The amount of memory presently allocated on the system.
1586The committed memory is a sum of all of the memory which
1587has been allocated by processes, even if it has not been
1588"used" by them as of yet.
1589A process which allocates 1GB of memory (using
1590.BR malloc (3)
1591or similar), but only touches 300MB of that memory will only show up
1592as using 300MB of memory even if it has the address space
1593allocated for the entire 1GB.
1594This 1GB is memory which has been "committed" to by the VM
1595and can be used at any time by the allocating application.
1596With strict overcommit enabled on the system (mode 2
99e91586 1597.IR /proc/sys/vm/overcommit_memory ),
3ba3d5b1
MK
1598allocations which would exceed the
1599.I CommitLimit
1600(detailed above) will not be permitted.
1601This is useful if one needs to guarantee that processes will not
1602fail due to lack of memory once that memory has been successfully allocated.
1603.TP
1604.IR VmallocTotal " %lu"
1605Total size of vmalloc memory area.
1606.TP
1607.IR VmallocUsed " %lu"
1608Amount of vmalloc area which is used.
1609.TP
1610.IR VmallocChunk " %lu"
1611Largest contiguous block of vmalloc area which is free.
1612.TP
1613.IR HardwareCorrupted " %lu (since Linux 2.6.32)"
1614(\fBCONFIG_MEMORY_FAILURE\fP is required.)
1615[To be documented.]
1616.TP
1617.IR AnonHugePages " %lu (since Linux 2.6.38)"
1618(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
7fac88a9 1619Non-file backed huge pages mapped into user-space page tables.
3ba3d5b1
MK
1620.TP
1621.IR HugePages_Total " %lu"
1622(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1623The size of the pool of huge pages.
1624.TP
1625.IR HugePages_Free " %lu"
1626(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1627The number of huge pages in the pool that are not yet allocated.
1628.TP
1629.IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
1630(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1631This is the number of huge pages for
1632which a commitment to allocate from the pool has been made,
1633but no allocation has yet been made.
1634These reserved huge pages
1635guarantee that an application will be able to allocate a
1636huge page from the pool of huge pages at fault time.
1637.TP
aa8a6b4f 1638.IR HugePages_Surp " %lu (since Linux 2.6.24)"
3ba3d5b1
MK
1639(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1640This is the number of huge pages in
1641the pool above the value in
1642.IR /proc/sys/vm/nr_hugepages .
1643The maximum number of surplus huge pages is controlled by
1644.IR /proc/sys/vm/nr_overcommit_hugepages .
1645.TP
1646.IR Hugepagesize " %lu"
1647(\fBCONFIG_HUGETLB_PAGE\fP is required.)
1648The size of huge pages.
1649.RE
fea681da 1650.TP
aa341984
MK
1651.I /proc/modules
1652A text list of the modules that have been loaded by the system.
1653See also
1654.BR lsmod (8).
1655.TP
fea681da 1656.I /proc/mounts
c1eea65a
MK
1657Before kernel 2.4.19, this file was a list
1658of all the file systems currently mounted on the system.
732e54dd 1659With the introduction of per-process mount namespaces in
c1eea65a
MK
1660Linux 2.4.19, this file became a link to
1661.IR /proc/self/mounts ,
732e54dd 1662which lists the mount points of the process's own mount namespace.
fea681da 1663The format of this file is documented in
31e9a9ec 1664.BR fstab (5).
fea681da 1665.TP
fea681da 1666.I /proc/mtrr
c13182ef 1667Memory Type Range Registers.
66a9882e 1668See the Linux kernel source file
cfe70b66 1669.I Documentation/mtrr.txt
fea681da
MK
1670for details.
1671.TP
1672.I /proc/net
1673various net pseudo-files, all of which give the status of some part of
c13182ef
MK
1674the networking layer.
1675These files contain ASCII structures and are,
59a40ed7
MK
1676therefore, readable with
1677.BR cat (1).
c13182ef 1678However, the standard
fea681da
MK
1679.BR netstat (8)
1680suite provides much cleaner access to these files.
1681.TP
1682.I /proc/net/arp
1683This holds an ASCII readable dump of the kernel ARP table used for
c13182ef 1684address resolutions.
01d0a447 1685It will show both dynamically learned and preprogrammed ARP entries.
c13182ef 1686The format is:
fea681da
MK
1687
1688.nf
1689.ft CW
1690.in 8n
1691IP address HW type Flags HW address Mask Device
1692192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
1693192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
1694.ft
1695.fi
1696.in
1697
6c04f928 1698Here "IP address" is the IPv4 address of the machine and the "HW type"
c13182ef
MK
1699is the hardware type of the address from RFC\ 826.
1700The flags are the internal
9a67332e
MK
1701flags of the ARP structure (as defined in
1702.IR /usr/include/linux/if_arp.h )
1703and
6c04f928 1704the "HW address" is the data link layer mapping for that IP address if
fea681da
MK
1705it is known.
1706.TP
1707.I /proc/net/dev
c13182ef
MK
1708The dev pseudo-file contains network device status information.
1709This gives
1710the number of received and sent packets, the number of errors and
fea681da 1711collisions
c13182ef
MK
1712and other basic statistics.
1713These are used by the
fea681da 1714.BR ifconfig (8)
c13182ef
MK
1715program to report device status.
1716The format is:
fea681da
MK
1717
1718.nf
1719.ft CW
1720.in 1n
1721Inter-| Receive | Transmit
1722 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
1723 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
1724 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
1725 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
1726 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
1727.in
1728.ft
1729.fi
1730.\" .TP
1731.\" .I /proc/net/ipx
1732.\" No information.
1733.\" .TP
1734.\" .I /proc/net/ipx_route
1735.\" No information.
1736.TP
1737.I /proc/net/dev_mcast
1738Defined in
1739.IR /usr/src/linux/net/core/dev_mcast.c :
1740.nf
1741.in +5
9fdfa163 1742indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
17432 eth0 1 0 01005e000001
17443 eth1 1 0 01005e000001
17454 eth2 1 0 01005e000001
1746.in
1747.fi
1748.TP
1749.I /proc/net/igmp
c13182ef
MK
1750Internet Group Management Protocol.
1751Defined in
fea681da
MK
1752.IR /usr/src/linux/net/core/igmp.c .
1753.TP
1754.I /proc/net/rarp
1755This file uses the same format as the
1756.I arp
1757file and contains the current reverse mapping database used to provide
1758.BR rarp (8)
c13182ef
MK
1759reverse address lookup services.
1760If RARP is not configured into the
fea681da
MK
1761kernel,
1762this file will not be present.
1763.TP
1764.I /proc/net/raw
c13182ef
MK
1765Holds a dump of the RAW socket table.
1766Much of the information is not of
fea681da 1767use
c13182ef 1768apart from debugging.
6c04f928 1769The "sl" value is the kernel hash slot for the
fea681da 1770socket,
6c04f928
MK
1771the "local_address" is the local address and protocol number pair.
1772\&"St" is
c13182ef
MK
1773the internal status of the socket.
1774The "tx_queue" and "rx_queue" are the
fea681da 1775outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1776The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
fdc196f5
MK
1777The "uid"
1778field holds the effective UID of the creator of the socket.
fea681da
MK
1779.\" .TP
1780.\" .I /proc/net/route
1781.\" No information, but looks similar to
1782.\" .BR route (8).
1783.TP
1784.I /proc/net/snmp
c13182ef 1785This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
fea681da 1786management
763f0e47 1787information bases for an SNMP agent.
fea681da
MK
1788.TP
1789.I /proc/net/tcp
c13182ef
MK
1790Holds a dump of the TCP socket table.
1791Much of the information is not
1792of use apart from debugging.
1793The "sl" value is the kernel hash slot
6beb1671
MK
1794for the socket, the "local_address" is the local address and port number pair.
1795The "rem_address" is the remote address and port number pair
6c04f928
MK
1796(if connected).
1797\&"St" is the internal status of the socket.
1798The "tx_queue" and "rx_queue" are the
fea681da 1799outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1800The "tr", "tm\->when", and "rexmits" fields hold internal information of
fdc196f5
MK
1801the kernel socket state and are only useful for debugging.
1802The "uid"
1803field holds the effective UID of the creator of the socket.
fea681da
MK
1804.TP
1805.I /proc/net/udp
c13182ef
MK
1806Holds a dump of the UDP socket table.
1807Much of the information is not of
1808use apart from debugging.
1809The "sl" value is the kernel hash slot for the
6beb1671
MK
1810socket, the "local_address" is the local address and port number pair.
1811The "rem_address" is the remote address and port number pair
fea681da
MK
1812(if connected). "St" is the internal status of the socket.
1813The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
c13182ef 1814in terms of kernel memory usage.
94e9d9fe 1815The "tr", "tm\->when", and "rexmits" fields
c13182ef 1816are not used by UDP.
fdc196f5
MK
1817The "uid"
1818field holds the effective UID of the creator of the socket.
fea681da
MK
1819The format is:
1820
1821.nf
1822.ft CW
1823.in 1n
94e9d9fe 1824sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
fea681da
MK
1825 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1826 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1827 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
1828.in
1829.ft
1830.fi
1831.TP
1832.I /proc/net/unix
008f1ecc 1833Lists the UNIX domain sockets present within the system and their
c13182ef
MK
1834status.
1835The format is:
fea681da
MK
1836.nf
1837.sp .5
1838.ft CW
1839Num RefCount Protocol Flags Type St Path
1840 0: 00000002 00000000 00000000 0001 03
1841 1: 00000001 00000000 00010000 0001 01 /dev/printer
1842.ft
1843.sp .5
1844.fi
1845
6c04f928
MK
1846Here "Num" is the kernel table slot number, "RefCount" is the number
1847of users of the socket, "Protocol" is currently always 0, "Flags"
fea681da 1848represent the internal kernel flags holding the status of the
c13182ef 1849socket.
008f1ecc 1850Currently, type is always "1" (UNIX domain datagram sockets are
6c04f928
MK
1851not yet supported in the kernel).
1852\&"St" is the internal state of the
fea681da
MK
1853socket and Path is the bound path (if any) of the socket.
1854.TP
1855.I /proc/partitions
1856Contains major and minor numbers of each partition as well as number
1857of blocks and partition name.
1858.TP
1859.I /proc/pci
1860This is a listing of all PCI devices found during kernel initialization
1861and their configuration.
2990d781 1862
59a40ed7
MK
1863This file has been deprecated in favor of a new
1864.I /proc
2990d781
MK
1865interface for PCI
1866.RI ( /proc/bus/pci ).
1867It became optional in Linux 2.2 (available with
1868.B CONFIG_PCI_OLD_PROC
1869set at kernel compilation).
24b74457 1870It became once more nonoptionally enabled in Linux 2.4.
2990d781
MK
1871Next, it was deprecated in Linux 2.6 (still available with
1872.B CONFIG_PCI_LEGACY_PROC
1873set), and finally removed altogether since Linux 2.6.17.
b4e9ee8f
MK
1874.\" FIXME /proc/sched_debug
1875.\" .TP
1876.\" .IR /proc/sched_debug " (since Linux 2.6.23)"
69119dc7 1877.\" See also /proc/[pid]/sched
fea681da
MK
1878.TP
1879.I /proc/scsi
59a40ed7
MK
1880A directory with the
1881.I scsi
1882mid-level pseudo-file and various SCSI low-level
2990d781
MK
1883driver directories,
1884which contain a file for each SCSI host in this system, all of
c13182ef
MK
1885which give the status of some part of the SCSI IO subsystem.
1886These files contain ASCII structures and are, therefore, readable with
2990d781 1887.BR cat (1).
fea681da 1888
c13182ef 1889You can also write to some of the files to reconfigure the subsystem or
59a40ed7 1890switch certain features on or off.
fea681da
MK
1891.TP
1892.I /proc/scsi/scsi
c13182ef 1893This is a listing of all SCSI devices known to the kernel.
59a40ed7 1894The listing is similar to the one seen during bootup.
c13182ef 1895scsi currently supports only the \fIadd-single-device\fP command which
59a40ed7
MK
1896allows root to add a hotplugged device to the list of known devices.
1897
1898The command
1899.in +4n
1900.nf
1901
1902echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi
fea681da 1903
59a40ed7
MK
1904.fi
1905.in
c13182ef
MK
1906will cause
1907host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
1908If there
fea681da
MK
1909is already a device known on this address or the address is invalid, an
1910error will be returned.
1911.TP
1912.I /proc/scsi/[drivername]
c13182ef
MK
1913\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
1914aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
1915scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
1916These directories show up for all drivers that registered at least one
59a40ed7 1917SCSI HBA.
c13182ef 1918Every directory contains one file per registered host.
59a40ed7 1919Every host-file is named after the number the host was assigned during
c13182ef 1920initialization.
fea681da 1921
c13182ef 1922Reading these files will usually show driver and host configuration,
59a40ed7 1923statistics, etc.
fea681da
MK
1924
1925Writing to these files allows different things on different hosts.
1926For example, with the \fIlatency\fP and \fInolatency\fP commands,
1927root can switch on and off command latency measurement code in the
c13182ef
MK
1928eata_dma driver.
1929With the \fIlockup\fP and \fIunlock\fP commands,
1930root can control bus lockups simulated by the scsi_debug driver.
fea681da
MK
1931.TP
1932.I /proc/self
59a40ed7
MK
1933This directory refers to the process accessing the
1934.I /proc
1935file system,
1936and is identical to the
1937.I /proc
1938directory named by the process ID of the same process.
fea681da
MK
1939.TP
1940.I /proc/slabinfo
c13182ef 1941Information about kernel caches.
821643a8
MK
1942Since Linux 2.6.16 this file is only present if the
1943.B CONFIG_SLAB
1944kernel configuration option is enabled.
350038ff 1945The columns in
38f76cd2 1946.I /proc/slabinfo
350038ff 1947are:
a08ea57c 1948.in +4n
fea681da 1949.nf
a08ea57c 1950
fea681da
MK
1951cache-name
1952num-active-objs
1953total-objs
1954object-size
1955num-active-slabs
1956total-slabs
1957num-pages-per-slab
1958.fi
a08ea57c
MK
1959.in
1960
c13182ef 1961See
fea681da
MK
1962.BR slabinfo (5)
1963for details.
1964.TP
1965.I /proc/stat
c13182ef
MK
1966kernel/system statistics.
1967Varies with architecture.
1968Common
fea681da
MK
1969entries include:
1970.RS
1971.TP
1972\fIcpu 3357 0 4313 1362393\fP
bfbfcd18 1973The amount of time, measured in units of
268f000b
MK
1974USER_HZ (1/100ths of a second on most architectures, use
1975.IR sysconf(_SC_CLK_TCK)
1976to obtain the right value),
b81087ab 1977.\" 1024 on Alpha and ia64
bfbfcd18
MK
1978that the system spent in user mode,
1979user mode with low priority (nice), system mode, and the
1980idle task, respectively.
b09b8526 1981.\" FIXME Actually, the following info about the /proc/stat 'cpu' field
777f5a9e 1982.\" does not seem to be quite right (at least in 2.6.12)
bfbfcd18 1983The last value should be USER_HZ times the
fea681da 1984second entry in the uptime pseudo-file.
ca92ce95 1985
bfbfcd18
MK
1986In Linux 2.6 this line includes three additional columns:
1987.I iowait
1988\- time waiting for I/O to complete (since 2.5.41);
1989.I irq
1990\- time servicing interrupts (since 2.6.0-test4);
1991.I softirq
1992\- time servicing softirqs (since 2.6.0-test4).
ca92ce95 1993
9de1f6cc
MK
1994Since Linux 2.6.11, there is an eighth column,
1995.I steal
1996\- stolen time, which is the time spent in other operating systems when
1997running in a virtualized environment
14c06953
MK
1998
1999Since Linux 2.6.24, there is a ninth column,
2000.IR guest ,
2001which is the time spent running a virtual CPU for guest
afef1764 2002operating systems under the control of the Linux kernel.
14c06953 2003.\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
fea681da
MK
2004.TP
2005\fIpage 5741 1808\fP
2006The number of pages the system paged in and the number that were paged
2007out (from disk).
2008.TP
2009\fIswap 1 0\fP
2010The number of swap pages that have been brought in and out.
2011.TP
c13182ef 2012.\" FIXME The following is not the full picture for the 'intr' of
777f5a9e 2013.\" /proc/stat on 2.6:
fea681da 2014\fIintr 1462898\fP
bfbfcd18
MK
2015This line shows counts of interrupts serviced since boot time,
2016for each of the possible system interrupts.
2017The first column is the total of all interrupts serviced;
2018each subsequent column is the total for a particular interrupt.
fea681da
MK
2019.TP
2020\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
636297e9 2021(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
bfbfcd18
MK
2022.br
2023(Linux 2.4 only)
fea681da
MK
2024.TP
2025\fIctxt 115315\fP
2026The number of context switches that the system underwent.
2027.TP
2028\fIbtime 769041601\fP
f49c451a 2029boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
fea681da
MK
2030.TP
2031\fIprocesses 86031\fP
2032Number of forks since boot.
bfbfcd18
MK
2033.TP
2034\fIprocs_running 6\fP
2035Number of processes in runnable state.
5fab2e7c 2036(Linux 2.5.45 onward.)
bfbfcd18
MK
2037.TP
2038\fIprocs_blocked 2\fP
2039Number of processes blocked waiting for I/O to complete.
5fab2e7c 2040(Linux 2.5.45 onward.)
fea681da
MK
2041.RE
2042.TP
2043.I /proc/swaps
c13182ef
MK
2044Swap areas in use.
2045See also
fea681da
MK
2046.BR swapon (8).
2047.TP
2048.I /proc/sys
2049This directory (present since 1.3.57) contains a number of files
2050and subdirectories corresponding to kernel variables.
2051These variables can be read and sometimes modified using
5a2ff571 2052the \fI/proc\fP file system, and the (deprecated)
fea681da 2053.BR sysctl (2)
c13182ef 2054system call.
fea681da 2055.TP
6ab7c0aa 2056.IR /proc/sys/abi " (since Linux 2.4.10)"
fea681da 2057This directory may contain files with application binary information.
6ab7c0aa 2058.\" On some systems, it is not present.
66a9882e 2059See the Linux kernel source file
6ab7c0aa
MK
2060.I Documentation/sysctl/abi.txt
2061for more information.
fea681da
MK
2062.TP
2063.I /proc/sys/debug
2064This directory may be empty.
2065.TP
2066.I /proc/sys/dev
e2badfdf 2067This directory contains device-specific information (e.g.,
9a67332e 2068.IR dev/cdrom/info ).
fea681da
MK
2069On
2070some systems, it may be empty.
2071.TP
2072.I /proc/sys/fs
49236d3c
MK
2073This directory contains the files and subdirectories for kernel variables
2074related to file systems.
fea681da
MK
2075.TP
2076.I /proc/sys/fs/binfmt_misc
c13182ef 2077Documentation for files in this directory can be found
66a9882e 2078in the Linux kernel sources in
fea681da
MK
2079.IR Documentation/binfmt_misc.txt .
2080.TP
59a40ed7
MK
2081.IR /proc/sys/fs/dentry-state " (since Linux 2.2)"
2082This file contains information about the status of the
2083directory cache (dcache).
2084The file contains six numbers,
c13182ef 2085.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
59a40ed7 2086.I want_pages
fea681da 2087(pages requested by system) and two dummy values.
59a40ed7
MK
2088.RS
2089.IP * 2
2090.I nr_dentry
2091is the number of allocated dentries (dcache entries).
2092This field is unused in Linux 2.2.
2093.IP *
2094.I nr_unused
2095is the number of unused dentries.
2096.IP *
2097.I age_limit
2098.\" looks like this is unused in kernels 2.2 to 2.6
2099is the age in seconds after which dcache entries
2100can be reclaimed when memory is short.
2101.IP *
2102.I want_pages
2103.\" looks like this is unused in kernels 2.2 to 2.6
c7094399 2104is nonzero when the kernel has called shrink_dcache_pages() and the
fea681da 2105dcache isn't pruned yet.
59a40ed7 2106.RE
fea681da
MK
2107.TP
2108.I /proc/sys/fs/dir-notify-enable
2109This file can be used to disable or enable the
2110.I dnotify
2111interface described in
2112.BR fcntl (2)
2113on a system-wide basis.
2114A value of 0 in this file disables the interface,
2115and a value of 1 enables it.
2116.TP
2117.I /proc/sys/fs/dquot-max
2118This file shows the maximum number of cached disk quota entries.
2119On some (2.4) systems, it is not present.
2120If the number of free cached disk quota entries is very low and
2121you have some awesome number of simultaneous system users,
2122you might want to raise the limit.
2123.TP
2124.I /proc/sys/fs/dquot-nr
2125This file shows the number of allocated disk quota
2126entries and the number of free disk quota entries.
2127.TP
24cb4a4b 2128.IR /proc/sys/fs/epoll " (since Linux 2.6.28)"
242b46af
MK
2129This directory contains the file
2130.IR max_user_watches ,
24cb4a4b
MK
2131which can be used to limit the amount of kernel memory consumed by the
2132.I epoll
2133interface.
2134For further details, see