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