]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
grfix
[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.
16b5f7ba 44.\" 2008-06-05, mtk, Added /proc/PID/oom_score, /proc/PID/oom_adj,
c3d9780d 45.\" /proc/PID/limits, /proc/PID/mountinfo, /proc/PID/mountstats,
b4e9ee8f 46.\" and /proc/PID/fdinfo/*.
16b5f7ba 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.\"
610f75cc 61.TH PROC 5 2008-08-13 "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
79.I /proc/[number]
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.
b4e9ee8f
MK
84.\" FIXME Describe /proc/[number]/attr and
85.\" /proc/PID/task/TID/attr
86.\" This is a directory
87.\" Added in ???
88.\" CONFIG_SECURITY
89.\"
fea681da 90.TP
857f1942
MK
91.IR /proc/[number]/auxv " (since 2.6.0-test7)"
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.
b4e9ee8f
MK
97.\" FIXME Describe /proc/[number]/cgroup and
98.\" /proc/PID/task/TID/cgroup
99.\" Info in Documentation/cgroups.txt
100.\" Added in 2.6.24
101.\" CONFIG_CGROUPS
102.\"
103.\" FIXME Describe /proc/[number]/clear_refs
104.\" Added in 2.6.22
105.\" "Clears page referenced bits shown in smaps output"
106.\" write-only
107.\" CONFIG_PROC_PAGE_MONITOR
857f1942 108.TP
fea681da 109.I /proc/[number]/cmdline
b447cd58
MK
110This holds the complete command line for the process,
111unless the process is a zombie.
112.\" In 2.3.26, this also used to be true if the process was swapped out.
113In the latter case, there is nothing in this file:
75b94dc3 114that is, a read on this file will return 0 characters.
b447cd58 115The command-line arguments appear in this file as a set of
59a40ed7
MK
116null-separated strings,
117with a further null byte (\(aq\\0\(aq) after the last string.
fea681da 118.TP
b4e9ee8f
MK
119.IR /proc/[number]/coredump_filter " (since kernel 2.6.23)"
120See
121.BR core (5).
5c411b17
MK
122.TP
123.IR /proc/[number]/cpuset " (since kernel 2.6.12)"
124.\" and/proc/PID/task/TID/cpuset
125See
126.BR cpuset (7).
b4e9ee8f 127.TP
fea681da 128.I /proc/[number]/cwd
c13182ef 129This is a symbolic link to the current working directory of the process.
59a40ed7
MK
130To find out the current working directory of process 20,
131for instance, you can do this:
fea681da 132
59a40ed7 133.in +4n
fea681da 134.nf
fea681da
MK
135cd /proc/20/cwd; /bin/pwd
136.fi
59a40ed7 137.in
fea681da 138
c13182ef
MK
139Note that the
140.I pwd
e7b489f0 141command is often a shell built-in, and might
c13182ef 142not work properly.
743638fd
MK
143In
144.BR bash (1),
145you may use
146.IR "pwd\ \-P" .
afcaf646
MK
147
148.\" The following was still true as at kernel 2.6.13
c13182ef
MK
149In a multithreaded process, the contents of this symbolic link
150are not available if the main thread has already terminated
afcaf646 151(typically by calling
59a40ed7 152.BR pthread_exit (3)).
fea681da
MK
153.TP
154.I /proc/[number]/environ
155This file contains the environment for the process.
f81fb444 156The entries are separated by null bytes (\(aq\\0\(aq),
b4e9ee8f 157and there may be a null byte at the end.
fea681da 158Thus, to print out the environment of process 1, you would do:
a08ea57c 159.in +4n
fea681da 160.nf
a08ea57c 161
fea681da
MK
162.ft CW
163(cat /proc/1/environ; echo) | tr "\\000" "\\n"
164.fi
165.ft P
a08ea57c 166.in
fea681da
MK
167
168(For a reason why one should want to do this, see
f41d1d3d
MK
169.BR lilo (8)
170or
171.BR grub (8).)
fea681da
MK
172.TP
173.I /proc/[number]/exe
174Under Linux 2.2 and later, this file is a symbolic link
2d7195b8 175containing the actual pathname of the executed command.
c13182ef
MK
176This symbolic link can be dereferenced normally; attempting to open
177it will open the executable.
178You can even type
fea681da 179.I /proc/[number]/exe
c13182ef 180to run another copy of the same executable as is being run by
6931a324 181process [number].
afcaf646 182.\" The following was still true as at kernel 2.6.13
c13182ef
MK
183In a multithreaded process, the contents of this symbolic link
184are not available if the main thread has already terminated
afcaf646
MK
185(typically by calling
186.BR pthread_exit (3)).
fea681da
MK
187
188Under Linux 2.0 and earlier
189.I /proc/[number]/exe
c13182ef
MK
190is a pointer to the binary which was executed,
191and appears as a symbolic link.
192A
fea681da
MK
193.BR readlink (2)
194call on this file under Linux 2.0 returns a string in the format:
195
59a40ed7 196 [device]:inode
fea681da
MK
197
198For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
199MFM, etc. drives) minor 01 (first partition on the first drive).
200
201.BR find (1)
59a40ed7
MK
202with the
203.I \-inum
204option can be used to locate the file.
fea681da
MK
205.TP
206.I /proc/[number]/fd
207This is a subdirectory containing one entry for each file which the
208process has open, named by its file descriptor, and which is a
c13182ef
MK
209symbolic link to the actual file.
210Thus, 0 is standard input, 1 standard output, 2 standard error, etc.
fea681da 211
afcaf646
MK
212.\" The following was still true as at kernel 2.6.13
213In a multithreaded process, the contents of this directory
c13182ef 214are not available if the main thread has already terminated
afcaf646
MK
215(typically by calling
216.BR pthread_exit (3)).
217
59a40ed7
MK
218Programs that will take a filename as a command-line argument,
219but will not take input from standard input if no argument is supplied,
220or that write to a file named as a command-line argument,
221but will not send their output to standard output
222if no argument is supplied, can nevertheless be made to use
223standard input or standard out using
c4fe9aef 224.IR /proc/[number]/fd .
59a40ed7
MK
225For example, assuming that
226.I \-i
227is the flag designating an input file and
228.I \-o
229is the flag designating an output file:
a08ea57c 230.in +4n
fea681da
MK
231.nf
232
59a40ed7 233foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ...
fea681da 234.fi
a08ea57c
MK
235.in
236
fea681da
MK
237and you have a working filter.
238.\" The following is not true in my tests (MTK):
239.\" Note that this will not work for
240.\" programs that seek on their files, as the files in the fd directory
241.\" are not seekable.
242
59a40ed7
MK
243.I /proc/self/fd/N
244is approximately the same as
245.I /dev/fd/N
8ee190da 246in some Unix and Unix-like systems.
c13182ef 247Most Linux MAKEDEV scripts symbolically link
59a40ed7
MK
248.I /dev/fd
249to
250.IR /proc/self/fd ,
251in fact.
252
253Most systems provide symbolic links
254.IR /dev/stdin ,
255.IR /dev/stdout ,
256and
257.IR /dev/stderr ,
258which respectively link to the files
259.IR 0 ,
260.IR 1 ,
261and
262.IR 2
263in
264.IR /proc/self/fd .
265Thus the example command above could be written as:
266.in +4n
267.nf
268
269foobar \-i /dev/stdin \-o /dev/stdout ...
270.fi
271.in
6aefb6df 272.\" FIXME Describe /proc/[number]/loginuid
b877b392 273.\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
b4e9ee8f
MK
274.\" CONFIG_AUDITSYSCALL
275.TP
59a40ed7 276.IR /proc/[number]/fdinfo/ " (since kernel 2.6.22)"
b4e9ee8f
MK
277This is a subdirectory containing one entry for each file which the
278process has open, named by its file descriptor.
279The contents of each file can be read to obtain information
280about the corresponding file descriptor, for example:
281.in +4n
282.nf
283
284$ cat /proc/12015/fdinfo/4
285pos: 1000
286flags: 01002002
287.fi
288.in
289
290The
291.I pos
292field is a decimal number showing the current file offset.
293The
294.I flags
295field is an octal number that displays the
296file access mode and file status flags (see
297.BR open (2)).
298
299The files in this directory are readable only by the owner of the process.
300.\" FIXME document /proc/[number]/io
301.\" .TP
302.\" .IR /proc/[number]/io " (since kernel 2.6.20)"
303.TP
304.IR /proc/[number]/limits " (since kernel 2.6.24)"
305This file displays the soft limit, hard limit, and units of measurement
306for each of the process's resource limits (see
59a40ed7 307.BR getrlimit (2)).
b4e9ee8f 308The file is protected to only allow reading by the real UID of the process.
fea681da
MK
309.TP
310.I /proc/[number]/maps
311A file containing the currently mapped memory regions and their access
312permissions.
313
314The format is:
315
316.nf
317.ft CW
3bc960c2
MK
318address perms offset dev inode pathname
31908048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
32008056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm
fea681da 32108058000-0805b000 rwxp 00000000 00:00 0
3bc960c2
MK
32240000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so
32340013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so
3244001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
32540135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so
fea681da
MK
3264013e000-40142000 rw-p 00000000 00:00 0
327bffff000-c0000000 rwxp 00000000 00:00 0
328.ft
329.fi
fea681da 330
59a40ed7
MK
331where "address" is the address space in the process that it occupies,
332"perms" is a set of permissions:
fea681da
MK
333
334.nf
335.in +5
336r = read
337w = write
338x = execute
339s = shared
340p = private (copy on write)
341.fi
342.in
343
59a40ed7
MK
344"offset" is the offset into the file/whatever, "dev" is the device
345(major:minor), and "inode" is the inode on that device.
3460 indicates that no inode is associated with the memory region,
347as the case would be with BSS (uninitialized data).
fea681da
MK
348
349Under Linux 2.0 there is no field giving pathname.
350.TP
351.I /proc/[number]/mem
352This file can be used to access the pages of a process's memory through
353.BR open (2),
354.BR read (2),
355and
ccb2bb0d 356.BR lseek (2).
b4e9ee8f
MK
357.TP
358.IR /proc/[number]/mountinfo " (since Linux 2.6.26)"
359.\" This info adapted from Documentation/filesystems/proc.txt
360This file contains information about mount points.
361It contains lines of the form:
362.nf
363.ft CW
b4e9ee8f
MK
364
36536 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
366(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
b4e9ee8f
MK
367.ft
368.fi
369.IP
370The numbers in parentheses are labels for the descriptions below:
3bc960c2 371.RS 7
b4e9ee8f
MK
372.TP 5
373(1)
374mount ID: unique identifier of the mount (may be reused after
375.BR umount (2)).
376.TP
377(2)
378parent ID: ID of parent mount (or of self for the top of the mount tree).
379.TP
380(3)
381major:minor: value of
382.I st_dev
383for files on file system (see
384.BR stat (2)).
385.TP
386(4)
387root: root of the mount within the file system.
388.TP
389(5)
390mount point: mount point relative to the process's root.
391.TP
392(6)
393mount options: per-mount options.
394.TP
395(7)
396optional fields: zero or more fields of the form "tag[:value]".
397.TP
398(8)
399separator: marks the end of the optional fields.
400.TP
401(9)
402file system type: name of file system in the form "type[.subtype]".
403.TP
404(10)
405mount source: file system-specific information or "none".
406.TP
407(11)
408super options: per-super block options.
409.RE
410.IP
411Parsers should ignore all unrecognized optional fields.
412Currently the possible optional fields are:
413.RS 12
414.TP 18
415shared:X
416mount is shared in peer group X
417.TP
418master:X
419mount is slave to peer group X
420.TP
421propagate_from:X
422mount is slave and receives propagation from peer group X (*)
423.TP
424unbindable
425mount is unbindable
426.RE
427.IP
428(*) X is the closest dominant peer group under the process's root.
429If X is the immediate master of the mount,
430or if there is no dominant peer group under the same root,
431then only the "master:X" field is present
432and not the "propagate_from:X" field.
433
434For more information on mount propagation see:
435.I Documentation/filesystems/sharedsubtree.txt
436in the kernel source tree.
437.TP
438.IR /proc/[number]/mountstats " (since Linux 2.6.17)"
439This file system exports information (statistics, configuration information)
440about the mount points in the process's name space.
441Lines in this file have the form:
442.nf
443
444device /dev/sda7 mounted on /home with fstype ext3 [statistics]
445( 1 ) ( 2 ) (3 ) (4)
446.fi
447.IP
448The fields in each line are:
3bc960c2 449.RS 7
b4e9ee8f
MK
450.TP 5
451(1)
452The name of the mounted device
453(or "nodevice" if there is no corresponding device).
454.TP
455(2)
456The mount point within the file system tree.
457.TP
458(3)
459The file system type.
460.TP
461(4)
462Optional statistics and configuration information.
463Currently (as at Linux 2.6.26), only NFS file systems export
464information via this field.
465.RE
466.IP
467This file is only readable by the owner of the process.
468.\"
469.\" FIXME Describe /proc/[number]/mountstats and
470.\" /proc/PID/task/TID/mountstats
471.\" Some information can be found in the 2.6.17 change log.
472.\" Added in 2.6.17
473.\"
474.TP
7388733a 475.IR /proc/[number]/numa_maps " (since Linux 2.6.14)"
610f75cc
MK
476See
477.BR numa (7).
7388733a 478.TP
b4e9ee8f 479.IR /proc/[number]/oom_adj " (since Linux 2.6.11)"
b4e9ee8f 480This file can be used to adjust the score used to select which process
0425de01 481should be killed in an out-of-memory (OOM) situation.
b4e9ee8f
MK
482The kernel uses this value for a bit-shift operation of the process's
483.IR oom_score
484value:
5b8dbfd4
MK
485valid values are in the range \-16 to +15,
486plus the special value \-17,
b4e9ee8f
MK
487which disables OOM-killing altogether for this process.
488A positive score increases the likelihood of this
489process being killed by the OOM-killer;
490a negative score decreases the likelihood.
491The default value for this file is 0;
492a new process inherits its parent's
493.I oom_adj
494setting.
495A process must be privileged
496.RB ( CAP_SYS_RESOURCE )
497to update this file.
498.TP
499.IR /proc/[number]/oom_score " (since Linux 2.6.11)"
500.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
501This file displays the current score that the kernel gives to
502this process for the purpose of selecting a process
503for the OOM-killer.
504A higher score means that the process is more likely to be
505selected by the OOM-killer.
506The basis for this score is the amount of memory used by the process,
507with increases (+) or decreases (\-) for factors including:
508.\" See mm/oom_kill.c::badness() in the 2.6.25 sources
509.RS
510.IP * 2
511whether the process creates a lot of children using
512.BR fork (2)
513(+);
514.IP *
515whether the process has been running a long time,
516or has used a lot of CPU time (\-);
517.IP *
518whether the process has a low nice value (i.e., > 0) (+);
519.IP *
520whether the process is privileged (\-); and
521.\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
522.IP *
523whether the process is making direct hardware access (\-).
524.\" More precisely, if it has CAP_SYS_RAWIO
525.RE
526.IP
527The
528.I oom_score
529also reflects the bit-shift adjustment specified by the
530.I oom_adj
531setting for the process.
532.\" FIXME Describe /proc/[number]/pagemap
533.\" Added in 2.6.25
534.\" CONFIG_PROC_PAGE_MONITOR
fea681da
MK
535.TP
536.I /proc/[number]/root
537Unix and Linux support the idea of a per-process root of the
24d01c53 538file system, set by the
fea681da 539.BR chroot (2)
c13182ef
MK
540system call.
541This file is a symbolic link that points to the process's
fea681da 542root directory, and behaves as exe, fd/*, etc. do.
afcaf646
MK
543
544.\" The following was still true as at kernel 2.6.13
c13182ef
MK
545In a multithreaded process, the contents of this symbolic link
546are not available if the main thread has already terminated
afcaf646
MK
547(typically by calling
548.BR pthread_exit (3)).
6aefb6df
MK
549.\" FIXME Describe /proc/[number]/seccomp
550.\" Added in 2.6.12
b4e9ee8f
MK
551.\" FIXME Describe /proc/[number]/sessionid
552.\" Added in 2.6.25; read-only; only readable by real UID
553.\" CONFIG_AUDITSYSCALL
554.\" FIXME Describe /proc/[number]/sched
555.\" Added in 2.6.23
556.\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
557.\" Displays various scheduling parameters
558.\" This file can be written, to reset stats
559.\" FIXME Describe /proc/[number]/schedstats and
560.\" /proc/[number]/task/TID/schedstats
561.\" Added in 2.6.9
562.\" CONFIG_SCHEDSTATS
fea681da 563.TP
b07b19c4 564.IR /proc/[number]/smaps " (since Linux 2.6.14)"
b4e9ee8f 565.\" CONFIG_PROC_PAGE_MONITOR
b07b19c4 566This file shows memory consumption for each of the process's mappings.
59a40ed7 567For each of mappings there is a series of lines such as the following:
a08ea57c 568.in +4n
b07b19c4
MK
569.nf
570
57108048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
572Size: 464 kB
573Rss: 424 kB
574Shared_Clean: 424 kB
575Shared_Dirty: 0 kB
576Private_Clean: 0 kB
577Private_Dirty: 0 kB
578
579.fi
a08ea57c 580.in
b07b19c4
MK
581The first of these lines shows the same information as is displayed
582for the mapping in
583.IR /proc/[number]/maps .
584The remaining lines show the size of the mapping,
585the amount of the mapping that is currently resident in RAM,
586the number clean and dirty shared pages in the mapping,
587and the number clean and dirty private pages in the mapping.
588
097585ed
MK
589This file is only present if the
590.B CONFIG_MMU
591kernel configuration
b07b19c4
MK
592option is enabled.
593.TP
fea681da 594.I /proc/[number]/stat
c13182ef
MK
595Status information about the process.
596This is used by
597.BR ps (1).
598It is defined in
fea681da
MK
599.IR /usr/src/linux/fs/proc/array.c "."
600
601The fields, in order, with their proper
602.BR scanf (3)
603format specifiers, are:
604.RS
59a40ed7 605.TP 12
fea681da 606\fIpid\fP %d
357cf3fe 607The process ID.
fea681da
MK
608.TP
609\fIcomm\fP %s
c13182ef
MK
610The filename of the executable, in parentheses.
611This is visible whether or not the executable is swapped out.
fea681da
MK
612.TP
613\fIstate\fP %c
614One character from the string "RSDZTW" where R is running, S is
615sleeping in an interruptible wait, D is waiting in uninterruptible
616disk sleep, Z is zombie, T is traced or stopped (on a signal),
617and W is paging.
618.TP
619\fIppid\fP %d
620The PID of the parent.
621.TP
622\fIpgrp\fP %d
623The process group ID of the process.
624.TP
625\fIsession\fP %d
626The session ID of the process.
627.TP
fea681da 628\fItty_nr\fP %d
59a40ed7
MK
629The controlling terminal of the process.
630(The minor device number is contained in the combination of bits
63131 to 20 and 7 to 0;
632the major device number is in bits 15 t0 8.)
fea681da
MK
633.TP
634\fItpgid\fP %d
635.\" This field and following, up to and including wchan added 0.99.1
59a40ed7
MK
636The ID of the foreground process group of the controlling
637terminal of the process.
fea681da 638.TP
2ebfeb1b 639\fIflags\fP %u (%lu before Linux 2.6.22)
c13182ef
MK
640The kernel flags word of the process.
641For bit meanings,
fea681da
MK
642see the PF_* defines in
643.IR <linux/sched.h> .
644Details depend on the kernel version.
645.TP
646\fIminflt\fP %lu
647The number of minor faults the process has made which have not
648required loading a memory page from disk.
649.TP
59a40ed7 650.\" field 11
fea681da
MK
651\fIcminflt\fP %lu
652The number of minor faults that the process's
653waited-for children have made.
654.TP
655\fImajflt\fP %lu
656The number of major faults the process has made which have
657required loading a memory page from disk.
658.TP
659\fIcmajflt\fP %lu
660The number of major faults that the process's
661waited-for children have made.
662.TP
663\fIutime\fP %lu
7a017e24
MK
664Amount of time that this process has been scheduled in user mode,
665measured in clock ticks (divide by
666.IR sysconf(_SC_CLK_TCK) .
a1c9dc59
MK
667This includes guest time, \fIguest_time\fP
668(time spent running a virtual CPU, see below),
669so that applications that are not aware of the guest time field
670do not lose that time from their calculations.
fea681da
MK
671.TP
672\fIstime\fP %lu
7a017e24
MK
673Amount of time that this process has been scheduled in kernel mode,
674measured in clock ticks (divide by
675.IR sysconf(_SC_CLK_TCK) .
fea681da
MK
676.TP
677\fIcutime\fP %ld
7a017e24
MK
678Amount of time that this process's
679waited-for children have been scheduled in user mode,
680measured in clock ticks (divide by
681.IR sysconf(_SC_CLK_TCK) .
c13182ef 682(See also
fea681da 683.BR times (2).)
a1c9dc59
MK
684This includes guest time, \fIcguest_time\fP
685(time spent running a virtual CPU, see below).
fea681da
MK
686.TP
687\fIcstime\fP %ld
7a017e24
MK
688Amount of time that this process's
689waited-for children have been scheduled in kernel mode,
690measured in clock ticks (divide by
691.IR sysconf(_SC_CLK_TCK) .
fea681da
MK
692.TP
693\fIpriority\fP %ld
59a40ed7
MK
694(Explanation for Linux 2.6)
695For processes running a real-time scheduling policy
696.RI ( policy
697below; see
698.BR sched_setscheduler (2)),
699this is the negated scheduling priority, minus one;
700that is, a number in the range \-2 to \-100,
701corresponding to real-time priorities 1 to 99.
702For processes running under a non-real-time scheduling policy,
703this is the raw nice value
704.RB ( setpriority (2))
705as represented in the kernel.
706The kernel stores nice values as numbers
707in the range 0 (high) to 39 (low),
708corresponding to the user-visible nice range of \-20 to 19.
709
710Before Linux 2.6, this was a scaled value based on
711the scheduler weighting given to this process.
712.\" And back in kernel 1.2 days things were different again.
fea681da
MK
713.TP
714\fInice\fP %ld
59a40ed7
MK
715The nice value (see
716.BR setpriority (2)),
717a value in the range 19 (low priority) to \-20 (high priority).
718.\" Back in kernel 1.2 days things were different.
fea681da
MK
719.TP
720.\" .TP
721.\" \fIcounter\fP %ld
722.\" The current maximum size in jiffies of the process's next timeslice,
723.\" or what is currently left of its current timeslice, if it is the
724.\" currently running process.
725.\" .TP
726.\" \fItimeout\fP %u
727.\" The time in jiffies of the process's next timeout.
0e94f77b
MK
728.\" timeout was removed sometime around 2.1/2.2
729\fInum_threads\fP %ld
2ebfeb1b 730Number of threads in this process (since Linux 2.6).
bb83d1b9 731Before kernel 2.6, this field was hard coded to 0 as a placeholder
0e94f77b 732for an earlier removed field.
fea681da 733.TP
59a40ed7 734.\" field 21
fea681da 735\fIitrealvalue\fP %ld
8bd58774
MK
736The time in jiffies before the next
737.B SIGALRM
738is sent to the process due to an interval timer.
0e94f77b
MK
739Since kernel 2.6.17, this field is no longer maintained,
740and is hard coded as 0.
fea681da 741.TP
0e94f77b 742\fIstarttime\fP %llu (was %lu before Linux 2.6)
fea681da
MK
743The time in jiffies the process started after system boot.
744.TP
745\fIvsize\fP %lu
746Virtual memory size in bytes.
747.TP
748\fIrss\fP %ld
59a40ed7 749Resident Set Size: number of pages the process has in real memory.
c13182ef
MK
750This is just the pages which
751count towards text, data, or stack space.
752This does not include pages
fea681da
MK
753which have not been demand-loaded in, or which are swapped out.
754.TP
59a40ed7
MK
755\fIrsslim\fP %lu
756Current soft limit in bytes on the rss of the process;
757see the description of
758.B RLIMIT_RSS
759in
760.BR getpriority (2).
fea681da
MK
761.TP
762\fIstartcode\fP %lu
763The address above which program text can run.
764.TP
765\fIendcode\fP %lu
766The address below which program text can run.
767.TP
768\fIstartstack\fP %lu
59a40ed7 769The address of the start (i.e., bottom) of the stack.
fea681da
MK
770.TP
771\fIkstkesp\fP %lu
59a40ed7 772The current value of ESP (stack pointer), as found in the
fea681da
MK
773kernel stack page for the process.
774.TP
775\fIkstkeip\fP %lu
776The current EIP (instruction pointer).
777.TP
59a40ed7 778.\" field 31
fea681da 779\fIsignal\fP %lu
59a40ed7
MK
780The bitmap of pending signals, displayed as a decimal number.
781Obsolete, because it does not provide information on real-time signals; use
782.I /proc/[number]/status
783instead.
fea681da
MK
784.TP
785\fIblocked\fP %lu
59a40ed7
MK
786The bitmap of blocked signals, displayed as a decimal number.
787Obsolete, because it does not provide information on real-time signals; use
788.I /proc/[number]/status
789instead.
fea681da
MK
790.TP
791\fIsigignore\fP %lu
59a40ed7
MK
792The bitmap of ignored signals, displayed as a decimal number.
793Obsolete, because it does not provide information on real-time signals; use
794.I /proc/[number]/status
795instead.
fea681da
MK
796.TP
797\fIsigcatch\fP %lu
59a40ed7
MK
798The bitmap of caught signals, displayed as a decimal number.
799Obsolete, because it does not provide information on real-time signals; use
800.I /proc/[number]/status
801instead.
fea681da
MK
802.TP
803\fIwchan\fP %lu
c13182ef
MK
804This is the "channel" in which the process is waiting.
805It is the
fea681da 806address of a system call, and can be looked up in a namelist if you
c13182ef 807need a textual name.
9a67332e
MK
808(If you have an up-to-date
809.IR /etc/psdatabase ,
810then
4d9b6984 811try \fIps \-l\fP to see the WCHAN field in action.)
fea681da
MK
812.TP
813\fInswap\fP %lu
0e94f77b 814.\" nswap was added in 2.0
4d9b6984 815Number of pages swapped (not maintained).
fea681da
MK
816.TP
817\fIcnswap\fP %lu
0e94f77b 818.\" cnswap was added in 2.0
4d9b6984 819Cumulative \fInswap\fP for child processes (not maintained).
fea681da 820.TP
2ebfeb1b 821\fIexit_signal\fP %d (since Linux 2.1.22)
fea681da
MK
822Signal to be sent to parent when we die.
823.TP
2ebfeb1b 824\fIprocessor\fP %d (since Linux 2.2.8)
fea681da 825CPU number last executed on.
568105c6 826.TP
2ebfeb1b 827\fIrt_priority\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
59a40ed7
MK
828Real-time scheduling priority, a number in the range 1 to 99 for
829processes scheduled under a real-time policy,
830or 0, for non-real-time processes (see
568105c6
MK
831.BR sched_setscheduler (2)).
832.TP
59a40ed7 833.\" field 41
2ebfeb1b 834\fIpolicy\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
568105c6
MK
835Scheduling policy (see
836.BR sched_setscheduler (2)).
cd60dedd 837Decode using the SCHED_* constants in
59a40ed7 838.IR linux/sched.h .
167450d6 839.TP
2ebfeb1b 840\fIdelayacct_blkio_ticks\fP %llu (since Linux 2.6.18)
0e94f77b 841Aggregated block I/O delays, measured in clock ticks (centiseconds).
14c06953
MK
842.TP
843\fIguest_time\fP %lu (since Linux 2.6.24)
844Guest time of the process (time spent running a virtual CPU
7a017e24
MK
845for a guest operating system), measured in clock ticks (divide by
846.IR sysconf(_SC_CLK_TCK) .
14c06953
MK
847.TP
848\fIcguest_time\fP %ld (since Linux 2.6.24)
7a017e24
MK
849Guest time of the process's children, measured in clock ticks (divide by
850.IR sysconf(_SC_CLK_TCK) .
fea681da
MK
851.RE
852.TP
853.I /proc/[number]/statm
59a40ed7 854Provides information about memory usage, measured in pages.
c13182ef 855The columns are:
a08ea57c
MK
856.in +4n
857.nf
858
859size total program size
59a40ed7 860 (same as VmSize in \fI/proc/[number]/status\fP)
a08ea57c 861resident resident set size
59a40ed7
MK
862 (same as VmRSS in \fI/proc/[number]/status\fP)
863share shared pages (from shared mappings)
a08ea57c 864text text (code)
59a40ed7
MK
865.\" (not including libs; broken, includes data segment)
866lib library (unused in Linux 2.6)
867data data + stack
868.\" (including libs; broken, includes library text)
a08ea57c
MK
869dt dirty pages (unused in Linux 2.6)
870.fi
871.in
fea681da
MK
872.TP
873.I /proc/[number]/status
874Provides much of the information in
875.I /proc/[number]/stat
876and
877.I /proc/[number]/statm
878in a format that's easier for humans to parse.
16b5f7ba
MK
879Here's an example:
880.in +4n
881.nf
882
883$ cat /proc/$$/status
884Name: bash
885State: S (sleeping)
886Tgid: 3515
887Pid: 3515
888PPid: 3452
889TracerPid: 0
890Uid: 1000 1000 1000 1000
891Gid: 100 100 100 100
892FDSize: 256
893Groups: 16 33 100
894VmPeak: 9136 kB
895VmSize: 7896 kB
896VmLck: 0 kB
897VmHWM: 7572 kB
898VmRSS: 6316 kB
899VmData: 5224 kB
900VmStk: 88 kB
901VmExe: 572 kB
902VmLib: 1708 kB
903VmPTE: 20 kB
904Threads: 1
905SigQ: 0/3067
906SigPnd: 0000000000000000
907ShdPnd: 0000000000000000
908SigBlk: 0000000000010000
909SigIgn: 0000000000384004
910SigCgt: 000000004b813efb
911CapInh: 0000000000000000
912CapPrm: 0000000000000000
913CapEff: 0000000000000000
914CapBnd: ffffffffffffffff
915Cpus_allowed: 00000001
916Cpus_allowed_list: 0
917Mems_allowed: 1
918Mems_allowed_list: 0
919voluntary_ctxt_switches: 150
920nonvoluntary_ctxt_switches: 545
921.fi
922.in
923.IP
924The fields are as follows:
925.RS
926.IP * 2
927.IR Name :
928Command run by this process.
929.IP *
930.IR State :
931Current state of the process. One of
932"R (running)",
933"S (sleeping)",
934"D (disk sleep)",
935"T (stopped)",
936"T (tracing stop)",
937"Z (zombie)",
938or
939"X (dead)".
940.IP *
941.IR Tgid :
942Thread group ID (i.e., Process ID).
943.IP *
944.IR Pid :
945Thread ID (see
946.BR gettid (2)).
947.IP *
948.IR TracerPid :
949PID of process tracing this process (0 if not being traced).
950.IP *
951.IR Uid ", " Gid :
952Real, effective, saved set, and file system UIDs (GIDs).
953.IP *
954.IR FDSize :
955Number of file descriptor slots currently allocated.
956.IP *
957.IR Groups :
958Supplementary group list.
959.IP *
960.IR VmPeak :
961Peak virtual memory size.
962.IP *
963.IR VmSize :
964Virtual memory size.
965.IP *
966.IR VmLck :
967Locked memory size.
968.IP *
969.IR VmHWM :
970Peak resident set size ("high water mark").
971.IP *
972.IR VmRSS :
973Resident set size.
974.IP *
975.IR VmData ", " VmStk ", " VmExe :
976Size of data, stack, and text segments.
977.IP *
978.IR VmLib :
979Shared library code size.
980.IP *
981.IR VmPTE :
982Page table entries size (since Linux 2.6.10).
983.IP *
984.IR Threads :
985Number of threads in process containing this thread.
986.IP *
987.IR SigPnd ", " ShdPnd :
988Number of signals pending for thread and for process as a whole (see
989.BR pthreads (7)
990and
991.BR signal (7)).
992.IP *
993.IR SigBlk ", " SigIgn ", " SigCgt :
994Masks indicating signals being blocked, ignored, and caught (see
995.BR signal (7)).
996.IP *
997.IR CapInh ", " CapPrm ", " CapEff :
998Masks of capabilities enabled in inheritable, permitted, and effective sets
999(see
1000.BR capabilities (7)).
1001.IP *
1002.IR CapBnd :
1003Capability Bounding set
1004(since kernel 2.6.26, see
1005.BR capabilities (7)).
1006.IP *
1007.IR Cpus_allowed :
1008Mask of CPUs on which this process may run
1009(since Linux 2.6.24, see
1010.BR cpuset (7)).
1011.IP *
1012.IR Cpus_allowed_list :
1013Same as previous, but in "list format"
1014(since Linux 2.6.26, see
1015.BR cpuset (7)).
1016.IP *
1017.IR Mems_allowed :
1018Mask of memory nodes allowed to this process
1019(since Linux 2.6.24, see
1020.BR cpuset (7)).
1021.IP *
1022.IR Mems_allowed_list :
1023Same as previous, but in "list format"
1024(since Linux 2.6.26, see
1025.BR cpuset (7)).
1026.IP *
1027.IR voluntary_context_switches ", " nonvoluntary_context_switches :
1028Number of voluntary and involuntary context switches (since Linux 2.6.23).
1029.RE
fea681da 1030.TP
2ebfeb1b 1031.IR /proc/[number]/task " (since Linux 2.6.0-test6)"
afcaf646
MK
1032This is a directory that contains one subdirectory
1033for each thread in the process.
1034The name of each subdirectory is the numerical thread ID of the
1035thread (see
1036.BR gettid (2)).
1037Within each of these subdirectories, there is a set of
1038files with the same names and contents as under the
1039.I /proc/[number]
1040directories.
1041For attributes that are shared by all threads, the contents for
1042each of the files under the
1043.I task/[thread-ID]
1044subdirectories will be the same as in the corresponding
c13182ef 1045file in the parent
afcaf646
MK
1046.I /proc/[number]
1047directory
c13182ef 1048(e.g., in a multithreaded process, all of the
afcaf646 1049.I task/[thread-ID]/cwd
c13182ef 1050files will have the same value as the
afcaf646 1051.I /proc/[number]/cwd
c13182ef 1052file in the parent directory, since all of the threads in a process
afcaf646
MK
1053share a working directory).
1054For attributes that are distinct for each thread,
c13182ef 1055the corresponding files under
afcaf646
MK
1056.I task/[thread-ID]
1057may have different values (e.g., various fields in each of the
1058.I task/[thread-ID]/status
1059files may be different for each thread).
1060
1061.\" The following was still true as at kernel 2.6.13
1062In a multithreaded process, the contents of the
1063.I /proc/[number]/task
c13182ef 1064directory are not available if the main thread has already terminated
afcaf646
MK
1065(typically by calling
1066.BR pthread_exit (3)).
1067.TP
fea681da 1068.I /proc/apm
097585ed
MK
1069Advanced power management version and battery information when
1070.B CONFIG_APM
1071is defined at kernel compilation time.
fea681da
MK
1072.TP
1073.I /proc/bus
1074Contains subdirectories for installed busses.
1075.TP
1076.I /proc/bus/pccard
59a40ed7 1077Subdirectory for PCMCIA devices when
097585ed
MK
1078.B CONFIG_PCMCIA
1079is set at kernel compilation time.
fea681da
MK
1080.TP
1081.I /proc/bus/pccard/drivers
1082.TP
1083.I /proc/bus/pci
c13182ef 1084Contains various bus subdirectories and pseudo-files containing
59a40ed7 1085information about PCI busses, installed devices, and device
c13182ef
MK
1086drivers.
1087Some of these files are not ASCII.
fea681da
MK
1088.TP
1089.I /proc/bus/pci/devices
59a40ed7 1090Information about PCI devices.
c13182ef 1091They may be accessed through
fea681da
MK
1092.BR lspci (8)
1093and
1094.BR setpci (8).
1095.TP
1096.I /proc/cmdline
c13182ef
MK
1097Arguments passed to the Linux kernel at boot time.
1098Often done via a boot manager such as
59a40ed7
MK
1099.BR lilo (8)
1100or
1101.BR grub (8).
f6e524c4
MK
1102.TP
1103.IR /proc/config.gz " (since Linux 2.6)"
1104This file exposes the configuration options that were used
c3d9780d 1105to build the currently running kernel,
f6e524c4
MK
1106in the same format as they would be shown in the
1107.I .config
1108file that resulted when configuring the kernel (using
1109.IR "make xconfig" ,
1110.IR "make config" ,
1111or similar).
1112The file contents are compressed; view or search them using
1113.BR zcat (1),
1114.BR zgrep (1),
1115etc.
1116As long as no changes have been made to the following file,
250e01ec
MK
1117the contents of
1118.I /proc/config.gz
1119are the same as those provided by :
f6e524c4
MK
1120.in +4n
1121.nf
1122
9fd8b185 1123cat /lib/modules/$(uname -r)/build/.config
f6e524c4
MK
1124.fi
1125.in
250e01ec
MK
1126.IP
1127.I /proc/config.gz
1128is only provided if the kernel is configured with
250e01ec 1129.BR CONFIG_IKCONFIG_PROC .
fea681da
MK
1130.TP
1131.I /proc/cpuinfo
1132This is a collection of CPU and system architecture dependent items,
1133for each supported architecture a different list.
1134Two common entries are \fIprocessor\fP which gives CPU number and
c13182ef
MK
1135\fIbogomips\fP; a system constant that is calculated
1136during kernel initialization.
1137SMP machines have information for
fea681da
MK
1138each CPU.
1139.TP
1140.I /proc/devices
c13182ef
MK
1141Text listing of major numbers and device groups.
1142This can be used by MAKEDEV scripts for consistency with the kernel.
fea681da
MK
1143.TP
1144.IR /proc/diskstats " (since Linux 2.5.69)"
1145This file contains disk I/O statistics for each disk device.
1146See the kernel source file
1147.I Documentation/iostats.txt
1148for further information.
1149.TP
1150.I /proc/dma
c13182ef 1151This is a list of the registered \fIISA\fP DMA (direct memory access)
fea681da
MK
1152channels in use.
1153.TP
1154.I /proc/driver
1155Empty subdirectory.
1156.TP
1157.I /proc/execdomains
1158List of the execution domains (ABI personalities).
1159.TP
1160.I /proc/fb
097585ed
MK
1161Frame buffer information when
1162.B CONFIG_FB
1163is defined during kernel compilation.
fea681da
MK
1164.TP
1165.I /proc/filesystems
24d01c53
MK
1166A text listing of the file systems which are supported by the kernel,
1167namely file systems which were compiled into the kernel or whose kernel
6387216b
MK
1168modules are currently loaded.
1169(See also
fb477da2 1170.BR filesystems (5).)
24d01c53 1171If a file system is marked with "nodev",
809d0164 1172this means that it does not require a block device to be mounted
24d01c53 1173(e.g., virtual file system, network file system).
809d0164
MK
1174
1175Incidentally, this file may be used by
1176.BR mount (8)
24d01c53
MK
1177when no file system is specified and it didn't manage to determine the
1178file system type.
1179Then file systems contained in this file are tried
809d0164 1180(excepted those that are marked with "nodev").
fea681da
MK
1181.TP
1182.I /proc/fs
1183Empty subdirectory.
1184.TP
1185.I /proc/ide
1186This directory
59a40ed7
MK
1187exists on systems with the IDE bus.
1188There are directories for each IDE channel and attached device.
c13182ef 1189Files include:
fea681da 1190
a08ea57c 1191.in +4n
fea681da
MK
1192.nf
1193cache buffer size in KB
1194capacity number of sectors
1195driver driver version
1196geometry physical and logical geometry
9fdfa163 1197identify in hexadecimal
fea681da
MK
1198media media type
1199model manufacturer's model number
1200settings drive settings
9fdfa163
MK
1201smart_thresholds in hexadecimal
1202smart_values in hexadecimal
fea681da 1203.fi
a08ea57c 1204.in
fea681da 1205
c13182ef 1206The
fea681da
MK
1207.BR hdparm (8)
1208utility provides access to this information in a friendly format.
1209.TP
1210.I /proc/interrupts
59a40ed7 1211This is used to record the number of interrupts for each IRQ on (at
c13182ef
MK
1212least) the i386 architecture.
1213Very easy to read formatting, done in
fea681da
MK
1214ASCII.
1215.TP
1216.I /proc/iomem
1217I/O memory map in Linux 2.4.
1218.TP
1219.I /proc/ioports
c13182ef 1220This is a list of currently registered Input-Output port regions that
fea681da
MK
1221are in use.
1222.TP
1223.IR /proc/kallsyms " (since Linux 2.5.71)"
1224This holds the kernel exported symbol definitions used by the
1225.BR modules (X)
1226tools to dynamically link and bind loadable modules.
1227In Linux 2.5.47 and earlier, a similar file with slightly different syntax
1228was named
1229.IR ksyms .
1230.TP
1231.I /proc/kcore
1232This file represents the physical memory of the system and is stored
c13182ef
MK
1233in the ELF core file format.
1234With this pseudo-file, and an unstripped
9a67332e
MK
1235kernel
1236.RI ( /usr/src/linux/vmlinux )
1237binary, GDB can be used to
fea681da
MK
1238examine the current state of any kernel data structures.
1239
1240The total length of the file is the size of physical memory (RAM) plus
12414KB.
1242.TP
1243.I /proc/kmsg
1244This file can be used instead of the
1245.BR syslog (2)
c13182ef
MK
1246system call to read kernel messages.
1247A process must have superuser
fea681da 1248privileges to read this file, and only one process should read this
c13182ef
MK
1249file.
1250This file should not be read if a syslog process is running
fea681da
MK
1251which uses the
1252.BR syslog (2)
1253system call facility to log kernel messages.
1254
1255Information in this file is retrieved with the
1256.BR dmesg (8)
1257program.
1258.TP
1259.IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
1260See
1261.IR /proc/kallsyms .
1262.TP
1263.I /proc/loadavg
6b05dc38
MK
1264The first three fields in this file are load average figures
1265giving the number of jobs in the run queue (state R)
fea681da
MK
1266or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
1267They are the same as the load average numbers given by
1268.BR uptime (1)
1269and other programs.
6b05dc38
MK
1270The fourth field consists of two numbers separated by a slash (/).
1271The first of these is the number of currently executing kernel
c13182ef 1272scheduling entities (processes, threads);
6b05dc38
MK
1273this will be less than or equal to the number of CPUs.
1274The value after the slash is the number of kernel scheduling entities
1275that currently exist on the system.
1276The fifth field is the PID of the process that was most
1277recently created on the system.
fea681da
MK
1278.TP
1279.I /proc/locks
1280This file shows current file locks
1281.RB ( flock "(2) and " fcntl (2))
1282and leases
1283.RB ( fcntl (2)).
1284.TP
89dd5f8a 1285.IR /proc/malloc " (only up to and including Linux 2.2)"
59a40ed7 1286.\" It looks like this only ever did something back in 1.0 days
097585ed 1287This file is only present if
89dd5f8a 1288.B CONFIG_DEBUG_MALLOC
097585ed 1289was defined during compilation.
fea681da
MK
1290.TP
1291.I /proc/meminfo
1292This is used by
1293.BR free (1)
1294to report the amount of free and used memory (both physical and swap)
1295on the system as well as the shared memory and buffers used by the
1296kernel.
1297
1298It is in the same format as
1299.BR free (1),
1300except in bytes rather than KB.
1301.TP
1302.I /proc/mounts
1303This is a list of all the file systems currently mounted on the system.
1304The format of this file is documented in
31e9a9ec 1305.BR fstab (5).
c13182ef 1306Since kernel version 2.6.15, this file is pollable:
57651c15
MK
1307after opening the file for reading, a change in this file
1308(i.e., a file system mount or unmount) causes
1309.BR select (2)
1310to mark the file descriptor as readable, and
1311.BR poll (2)
1312and
1313.BR epoll_wait (2)
1314mark the file as having an error condition.
fea681da
MK
1315.TP
1316.I /proc/modules
1317A text list of the modules that have been loaded by the system.
1318See also
1319.BR lsmod (8).
1320.TP
1321.I /proc/mtrr
c13182ef
MK
1322Memory Type Range Registers.
1323See
fea681da
MK
1324.I /usr/src/linux/Documentation/mtrr.txt
1325for details.
1326.TP
1327.I /proc/net
1328various net pseudo-files, all of which give the status of some part of
c13182ef
MK
1329the networking layer.
1330These files contain ASCII structures and are,
59a40ed7
MK
1331therefore, readable with
1332.BR cat (1).
c13182ef 1333However, the standard
fea681da
MK
1334.BR netstat (8)
1335suite provides much cleaner access to these files.
1336.TP
1337.I /proc/net/arp
1338This holds an ASCII readable dump of the kernel ARP table used for
c13182ef 1339address resolutions.
59a40ed7 1340It will show both dynamically learned and pre-programmed ARP entries.
c13182ef 1341The format is:
fea681da
MK
1342
1343.nf
1344.ft CW
1345.in 8n
1346IP address HW type Flags HW address Mask Device
1347192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
1348192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
1349.ft
1350.fi
1351.in
1352
6c04f928 1353Here "IP address" is the IPv4 address of the machine and the "HW type"
c13182ef
MK
1354is the hardware type of the address from RFC\ 826.
1355The flags are the internal
9a67332e
MK
1356flags of the ARP structure (as defined in
1357.IR /usr/include/linux/if_arp.h )
1358and
6c04f928 1359the "HW address" is the data link layer mapping for that IP address if
fea681da
MK
1360it is known.
1361.TP
1362.I /proc/net/dev
c13182ef
MK
1363The dev pseudo-file contains network device status information.
1364This gives
1365the number of received and sent packets, the number of errors and
fea681da 1366collisions
c13182ef
MK
1367and other basic statistics.
1368These are used by the
fea681da 1369.BR ifconfig (8)
c13182ef
MK
1370program to report device status.
1371The format is:
fea681da
MK
1372
1373.nf
1374.ft CW
1375.in 1n
1376Inter-| Receive | Transmit
1377 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
1378 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
1379 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
1380 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
1381 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
1382.in
1383.ft
1384.fi
1385.\" .TP
1386.\" .I /proc/net/ipx
1387.\" No information.
1388.\" .TP
1389.\" .I /proc/net/ipx_route
1390.\" No information.
1391.TP
1392.I /proc/net/dev_mcast
1393Defined in
1394.IR /usr/src/linux/net/core/dev_mcast.c :
1395.nf
1396.in +5
9fdfa163 1397indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
13982 eth0 1 0 01005e000001
13993 eth1 1 0 01005e000001
14004 eth2 1 0 01005e000001
1401.in
1402.fi
1403.TP
1404.I /proc/net/igmp
c13182ef
MK
1405Internet Group Management Protocol.
1406Defined in
fea681da
MK
1407.IR /usr/src/linux/net/core/igmp.c .
1408.TP
1409.I /proc/net/rarp
1410This file uses the same format as the
1411.I arp
1412file and contains the current reverse mapping database used to provide
1413.BR rarp (8)
c13182ef
MK
1414reverse address lookup services.
1415If RARP is not configured into the
fea681da
MK
1416kernel,
1417this file will not be present.
1418.TP
1419.I /proc/net/raw
c13182ef
MK
1420Holds a dump of the RAW socket table.
1421Much of the information is not of
fea681da 1422use
c13182ef 1423apart from debugging.
6c04f928 1424The "sl" value is the kernel hash slot for the
fea681da 1425socket,
6c04f928
MK
1426the "local_address" is the local address and protocol number pair.
1427\&"St" is
c13182ef
MK
1428the internal status of the socket.
1429The "tx_queue" and "rx_queue" are the
fea681da 1430outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1431The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
fdc196f5
MK
1432The "uid"
1433field holds the effective UID of the creator of the socket.
fea681da
MK
1434.\" .TP
1435.\" .I /proc/net/route
1436.\" No information, but looks similar to
1437.\" .BR route (8).
1438.TP
1439.I /proc/net/snmp
c13182ef 1440This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
fea681da 1441management
763f0e47 1442information bases for an SNMP agent.
fea681da
MK
1443.TP
1444.I /proc/net/tcp
c13182ef
MK
1445Holds a dump of the TCP socket table.
1446Much of the information is not
1447of use apart from debugging.
1448The "sl" value is the kernel hash slot
6beb1671
MK
1449for the socket, the "local_address" is the local address and port number pair.
1450The "rem_address" is the remote address and port number pair
6c04f928
MK
1451(if connected).
1452\&"St" is the internal status of the socket.
1453The "tx_queue" and "rx_queue" are the
fea681da 1454outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 1455The "tr", "tm\->when", and "rexmits" fields hold internal information of
fdc196f5
MK
1456the kernel socket state and are only useful for debugging.
1457The "uid"
1458field holds the effective UID of the creator of the socket.
fea681da
MK
1459.TP
1460.I /proc/net/udp
c13182ef
MK
1461Holds a dump of the UDP socket table.
1462Much of the information is not of
1463use apart from debugging.
1464The "sl" value is the kernel hash slot for the
6beb1671
MK
1465socket, the "local_address" is the local address and port number pair.
1466The "rem_address" is the remote address and port number pair
fea681da
MK
1467(if connected). "St" is the internal status of the socket.
1468The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
c13182ef 1469in terms of kernel memory usage.
94e9d9fe 1470The "tr", "tm\->when", and "rexmits" fields
c13182ef 1471are not used by UDP.
fdc196f5
MK
1472The "uid"
1473field holds the effective UID of the creator of the socket.
fea681da
MK
1474The format is:
1475
1476.nf
1477.ft CW
1478.in 1n
94e9d9fe 1479sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
fea681da
MK
1480 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1481 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1482 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
1483.in
1484.ft
1485.fi
1486.TP
1487.I /proc/net/unix
8ee190da 1488Lists the Unix domain sockets present within the system and their
c13182ef
MK
1489status.
1490The format is:
fea681da
MK
1491.nf
1492.sp .5
1493.ft CW
1494Num RefCount Protocol Flags Type St Path
1495 0: 00000002 00000000 00000000 0001 03
1496 1: 00000001 00000000 00010000 0001 01 /dev/printer
1497.ft
1498.sp .5
1499.fi
1500
6c04f928
MK
1501Here "Num" is the kernel table slot number, "RefCount" is the number
1502of users of the socket, "Protocol" is currently always 0, "Flags"
fea681da 1503represent the internal kernel flags holding the status of the
c13182ef 1504socket.
6c04f928
MK
1505Currently, type is always "1" (Unix domain datagram sockets are
1506not yet supported in the kernel).
1507\&"St" is the internal state of the
fea681da
MK
1508socket and Path is the bound path (if any) of the socket.
1509.TP
1510.I /proc/partitions
1511Contains major and minor numbers of each partition as well as number
1512of blocks and partition name.
1513.TP
1514.I /proc/pci
1515This is a listing of all PCI devices found during kernel initialization
1516and their configuration.
2990d781 1517
59a40ed7
MK
1518This file has been deprecated in favor of a new
1519.I /proc
2990d781
MK
1520interface for PCI
1521.RI ( /proc/bus/pci ).
1522It became optional in Linux 2.2 (available with
1523.B CONFIG_PCI_OLD_PROC
1524set at kernel compilation).
1525It became once more non-optionally enabled in Linux 2.4.
1526Next, it was deprecated in Linux 2.6 (still available with
1527.B CONFIG_PCI_LEGACY_PROC
1528set), and finally removed altogether since Linux 2.6.17.
b4e9ee8f
MK
1529.\" FIXME /proc/sched_debug
1530.\" .TP
1531.\" .IR /proc/sched_debug " (since Linux 2.6.23)"
1532.\" See also /proc/PID/sched
fea681da
MK
1533.TP
1534.I /proc/scsi
59a40ed7
MK
1535A directory with the
1536.I scsi
1537mid-level pseudo-file and various SCSI low-level
2990d781
MK
1538driver directories,
1539which contain a file for each SCSI host in this system, all of
c13182ef
MK
1540which give the status of some part of the SCSI IO subsystem.
1541These files contain ASCII structures and are, therefore, readable with
2990d781 1542.BR cat (1).
fea681da 1543
c13182ef 1544You can also write to some of the files to reconfigure the subsystem or
59a40ed7 1545switch certain features on or off.
fea681da
MK
1546.TP
1547.I /proc/scsi/scsi
c13182ef 1548This is a listing of all SCSI devices known to the kernel.
59a40ed7 1549The listing is similar to the one seen during bootup.
c13182ef 1550scsi currently supports only the \fIadd-single-device\fP command which
59a40ed7
MK
1551allows root to add a hotplugged device to the list of known devices.
1552
1553The command
1554.in +4n
1555.nf
1556
1557echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi
fea681da 1558
59a40ed7
MK
1559.fi
1560.in
c13182ef
MK
1561will cause
1562host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
1563If there
fea681da
MK
1564is already a device known on this address or the address is invalid, an
1565error will be returned.
1566.TP
1567.I /proc/scsi/[drivername]
c13182ef
MK
1568\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
1569aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
1570scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
1571These directories show up for all drivers that registered at least one
59a40ed7 1572SCSI HBA.
c13182ef 1573Every directory contains one file per registered host.
59a40ed7 1574Every host-file is named after the number the host was assigned during
c13182ef 1575initialization.
fea681da 1576
c13182ef 1577Reading these files will usually show driver and host configuration,
59a40ed7 1578statistics, etc.
fea681da
MK
1579
1580Writing to these files allows different things on different hosts.
1581For example, with the \fIlatency\fP and \fInolatency\fP commands,
1582root can switch on and off command latency measurement code in the
c13182ef
MK
1583eata_dma driver.
1584With the \fIlockup\fP and \fIunlock\fP commands,
1585root can control bus lockups simulated by the scsi_debug driver.
fea681da
MK
1586.TP
1587.I /proc/self
59a40ed7
MK
1588This directory refers to the process accessing the
1589.I /proc
1590file system,
1591and is identical to the
1592.I /proc
1593directory named by the process ID of the same process.
fea681da
MK
1594.TP
1595.I /proc/slabinfo
c13182ef 1596Information about kernel caches.
821643a8
MK
1597Since Linux 2.6.16 this file is only present if the
1598.B CONFIG_SLAB
1599kernel configuration option is enabled.
350038ff 1600The columns in
38f76cd2 1601.I /proc/slabinfo
350038ff 1602are:
a08ea57c 1603.in +4n
fea681da 1604.nf
a08ea57c 1605
fea681da
MK
1606cache-name
1607num-active-objs
1608total-objs
1609object-size
1610num-active-slabs
1611total-slabs
1612num-pages-per-slab
1613.fi
a08ea57c
MK
1614.in
1615
c13182ef 1616See
fea681da
MK
1617.BR slabinfo (5)
1618for details.
1619.TP
1620.I /proc/stat
c13182ef
MK
1621kernel/system statistics.
1622Varies with architecture.
1623Common
fea681da
MK
1624entries include:
1625.RS
1626.TP
1627\fIcpu 3357 0 4313 1362393\fP
bfbfcd18 1628The amount of time, measured in units of
268f000b
MK
1629USER_HZ (1/100ths of a second on most architectures, use
1630.IR sysconf(_SC_CLK_TCK)
1631to obtain the right value),
b81087ab 1632.\" 1024 on Alpha and ia64
bfbfcd18
MK
1633that the system spent in user mode,
1634user mode with low priority (nice), system mode, and the
1635idle task, respectively.
b09b8526 1636.\" FIXME Actually, the following info about the /proc/stat 'cpu' field
777f5a9e 1637.\" does not seem to be quite right (at least in 2.6.12)
bfbfcd18 1638The last value should be USER_HZ times the
fea681da 1639second entry in the uptime pseudo-file.
ca92ce95 1640
bfbfcd18
MK
1641In Linux 2.6 this line includes three additional columns:
1642.I iowait
1643\- time waiting for I/O to complete (since 2.5.41);
1644.I irq
1645\- time servicing interrupts (since 2.6.0-test4);
1646.I softirq
1647\- time servicing softirqs (since 2.6.0-test4).
ca92ce95 1648
9de1f6cc
MK
1649Since Linux 2.6.11, there is an eighth column,
1650.I steal
1651\- stolen time, which is the time spent in other operating systems when
1652running in a virtualized environment
14c06953
MK
1653
1654Since Linux 2.6.24, there is a ninth column,
1655.IR guest ,
1656which is the time spent running a virtual CPU for guest
afef1764 1657operating systems under the control of the Linux kernel.
14c06953 1658.\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
fea681da
MK
1659.TP
1660\fIpage 5741 1808\fP
1661The number of pages the system paged in and the number that were paged
1662out (from disk).
1663.TP
1664\fIswap 1 0\fP
1665The number of swap pages that have been brought in and out.
1666.TP
c13182ef 1667.\" FIXME The following is not the full picture for the 'intr' of
777f5a9e 1668.\" /proc/stat on 2.6:
fea681da 1669\fIintr 1462898\fP
bfbfcd18
MK
1670This line shows counts of interrupts serviced since boot time,
1671for each of the possible system interrupts.
1672The first column is the total of all interrupts serviced;
1673each subsequent column is the total for a particular interrupt.
fea681da
MK
1674.TP
1675\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
1676(major,minor):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
bfbfcd18
MK
1677.br
1678(Linux 2.4 only)
fea681da
MK
1679.TP
1680\fIctxt 115315\fP
1681The number of context switches that the system underwent.
1682.TP
1683\fIbtime 769041601\fP
be9634cf 1684boot time, in seconds since the Epoch (January 1, 1970).
fea681da
MK
1685.TP
1686\fIprocesses 86031\fP
1687Number of forks since boot.
bfbfcd18
MK
1688.TP
1689\fIprocs_running 6\fP
1690Number of processes in runnable state.
1691(Linux 2.5.45 onwards.)
1692.TP
1693\fIprocs_blocked 2\fP
1694Number of processes blocked waiting for I/O to complete.
1695(Linux 2.5.45 onwards.)
fea681da
MK
1696.RE
1697.TP
1698.I /proc/swaps
c13182ef
MK
1699Swap areas in use.
1700See also
fea681da
MK
1701.BR swapon (8).
1702.TP
1703.I /proc/sys
1704This directory (present since 1.3.57) contains a number of files
1705and subdirectories corresponding to kernel variables.
1706These variables can be read and sometimes modified using
59a40ed7 1707the \fI/proc\fP file system, and the
fea681da 1708.BR sysctl (2)
c13182ef
MK
1709system call.
1710Presently, there are subdirectories
fea681da
MK
1711.IR abi ", " debug ", " dev ", " fs ", " kernel ", " net ", " proc ", "
1712.IR rxrpc ", " sunrpc " and " vm
1713that each contain more files and subdirectories.
1714.TP
6ab7c0aa 1715.IR /proc/sys/abi " (since Linux 2.4.10)"
fea681da 1716This directory may contain files with application binary information.
6ab7c0aa
MK
1717.\" On some systems, it is not present.
1718See the kernel source file
1719.I Documentation/sysctl/abi.txt
1720for more information.
fea681da
MK
1721.TP
1722.I /proc/sys/debug
1723This directory may be empty.
1724.TP
1725.I /proc/sys/dev
e2badfdf 1726This directory contains device-specific information (e.g.,
9a67332e 1727.IR dev/cdrom/info ).
fea681da
MK
1728On
1729some systems, it may be empty.
1730.TP
1731.I /proc/sys/fs
6d64ca9c 1732This contains the subdirectories
b877b392 1733.IR binfmt_misc ", " inotify ", and " mqueue ,
fea681da 1734and files
c13182ef
MK
1735.IR dentry-state ", " dir-notify-enable ", " dquot-nr ", " file-max ", "
1736.IR file-nr ", " inode-max ", " inode-nr ", " inode-state ", "
1737.IR lease-break-time ", " leases-enable ", "
43da96f2
MK
1738.IR overflowgid ", " overflowuid ", "
1739.IR suid_dumpable ", "
1740.IR super-max ", and " super-nr .
fea681da
MK
1741.TP
1742.I /proc/sys/fs/binfmt_misc
c13182ef 1743Documentation for files in this directory can be found
b877b392 1744in the kernel sources in
fea681da
MK
1745.IR Documentation/binfmt_misc.txt .
1746.TP
59a40ed7
MK
1747.IR /proc/sys/fs/dentry-state " (since Linux 2.2)"
1748This file contains information about the status of the
1749directory cache (dcache).
1750The file contains six numbers,
c13182ef 1751.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
59a40ed7 1752.I want_pages
fea681da 1753(pages requested by system) and two dummy values.
59a40ed7
MK
1754.RS
1755.IP * 2
1756.I nr_dentry
1757is the number of allocated dentries (dcache entries).
1758This field is unused in Linux 2.2.
1759.IP *
1760.I nr_unused
1761is the number of unused dentries.
1762.IP *
1763.I age_limit
1764.\" looks like this is unused in kernels 2.2 to 2.6
1765is the age in seconds after which dcache entries
1766can be reclaimed when memory is short.
1767.IP *
1768.I want_pages
1769.\" looks like this is unused in kernels 2.2 to 2.6
1770is non-zero when the kernel has called shrink_dcache_pages() and the
fea681da 1771dcache isn't pruned yet.
59a40ed7 1772.RE
fea681da
MK
1773.TP
1774.I /proc/sys/fs/dir-notify-enable
1775This file can be used to disable or enable the
1776.I dnotify
1777interface described in
1778.BR fcntl (2)
1779on a system-wide basis.
1780A value of 0 in this file disables the interface,
1781and a value of 1 enables it.
1782.TP
1783.I /proc/sys/fs/dquot-max
1784This file shows the maximum number of cached disk quota entries.
1785On some (2.4) systems, it is not present.
1786If the number of free cached disk quota entries is very low and
1787you have some awesome number of simultaneous system users,
1788you might want to raise the limit.
1789.TP
1790.I /proc/sys/fs/dquot-nr
1791This file shows the number of allocated disk quota
1792entries and the number of free disk quota entries.
1793.TP
1794.I /proc/sys/fs/file-max
1795This file defines
1796a system-wide limit on the number of open files for all processes.
1797(See also
1798.BR setrlimit (2),
1799which can be used by a process to set the per-process limit,
1800.BR RLIMIT_NOFILE ,
1801on the number of files it may open.)
1802If you get lots
1803of error messages about running out of file handles,
1804try increasing this value:
1805.br
1806
1807.br
1808.nf
1809.ft CW
1810echo 100000 > /proc/sys/fs/file-max
1811.fi
1812.ft
1813
1814The kernel constant
7b2b5ea4 1815.B NR_OPEN
fea681da
MK
1816imposes an upper limit on the value that may be placed in
1817.IR file-max .
1818
c13182ef 1819If you increase
fea681da
MK
1820.IR /proc/sys/fs/file-max ","
1821be sure to increase
1822.I /proc/sys/fs/inode-max
1823to 3-4 times the new
c13182ef 1824value of
fea681da
MK
1825.IR /proc/sys/fs/file-max ","
1826or you will run out of inodes.
1827.TP
1828.I /proc/sys/fs/file-nr
59a40ed7
MK
1829This (read-only) file gives the number of files presently opened.
1830It contains three numbers: the number of allocated file handles;
1831the number of free file handles; and the maximum number of file handles.
c13182ef
MK
1832The kernel allocates file handles dynamically, but it
1833doesn't free them again.
1834If the number of allocated files is close to the
fea681da
MK
1835maximum, you should consider increasing the maximum.
1836When the number of free file handles is
1837large, you've encountered a peak in your usage of file
1838handles and you probably don't need to increase the maximum.
1839.TP
c13182ef 1840.I /proc/sys/fs/inode-max
fea681da 1841This file contains the maximum number of in-memory inodes.
59a40ed7 1842On some (2.4) systems, it may not be present.
c13182ef 1843This value should be 3-4 times larger
59a40ed7
MK
1844than the value in
1845.IR file-max ,
1846since \fIstdin\fP, \fIstdout\fP
1847and network sockets also need an inode to handle them.
1848When you regularly run out of inodes, you need to increase this value.
fea681da
MK
1849.TP
1850.I /proc/sys/fs/inode-nr
59a40ed7
MK
1851This file contains the first two values from
1852.IR inode-state .
fea681da
MK
1853.TP
1854.I /proc/sys/fs/inode-state
1855This file
59a40ed7
MK
1856contains seven numbers:
1857.IR nr_inodes ,
1858.IR nr_free_inodes ,
1859.IR preshrink ,
1860and four dummy values.
1861.I nr_inodes
1862is the number of inodes the system has allocated.
1863This can be slightly more than
1864.I inode-max
1865because Linux allocates them one page full at a time.
1866.I nr_free_inodes
1867represents the number of free inodes.
1868.I preshrink
1869is non-zero when the
1870.I nr_inodes
1871>
1872.I inode-max
1873and the system needs to prune the inode list instead of allocating more.
fea681da 1874.TP
b877b392 1875.IR /proc/sys/fs/inotify " (since Linux 2.6.13)"
c13182ef 1876This directory contains files
b877b392
MK
1877.IR max_queued_events ", " max_user_instances ", and " max_user_watches ,
1878that can be used to limit the amount of kernel memory consumed by the
1879.I inotify
1880interface.
c13182ef 1881For further details, see
435b27cc 1882.BR inotify (7).
b877b392 1883.TP
fea681da 1884.I /proc/sys/fs/lease-break-time
59a40ed7 1885This file specifies the grace period that the kernel grants to a process
fea681da
MK
1886holding a file lease
1887.RB ( fcntl (2))
1888after it has sent a signal to that process notifying it
1889that another process is waiting to open the file.
1890If the lease holder does not remove or downgrade the lease within
1891this grace period, the kernel forcibly breaks the lease.
1892.TP
1893.I /proc/sys/fs/leases-enable
1894This file can be used to enable or disable file leases
1895.RB ( fcntl (2))
1896on a system-wide basis.
1897If this file contains the value 0, leases are disabled.
eba72288 1898A non-zero value enables leases.
6d64ca9c
MK
1899.TP
1900.IR /proc/sys/fs/mqueue " (since Linux 2.6.6)"
c13182ef 1901This directory contains files
6d64ca9c
MK
1902.IR msg_max ", " msgsize_max ", and " queues_max ,
1903controlling the resources used by POSIX message queues.
96018ebe 1904See
c13182ef 1905.BR mq_overview (7)
96018ebe 1906for details.
6d64ca9c
MK
1907.TP
1908.IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid
1909These files
1910allow you to change the value of the fixed UID and GID.
1911The default is 65534.
24d01c53 1912Some file systems only support 16-bit UIDs and GIDs, although in Linux
c13182ef 1913UIDs and GIDs are 32 bits.
24d01c53 1914When one of these file systems is mounted
6d64ca9c
MK
1915with writes enabled, any UID or GID that would exceed 65535 is translated
1916to the overflow value before being written to disk.
1917.TP
43da96f2
MK
1918.IR /proc/sys/fs/suid_dumpable " (since Linux 2.6.13)"
1919.\" The following is based on text from Documentation/sysctl/kernel.txt
c13182ef 1920The value in this file determines whether core dump files are
f1162930
MK
1921produced for set-user-ID or otherwise protected/tainted binaries.
1922Three different integer values can be specified:
43da96f2
MK
1923.sp
1924\fI0\ (default)\fP
d9bfdb9c 1925This provides the traditional (pre-Linux 2.6.13) behavior.
c13182ef 1926A core dump will not be produced for a process which has
f1162930 1927changed credentials (by calling
c13182ef
MK
1928.BR seteuid (2),
1929.BR setgid (2),
1930or similar, or by executing a set-user-ID or set-group-ID program)
f1162930 1931or whose binary does not have read permission enabled.
43da96f2 1932.sp
f1162930 1933\fI1\ ("debug")\fP
43da96f2 1934All processes dump core when possible.
c13182ef 1935The core dump is owned by the file system user ID of the dumping process
f1162930 1936and no security is applied.
43da96f2
MK
1937This is intended for system debugging situations only.
1938Ptrace is unchecked.
1939.sp
f1162930 1940\fI2\ ("suidsafe")\fP
c13182ef
MK
1941Any binary which normally would not be dumped (see "0" above)
1942is dumped readable by root only.
f1162930 1943This allows the user to remove the core dump file but not to read it.
c13182ef 1944For security reasons core dumps in this mode will not overwrite one
43da96f2 1945another or other files.
b877b392 1946This mode is appropriate when administrators are
43da96f2 1947attempting to debug problems in a normal environment.
fea681da 1948.TP
c13182ef
MK
1949.I /proc/sys/fs/super-max
1950This file
fea681da 1951controls the maximum number of superblocks, and
24d01c53 1952thus the maximum number of mounted file systems the kernel
c13182ef 1953can have.
59a40ed7
MK
1954You only need to increase
1955.I super-max
1956if you need to mount more file systems than the current value in
1957.I super-max
fea681da
MK
1958allows you to.
1959.TP
1960.I /proc/sys/fs/super-nr
c13182ef 1961This file
24d01c53 1962contains the number of file systems currently mounted.
fea681da
MK
1963.TP
1964.I /proc/sys/kernel
417fceb7
MK
1965This directory contains files controlling a range of kernel parameters,
1966a described below.
fea681da
MK
1967.TP
1968.I /proc/sys/kernel/acct
c13182ef 1969This file
59a40ed7
MK
1970contains three numbers:
1971.IR highwater ,
1972.IR lowwater ,
1973and
1974.IR frequency .
fea681da 1975If BSD-style process accounting is enabled these values control
d9bfdb9c 1976its behavior.
59a40ed7
MK
1977If free space on file system where the log lives goes below
1978.I lowwater
1979percent accounting suspends.
1980If free space gets above
1981.I highwater
1982percent accounting resumes.
1983.I frequency
1984determines
fea681da 1985how often the kernel checks the amount of free space (value is in
c13182ef
MK
1986seconds).
1987Default values are 4, 2 and 30.
74aace8a
MK
1988That is, suspend accounting if 2% or less space is free; resume it
1989if 4% or more space is free; consider information about amount of free space
fea681da
MK
1990valid for 30 seconds.
1991.TP
59a40ed7 1992.IR /proc/sys/kernel/cap-bound " (from Linux 2.2 to 2.6.24)"
fea681da 1993This file holds the value of the kernel
0daa9e92 1994.I "capability bounding set"
fea681da
MK
1995(expressed as a signed decimal number).
1996This set is ANDed against the capabilities permitted to a process
c13182ef 1997during
ee6e96c1 1998.BR execve (2).
59a40ed7
MK
1999Starting with Linux 2.6.25,
2000the system-wide capability bounding set disappeared,
2001and was replaced by a per-thread bounding set; see
2002.BR capabilities (7).
fea681da
MK
2003.TP
2004.I /proc/sys/kernel/core_pattern
5937fccd
MK
2005See
2006.BR core (5).
654cc098 2007.TP
fea681da 2008.I /proc/sys/kernel/core_uses_pid
5937fccd
MK
2009See
2010.BR core (5).
fea681da
MK
2011.TP
2012.I /proc/sys/kernel/ctrl-alt-del
2013This file
2014controls the handling of Ctrl-Alt-Del from the keyboard.
2015When the value in this file is 0, Ctrl-Alt-Del is trapped and
2016sent to the
49ec013c 2017.BR init (8)
fea681da 2018program to handle a graceful restart.
87174b3a 2019When the value is greater than zero, Linux's reaction to a Vulcan
fea681da
MK
2020Nerve Pinch (tm) will be an immediate reboot, without even
2021syncing its dirty buffers.
6c04f928 2022Note: when a program (like dosemu) has the keyboard in "raw"
fea681da
MK
2023mode, the ctrl-alt-del is intercepted by the program before it
2024ever reaches the kernel tty layer, and it's up to the program
2025to decide what to do with it.
2026.TP
2027.I /proc/sys/kernel/hotplug
2028This file
2029contains the path for the hotplug policy agent.
60849763 2030The default value in this file is
9a67332e 2031.IR /sbin/hotplug .
fea681da
MK
2032.TP
2033.IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname
2034can be used to set the NIS/YP domainname and the
2035hostname of your box in exactly the same way as the commands
8b49407f
MK
2036.BR domainname (1)
2037and
03d2434e
MK
2038.BR hostname (1),
2039that is:
fea681da 2040
a08ea57c
MK
2041.in +4n
2042.nf
fea681da 2043# echo "darkstar" > /proc/sys/kernel/hostname
fea681da 2044# echo "mydomain" > /proc/sys/kernel/domainname
a08ea57c
MK
2045.fi
2046.in
fea681da 2047
fea681da 2048has the same effect as
fea681da 2049
a08ea57c
MK
2050.in +4n
2051.nf
fea681da 2052# hostname "darkstar"
fea681da 2053# domainname "mydomain"
a08ea57c
MK
2054.fi
2055.in
fea681da 2056
fea681da
MK
2057Note, however, that the classic darkstar.frop.org has the
2058hostname "darkstar" and DNS (Internet Domain Name Server)
2059domainname "frop.org", not to be confused with the NIS (Network
c13182ef
MK
2060Information Service) or YP (Yellow Pages) domainname.
2061These two
2062domain names are in general different.
2063For a detailed discussion
fea681da
MK
2064see the
2065.BR hostname (1)
2066man page.
2067.TP
2068.I /proc/sys/kernel/htab-reclaim
eba72288 2069(PowerPC only) If this file is set to a non-zero value,
fea681da 2070the PowerPC htab
9a67332e
MK
2071(see kernel file
2072.IR Documentation/powerpc/ppc_htab.txt )
2073is pruned
fea681da
MK
2074each time the system hits the idle loop.
2075.TP
2076.I /proc/sys/kernel/l2cr
2077(PowerPC only) This file
2078contains a flag that controls the L2 cache of G3 processor
c13182ef
MK
2079boards.
2080If 0, the cache is disabled.
eba72288 2081Enabled if non-zero.
fea681da
MK
2082.TP
2083.I /proc/sys/kernel/modprobe
6ab7c0aa
MK
2084This file contains the path for the kernel module loader.
2085The default value is
2086.IR /sbin/modprobe .
2087The file is only present if the kernel is built with the
821643a8
MK
2088.B CONFIG_KMOD
2089option enabled.
6ab7c0aa
MK
2090It is described by the kernel source file
2091.I Documentation/kmod.txt
2092(only present in kernel 2.4 and earlier).
fea681da
MK
2093.TP
2094.I /proc/sys/kernel/msgmax
2095This file defines
2096a system-wide limit specifying the maximum number of bytes in
2097a single message written on a System V message queue.
2098.TP
2099.I /proc/sys/kernel/msgmni
2100This file defines the system-wide limit on the number of
2101message queue identifiers.
2102(This file is only present in Linux 2.4 onwards.)
2103.TP
2104.I /proc/sys/kernel/msgmnb
d9bfdb9c 2105This file defines a system-wide parameter used to initialize the
fea681da 2106.I msg_qbytes
568105c6 2107setting for subsequently created message queues.
fea681da
MK
2108The
2109.I msg_qbytes
2110setting specifies the maximum number of bytes that may be written to the
2111message queue.
2112.TP
2113.IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease
2114These files
2115give substrings of
2116.IR /proc/version .
2117.TP
2118.IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid
2119These files duplicate the files
2120.I /proc/sys/fs/overflowgid
2121and
2122.IR /proc/sys/fs/overflowuid .
2123.TP
2124.I /proc/sys/kernel/panic
59a40ed7 2125This file gives read/write access to the kernel variable
fea681da 2126.IR panic_timeout .
eba72288 2127If this is zero, the kernel will loop on a panic; if non-zero
fea681da 2128it indicates that the kernel should autoreboot after this number
c13182ef
MK
2129of seconds.
2130When you use the
fea681da
MK
2131software watchdog device driver, the recommended setting is 60.
2132.TP
bfde23a2
MK
2133.IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)"
2134This file controls the kernel's behavior when an oops
c13182ef
MK
2135or BUG is encountered.
2136If this file contains 0, then the system
2137tries to continue operation.
2138If it contains 1, then the system
fea681da 2139delays a few seconds (to give klogd time to record the oops output)
c13182ef 2140and then panics.
fea681da
MK
2141If the
2142.I /proc/sys/kernel/panic
eba72288 2143file is also non-zero then the machine will be rebooted.
fea681da 2144.TP
bfde23a2
MK
2145.I /proc/sys/kernel/pid_max "( since Linux 2.5.34)"
2146This file specifies the value at which PIDs wrap around
fea681da
MK
2147(i.e., the value in this file is one greater than the maximum PID).
2148The default value for this file, 32768,
2149results in the same range of PIDs as on earlier kernels.
c13182ef 2150On 32-bit platforms, 32768 is the maximum value for
b3b8bd24 2151.IR pid_max .
c13182ef 2152On 64-bit systems,
b3b8bd24
MK
2153.I pid_max
2154can be set to any value up to 2^22
b1b0eb73
MK
2155.RB ( PID_MAX_LIMIT ,
2156approximately 4 million).
c13182ef 2157.\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit
b3b8bd24
MK
2158.\" platforms, but this broke /proc/PID
2159.\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
fea681da
MK
2160.TP
2161.IR /proc/sys/kernel/powersave-nap " (PowerPC only)"
c13182ef 2162This file contains a flag.
6c04f928 2163If set, Linux-PPC will use the "nap" mode of
fea681da 2164powersaving,
6c04f928 2165otherwise the "doze" mode will be used.
fea681da
MK
2166.TP
2167.I /proc/sys/kernel/printk
59a40ed7
MK
2168The four values in this file are
2169.IR console_loglevel ,
2170.IR default_message_loglevel ,
40374cfc
MK
2171.IR minimum_console_level ,
2172 and
2173.IR default_console_loglevel .
59a40ed7
MK
2174These values influence
2175.I printk()
2176behavior when printing or logging error messages.
c13182ef 2177See
fea681da
MK
2178.BR syslog (2)
2179for more info on the different loglevels.
2180Messages with a higher priority than
59a40ed7
MK
2181.I console_loglevel
2182will be printed to the console.
2183Messages without an explicit priority will be printed with priority
2184.IR default_message_level .
2185.I minimum_console_loglevel
2186is the minimum (highest) value to which
2187.I console_loglevel
2188can be set.
2189.I default_console_loglevel
2190is the default value for
2191.IR console_loglevel .
fea681da
MK
2192.TP
2193.IR /proc/sys/kernel/pty " (since Linux 2.6.4)"
59a40ed7 2194This directory contains two files relating to the number of Unix 98
fea681da
MK
2195pseudo-terminals (see
2196.BR pts (4))
2197on the system.
2198.TP
2199.I /proc/sys/kernel/pty/max
2200This file defines the maximum number of pseudo-terminals.
2201.TP
2202.I /proc/sys/kernel/pty/nr
2203This read-only file
2204indicates how many pseudo-terminals are currently in use.
2205.TP
fea681da
MK
2206.I /proc/sys/kernel/random
2207This directory
2208contains various parameters controlling the operation of the file
2209.IR /dev/random .
c13182ef 2210See
95a32af8
MK
2211.BR random (4)
2212for further information.
fea681da
MK
2213.TP
2214.I /proc/sys/kernel/real-root-dev
59a40ed7 2215This file is documented in the kernel source file
9a67332e 2216.IR Documentation/initrd.txt .
fea681da
MK
2217.TP
2218.IR /proc/sys/kernel/reboot-cmd " (Sparc only) "
2219This file seems to be a way to give an argument to the SPARC
c13182ef
MK
2220ROM/Flash boot loader.
2221Maybe to tell it what to do after
fea681da
MK
2222rebooting?
2223.TP
2224.I /proc/sys/kernel/rtsig-max
c13182ef 2225(Only in kernels up to and including 2.6.7; see
70556c17 2226.BR setrlimit (2))
fea681da 2227This file can be used to tune the maximum number
6f36deb4 2228of POSIX real-time (queued) signals that can be outstanding
fea681da
MK
2229in the system.
2230.TP
2231.I /proc/sys/kernel/rtsig-nr
70556c17 2232(Only in kernels up to and including 2.6.7.)
6f36deb4 2233This file shows the number POSIX real-time signals currently queued.
fea681da
MK
2234.TP
2235.IR /proc/sys/kernel/sem " (since Linux 2.4)"
2236This file contains 4 numbers defining limits for System V IPC semaphores.
c13182ef 2237These fields are, in order:
fea681da
MK
2238.RS
2239.IP SEMMSL 8
2240The maximum semaphores per semaphore set.
2241.IP SEMMNS 8
2242A system-wide limit on the number of semaphores in all semaphore sets.
2243.IP SEMOPM 8
2244The maximum number of operations that may be specified in a
2245.BR semop (2)
2246call.
2247.IP SEMMNI 8
2248A system-wide limit on the maximum number of semaphore identifiers.
2249.RE
2250.TP
2251.I /proc/sys/kernel/sg-big-buff
c13182ef 2252This file
fea681da 2253shows the size of the generic SCSI device (sg) buffer.
5ec8d26f 2254You can't tune it just yet, but you could change it at
9a67332e
MK
2255compile time by editing
2256.I include/scsi/sg.h
2257and changing
b1b0eb73
MK
2258the value of
2259.BR SG_BIG_BUFF .
c13182ef 2260However, there shouldn't be any reason to change this value.
fea681da
MK
2261.TP
2262.I /proc/sys/kernel/shmall
2263This file
2264contains the system-wide limit on the total number of pages of
2265System V shared memory.
2266.TP
2267.I /proc/sys/kernel/shmmax
2268This file
cf50118f 2269can be used to query and set the run-time limit
c13182ef 2270on the maximum (System V IPC) shared memory segment size that can be
fea681da 2271created.
b1b0eb73 2272Shared memory segments up to 1GB are now supported in the
c13182ef 2273kernel.
b1b0eb73
MK
2274This value defaults to
2275.BR SHMMAX .
fea681da
MK
2276.TP
2277.I /proc/sys/kernel/shmmni
2278(available in Linux 2.4 and onwards)
2279This file
2280specifies the system-wide maximum number of System V shared memory
2281segments that can be created.
2282.TP
2283.I /proc/sys/kernel/version
59a40ed7 2284This file contains a string like:
fea681da 2285
3c1a1cdc 2286 #5 Wed Feb 25 21:49:24 MET 1998
fea681da 2287
6c04f928 2288The "#5" means that
fea681da
MK
2289this is the fifth kernel built from this source base and the
2290date behind it indicates the time the kernel was built.
2291.TP
2292.IR /proc/sys/kernel/zero-paged " (PowerPC only) "
2293This file
c13182ef 2294contains a flag.
eba72288 2295When enabled (non-zero), Linux-PPC will pre-zero pages in
fea681da
MK
2296the idle loop, possibly speeding up get_free_pages.
2297.TP
2298.I /proc/sys/net
2299This directory contains networking stuff.
81c6dd6c
MK
2300Explanations for some of the files under this directory can be found in
2301.BR tcp (7)
2302and
2303.BR ip (7).
fea681da 2304.TP
ec650cc1
MK
2305.I /proc/sys/net/core/somaxconn
2306This file defines a ceiling value for the
2307.I backlog
2308argument of
2309.BR listen (2);
2310see the
2311.BR listen (2)
2312manual page for details.
2313.TP
fea681da
MK
2314.I /proc/sys/proc
2315This directory may be empty.
2316.TP
2317.I /proc/sys/sunrpc
2318This directory supports Sun remote procedure call for network file system
c13182ef
MK
2319(NFS).
2320On some systems, it is not present.
fea681da
MK
2321.TP
2322.I /proc/sys/vm
c13182ef 2323This directory contains files for memory management tuning, buffer and
fb8e1d1b 2324cache management.
fea681da 2325.TP
b6c40587
MK
2326.IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)"
2327Writing to this file causes the kernel to drop clean caches, dentries and
2328inodes from memory, causing that memory to become free.
2329
c13182ef 2330To free pagecache, use
b6c40587
MK
2331.IR "echo 1 > /proc/sys/vm/drop_caches" ;
2332to free dentries and inodes, use
2333.IR "echo 2 > /proc/sys/vm/drop_caches" ;
2334to free pagecache, dentries and inodes, use
2335.IR "echo 3 > /proc/sys/vm/drop_caches" .
2336
c13182ef 2337Because this is a non-destructive operation and dirty objects
b6c40587 2338are not freeable, the
c13182ef 2339user should run
b6c40587
MK
2340.BR sync (8)
2341first.
2342.TP
473ad28f
MK
2343.IR /proc/sys/vm/legacy_va_layout " (since Linux 2.6.9)"
2344.\" The following is from Documentation/filesystems/proc.txt
e10120df 2345If non-zero, this disables the new 32-bit memory-mapping layout;
473ad28f
MK
2346the kernel will use the legacy (2.4) layout for all processes.
2347.TP
c3d9780d
MK
2348.IR /proc/sys/vm/oom_dump_tasks " (since Linux 2.6.25)"
2349.\" The following is from Documentation/sysctl/vm.txt
2350Enables a system-wide task dump (excluding kernel threads) to be
2351produced when the kernel performs an OOM-killing.
2352The dump includes the following information
2353for each task (thread, process):
2354thread ID, real user ID, thread group ID (process ID),
2355virtual memory size, resident set size,
2356the CPU that the task is scheduled on,
2357oom_adj score (see the description of
2358.IR /proc/[number]/oom_adj ),
2359and command name.
2360This is helpful to determine why the OOM-killer was invoked
2361and to identify the rogue task that caused it.
2362
2363If this contains the value zero, this information is suppressed.
2364On very large systems with thousands of tasks,
2365it may not be feasible to dump the memory state information for each one.
2366Such systems should not be forced to incur a performance penalty in
2367OOM situations when the information may not be desired.
2368
2369If this is set to non-zero, this information is shown whenever the
2370OOM-killer actually kills a memory-hogging task.
2371
2372The default value is 0.
2373.TP
e10120df
MK
2374.IR /proc/sys/vm/oom_kill_allocating_task " (since Linux 2.6.24)"
2375.\" The following is from Documentation/sysctl/vm.txt
2376This enables or disables killing the OOM-triggering task in
2377out-of-memory situations.
2378
c3d9780d 2379If this is set to zero, the OOM-killer will scan through the entire
e10120df
MK
2380tasklist and select a task based on heuristics to kill.
2381This normally selects a rogue memory-hogging task that
2382frees up a large amount of memory when killed.
2383
c3d9780d 2384If this is set to non-zero, the OOM-killer simply kills the task that
e10120df
MK
2385triggered the out-of-memory condition.
2386This avoids a possibly expensive tasklist scan.
2387
2388If
2389.I /proc/sys/vm/panic_on_oom
2390is non-zero, it takes precedence over whatever value is used in
2391.IR /proc/sys/vm/oom_kill_allocating_task .
2392
2393The default value is 0.
2394.TP
fea681da 2395.I /proc/sys/vm/overcommit_memory
c13182ef
MK
2396This file contains the kernel virtual memory accounting mode.
2397Values are:
59a40ed7
MK
2398.RS
2399.IP
fea681da
MK
24000: heuristic overcommit (this is the default)
2401.br
24021: always overcommit, never check
2403.br
24042: always check, never overcommit
59a40ed7
MK
2405.RE
2406.IP
fea681da
MK
2407In mode 0, calls of
2408.BR mmap (2)
097585ed 2409with
0daa9e92 2410.B MAP_NORESERVE
e10120df 2411are not checked, and the default check is very weak,
fea681da 2412leading to the risk of getting a process "OOM-killed".
eba72288 2413Under Linux 2.4 any non-zero value implies mode 1.
fea681da
MK
2414In mode 2 (available since Linux 2.6), the total virtual address space
2415on the system is limited to (SS + RAM*(r/100)),
2416where SS is the size of the swap space, and RAM
2417is the size of the physical memory, and r is the contents of the file
2418.IR /proc/sys/vm/overcommit_ratio .
2419.TP
2420.I /proc/sys/vm/overcommit_ratio
c13182ef 2421See the description of
fea681da
MK
2422.IR /proc/sys/vm/overcommit_memory .
2423.TP
c3d9780d
MK
2424.IR /proc/sys/vm/panic_on_oom " (since Linux 2.6.18)"
2425.\" The following is adapted from Documentation/sysctl/vm.txt
2426This enables or disables a kernel panic in
2427an out-of-memory situation.
2428
2429If this file is set to the value 0,
2430the kernel's OOM-killer will kill some rogue process.
2431Usually, the OOM-killer is able to kill a rogue process and the
2432system will survive.
2433
2434If this file is set to the value 1,
2435then the kernel normally panics when out-of-memory happens.
2436However, if a process limits allocations to certain nodes
2437using memory policies
2438.RB ( mbind (2)
2439.BR MPOL_BIND )
2440or cpusets
2441.RB ( cpuset (7))
2442and those nodes reach memory exhaustion status,
2443one process may be killed by the OOM-killer.
2444No panic occurs in this case:
fd7193f5 2445because other nodes' memory may be free,
c3d9780d
MK
2446this means the system as a whole may not have reached
2447an out-of-memory situation yet.
2448
2449If this file is set to the value 2,
2450the kernel always panics when an out-of-memory condition occurs.
2451
2452The default value is 0.
24531 and 2 are for failover of clustering.
2454Select either according to your policy of failover.
2455.TP
fea681da 2456.I /proc/sysvipc
c13182ef 2457Subdirectory containing the pseudo-files
fea681da 2458.IR msg ", " sem " and " shm "."
c13182ef 2459These files list the System V Interprocess Communication (IPC) objects
fea681da
MK
2460(respectively: message queues, semaphores, and shared memory)
2461that currently exist on the system,
2462providing similar information to that available via
2463.BR ipcs (1).
2464These files have headers and are formatted (one IPC object per line)
2465for easy understanding.
2c5e151c 2466.BR svipc (7)
fea681da
MK
2467provides further background on the information shown by these files.
2468.TP
2469.I /proc/tty
c13182ef 2470Subdirectory containing the pseudo-files and subdirectories for
fea681da
MK
2471tty drivers and line disciplines.
2472.TP
2473.I /proc/uptime
2474This file contains two numbers: the uptime of the system (seconds),
2475and the amount of time spent in idle process (seconds).
2476.TP
2477.I /proc/version
2478This string identifies the kernel version that is currently running.
030d3025
MK
2479It includes the contents of
2480.IR /proc/sys/kernel/ostype ,
0daa9e92 2481.I /proc/sys/kernel/osrelease
030d3025
MK
2482and
2483.IR /proc/sys/kernel/version .
c13182ef 2484For example:
fea681da
MK
2485.nf
2486.in -2
2487.ft CW
2488Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994
2489.ft
2490.in +2
2491.fi
b4e9ee8f
MK
2492.\" FIXME Document /proc/timer_list
2493.\" .TP
2494.\" .IR /proc/timer_list " (since Linux 2.6.21)"
2495.\" See the 2.6.21 Change log
2496.\" FIXME Document /proc/timer_stats
2497.\" .TP
2498.\" .IR /proc/timer_stats " (since Linux 2.6.21)"
2499.\" See the 2.6.21 Change log
fea681da
MK
2500.TP
2501.IR /proc/vmstat " (since Linux 2.6)"
2502This file displays various virtual memory statistics.
363f747c
MK
2503.TP
2504.IR /proc/zoneinfo " (since Linux 2.6.13)"
2505This file display information about memory zones.
d9bfdb9c 2506This is useful for analyzing virtual memory behavior.
218e46f8 2507.\" FIXME more should be said about /proc/zoneinfo
e37e3282
MK
2508.SH NOTES
2509Many strings (i.e., the environment and command line) are in
f81fb444 2510the internal format, with sub-fields terminated by null bytes (\(aq\\0\(aq),
e37e3282
MK
2511so you
2512may find that things are more readable if you use \fIod \-c\fP or \fItr
2513"\\000" "\\n"\fP to read them.
26868e5b 2514Alternatively, \fIecho \`cat <file>\`\fP works well.
e37e3282
MK
2515
2516This manual page is incomplete, possibly inaccurate, and is the kind
2517of thing that needs to be updated very often.
2518.\" .SH ACKNOWLEDGEMENTS
2519.\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on
2520.\" kernel source documentation files written by Rik van Riel.
fea681da
MK
2521.SH "SEE ALSO"
2522.BR cat (1),
2523.BR find (1),
2524.BR free (1),
fea681da
MK
2525.BR ps (1),
2526.BR tr (1),
2527.BR uptime (1),
2528.BR chroot (2),
2529.BR mmap (2),
2530.BR readlink (2),
2531.BR syslog (2),
2532.BR slabinfo (5),
2533.BR hier (7),
268f000b 2534.BR time (7),
fea681da
MK
2535.BR arp (8),
2536.BR dmesg (8),
2537.BR hdparm (8),
2538.BR ifconfig (8),
2539.BR init (8),
2540.BR lsmod (8),
2541.BR lspci (8),
809d0164 2542.BR mount (8),
fea681da
MK
2543.BR netstat (8),
2544.BR procinfo (8),
2545.BR route (8)
2546.br
e98268b4
MK
2547The kernel source files:
2548.IR Documentation/filesystems/proc.txt ,
2549.IR Documentation/sysctl/vm.txt