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