]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
s/filesystem/file system/
[thirdparty/man-pages.git] / man5 / proc.5
CommitLineData
fea681da
MK
1.\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com)
2.\" with networking additions from Alan Cox (A.Cox@swansea.ac.uk)
3.\" and scsi additions from Michael Neuffer (neuffer@mail.uni-mainz.de)
4.\" and sysctl additions from Andries Brouwer (aeb@cwi.nl)
5.\" and System V IPC (as well as various other) additions from
c11b1abf 6.\" Michael Kerrisk <mtk.manpages@gmail.com>
fea681da
MK
7.\"
8.\" This is free documentation; you can redistribute it and/or
9.\" modify it under the terms of the GNU General Public License as
10.\" published by the Free Software Foundation; either version 2 of
11.\" the License, or (at your option) any later version.
12.\"
13.\" The GNU General Public License's references to "object code"
14.\" and "executables" are to be interpreted as the output of any
15.\" document formatting or typesetting system, including
16.\" intermediate and printed output.
17.\"
18.\" This manual is distributed in the hope that it will be useful,
19.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
20.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21.\" GNU General Public License for more details.
22.\"
23.\" You should have received a copy of the GNU General Public
24.\" License along with this manual; if not, write to the Free
25.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
26.\" USA.
27.\"
28.\" Modified 1995-05-17 by faith@cs.unc.edu
29.\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com).
30.\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl
31.\" Modified 2001-12-16 by rwhron@earthlink.net
32.\" Modified 2002-07-13 by jbelton@shaw.ca
33.\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25
c11b1abf 34.\" by Michael Kerrisk <mtk.manpages@gmail.com>
5d6d14a0
MK
35.\" 2004-11-17, mtk -- updated notes on /proc/loadavg
36.\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8
568105c6
MK
37.\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list
38.\" 2005-05-12, mtk, updated 'stat'
6d64ca9c 39.\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/*
363f747c
MK
40.\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable
41.\" 2005-09-19, mtk, added /proc/zoneinfo
c13182ef 42.\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to
96018ebe 43.\" mq_overview.7.
363f747c 44.\"
b07b19c4
MK
45.\" FIXME 2.6.14 has /proc/PID/numa_maps (if CONFIG_NUMA is
46.\" enabled); this needs to be documented.
c13182ef 47.\" Info on numa_maps can be found in the patch-2.6.14
b07b19c4 48.\" Changelog, but this is possibly not up to date.
8cf9de1b 49.\"
c533af9d 50.\" FIXME 2.6.13 seems to have /proc/vmcore implemented
c13182ef
MK
51.\" in the source code, but there is no option available under
52.\" 'make xconfig'; eventually this should be fixed, and then info
53.\" from the patch-2.6.13 and change log could be used to write an
c533af9d 54.\" entry in this man page.
8cf9de1b 55.\"
c13182ef
MK
56.\" FIXME cross check against Documentation/filesystems/proc.txt
57.\" to see what information could be imported from that file
c533af9d 58.\" into this file.
fea681da 59.\"
2ccfac8b 60.TH PROC 5 2007-11-30 "Linux" "Linux Programmer's Manual"
fea681da 61.SH NAME
24d01c53 62proc \- process information pseudo-file system
fea681da
MK
63.SH DESCRIPTION
64The
65.I proc
24d01c53 66file system is a pseudo-file system which is used as an interface to
c13182ef
MK
67kernel data structures.
68It is commonly mounted at
fea681da 69.IR /proc .
c13182ef 70Most of it is read-only, but some files allow kernel variables to be
fea681da
MK
71changed.
72.LP
73The following outline gives a quick tour through the /proc hierarchy.
74.PD 1
75.TP
76.I /proc/[number]
77There is a numerical subdirectory for each running process; the
78subdirectory is named by the process ID.
79Each such subdirectory contains the following
80pseudo-files and directories.
81.TP
857f1942
MK
82.IR /proc/[number]/auxv " (since 2.6.0-test7)"
83This contains the contents of the ELF interpreter information passed
c13182ef 84to the process at exec time.
857f1942 85The format is one \fIunsigned long\fP ID
c13182ef 86plus one \fIunsigned long\fP value for each entry.
857f1942
MK
87The last entry contains two zeros.
88.TP
fea681da 89.I /proc/[number]/cmdline
b447cd58
MK
90This holds the complete command line for the process,
91unless the process is a zombie.
92.\" In 2.3.26, this also used to be true if the process was swapped out.
93In the latter case, there is nothing in this file:
75b94dc3 94that is, a read on this file will return 0 characters.
b447cd58 95The command-line arguments appear in this file as a set of
fea681da
MK
96null-separated strings, with a further null byte after the last string.
97.TP
98.I /proc/[number]/cwd
c13182ef 99This is a symbolic link to the current working directory of the process.
afcaf646 100To find out the cwd of process 20, for instance, you can do this:
fea681da
MK
101
102.br
103.nf
104.ft CW
105cd /proc/20/cwd; /bin/pwd
106.fi
107.ft
108
c13182ef
MK
109Note that the
110.I pwd
afcaf646 111command is often a shell builtin, and might
c13182ef
MK
112not work properly.
113In bash, you may use pwd \-P.
afcaf646
MK
114
115.\" The following was still true as at kernel 2.6.13
c13182ef
MK
116In a multithreaded process, the contents of this symbolic link
117are not available if the main thread has already terminated
afcaf646
MK
118(typically by calling
119.BR pthread_exit (3).
fea681da
MK
120.TP
121.I /proc/[number]/environ
122This file contains the environment for the process.
28d88c17
MK
123The entries are separated by null bytes ('\\0'),
124and there may be a null bytes at the end.
fea681da
MK
125Thus, to print out the environment of process 1, you would do:
126
a08ea57c 127.in +4n
fea681da 128.nf
a08ea57c 129
fea681da
MK
130.ft CW
131(cat /proc/1/environ; echo) | tr "\\000" "\\n"
132.fi
133.ft P
a08ea57c 134.in
fea681da
MK
135
136(For a reason why one should want to do this, see
f41d1d3d
MK
137.BR lilo (8)
138or
139.BR grub (8).)
fea681da
MK
140.TP
141.I /proc/[number]/exe
142Under Linux 2.2 and later, this file is a symbolic link
2d7195b8 143containing the actual pathname of the executed command.
c13182ef
MK
144This symbolic link can be dereferenced normally; attempting to open
145it will open the executable.
146You can even type
fea681da 147.I /proc/[number]/exe
c13182ef 148to run another copy of the same executable as is being run by
6931a324 149process [number].
afcaf646 150.\" The following was still true as at kernel 2.6.13
c13182ef
MK
151In a multithreaded process, the contents of this symbolic link
152are not available if the main thread has already terminated
afcaf646
MK
153(typically by calling
154.BR pthread_exit (3)).
fea681da
MK
155
156Under Linux 2.0 and earlier
157.I /proc/[number]/exe
c13182ef
MK
158is a pointer to the binary which was executed,
159and appears as a symbolic link.
160A
fea681da
MK
161.BR readlink (2)
162call on this file under Linux 2.0 returns a string in the format:
163
164[device]:inode
165
166For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
167MFM, etc. drives) minor 01 (first partition on the first drive).
168
169.BR find (1)
4d9b6984 170with the \-inum option can be used to locate the file.
fea681da
MK
171.TP
172.I /proc/[number]/fd
173This is a subdirectory containing one entry for each file which the
174process has open, named by its file descriptor, and which is a
c13182ef
MK
175symbolic link to the actual file.
176Thus, 0 is standard input, 1 standard output, 2 standard error, etc.
fea681da 177
afcaf646
MK
178.\" The following was still true as at kernel 2.6.13
179In a multithreaded process, the contents of this directory
c13182ef 180are not available if the main thread has already terminated
afcaf646
MK
181(typically by calling
182.BR pthread_exit (3)).
183
fea681da
MK
184Programs that will take a filename, but will not take the standard
185input, and which write to a file, but will not send their output to
4d9b6984
MK
186standard output, can be effectively foiled this way, assuming that \-i
187is the flag designating an input file and \-o is the flag designating
fea681da 188an output file:
a08ea57c 189.in +4n
fea681da
MK
190.nf
191
2bc2f479 192\f(CWfoobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ...\fR
fea681da 193.fi
a08ea57c
MK
194.in
195
fea681da
MK
196and you have a working filter.
197.\" The following is not true in my tests (MTK):
198.\" Note that this will not work for
199.\" programs that seek on their files, as the files in the fd directory
200.\" are not seekable.
201
202/proc/self/fd/N is approximately the same as /dev/fd/N in some UNIX
c13182ef
MK
203and UNIX-like systems.
204Most Linux MAKEDEV scripts symbolically link
fea681da 205/dev/fd to /proc/self/fd, in fact.
6aefb6df 206.\" FIXME Describe /proc/[number]/loginuid
b877b392 207.\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
fea681da
MK
208.TP
209.I /proc/[number]/maps
210A file containing the currently mapped memory regions and their access
211permissions.
212
213The format is:
214
215.nf
216.ft CW
217.in 8n
218address perms offset dev inode pathname
21908048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
22008056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm
22108058000-0805b000 rwxp 00000000 00:00 0
22240000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so
22340013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so
2244001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
22540135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so
2264013e000-40142000 rw-p 00000000 00:00 0
227bffff000-c0000000 rwxp 00000000 00:00 0
228.ft
229.fi
230.in
231
232where address is the address space in the process that it occupies,
233perms is a set of permissions:
234
235.nf
236.in +5
237r = read
238w = write
239x = execute
240s = shared
241p = private (copy on write)
242.fi
243.in
244
245offset is the offset into the file/whatever, dev is the device
246(major:minor), and inode is the inode on that device. 0 indicates
247that no inode is associated with the memory region, as the case would
248be with bss.
249
250Under Linux 2.0 there is no field giving pathname.
251.TP
252.I /proc/[number]/mem
253This file can be used to access the pages of a process's memory through
254.BR open (2),
255.BR read (2),
256and
ccb2bb0d 257.BR lseek (2).
978770aa
MK
258.\" FIXME Describe /proc/[number]/mountstats and
259.\" /proc/PID/task/TID/mountstats
260.\" Some information can be found in the 2.6.17-rc1 change log.
73dc596d 261.\" Added in 2.6.17
978770aa 262.\"
6aefb6df 263.\" FIXME Describe /proc/[number]/oom_adj
e02756a4 264.\" Added in 2.6.11; updating requires CAP_SYS_RESOURCE
6aefb6df
MK
265.\" Mention OOM_DISABLE (-17)
266.\" FIXME Describe /proc/[number]/oom_score
267.\" Added in 2.6.11; read-only
fea681da
MK
268.TP
269.I /proc/[number]/root
270Unix and Linux support the idea of a per-process root of the
24d01c53 271file system, set by the
fea681da 272.BR chroot (2)
c13182ef
MK
273system call.
274This file is a symbolic link that points to the process's
fea681da 275root directory, and behaves as exe, fd/*, etc. do.
afcaf646
MK
276
277.\" The following was still true as at kernel 2.6.13
c13182ef
MK
278In a multithreaded process, the contents of this symbolic link
279are not available if the main thread has already terminated
afcaf646
MK
280(typically by calling
281.BR pthread_exit (3)).
6aefb6df
MK
282.\" FIXME Describe /proc/[number]/seccomp
283.\" Added in 2.6.12
fea681da 284.TP
b07b19c4
MK
285.IR /proc/[number]/smaps " (since Linux 2.6.14)"
286This file shows memory consumption for each of the process's mappings.
287For each of mappings there is a series of lines as follows:
a08ea57c 288.in +4n
b07b19c4
MK
289.nf
290
29108048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
292Size: 464 kB
293Rss: 424 kB
294Shared_Clean: 424 kB
295Shared_Dirty: 0 kB
296Private_Clean: 0 kB
297Private_Dirty: 0 kB
298
299.fi
a08ea57c 300.in
b07b19c4
MK
301The first of these lines shows the same information as is displayed
302for the mapping in
303.IR /proc/[number]/maps .
304The remaining lines show the size of the mapping,
305the amount of the mapping that is currently resident in RAM,
306the number clean and dirty shared pages in the mapping,
307and the number clean and dirty private pages in the mapping.
308
097585ed
MK
309This file is only present if the
310.B CONFIG_MMU
311kernel configuration
b07b19c4
MK
312option is enabled.
313.TP
fea681da 314.I /proc/[number]/stat
c13182ef
MK
315Status information about the process.
316This is used by
317.BR ps (1).
318It is defined in
fea681da
MK
319.IR /usr/src/linux/fs/proc/array.c "."
320
321The fields, in order, with their proper
322.BR scanf (3)
323format specifiers, are:
324.RS
325.TP
326\fIpid\fP %d
357cf3fe 327The process ID.
fea681da
MK
328.TP
329\fIcomm\fP %s
c13182ef
MK
330The filename of the executable, in parentheses.
331This is visible whether or not the executable is swapped out.
fea681da
MK
332.TP
333\fIstate\fP %c
334One character from the string "RSDZTW" where R is running, S is
335sleeping in an interruptible wait, D is waiting in uninterruptible
336disk sleep, Z is zombie, T is traced or stopped (on a signal),
337and W is paging.
338.TP
339\fIppid\fP %d
340The PID of the parent.
341.TP
342\fIpgrp\fP %d
343The process group ID of the process.
344.TP
345\fIsession\fP %d
346The session ID of the process.
347.TP
348.\" tty_nr needs better explanation.
349\fItty_nr\fP %d
350The tty the process uses.
351.TP
352\fItpgid\fP %d
353.\" This field and following, up to and including wchan added 0.99.1
354The process group ID of the process which currently owns the tty that
355the process is connected to.
356.TP
2ebfeb1b 357\fIflags\fP %u (%lu before Linux 2.6.22)
c13182ef
MK
358The kernel flags word of the process.
359For bit meanings,
fea681da
MK
360see the PF_* defines in
361.IR <linux/sched.h> .
362Details depend on the kernel version.
363.TP
364\fIminflt\fP %lu
365The number of minor faults the process has made which have not
366required loading a memory page from disk.
367.TP
368\fIcminflt\fP %lu
369The number of minor faults that the process's
370waited-for children have made.
371.TP
372\fImajflt\fP %lu
373The number of major faults the process has made which have
374required loading a memory page from disk.
375.TP
376\fIcmajflt\fP %lu
377The number of major faults that the process's
378waited-for children have made.
379.TP
380\fIutime\fP %lu
381The number of jiffies that this process has been scheduled in user
382mode.
383.TP
384\fIstime\fP %lu
385The number of jiffies that this process has been scheduled in kernel
386mode.
387.TP
388\fIcutime\fP %ld
389The number of jiffies that this process's
c13182ef
MK
390waited-for children have been scheduled in user mode.
391(See also
fea681da
MK
392.BR times (2).)
393.TP
394\fIcstime\fP %ld
395The number of jiffies that this process's
396waited-for children have been scheduled in kernel mode.
397.TP
398\fIpriority\fP %ld
c13182ef
MK
399The standard nice value, plus fifteen.
400The value is never negative in the kernel.
fea681da
MK
401.TP
402\fInice\fP %ld
8729177b 403The nice value ranges from 19 (nicest) to \-19 (not nice to others).
fea681da
MK
404.TP
405.\" .TP
406.\" \fIcounter\fP %ld
407.\" The current maximum size in jiffies of the process's next timeslice,
408.\" or what is currently left of its current timeslice, if it is the
409.\" currently running process.
410.\" .TP
411.\" \fItimeout\fP %u
412.\" The time in jiffies of the process's next timeout.
0e94f77b
MK
413.\" timeout was removed sometime around 2.1/2.2
414\fInum_threads\fP %ld
2ebfeb1b 415Number of threads in this process (since Linux 2.6).
bb83d1b9 416Before kernel 2.6, this field was hard coded to 0 as a placeholder
0e94f77b 417for an earlier removed field.
fea681da
MK
418.TP
419\fIitrealvalue\fP %ld
8bd58774
MK
420The time in jiffies before the next
421.B SIGALRM
422is sent to the process due to an interval timer.
0e94f77b
MK
423Since kernel 2.6.17, this field is no longer maintained,
424and is hard coded as 0.
fea681da 425.TP
0e94f77b 426\fIstarttime\fP %llu (was %lu before Linux 2.6)
fea681da
MK
427The time in jiffies the process started after system boot.
428.TP
429\fIvsize\fP %lu
430Virtual memory size in bytes.
431.TP
432\fIrss\fP %ld
433Resident Set Size: number of pages the process has in real memory,
c13182ef
MK
434minus 3 for administrative purposes.
435This is just the pages which
436count towards text, data, or stack space.
437This does not include pages
fea681da
MK
438which have not been demand-loaded in, or which are swapped out.
439.TP
440\fIrlim\fP %lu
441Current limit in bytes on the rss of the process (usually
4424294967295 on i386).
443.TP
444\fIstartcode\fP %lu
445The address above which program text can run.
446.TP
447\fIendcode\fP %lu
448The address below which program text can run.
449.TP
450\fIstartstack\fP %lu
451The address of the start of the stack.
452.TP
453\fIkstkesp\fP %lu
454The current value of esp (stack pointer), as found in the
455kernel stack page for the process.
456.TP
457\fIkstkeip\fP %lu
458The current EIP (instruction pointer).
459.TP
460\fIsignal\fP %lu
0c6085e0 461The bitmap of pending signals.
fea681da
MK
462.TP
463\fIblocked\fP %lu
0c6085e0 464The bitmap of blocked signals.
fea681da
MK
465.TP
466\fIsigignore\fP %lu
467The bitmap of ignored signals.
468.TP
469\fIsigcatch\fP %lu
0c6085e0 470The bitmap of caught signals.
fea681da
MK
471.TP
472\fIwchan\fP %lu
c13182ef
MK
473This is the "channel" in which the process is waiting.
474It is the
fea681da 475address of a system call, and can be looked up in a namelist if you
c13182ef 476need a textual name.
9a67332e
MK
477(If you have an up-to-date
478.IR /etc/psdatabase ,
479then
4d9b6984 480try \fIps \-l\fP to see the WCHAN field in action.)
fea681da
MK
481.TP
482\fInswap\fP %lu
0e94f77b 483.\" nswap was added in 2.0
4d9b6984 484Number of pages swapped (not maintained).
fea681da
MK
485.TP
486\fIcnswap\fP %lu
0e94f77b 487.\" cnswap was added in 2.0
4d9b6984 488Cumulative \fInswap\fP for child processes (not maintained).
fea681da 489.TP
2ebfeb1b 490\fIexit_signal\fP %d (since Linux 2.1.22)
fea681da
MK
491Signal to be sent to parent when we die.
492.TP
2ebfeb1b 493\fIprocessor\fP %d (since Linux 2.2.8)
fea681da 494CPU number last executed on.
568105c6 495.TP
2ebfeb1b 496\fIrt_priority\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
568105c6
MK
497Real-time scheduling priority (see
498.BR sched_setscheduler (2)).
499.TP
2ebfeb1b 500\fIpolicy\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
568105c6
MK
501Scheduling policy (see
502.BR sched_setscheduler (2)).
167450d6 503.TP
2ebfeb1b 504\fIdelayacct_blkio_ticks\fP %llu (since Linux 2.6.18)
0e94f77b 505Aggregated block I/O delays, measured in clock ticks (centiseconds).
fea681da
MK
506.RE
507.TP
508.I /proc/[number]/statm
c13182ef
MK
509Provides information about memory status in pages.
510The columns are:
a08ea57c
MK
511.in +4n
512.nf
513
514size total program size
515resident resident set size
516share shared pages
517text text (code)
518lib library
519data data/stack
520dt dirty pages (unused in Linux 2.6)
521.fi
522.in
fea681da
MK
523.TP
524.I /proc/[number]/status
525Provides much of the information in
526.I /proc/[number]/stat
527and
528.I /proc/[number]/statm
529in a format that's easier for humans to parse.
530.TP
2ebfeb1b 531.IR /proc/[number]/task " (since Linux 2.6.0-test6)"
afcaf646
MK
532This is a directory that contains one subdirectory
533for each thread in the process.
534The name of each subdirectory is the numerical thread ID of the
535thread (see
536.BR gettid (2)).
537Within each of these subdirectories, there is a set of
538files with the same names and contents as under the
539.I /proc/[number]
540directories.
541For attributes that are shared by all threads, the contents for
542each of the files under the
543.I task/[thread-ID]
544subdirectories will be the same as in the corresponding
c13182ef 545file in the parent
afcaf646
MK
546.I /proc/[number]
547directory
c13182ef 548(e.g., in a multithreaded process, all of the
afcaf646 549.I task/[thread-ID]/cwd
c13182ef 550files will have the same value as the
afcaf646 551.I /proc/[number]/cwd
c13182ef 552file in the parent directory, since all of the threads in a process
afcaf646
MK
553share a working directory).
554For attributes that are distinct for each thread,
c13182ef 555the corresponding files under
afcaf646
MK
556.I task/[thread-ID]
557may have different values (e.g., various fields in each of the
558.I task/[thread-ID]/status
559files may be different for each thread).
560
561.\" The following was still true as at kernel 2.6.13
562In a multithreaded process, the contents of the
563.I /proc/[number]/task
c13182ef 564directory are not available if the main thread has already terminated
afcaf646
MK
565(typically by calling
566.BR pthread_exit (3)).
567.TP
fea681da 568.I /proc/apm
097585ed
MK
569Advanced power management version and battery information when
570.B CONFIG_APM
571is defined at kernel compilation time.
fea681da
MK
572.TP
573.I /proc/bus
574Contains subdirectories for installed busses.
575.TP
576.I /proc/bus/pccard
097585ed
MK
577Subdirectory for pcmcia devices when
578.B CONFIG_PCMCIA
579is set at kernel compilation time.
fea681da
MK
580.TP
581.I /proc/bus/pccard/drivers
582.TP
583.I /proc/bus/pci
c13182ef
MK
584Contains various bus subdirectories and pseudo-files containing
585information about pci busses, installed devices, and device
586drivers.
587Some of these files are not ASCII.
fea681da
MK
588.TP
589.I /proc/bus/pci/devices
c13182ef
MK
590Information about pci devices.
591They may be accessed through
fea681da
MK
592.BR lspci (8)
593and
594.BR setpci (8).
595.TP
596.I /proc/cmdline
c13182ef
MK
597Arguments passed to the Linux kernel at boot time.
598Often done via a boot manager such as
fea681da 599.BR lilo (1).
2bb6d7e6 600.\" FIXME Document /proc/config.gz (new in kernel 2.6)
fea681da
MK
601.TP
602.I /proc/cpuinfo
603This is a collection of CPU and system architecture dependent items,
604for each supported architecture a different list.
605Two common entries are \fIprocessor\fP which gives CPU number and
c13182ef
MK
606\fIbogomips\fP; a system constant that is calculated
607during kernel initialization.
608SMP machines have information for
fea681da
MK
609each CPU.
610.TP
611.I /proc/devices
c13182ef
MK
612Text listing of major numbers and device groups.
613This can be used by MAKEDEV scripts for consistency with the kernel.
fea681da
MK
614.TP
615.IR /proc/diskstats " (since Linux 2.5.69)"
616This file contains disk I/O statistics for each disk device.
617See the kernel source file
618.I Documentation/iostats.txt
619for further information.
620.TP
621.I /proc/dma
c13182ef 622This is a list of the registered \fIISA\fP DMA (direct memory access)
fea681da
MK
623channels in use.
624.TP
625.I /proc/driver
626Empty subdirectory.
627.TP
628.I /proc/execdomains
629List of the execution domains (ABI personalities).
630.TP
631.I /proc/fb
097585ed
MK
632Frame buffer information when
633.B CONFIG_FB
634is defined during kernel compilation.
fea681da
MK
635.TP
636.I /proc/filesystems
24d01c53
MK
637A text listing of the file systems which are supported by the kernel,
638namely file systems which were compiled into the kernel or whose kernel
809d0164 639modules are currently loaded. (See also
fb477da2 640.BR filesystems (5).)
24d01c53 641If a file system is marked with "nodev",
809d0164 642this means that it does not require a block device to be mounted
24d01c53 643(e.g., virtual file system, network file system).
809d0164
MK
644
645Incidentally, this file may be used by
646.BR mount (8)
24d01c53
MK
647when no file system is specified and it didn't manage to determine the
648file system type.
649Then file systems contained in this file are tried
809d0164 650(excepted those that are marked with "nodev").
fea681da
MK
651.TP
652.I /proc/fs
653Empty subdirectory.
654.TP
655.I /proc/ide
656This directory
c13182ef
MK
657exists on systems with the ide bus.
658There are directories for each ide channel and attached device.
659Files include:
fea681da 660
a08ea57c 661.in +4n
fea681da
MK
662.nf
663cache buffer size in KB
664capacity number of sectors
665driver driver version
666geometry physical and logical geometry
9fdfa163 667identify in hexadecimal
fea681da
MK
668media media type
669model manufacturer's model number
670settings drive settings
9fdfa163
MK
671smart_thresholds in hexadecimal
672smart_values in hexadecimal
fea681da 673.fi
a08ea57c 674.in
fea681da 675
c13182ef 676The
fea681da
MK
677.BR hdparm (8)
678utility provides access to this information in a friendly format.
679.TP
680.I /proc/interrupts
681This is used to record the number of interrupts per each IRQ on (at
c13182ef
MK
682least) the i386 architecture.
683Very easy to read formatting, done in
fea681da
MK
684ASCII.
685.TP
686.I /proc/iomem
687I/O memory map in Linux 2.4.
688.TP
689.I /proc/ioports
c13182ef 690This is a list of currently registered Input-Output port regions that
fea681da
MK
691are in use.
692.TP
693.IR /proc/kallsyms " (since Linux 2.5.71)"
694This holds the kernel exported symbol definitions used by the
695.BR modules (X)
696tools to dynamically link and bind loadable modules.
697In Linux 2.5.47 and earlier, a similar file with slightly different syntax
698was named
699.IR ksyms .
700.TP
701.I /proc/kcore
702This file represents the physical memory of the system and is stored
c13182ef
MK
703in the ELF core file format.
704With this pseudo-file, and an unstripped
9a67332e
MK
705kernel
706.RI ( /usr/src/linux/vmlinux )
707binary, GDB can be used to
fea681da
MK
708examine the current state of any kernel data structures.
709
710The total length of the file is the size of physical memory (RAM) plus
7114KB.
712.TP
713.I /proc/kmsg
714This file can be used instead of the
715.BR syslog (2)
c13182ef
MK
716system call to read kernel messages.
717A process must have superuser
fea681da 718privileges to read this file, and only one process should read this
c13182ef
MK
719file.
720This file should not be read if a syslog process is running
fea681da
MK
721which uses the
722.BR syslog (2)
723system call facility to log kernel messages.
724
725Information in this file is retrieved with the
726.BR dmesg (8)
727program.
728.TP
729.IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
730See
731.IR /proc/kallsyms .
732.TP
733.I /proc/loadavg
6b05dc38
MK
734The first three fields in this file are load average figures
735giving the number of jobs in the run queue (state R)
fea681da
MK
736or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
737They are the same as the load average numbers given by
738.BR uptime (1)
739and other programs.
6b05dc38
MK
740The fourth field consists of two numbers separated by a slash (/).
741The first of these is the number of currently executing kernel
c13182ef 742scheduling entities (processes, threads);
6b05dc38
MK
743this will be less than or equal to the number of CPUs.
744The value after the slash is the number of kernel scheduling entities
745that currently exist on the system.
746The fifth field is the PID of the process that was most
747recently created on the system.
fea681da
MK
748.TP
749.I /proc/locks
750This file shows current file locks
751.RB ( flock "(2) and " fcntl (2))
752and leases
753.RB ( fcntl (2)).
754.TP
89dd5f8a 755.IR /proc/malloc " (only up to and including Linux 2.2)"
097585ed 756This file is only present if
89dd5f8a 757.B CONFIG_DEBUG_MALLOC
097585ed 758was defined during compilation.
fea681da
MK
759.TP
760.I /proc/meminfo
761This is used by
762.BR free (1)
763to report the amount of free and used memory (both physical and swap)
764on the system as well as the shared memory and buffers used by the
765kernel.
766
767It is in the same format as
768.BR free (1),
769except in bytes rather than KB.
770.TP
771.I /proc/mounts
772This is a list of all the file systems currently mounted on the system.
773The format of this file is documented in
31e9a9ec 774.BR fstab (5).
c13182ef 775Since kernel version 2.6.15, this file is pollable:
57651c15
MK
776after opening the file for reading, a change in this file
777(i.e., a file system mount or unmount) causes
778.BR select (2)
779to mark the file descriptor as readable, and
780.BR poll (2)
781and
782.BR epoll_wait (2)
783mark the file as having an error condition.
fea681da
MK
784.TP
785.I /proc/modules
786A text list of the modules that have been loaded by the system.
787See also
788.BR lsmod (8).
789.TP
790.I /proc/mtrr
c13182ef
MK
791Memory Type Range Registers.
792See
fea681da
MK
793.I /usr/src/linux/Documentation/mtrr.txt
794for details.
795.TP
796.I /proc/net
797various net pseudo-files, all of which give the status of some part of
c13182ef
MK
798the networking layer.
799These files contain ASCII structures and are,
800therefore, readable with cat.
801However, the standard
fea681da
MK
802.BR netstat (8)
803suite provides much cleaner access to these files.
804.TP
805.I /proc/net/arp
806This holds an ASCII readable dump of the kernel ARP table used for
c13182ef
MK
807address resolutions.
808It will show both dynamically learned and
809pre-programmed ARP entries.
810The format is:
fea681da
MK
811
812.nf
813.ft CW
814.in 8n
815IP address HW type Flags HW address Mask Device
816192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
817192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
818.ft
819.fi
820.in
821
822Here 'IP address' is the IPv4 address of the machine and the 'HW type'
c13182ef
MK
823is the hardware type of the address from RFC\ 826.
824The flags are the internal
9a67332e
MK
825flags of the ARP structure (as defined in
826.IR /usr/include/linux/if_arp.h )
827and
fea681da
MK
828the 'HW address' is the data link layer mapping for that IP address if
829it is known.
830.TP
831.I /proc/net/dev
c13182ef
MK
832The dev pseudo-file contains network device status information.
833This gives
834the number of received and sent packets, the number of errors and
fea681da 835collisions
c13182ef
MK
836and other basic statistics.
837These are used by the
fea681da 838.BR ifconfig (8)
c13182ef
MK
839program to report device status.
840The format is:
fea681da
MK
841
842.nf
843.ft CW
844.in 1n
845Inter-| Receive | Transmit
846 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
847 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
848 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
849 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
850 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
851.in
852.ft
853.fi
854.\" .TP
855.\" .I /proc/net/ipx
856.\" No information.
857.\" .TP
858.\" .I /proc/net/ipx_route
859.\" No information.
860.TP
861.I /proc/net/dev_mcast
862Defined in
863.IR /usr/src/linux/net/core/dev_mcast.c :
864.nf
865.in +5
9fdfa163 866indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
8672 eth0 1 0 01005e000001
8683 eth1 1 0 01005e000001
8694 eth2 1 0 01005e000001
870.in
871.fi
872.TP
873.I /proc/net/igmp
c13182ef
MK
874Internet Group Management Protocol.
875Defined in
fea681da
MK
876.IR /usr/src/linux/net/core/igmp.c .
877.TP
878.I /proc/net/rarp
879This file uses the same format as the
880.I arp
881file and contains the current reverse mapping database used to provide
882.BR rarp (8)
c13182ef
MK
883reverse address lookup services.
884If RARP is not configured into the
fea681da
MK
885kernel,
886this file will not be present.
887.TP
888.I /proc/net/raw
c13182ef
MK
889Holds a dump of the RAW socket table.
890Much of the information is not of
fea681da 891use
c13182ef
MK
892apart from debugging.
893The 'sl' value is the kernel hash slot for the
fea681da 894socket,
6beb1671 895the 'local_address' is the local address and protocol number pair. "St" is
c13182ef
MK
896the internal status of the socket.
897The "tx_queue" and "rx_queue" are the
fea681da 898outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 899The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
fdc196f5
MK
900The "uid"
901field holds the effective UID of the creator of the socket.
fea681da
MK
902.\" .TP
903.\" .I /proc/net/route
904.\" No information, but looks similar to
905.\" .BR route (8).
906.TP
907.I /proc/net/snmp
c13182ef 908This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
fea681da 909management
763f0e47 910information bases for an SNMP agent.
fea681da
MK
911.TP
912.I /proc/net/tcp
c13182ef
MK
913Holds a dump of the TCP socket table.
914Much of the information is not
915of use apart from debugging.
916The "sl" value is the kernel hash slot
6beb1671
MK
917for the socket, the "local_address" is the local address and port number pair.
918The "rem_address" is the remote address and port number pair
fea681da
MK
919(if connected). 'St' is the internal status of the socket.
920The 'tx_queue' and 'rx_queue' are the
921outgoing and incoming data queue in terms of kernel memory usage.
94e9d9fe 922The "tr", "tm\->when", and "rexmits" fields hold internal information of
fdc196f5
MK
923the kernel socket state and are only useful for debugging.
924The "uid"
925field holds the effective UID of the creator of the socket.
fea681da
MK
926.TP
927.I /proc/net/udp
c13182ef
MK
928Holds a dump of the UDP socket table.
929Much of the information is not of
930use apart from debugging.
931The "sl" value is the kernel hash slot for the
6beb1671
MK
932socket, the "local_address" is the local address and port number pair.
933The "rem_address" is the remote address and port number pair
fea681da
MK
934(if connected). "St" is the internal status of the socket.
935The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
c13182ef 936in terms of kernel memory usage.
94e9d9fe 937The "tr", "tm\->when", and "rexmits" fields
c13182ef 938are not used by UDP.
fdc196f5
MK
939The "uid"
940field holds the effective UID of the creator of the socket.
fea681da
MK
941The format is:
942
943.nf
944.ft CW
945.in 1n
94e9d9fe 946sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
fea681da
MK
947 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
948 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
949 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
950.in
951.ft
952.fi
953.TP
954.I /proc/net/unix
955Lists the UNIX domain sockets present within the system and their
c13182ef
MK
956status.
957The format is:
fea681da
MK
958.nf
959.sp .5
960.ft CW
961Num RefCount Protocol Flags Type St Path
962 0: 00000002 00000000 00000000 0001 03
963 1: 00000001 00000000 00010000 0001 01 /dev/printer
964.ft
965.sp .5
966.fi
967
968Here 'Num' is the kernel table slot number, 'RefCount' is the number
969of users of the socket, 'Protocol' is currently always 0, 'Flags'
970represent the internal kernel flags holding the status of the
c13182ef
MK
971socket.
972Currently, type is always '1' (Unix domain datagram sockets are
fea681da
MK
973not yet supported in the kernel). 'St' is the internal state of the
974socket and Path is the bound path (if any) of the socket.
975.TP
976.I /proc/partitions
977Contains major and minor numbers of each partition as well as number
978of blocks and partition name.
979.TP
980.I /proc/pci
981This is a listing of all PCI devices found during kernel initialization
982and their configuration.
2990d781
MK
983
984This file has been deprecated in favor of a new /proc
985interface for PCI
986.RI ( /proc/bus/pci ).
987It became optional in Linux 2.2 (available with
988.B CONFIG_PCI_OLD_PROC
989set at kernel compilation).
990It became once more non-optionally enabled in Linux 2.4.
991Next, it was deprecated in Linux 2.6 (still available with
992.B CONFIG_PCI_LEGACY_PROC
993set), and finally removed altogether since Linux 2.6.17.
fea681da
MK
994.TP
995.I /proc/scsi
2990d781
MK
996A directory with the scsi mid-level pseudo-file and various SCSI low-level
997driver directories,
998which contain a file for each SCSI host in this system, all of
c13182ef
MK
999which give the status of some part of the SCSI IO subsystem.
1000These files contain ASCII structures and are, therefore, readable with
2990d781 1001.BR cat (1).
fea681da 1002
c13182ef 1003You can also write to some of the files to reconfigure the subsystem or
fea681da
MK
1004switch
1005certain features on or off.
1006.TP
1007.I /proc/scsi/scsi
c13182ef
MK
1008This is a listing of all SCSI devices known to the kernel.
1009The listing is
fea681da 1010similar to the one seen during bootup.
c13182ef 1011scsi currently supports only the \fIadd-single-device\fP command which
fea681da
MK
1012allows
1013root to add a hotplugged device to the list of known devices.
1014
c13182ef
MK
1015An
1016.B echo 'scsi add-single-device 1 0 5 0' > /proc/scsi/scsi
1017will cause
1018host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0.
1019If there
fea681da
MK
1020is already a device known on this address or the address is invalid, an
1021error will be returned.
1022.TP
1023.I /proc/scsi/[drivername]
c13182ef
MK
1024\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
1025aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
1026scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
1027These directories show up for all drivers that registered at least one
1028SCSI
1029HBA.
1030Every directory contains one file per registered host.
1031Every
fea681da 1032host-file is named after the number the host was assigned during
c13182ef 1033initialization.
fea681da 1034
c13182ef 1035Reading these files will usually show driver and host configuration,
fea681da
MK
1036statistics etc.
1037
1038Writing to these files allows different things on different hosts.
1039For example, with the \fIlatency\fP and \fInolatency\fP commands,
1040root can switch on and off command latency measurement code in the
c13182ef
MK
1041eata_dma driver.
1042With the \fIlockup\fP and \fIunlock\fP commands,
1043root can control bus lockups simulated by the scsi_debug driver.
fea681da
MK
1044.TP
1045.I /proc/self
24d01c53 1046This directory refers to the process accessing the /proc file system,
fea681da
MK
1047and is identical to the /proc directory named by the process ID of the
1048same process.
1049.TP
1050.I /proc/slabinfo
c13182ef 1051Information about kernel caches.
821643a8
MK
1052Since Linux 2.6.16 this file is only present if the
1053.B CONFIG_SLAB
1054kernel configuration option is enabled.
350038ff 1055The columns in
38f76cd2 1056.I /proc/slabinfo
350038ff 1057are:
a08ea57c 1058.in +4n
fea681da 1059.nf
a08ea57c 1060
fea681da
MK
1061cache-name
1062num-active-objs
1063total-objs
1064object-size
1065num-active-slabs
1066total-slabs
1067num-pages-per-slab
1068.fi
a08ea57c
MK
1069.in
1070
c13182ef 1071See
fea681da
MK
1072.BR slabinfo (5)
1073for details.
1074.TP
1075.I /proc/stat
c13182ef
MK
1076kernel/system statistics.
1077Varies with architecture.
1078Common
fea681da
MK
1079entries include:
1080.RS
1081.TP
1082\fIcpu 3357 0 4313 1362393\fP
bfbfcd18 1083The amount of time, measured in units of
b877b392 1084USER_HZ (1/100ths of a second on most architectures),
bfbfcd18
MK
1085that the system spent in user mode,
1086user mode with low priority (nice), system mode, and the
1087idle task, respectively.
b09b8526 1088.\" FIXME Actually, the following info about the /proc/stat 'cpu' field
777f5a9e 1089.\" does not seem to be quite right (at least in 2.6.12)
bfbfcd18 1090The last value should be USER_HZ times the
fea681da 1091second entry in the uptime pseudo-file.
ca92ce95 1092
bfbfcd18
MK
1093In Linux 2.6 this line includes three additional columns:
1094.I iowait
1095\- time waiting for I/O to complete (since 2.5.41);
1096.I irq
1097\- time servicing interrupts (since 2.6.0-test4);
1098.I softirq
1099\- time servicing softirqs (since 2.6.0-test4).
ca92ce95 1100
9de1f6cc
MK
1101Since Linux 2.6.11, there is an eighth column,
1102.I steal
1103\- stolen time, which is the time spent in other operating systems when
1104running in a virtualized environment
fea681da
MK
1105.TP
1106\fIpage 5741 1808\fP
1107The number of pages the system paged in and the number that were paged
1108out (from disk).
1109.TP
1110\fIswap 1 0\fP
1111The number of swap pages that have been brought in and out.
1112.TP
c13182ef 1113.\" FIXME The following is not the full picture for the 'intr' of
777f5a9e 1114.\" /proc/stat on 2.6:
fea681da 1115\fIintr 1462898\fP
bfbfcd18
MK
1116This line shows counts of interrupts serviced since boot time,
1117for each of the possible system interrupts.
1118The first column is the total of all interrupts serviced;
1119each subsequent column is the total for a particular interrupt.
fea681da
MK
1120.TP
1121\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
1122(major,minor):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
bfbfcd18
MK
1123.br
1124(Linux 2.4 only)
fea681da
MK
1125.TP
1126\fIctxt 115315\fP
1127The number of context switches that the system underwent.
1128.TP
1129\fIbtime 769041601\fP
be9634cf 1130boot time, in seconds since the Epoch (January 1, 1970).
fea681da
MK
1131.TP
1132\fIprocesses 86031\fP
1133Number of forks since boot.
bfbfcd18
MK
1134.TP
1135\fIprocs_running 6\fP
1136Number of processes in runnable state.
1137(Linux 2.5.45 onwards.)
1138.TP
1139\fIprocs_blocked 2\fP
1140Number of processes blocked waiting for I/O to complete.
1141(Linux 2.5.45 onwards.)
fea681da
MK
1142.RE
1143.TP
1144.I /proc/swaps
c13182ef
MK
1145Swap areas in use.
1146See also
fea681da
MK
1147.BR swapon (8).
1148.TP
1149.I /proc/sys
1150This directory (present since 1.3.57) contains a number of files
1151and subdirectories corresponding to kernel variables.
1152These variables can be read and sometimes modified using
1153the \fIproc\fP file system, and the
1154.BR sysctl (2)
c13182ef
MK
1155system call.
1156Presently, there are subdirectories
fea681da
MK
1157.IR abi ", " debug ", " dev ", " fs ", " kernel ", " net ", " proc ", "
1158.IR rxrpc ", " sunrpc " and " vm
1159that each contain more files and subdirectories.
1160.TP
6ab7c0aa 1161.IR /proc/sys/abi " (since Linux 2.4.10)"
fea681da 1162This directory may contain files with application binary information.
6ab7c0aa
MK
1163.\" On some systems, it is not present.
1164See the kernel source file
1165.I Documentation/sysctl/abi.txt
1166for more information.
fea681da
MK
1167.TP
1168.I /proc/sys/debug
1169This directory may be empty.
1170.TP
1171.I /proc/sys/dev
e2badfdf 1172This directory contains device-specific information (e.g.,
9a67332e 1173.IR dev/cdrom/info ).
fea681da
MK
1174On
1175some systems, it may be empty.
1176.TP
1177.I /proc/sys/fs
6d64ca9c 1178This contains the subdirectories
b877b392 1179.IR binfmt_misc ", " inotify ", and " mqueue ,
fea681da 1180and files
c13182ef
MK
1181.IR dentry-state ", " dir-notify-enable ", " dquot-nr ", " file-max ", "
1182.IR file-nr ", " inode-max ", " inode-nr ", " inode-state ", "
1183.IR lease-break-time ", " leases-enable ", "
43da96f2
MK
1184.IR overflowgid ", " overflowuid ", "
1185.IR suid_dumpable ", "
1186.IR super-max ", and " super-nr .
fea681da
MK
1187.TP
1188.I /proc/sys/fs/binfmt_misc
c13182ef 1189Documentation for files in this directory can be found
b877b392 1190in the kernel sources in
fea681da
MK
1191.IR Documentation/binfmt_misc.txt .
1192.TP
1193.I /proc/sys/fs/dentry-state
c13182ef
MK
1194This file contains six numbers,
1195.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
fea681da
MK
1196want_pages
1197(pages requested by system) and two dummy values.
1198nr_dentry seems to be 0 all the time.
1199nr_unused seems to be the number of unused dentries.
1200age_limit is the age in seconds after which dcache entries
1201can be reclaimed when memory is short and want_pages is
c382a365 1202nonzero when the kernel has called shrink_dcache_pages() and the
fea681da
MK
1203dcache isn't pruned yet.
1204.TP
1205.I /proc/sys/fs/dir-notify-enable
1206This file can be used to disable or enable the
1207.I dnotify
1208interface described in
1209.BR fcntl (2)
1210on a system-wide basis.
1211A value of 0 in this file disables the interface,
1212and a value of 1 enables it.
1213.TP
1214.I /proc/sys/fs/dquot-max
1215This file shows the maximum number of cached disk quota entries.
1216On some (2.4) systems, it is not present.
1217If the number of free cached disk quota entries is very low and
1218you have some awesome number of simultaneous system users,
1219you might want to raise the limit.
1220.TP
1221.I /proc/sys/fs/dquot-nr
1222This file shows the number of allocated disk quota
1223entries and the number of free disk quota entries.
1224.TP
1225.I /proc/sys/fs/file-max
1226This file defines
1227a system-wide limit on the number of open files for all processes.
1228(See also
1229.BR setrlimit (2),
1230which can be used by a process to set the per-process limit,
1231.BR RLIMIT_NOFILE ,
1232on the number of files it may open.)
1233If you get lots
1234of error messages about running out of file handles,
1235try increasing this value:
1236.br
1237
1238.br
1239.nf
1240.ft CW
1241echo 100000 > /proc/sys/fs/file-max
1242.fi
1243.ft
1244
1245The kernel constant
7b2b5ea4 1246.B NR_OPEN
fea681da
MK
1247imposes an upper limit on the value that may be placed in
1248.IR file-max .
1249
c13182ef 1250If you increase
fea681da
MK
1251.IR /proc/sys/fs/file-max ","
1252be sure to increase
1253.I /proc/sys/fs/inode-max
1254to 3-4 times the new
c13182ef 1255value of
fea681da
MK
1256.IR /proc/sys/fs/file-max ","
1257or you will run out of inodes.
1258.TP
1259.I /proc/sys/fs/file-nr
1260This (read-only) file
1261gives the number of files presently opened.
1262It contains three numbers: The number of allocated
1263file handles, the number of free file handles and the maximum
c13182ef
MK
1264number of file handles.
1265The kernel allocates file handles dynamically, but it
1266doesn't free them again.
1267If the number of allocated files is close to the
fea681da
MK
1268
1269maximum, you should consider increasing the maximum.
1270When the number of free file handles is
1271large, you've encountered a peak in your usage of file
1272handles and you probably don't need to increase the maximum.
1273.TP
c13182ef 1274.I /proc/sys/fs/inode-max
fea681da
MK
1275This file contains the maximum number of in-memory inodes.
1276On some (2.4) systems, it may not be
c13182ef
MK
1277present.
1278This value should be 3-4 times larger
9bef72b5
MK
1279than the value in file-max, since \fIstdin\fP, \fIstdout\fP
1280and network sockets also
c13182ef
MK
1281need an inode to handle them.
1282When you regularly run
fea681da
MK
1283out of inodes, you need to increase this value.
1284.TP
1285.I /proc/sys/fs/inode-nr
1286This file contains the first two values from inode-state.
1287.TP
1288.I /proc/sys/fs/inode-state
1289This file
c13182ef
MK
1290contains seven numbers: nr_inodes, nr_free_inodes, preshrink and four
1291dummy values.
1292nr_inodes is the number of inodes the system has allocated.
1293This can be slightly more than inode-max because
e02756a4 1294Linux allocates them one page full at a time.
fea681da 1295nr_free_inodes represents the number of free inodes.
c382a365 1296preshrink is nonzero when the nr_inodes > inode-max and the
fea681da
MK
1297system needs to prune the inode list instead of allocating
1298more.
1299.TP
b877b392 1300.IR /proc/sys/fs/inotify " (since Linux 2.6.13)"
c13182ef 1301This directory contains files
b877b392
MK
1302.IR max_queued_events ", " max_user_instances ", and " max_user_watches ,
1303that can be used to limit the amount of kernel memory consumed by the
1304.I inotify
1305interface.
c13182ef 1306For further details, see
435b27cc 1307.BR inotify (7).
b877b392 1308.TP
fea681da
MK
1309.I /proc/sys/fs/lease-break-time
1310This file
1311specifies the grace period that the kernel grants to a process
1312holding a file lease
1313.RB ( fcntl (2))
1314after it has sent a signal to that process notifying it
1315that another process is waiting to open the file.
1316If the lease holder does not remove or downgrade the lease within
1317this grace period, the kernel forcibly breaks the lease.
1318.TP
1319.I /proc/sys/fs/leases-enable
1320This file can be used to enable or disable file leases
1321.RB ( fcntl (2))
1322on a system-wide basis.
1323If this file contains the value 0, leases are disabled.
c382a365 1324A nonzero value enables leases.
6d64ca9c
MK
1325.TP
1326.IR /proc/sys/fs/mqueue " (since Linux 2.6.6)"
c13182ef 1327This directory contains files
6d64ca9c
MK
1328.IR msg_max ", " msgsize_max ", and " queues_max ,
1329controlling the resources used by POSIX message queues.
96018ebe 1330See
c13182ef 1331.BR mq_overview (7)
96018ebe 1332for details.
6d64ca9c
MK
1333.TP
1334.IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid
1335These files
1336allow you to change the value of the fixed UID and GID.
1337The default is 65534.
24d01c53 1338Some file systems only support 16-bit UIDs and GIDs, although in Linux
c13182ef 1339UIDs and GIDs are 32 bits.
24d01c53 1340When one of these file systems is mounted
6d64ca9c
MK
1341with writes enabled, any UID or GID that would exceed 65535 is translated
1342to the overflow value before being written to disk.
1343.TP
43da96f2
MK
1344.IR /proc/sys/fs/suid_dumpable " (since Linux 2.6.13)"
1345.\" The following is based on text from Documentation/sysctl/kernel.txt
c13182ef 1346The value in this file determines whether core dump files are
f1162930
MK
1347produced for set-user-ID or otherwise protected/tainted binaries.
1348Three different integer values can be specified:
43da96f2
MK
1349.sp
1350\fI0\ (default)\fP
d9bfdb9c 1351This provides the traditional (pre-Linux 2.6.13) behavior.
c13182ef 1352A core dump will not be produced for a process which has
f1162930 1353changed credentials (by calling
c13182ef
MK
1354.BR seteuid (2),
1355.BR setgid (2),
1356or similar, or by executing a set-user-ID or set-group-ID program)
f1162930 1357or whose binary does not have read permission enabled.
43da96f2 1358.sp
f1162930 1359\fI1\ ("debug")\fP
43da96f2 1360All processes dump core when possible.
c13182ef 1361The core dump is owned by the file system user ID of the dumping process
f1162930 1362and no security is applied.
43da96f2
MK
1363This is intended for system debugging situations only.
1364Ptrace is unchecked.
1365.sp
f1162930 1366\fI2\ ("suidsafe")\fP
c13182ef
MK
1367Any binary which normally would not be dumped (see "0" above)
1368is dumped readable by root only.
f1162930 1369This allows the user to remove the core dump file but not to read it.
c13182ef 1370For security reasons core dumps in this mode will not overwrite one
43da96f2 1371another or other files.
b877b392 1372This mode is appropriate when administrators are
43da96f2 1373attempting to debug problems in a normal environment.
fea681da 1374.TP
c13182ef
MK
1375.I /proc/sys/fs/super-max
1376This file
fea681da 1377controls the maximum number of superblocks, and
24d01c53 1378thus the maximum number of mounted file systems the kernel
c13182ef
MK
1379can have.
1380You only need to increase super-max if you need to
24d01c53 1381mount more file systems than the current value in super-max
fea681da
MK
1382allows you to.
1383.TP
1384.I /proc/sys/fs/super-nr
c13182ef 1385This file
24d01c53 1386contains the number of file systems currently mounted.
fea681da
MK
1387.TP
1388.I /proc/sys/kernel
1389This directory contains files
1390.IR acct ", " cad_pid ", " cap-bound ", "
1391.IR core_pattern ", " core_uses_pid ", "
1392.IR ctrl-alt-del ", " dentry-state ", " domainname ", "
c13182ef 1393.IR hotplug ", " hostname ", "
fea681da
MK
1394.IR htab-reclaim " (PowerPC only), "
1395.IR java-appletviewer " (binfmt_java, obsolete), "
1396.IR java-interpreter " (binfmt_java, obsolete), " l2cr " (PowerPC only), "
c13182ef 1397.IR modprobe ", " msgmax ", " msgmnb ", "
fea681da
MK
1398.IR msgmni ", " osrelease ", " ostype ", " overflowgid ", " overflowuid ,
1399.IR panic ", " panic_on_oops ", " pid_max ", "
1400.IR powersave-nap " (PowerPC only), " printk ", " pty ", " random ", "
c13182ef 1401.IR real-root-dev ", " reboot-cmd " (SPARC only), " rtsig-max ", "
fea681da
MK
1402.IR rtsig-nr ", " sem ", " sg-big-buff ", "
1403.IR shmall ", " shmmax ", " shmmni ", " sysrq ", " tainted ", " threads-max ,
43da96f2 1404.IR version ", and " zero-paged " (PowerPC only)."
fea681da
MK
1405.TP
1406.I /proc/sys/kernel/acct
c13182ef 1407This file
fea681da
MK
1408contains three numbers: highwater, lowwater and frequency.
1409If BSD-style process accounting is enabled these values control
d9bfdb9c 1410its behavior.
24d01c53 1411If free space on file system where the log lives
c13182ef
MK
1412goes below lowwater percent accounting suspends.
1413If free space gets
1414above highwater percent accounting resumes.
1415Frequency determines
fea681da 1416how often the kernel checks the amount of free space (value is in
c13182ef
MK
1417seconds).
1418Default values are 4, 2 and 30.
fea681da
MK
1419That is, suspend accounting if <= 2% of space is free; resume it
1420if >= 4% of space is free; consider information about amount of free space
1421valid for 30 seconds.
1422.TP
1423.I /proc/sys/kernel/cap-bound
1424This file holds the value of the kernel
0daa9e92 1425.I "capability bounding set"
fea681da
MK
1426(expressed as a signed decimal number).
1427This set is ANDed against the capabilities permitted to a process
c13182ef 1428during
ee6e96c1 1429.BR execve (2).
fea681da
MK
1430.TP
1431.I /proc/sys/kernel/core_pattern
5937fccd
MK
1432See
1433.BR core (5).
654cc098 1434.TP
fea681da 1435.I /proc/sys/kernel/core_uses_pid
5937fccd
MK
1436See
1437.BR core (5).
fea681da
MK
1438.TP
1439.I /proc/sys/kernel/ctrl-alt-del
1440This file
1441controls the handling of Ctrl-Alt-Del from the keyboard.
1442When the value in this file is 0, Ctrl-Alt-Del is trapped and
1443sent to the
49ec013c 1444.BR init (8)
fea681da
MK
1445program to handle a graceful restart.
1446When the value is > 0, Linux's reaction to a Vulcan
1447Nerve Pinch (tm) will be an immediate reboot, without even
1448syncing its dirty buffers.
1449Note: when a program (like dosemu) has the keyboard in 'raw'
1450mode, the ctrl-alt-del is intercepted by the program before it
1451ever reaches the kernel tty layer, and it's up to the program
1452to decide what to do with it.
1453.TP
1454.I /proc/sys/kernel/hotplug
1455This file
1456contains the path for the hotplug policy agent.
60849763 1457The default value in this file is
9a67332e 1458.IR /sbin/hotplug .
fea681da
MK
1459.TP
1460.IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname
1461can be used to set the NIS/YP domainname and the
1462hostname of your box in exactly the same way as the commands
8b49407f
MK
1463.BR domainname (1)
1464and
03d2434e
MK
1465.BR hostname (1),
1466that is:
fea681da 1467
a08ea57c
MK
1468.in +4n
1469.nf
fea681da 1470# echo "darkstar" > /proc/sys/kernel/hostname
fea681da 1471# echo "mydomain" > /proc/sys/kernel/domainname
a08ea57c
MK
1472.fi
1473.in
fea681da 1474
fea681da 1475has the same effect as
fea681da 1476
a08ea57c
MK
1477.in +4n
1478.nf
fea681da 1479# hostname "darkstar"
fea681da 1480# domainname "mydomain"
a08ea57c
MK
1481.fi
1482.in
fea681da 1483
fea681da
MK
1484Note, however, that the classic darkstar.frop.org has the
1485hostname "darkstar" and DNS (Internet Domain Name Server)
1486domainname "frop.org", not to be confused with the NIS (Network
c13182ef
MK
1487Information Service) or YP (Yellow Pages) domainname.
1488These two
1489domain names are in general different.
1490For a detailed discussion
fea681da
MK
1491see the
1492.BR hostname (1)
1493man page.
1494.TP
1495.I /proc/sys/kernel/htab-reclaim
c382a365 1496(PowerPC only) If this file is set to a nonzero value,
fea681da 1497the PowerPC htab
9a67332e
MK
1498(see kernel file
1499.IR Documentation/powerpc/ppc_htab.txt )
1500is pruned
fea681da
MK
1501each time the system hits the idle loop.
1502.TP
1503.I /proc/sys/kernel/l2cr
1504(PowerPC only) This file
1505contains a flag that controls the L2 cache of G3 processor
c13182ef
MK
1506boards.
1507If 0, the cache is disabled.
c382a365 1508Enabled if nonzero.
fea681da
MK
1509.TP
1510.I /proc/sys/kernel/modprobe
6ab7c0aa
MK
1511This file contains the path for the kernel module loader.
1512The default value is
1513.IR /sbin/modprobe .
1514The file is only present if the kernel is built with the
821643a8
MK
1515.B CONFIG_KMOD
1516option enabled.
6ab7c0aa
MK
1517It is described by the kernel source file
1518.I Documentation/kmod.txt
1519(only present in kernel 2.4 and earlier).
fea681da
MK
1520.TP
1521.I /proc/sys/kernel/msgmax
1522This file defines
1523a system-wide limit specifying the maximum number of bytes in
1524a single message written on a System V message queue.
1525.TP
1526.I /proc/sys/kernel/msgmni
1527This file defines the system-wide limit on the number of
1528message queue identifiers.
1529(This file is only present in Linux 2.4 onwards.)
1530.TP
1531.I /proc/sys/kernel/msgmnb
d9bfdb9c 1532This file defines a system-wide parameter used to initialize the
fea681da 1533.I msg_qbytes
568105c6 1534setting for subsequently created message queues.
fea681da
MK
1535The
1536.I msg_qbytes
1537setting specifies the maximum number of bytes that may be written to the
1538message queue.
1539.TP
1540.IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease
1541These files
1542give substrings of
1543.IR /proc/version .
1544.TP
1545.IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid
1546These files duplicate the files
1547.I /proc/sys/fs/overflowgid
1548and
1549.IR /proc/sys/fs/overflowuid .
1550.TP
1551.I /proc/sys/kernel/panic
1552gives read/write access to the kernel variable
1553.IR panic_timeout .
c382a365 1554If this is zero, the kernel will loop on a panic; if nonzero
fea681da 1555it indicates that the kernel should autoreboot after this number
c13182ef
MK
1556of seconds.
1557When you use the
fea681da
MK
1558software watchdog device driver, the recommended setting is 60.
1559.TP
1560.I /proc/sys/kernel/panic_on_oops
d9bfdb9c 1561This file (new in Linux 2.5) controls the kernel's behavior when an oops
c13182ef
MK
1562or BUG is encountered.
1563If this file contains 0, then the system
1564tries to continue operation.
1565If it contains 1, then the system
fea681da 1566delays a few seconds (to give klogd time to record the oops output)
c13182ef 1567and then panics.
fea681da
MK
1568If the
1569.I /proc/sys/kernel/panic
c382a365 1570file is also nonzero then the machine will be rebooted.
fea681da
MK
1571.TP
1572.I /proc/sys/kernel/pid_max
c13182ef 1573This file
fea681da
MK
1574(new in Linux 2.5)
1575specifies the value at which PIDs wrap around
1576(i.e., the value in this file is one greater than the maximum PID).
1577The default value for this file, 32768,
1578results in the same range of PIDs as on earlier kernels.
c13182ef 1579On 32-bit platforms, 32768 is the maximum value for
b3b8bd24 1580.IR pid_max .
c13182ef 1581On 64-bit systems,
b3b8bd24
MK
1582.I pid_max
1583can be set to any value up to 2^22
b1b0eb73
MK
1584.RB ( PID_MAX_LIMIT ,
1585approximately 4 million).
c13182ef 1586.\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit
b3b8bd24
MK
1587.\" platforms, but this broke /proc/PID
1588.\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
fea681da
MK
1589.TP
1590.IR /proc/sys/kernel/powersave-nap " (PowerPC only)"
c13182ef
MK
1591This file contains a flag.
1592If set, Linux-PPC will use the 'nap' mode of
fea681da
MK
1593powersaving,
1594otherwise the 'doze' mode will be used.
1595.TP
1596.I /proc/sys/kernel/printk
1597The four values in this file
1598are console_loglevel, default_message_loglevel, minimum_console_level and
1599default_console_loglevel.
1600These values influence printk() behavior when printing or
c13182ef
MK
1601logging error messages.
1602See
fea681da
MK
1603.BR syslog (2)
1604for more info on the different loglevels.
1605Messages with a higher priority than
1606console_loglevel will be printed to the console.
1607Messages without an explicit priority
1608will be printed with priority default_message_level.
1609minimum_console_loglevel is the minimum (highest) value to which
1610console_loglevel can be set.
1611default_console_loglevel is the default value for console_loglevel.
1612.TP
1613.IR /proc/sys/kernel/pty " (since Linux 2.6.4)"
c13182ef 1614This directory
fea681da
MK
1615contains two files relating to the number of Unix 98
1616pseudo-terminals (see
1617.BR pts (4))
1618on the system.
1619.TP
1620.I /proc/sys/kernel/pty/max
1621This file defines the maximum number of pseudo-terminals.
1622.TP
1623.I /proc/sys/kernel/pty/nr
1624This read-only file
1625indicates how many pseudo-terminals are currently in use.
1626.TP
fea681da
MK
1627.I /proc/sys/kernel/random
1628This directory
1629contains various parameters controlling the operation of the file
1630.IR /dev/random .
c13182ef 1631See
95a32af8
MK
1632.BR random (4)
1633for further information.
fea681da
MK
1634.TP
1635.I /proc/sys/kernel/real-root-dev
1636This file
9a67332e
MK
1637is documented in the kernel source file
1638.IR Documentation/initrd.txt .
fea681da
MK
1639.TP
1640.IR /proc/sys/kernel/reboot-cmd " (Sparc only) "
1641This file seems to be a way to give an argument to the SPARC
c13182ef
MK
1642ROM/Flash boot loader.
1643Maybe to tell it what to do after
fea681da
MK
1644rebooting?
1645.TP
1646.I /proc/sys/kernel/rtsig-max
c13182ef 1647(Only in kernels up to and including 2.6.7; see
70556c17 1648.BR setrlimit (2))
fea681da
MK
1649This file can be used to tune the maximum number
1650of POSIX realtime (queued) signals that can be outstanding
1651in the system.
1652.TP
1653.I /proc/sys/kernel/rtsig-nr
70556c17 1654(Only in kernels up to and including 2.6.7.)
fea681da
MK
1655This file shows the number POSIX realtime signals currently queued.
1656.TP
1657.IR /proc/sys/kernel/sem " (since Linux 2.4)"
1658This file contains 4 numbers defining limits for System V IPC semaphores.
c13182ef 1659These fields are, in order:
fea681da
MK
1660.RS
1661.IP SEMMSL 8
1662The maximum semaphores per semaphore set.
1663.IP SEMMNS 8
1664A system-wide limit on the number of semaphores in all semaphore sets.
1665.IP SEMOPM 8
1666The maximum number of operations that may be specified in a
1667.BR semop (2)
1668call.
1669.IP SEMMNI 8
1670A system-wide limit on the maximum number of semaphore identifiers.
1671.RE
1672.TP
1673.I /proc/sys/kernel/sg-big-buff
c13182ef 1674This file
fea681da 1675shows the size of the generic SCSI device (sg) buffer.
5ec8d26f 1676You can't tune it just yet, but you could change it at
9a67332e
MK
1677compile time by editing
1678.I include/scsi/sg.h
1679and changing
b1b0eb73
MK
1680the value of
1681.BR SG_BIG_BUFF .
c13182ef 1682However, there shouldn't be any reason to change this value.
fea681da
MK
1683.TP
1684.I /proc/sys/kernel/shmall
1685This file
1686contains the system-wide limit on the total number of pages of
1687System V shared memory.
1688.TP
1689.I /proc/sys/kernel/shmmax
1690This file
1691can be used to query and set the run time limit
c13182ef 1692on the maximum (System V IPC) shared memory segment size that can be
fea681da 1693created.
b1b0eb73 1694Shared memory segments up to 1GB are now supported in the
c13182ef 1695kernel.
b1b0eb73
MK
1696This value defaults to
1697.BR SHMMAX .
fea681da
MK
1698.TP
1699.I /proc/sys/kernel/shmmni
1700(available in Linux 2.4 and onwards)
1701This file
1702specifies the system-wide maximum number of System V shared memory
1703segments that can be created.
1704.TP
1705.I /proc/sys/kernel/version
1706contains a string like:
fea681da 1707
3c1a1cdc 1708 #5 Wed Feb 25 21:49:24 MET 1998
fea681da 1709
fea681da
MK
1710The '#5' means that
1711this is the fifth kernel built from this source base and the
1712date behind it indicates the time the kernel was built.
1713.TP
1714.IR /proc/sys/kernel/zero-paged " (PowerPC only) "
1715This file
c13182ef 1716contains a flag.
c382a365 1717When enabled (nonzero), Linux-PPC will pre-zero pages in
fea681da
MK
1718the idle loop, possibly speeding up get_free_pages.
1719.TP
1720.I /proc/sys/net
1721This directory contains networking stuff.
81c6dd6c
MK
1722Explanations for some of the files under this directory can be found in
1723.BR tcp (7)
1724and
1725.BR ip (7).
fea681da 1726.TP
ec650cc1
MK
1727.I /proc/sys/net/core/somaxconn
1728This file defines a ceiling value for the
1729.I backlog
1730argument of
1731.BR listen (2);
1732see the
1733.BR listen (2)
1734manual page for details.
1735.TP
fea681da
MK
1736.I /proc/sys/proc
1737This directory may be empty.
1738.TP
1739.I /proc/sys/sunrpc
1740This directory supports Sun remote procedure call for network file system
c13182ef
MK
1741(NFS).
1742On some systems, it is not present.
fea681da
MK
1743.TP
1744.I /proc/sys/vm
c13182ef 1745This directory contains files for memory management tuning, buffer and
fea681da
MK
1746cache
1747management.
1748.TP
b6c40587
MK
1749.IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)"
1750Writing to this file causes the kernel to drop clean caches, dentries and
1751inodes from memory, causing that memory to become free.
1752
c13182ef 1753To free pagecache, use
b6c40587
MK
1754.IR "echo 1 > /proc/sys/vm/drop_caches" ;
1755to free dentries and inodes, use
1756.IR "echo 2 > /proc/sys/vm/drop_caches" ;
1757to free pagecache, dentries and inodes, use
1758.IR "echo 3 > /proc/sys/vm/drop_caches" .
1759
c13182ef 1760Because this is a non-destructive operation and dirty objects
b6c40587 1761are not freeable, the
c13182ef 1762user should run
b6c40587
MK
1763.BR sync (8)
1764first.
1765.TP
473ad28f
MK
1766.IR /proc/sys/vm/legacy_va_layout " (since Linux 2.6.9)"
1767.\" The following is from Documentation/filesystems/proc.txt
c382a365 1768If nonzero, this disable the new 32-bit memory-mapping layout;
473ad28f
MK
1769the kernel will use the legacy (2.4) layout for all processes.
1770.TP
fea681da 1771.I /proc/sys/vm/overcommit_memory
c13182ef
MK
1772This file contains the kernel virtual memory accounting mode.
1773Values are:
fea681da
MK
1774.br
17750: heuristic overcommit (this is the default)
1776.br
17771: always overcommit, never check
1778.br
17792: always check, never overcommit
1780.br
1781In mode 0, calls of
1782.BR mmap (2)
097585ed 1783with
0daa9e92 1784.B MAP_NORESERVE
097585ed 1785set are not checked, and the default check is very weak,
fea681da 1786leading to the risk of getting a process "OOM-killed".
c382a365 1787Under Linux 2.4 any nonzero value implies mode 1.
fea681da
MK
1788In mode 2 (available since Linux 2.6), the total virtual address space
1789on the system is limited to (SS + RAM*(r/100)),
1790where SS is the size of the swap space, and RAM
1791is the size of the physical memory, and r is the contents of the file
1792.IR /proc/sys/vm/overcommit_ratio .
1793.TP
1794.I /proc/sys/vm/overcommit_ratio
c13182ef 1795See the description of
fea681da
MK
1796.IR /proc/sys/vm/overcommit_memory .
1797.TP
1798.I /proc/sysvipc
c13182ef 1799Subdirectory containing the pseudo-files
fea681da 1800.IR msg ", " sem " and " shm "."
c13182ef 1801These files list the System V Interprocess Communication (IPC) objects
fea681da
MK
1802(respectively: message queues, semaphores, and shared memory)
1803that currently exist on the system,
1804providing similar information to that available via
1805.BR ipcs (1).
1806These files have headers and are formatted (one IPC object per line)
1807for easy understanding.
2c5e151c 1808.BR svipc (7)
fea681da
MK
1809provides further background on the information shown by these files.
1810.TP
1811.I /proc/tty
c13182ef 1812Subdirectory containing the pseudo-files and subdirectories for
fea681da
MK
1813tty drivers and line disciplines.
1814.TP
1815.I /proc/uptime
1816This file contains two numbers: the uptime of the system (seconds),
1817and the amount of time spent in idle process (seconds).
1818.TP
1819.I /proc/version
1820This string identifies the kernel version that is currently running.
030d3025
MK
1821It includes the contents of
1822.IR /proc/sys/kernel/ostype ,
0daa9e92 1823.I /proc/sys/kernel/osrelease
030d3025
MK
1824and
1825.IR /proc/sys/kernel/version .
c13182ef 1826For example:
fea681da
MK
1827.nf
1828.in -2
1829.ft CW
1830Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994
1831.ft
1832.in +2
1833.fi
1834.TP
1835.IR /proc/vmstat " (since Linux 2.6)"
1836This file displays various virtual memory statistics.
363f747c
MK
1837.TP
1838.IR /proc/zoneinfo " (since Linux 2.6.13)"
1839This file display information about memory zones.
d9bfdb9c 1840This is useful for analyzing virtual memory behavior.
218e46f8 1841.\" FIXME more should be said about /proc/zoneinfo
e37e3282
MK
1842.SH NOTES
1843Many strings (i.e., the environment and command line) are in
1844the internal format, with sub-fields terminated by null bytes ('\\0'),
1845so you
1846may find that things are more readable if you use \fIod \-c\fP or \fItr
1847"\\000" "\\n"\fP to read them.
1848Alternatively, \fIecho `cat <file>`\fP works well.
1849
1850This manual page is incomplete, possibly inaccurate, and is the kind
1851of thing that needs to be updated very often.
1852.\" .SH ACKNOWLEDGEMENTS
1853.\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on
1854.\" kernel source documentation files written by Rik van Riel.
fea681da
MK
1855.SH "SEE ALSO"
1856.BR cat (1),
1857.BR find (1),
1858.BR free (1),
fea681da
MK
1859.BR ps (1),
1860.BR tr (1),
1861.BR uptime (1),
1862.BR chroot (2),
1863.BR mmap (2),
1864.BR readlink (2),
1865.BR syslog (2),
1866.BR slabinfo (5),
1867.BR hier (7),
1868.BR arp (8),
1869.BR dmesg (8),
1870.BR hdparm (8),
1871.BR ifconfig (8),
1872.BR init (8),
1873.BR lsmod (8),
1874.BR lspci (8),
809d0164 1875.BR mount (8),
fea681da
MK
1876.BR netstat (8),
1877.BR procinfo (8),
1878.BR route (8)
1879.br
1880.I /usr/src/linux/Documentation/filesystems/proc.txt