]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc.5
Spelling fixes
[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
305a0578 6.\" Michael Kerrisk <mtk-manpages@gmx.net>
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
305a0578 34.\" by Michael Kerrisk <mtk-manpages@gmx.net>
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'
fea681da 39.\"
c3c6c1f6 40.TH PROC 5 2005-05-12 "" "Linux Programmer's Manual"
fea681da
MK
41.SH NAME
42proc \- process information pseudo-filesystem
43
44.SH DESCRIPTION
45The
46.I proc
47filesystem is a pseudo-filesystem which is used as an interface to
48kernel data structures. It is commonly mounted at
49.IR /proc .
50Most of it is read-only, but some files allow kernel variables to be
51changed.
52.LP
53The following outline gives a quick tour through the /proc hierarchy.
54.PD 1
55.TP
56.I /proc/[number]
57There is a numerical subdirectory for each running process; the
58subdirectory is named by the process ID.
59Each such subdirectory contains the following
60pseudo-files and directories.
61.TP
62.I /proc/[number]/cmdline
63This holds the complete command line for the process, unless the whole
64process has been swapped out or the process is a zombie. In
65either of these latter cases, there is nothing in this file: i.e. a
66read on this file will return 0 characters.
67The command line arguments appear in this file as a set of
68null-separated strings, with a further null byte after the last string.
69.TP
70.I /proc/[number]/cwd
71This is a link to the current working directory of the process. To find
72out
73the cwd of process 20, for instance, you can do this:
74
75.br
76.nf
77.ft CW
78cd /proc/20/cwd; /bin/pwd
79.fi
80.ft
81
82Note that the pwd command is often a shell builtin, and might
83not work properly. In bash, you may use pwd -P.
84.TP
85.I /proc/[number]/environ
86This file contains the environment for the process.
87The entries are separated by null characters,
88and there may be a null character at the end.
89Thus, to print out the environment of process 1, you would do:
90
91.br
92.nf
93.ft CW
94(cat /proc/1/environ; echo) | tr "\\000" "\\n"
95.fi
96.ft P
97
98(For a reason why one should want to do this, see
99.BR lilo (8).)
100.TP
101.I /proc/[number]/exe
102Under Linux 2.2 and later, this file is a symbolic link
103containing the actual path name of the executed command.
104This symbolic link can be dereferenced normally - attempting to open
105it will open the executable. You can even type
106.I /proc/[number]/exe
107to run another copy of the same process as [number].
108
109Under Linux 2.0 and earlier
110.I /proc/[number]/exe
111is a pointer to the binary which was executed,
112and appears as a symbolic link. A
113.BR readlink (2)
114call on this file under Linux 2.0 returns a string in the format:
115
116[device]:inode
117
118For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
119MFM, etc. drives) minor 01 (first partition on the first drive).
120
121.BR find (1)
122with the -inum option can be used to locate the file.
123.TP
124.I /proc/[number]/fd
125This is a subdirectory containing one entry for each file which the
126process has open, named by its file descriptor, and which is a
127symbolic link to the actual file. Thus, 0 is
128standard input, 1 standard output, 2 standard error, etc.
129
130Programs that will take a filename, but will not take the standard
131input, and which write to a file, but will not send their output to
132standard output, can be effectively foiled this way, assuming that -i
133is the flag designating an input file and -o is the flag designating
134an output file:
135.br
136.nf
137
138\f(CWfoobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...\fR
139
140.fi
141.br
142and you have a working filter.
143.\" The following is not true in my tests (MTK):
144.\" Note that this will not work for
145.\" programs that seek on their files, as the files in the fd directory
146.\" are not seekable.
147
148/proc/self/fd/N is approximately the same as /dev/fd/N in some UNIX
149and UNIX-like systems. Most Linux MAKEDEV scripts symbolically link
150/dev/fd to /proc/self/fd, in fact.
151.TP
152.I /proc/[number]/maps
153A file containing the currently mapped memory regions and their access
154permissions.
155
156The format is:
157
158.nf
159.ft CW
160.in 8n
161address perms offset dev inode pathname
16208048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
16308056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm
16408058000-0805b000 rwxp 00000000 00:00 0
16540000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so
16640013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so
1674001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
16840135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so
1694013e000-40142000 rw-p 00000000 00:00 0
170bffff000-c0000000 rwxp 00000000 00:00 0
171.ft
172.fi
173.in
174
175where address is the address space in the process that it occupies,
176perms is a set of permissions:
177
178.nf
179.in +5
180r = read
181w = write
182x = execute
183s = shared
184p = private (copy on write)
185.fi
186.in
187
188offset is the offset into the file/whatever, dev is the device
189(major:minor), and inode is the inode on that device. 0 indicates
190that no inode is associated with the memory region, as the case would
191be with bss.
192
193Under Linux 2.0 there is no field giving pathname.
194.TP
195.I /proc/[number]/mem
196This file can be used to access the pages of a process's memory through
197.BR open (2),
198.BR read (2),
199and
200.BR fseek (3).
201.TP
202.I /proc/[number]/root
203Unix and Linux support the idea of a per-process root of the
204filesystem, set by the
205.BR chroot (2)
206system call. This file is a symbolic link that points to the process's
207root directory, and behaves as exe, fd/*, etc. do.
208.TP
209.I /proc/[number]/stat
210Status information about the process. This is used by
211.BR ps (1).
212It is defined in
213.IR /usr/src/linux/fs/proc/array.c "."
214
215The fields, in order, with their proper
216.BR scanf (3)
217format specifiers, are:
218.RS
219.TP
220\fIpid\fP %d
221The process id.
222.TP
223\fIcomm\fP %s
224The filename of the executable, in parentheses. This is visible
225whether or not the executable is swapped out.
226.TP
227\fIstate\fP %c
228One character from the string "RSDZTW" where R is running, S is
229sleeping in an interruptible wait, D is waiting in uninterruptible
230disk sleep, Z is zombie, T is traced or stopped (on a signal),
231and W is paging.
232.TP
233\fIppid\fP %d
234The PID of the parent.
235.TP
236\fIpgrp\fP %d
237The process group ID of the process.
238.TP
239\fIsession\fP %d
240The session ID of the process.
241.TP
242.\" tty_nr needs better explanation.
243\fItty_nr\fP %d
244The tty the process uses.
245.TP
246\fItpgid\fP %d
247.\" This field and following, up to and including wchan added 0.99.1
248The process group ID of the process which currently owns the tty that
249the process is connected to.
250.TP
251\fIflags\fP %lu
252The kernel flags word of the process. For bit meanings,
253see the PF_* defines in
254.IR <linux/sched.h> .
255Details depend on the kernel version.
256.TP
257\fIminflt\fP %lu
258The number of minor faults the process has made which have not
259required loading a memory page from disk.
260.TP
261\fIcminflt\fP %lu
262The number of minor faults that the process's
263waited-for children have made.
264.TP
265\fImajflt\fP %lu
266The number of major faults the process has made which have
267required loading a memory page from disk.
268.TP
269\fIcmajflt\fP %lu
270The number of major faults that the process's
271waited-for children have made.
272.TP
273\fIutime\fP %lu
274The number of jiffies that this process has been scheduled in user
275mode.
276.TP
277\fIstime\fP %lu
278The number of jiffies that this process has been scheduled in kernel
279mode.
280.TP
281\fIcutime\fP %ld
282The number of jiffies that this process's
283waited-for children have been scheduled in user mode. (See also
284.BR times (2).)
285.TP
286\fIcstime\fP %ld
287The number of jiffies that this process's
288waited-for children have been scheduled in kernel mode.
289.TP
290\fIpriority\fP %ld
291The standard nice value, plus fifteen. The value is never negative in
292the kernel.
293.TP
294\fInice\fP %ld
8729177b 295The nice value ranges from 19 (nicest) to \-19 (not nice to others).
fea681da
MK
296.TP
297.\" .TP
298.\" \fIcounter\fP %ld
299.\" The current maximum size in jiffies of the process's next timeslice,
300.\" or what is currently left of its current timeslice, if it is the
301.\" currently running process.
302.\" .TP
303.\" \fItimeout\fP %u
304.\" The time in jiffies of the process's next timeout.
305\fI0\fP %ld
306This value is hard coded to 0 as a placeholder for a removed field.
307.TP
308\fIitrealvalue\fP %ld
309The time in jiffies before the next SIGALRM is sent to the process
310due to an interval timer.
311.TP
312\fIstarttime\fP %lu
313The time in jiffies the process started after system boot.
314.TP
315\fIvsize\fP %lu
316Virtual memory size in bytes.
317.TP
318\fIrss\fP %ld
319Resident Set Size: number of pages the process has in real memory,
320minus 3 for administrative purposes. This is just the pages which
321count towards text, data, or stack space. This does not include pages
322which have not been demand-loaded in, or which are swapped out.
323.TP
324\fIrlim\fP %lu
325Current limit in bytes on the rss of the process (usually
3264294967295 on i386).
327.TP
328\fIstartcode\fP %lu
329The address above which program text can run.
330.TP
331\fIendcode\fP %lu
332The address below which program text can run.
333.TP
334\fIstartstack\fP %lu
335The address of the start of the stack.
336.TP
337\fIkstkesp\fP %lu
338The current value of esp (stack pointer), as found in the
339kernel stack page for the process.
340.TP
341\fIkstkeip\fP %lu
342The current EIP (instruction pointer).
343.TP
344\fIsignal\fP %lu
0c6085e0 345The bitmap of pending signals.
fea681da
MK
346.TP
347\fIblocked\fP %lu
0c6085e0 348The bitmap of blocked signals.
fea681da
MK
349.TP
350\fIsigignore\fP %lu
351The bitmap of ignored signals.
352.TP
353\fIsigcatch\fP %lu
0c6085e0 354The bitmap of caught signals.
fea681da
MK
355.TP
356\fIwchan\fP %lu
357This is the "channel" in which the process is waiting. It is the
358address of a system call, and can be looked up in a namelist if you
359need a textual name. (If you have an up-to-date /etc/psdatabase, then
360try \fIps -l\fP to see the WCHAN field in action.)
361.TP
362\fInswap\fP %lu
363Number of pages swapped - not maintained.
364.TP
365\fIcnswap\fP %lu
fb829c74 366Cumulative \fInswap\fP for child processes - not maintained.
fea681da
MK
367.TP
368\fIexit_signal\fP %d
369Signal to be sent to parent when we die.
370.TP
371\fIprocessor\fP %d
372CPU number last executed on.
568105c6
MK
373.TP
374\fIrt_priority\fP %lu (since kernel 2.5.19)
375Real-time scheduling priority (see
376.BR sched_setscheduler (2)).
377.TP
378\fIpolicy\fP %lu (since kernel 2.5.19)
379Scheduling policy (see
380.BR sched_setscheduler (2)).
fea681da
MK
381.RE
382.TP
383.I /proc/[number]/statm
384Provides information about memory status in pages. The columns are:
385 size total program size
386 resident resident set size
387 share shared pages
5d6d14a0
MK
388 text text (code)
389 lib library
390 data data/stack
391 dt dirty pages (unused in Linux 2.6)
fea681da
MK
392.TP
393.I /proc/[number]/status
394Provides much of the information in
395.I /proc/[number]/stat
396and
397.I /proc/[number]/statm
398in a format that's easier for humans to parse.
399.TP
400.I /proc/apm
401Advanced power management version and battery information
402when CONFIG_APM is defined at kernel compilation time.
403.TP
404.I /proc/bus
405Contains subdirectories for installed busses.
406.TP
407.I /proc/bus/pccard
408Subdirectory for pcmcia devices when CONFIG_PCMCIA is set
409at kernel compilation time.
410.TP
411.I /proc/bus/pccard/drivers
412.TP
413.I /proc/bus/pci
414Contains various bus subdirectories and pseudo-files containing
415information about pci busses, installed devices, and device
416drivers. Some of these files are not ASCII.
417.TP
418.I /proc/bus/pci/devices
419Information about pci devices. They may be accessed through
420.BR lspci (8)
421and
422.BR setpci (8).
423.TP
424.I /proc/cmdline
425Arguments passed to the Linux kernel at boot time. Often done via
426a boot manager such as
427.BR lilo (1).
428.TP
429.I /proc/cpuinfo
430This is a collection of CPU and system architecture dependent items,
431for each supported architecture a different list.
432Two common entries are \fIprocessor\fP which gives CPU number and
433\fIbogomips\fP; a system constant that is calculated
434during kernel initialization. SMP machines have information for
435each CPU.
436.TP
437.I /proc/devices
438Text listing of major numbers and device groups. This can be used by
439MAKEDEV scripts for consistency with the kernel.
440.TP
441.IR /proc/diskstats " (since Linux 2.5.69)"
442This file contains disk I/O statistics for each disk device.
443See the kernel source file
444.I Documentation/iostats.txt
445for further information.
446.TP
447.I /proc/dma
448This is a list of the registered \fIISA\fP DMA (direct memory access)
449channels in use.
450.TP
451.I /proc/driver
452Empty subdirectory.
453.TP
454.I /proc/execdomains
455List of the execution domains (ABI personalities).
456.TP
457.I /proc/fb
458Frame buffer information when CONFIG_FB is defined during kernel
459compilation.
460.TP
461.I /proc/filesystems
462A text listing of the filesystems which were compiled into the kernel.
463Incidentally, this is used by
464.BR mount (1)
465to cycle through different filesystems when none is specified.
466.TP
467.I /proc/fs
468Empty subdirectory.
469.TP
470.I /proc/ide
471This directory
472exists on systems with the ide bus. There are directories for each
473ide channel and attached device. Files include:
474
475.nf
476cache buffer size in KB
477capacity number of sectors
478driver driver version
479geometry physical and logical geometry
9fdfa163 480identify in hexadecimal
fea681da
MK
481media media type
482model manufacturer's model number
483settings drive settings
9fdfa163
MK
484smart_thresholds in hexadecimal
485smart_values in hexadecimal
fea681da
MK
486.fi
487
488The
489.BR hdparm (8)
490utility provides access to this information in a friendly format.
491.TP
492.I /proc/interrupts
493This is used to record the number of interrupts per each IRQ on (at
9fdfa163 494least) the i386 architecture. Very easy to read formatting, done in
fea681da
MK
495ASCII.
496.TP
497.I /proc/iomem
498I/O memory map in Linux 2.4.
499.TP
500.I /proc/ioports
501This is a list of currently registered Input-Output port regions that
502are in use.
503.TP
504.IR /proc/kallsyms " (since Linux 2.5.71)"
505This holds the kernel exported symbol definitions used by the
506.BR modules (X)
507tools to dynamically link and bind loadable modules.
508In Linux 2.5.47 and earlier, a similar file with slightly different syntax
509was named
510.IR ksyms .
511.TP
512.I /proc/kcore
513This file represents the physical memory of the system and is stored
514in the ELF core file format. With this pseudo-file, and an unstripped
515kernel (/usr/src/linux/vmlinux) binary, GDB can be used to
516examine the current state of any kernel data structures.
517
518The total length of the file is the size of physical memory (RAM) plus
5194KB.
520.TP
521.I /proc/kmsg
522This file can be used instead of the
523.BR syslog (2)
524system call to read kernel messages. A process must have superuser
525privileges to read this file, and only one process should read this
526file. This file should not be read if a syslog process is running
527which uses the
528.BR syslog (2)
529system call facility to log kernel messages.
530
531Information in this file is retrieved with the
532.BR dmesg (8)
533program.
534.TP
535.IR /proc/ksyms " (Linux 1.1.23-2.5.47)"
536See
537.IR /proc/kallsyms .
538.TP
539.I /proc/loadavg
6b05dc38
MK
540The first three fields in this file are load average figures
541giving the number of jobs in the run queue (state R)
fea681da
MK
542or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
543They are the same as the load average numbers given by
544.BR uptime (1)
545and other programs.
6b05dc38
MK
546The fourth field consists of two numbers separated by a slash (/).
547The first of these is the number of currently executing kernel
548scheduling entities (processes, threads);
549this will be less than or equal to the number of CPUs.
550The value after the slash is the number of kernel scheduling entities
551that currently exist on the system.
552The fifth field is the PID of the process that was most
553recently created on the system.
fea681da
MK
554.TP
555.I /proc/locks
556This file shows current file locks
557.RB ( flock "(2) and " fcntl (2))
558and leases
559.RB ( fcntl (2)).
560.TP
561.I /proc/malloc
562This file is only present if CONFIGDEBUGMALLOC was defined during
563compilation.
564.TP
565.I /proc/meminfo
566This is used by
567.BR free (1)
568to report the amount of free and used memory (both physical and swap)
569on the system as well as the shared memory and buffers used by the
570kernel.
571
572It is in the same format as
573.BR free (1),
574except in bytes rather than KB.
575.TP
576.I /proc/mounts
577This is a list of all the file systems currently mounted on the system.
578The format of this file is documented in
579.IR fstab (5).
580.TP
581.I /proc/modules
582A text list of the modules that have been loaded by the system.
583See also
584.BR lsmod (8).
585.TP
586.I /proc/mtrr
587Memory Type Range Registers.
588See
589.I /usr/src/linux/Documentation/mtrr.txt
590for details.
591.TP
592.I /proc/net
593various net pseudo-files, all of which give the status of some part of
594the networking layer. These files contain ASCII structures and are,
595therefore, readable with cat. However, the standard
596.BR netstat (8)
597suite provides much cleaner access to these files.
598.TP
599.I /proc/net/arp
600This holds an ASCII readable dump of the kernel ARP table used for
601address resolutions. It will show both dynamically learned and
602pre-programmed ARP entries. The format is:
603
604.nf
605.ft CW
606.in 8n
607IP address HW type Flags HW address Mask Device
608192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
609192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
610.ft
611.fi
612.in
613
614Here 'IP address' is the IPv4 address of the machine and the 'HW type'
615is the hardware type of the address from RFC 826. The flags are the internal
616flags of the ARP structure (as defined in /usr/include/linux/if_arp.h) and
617the 'HW address' is the data link layer mapping for that IP address if
618it is known.
619.TP
620.I /proc/net/dev
621The dev pseudo-file contains network device status information. This gives
622the number of received and sent packets, the number of errors and
623collisions
624and other basic statistics. These are used by the
625.BR ifconfig (8)
626program to report device status. The format is:
627
628.nf
629.ft CW
630.in 1n
631Inter-| Receive | Transmit
632 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
633 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
634 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
635 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
636 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
637.in
638.ft
639.fi
640.\" .TP
641.\" .I /proc/net/ipx
642.\" No information.
643.\" .TP
644.\" .I /proc/net/ipx_route
645.\" No information.
646.TP
647.I /proc/net/dev_mcast
648Defined in
649.IR /usr/src/linux/net/core/dev_mcast.c :
650.nf
651.in +5
9fdfa163 652indx interface_name dmi_u dmi_g dmi_address
fea681da
MK
6532 eth0 1 0 01005e000001
6543 eth1 1 0 01005e000001
6554 eth2 1 0 01005e000001
656.in
657.fi
658.TP
659.I /proc/net/igmp
660Internet Group Management Protocol. Defined in
661.IR /usr/src/linux/net/core/igmp.c .
662.TP
663.I /proc/net/rarp
664This file uses the same format as the
665.I arp
666file and contains the current reverse mapping database used to provide
667.BR rarp (8)
668reverse address lookup services. If RARP is not configured into the
669kernel,
670this file will not be present.
671.TP
672.I /proc/net/raw
673Holds a dump of the RAW socket table. Much of the information is not of
674use
675apart from debugging. The 'sl' value is the kernel hash slot for the
676socket,
677the 'local address' is the local address and protocol number pair."St" is
678the internal status of the socket. The "tx_queue" and "rx_queue" are the
679outgoing and incoming data queue in terms of kernel memory usage.
680The "tr", "tm->when", and "rexmits" fields are not used by RAW.
681The uid field holds the creator euid of the socket.
682.\" .TP
683.\" .I /proc/net/route
684.\" No information, but looks similar to
685.\" .BR route (8).
686.TP
687.I /proc/net/snmp
688This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
689management
690information bases for an snmp agent.
691.TP
692.I /proc/net/tcp
693Holds a dump of the TCP socket table. Much of the information is not
694of use apart from debugging. The "sl" value is the kernel hash slot
695for the socket, the "local address" is the local address and port number pair.
696The "remote address" is the remote address and port number pair
697(if connected). 'St' is the internal status of the socket.
698The 'tx_queue' and 'rx_queue' are the
699outgoing and incoming data queue in terms of kernel memory usage.
700The "tr", "tm->when", and "rexmits" fields hold internal information of
701the kernel socket state and are only useful for debugging. The uid field
702holds the creator euid of the socket.
703.TP
704.I /proc/net/udp
705Holds a dump of the UDP socket table. Much of the information is not of
706use apart from debugging. The "sl" value is the kernel hash slot for the
707socket, the "local address" is the local address and port number pair.
708The "remote address" is the remote address and port number pair
709(if connected). "St" is the internal status of the socket.
710The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
711in terms of kernel memory usage. The "tr", "tm->when", and "rexmits" fields
712are not used by UDP. The uid field holds the creator euid of the socket.
713The format is:
714
715.nf
716.ft CW
717.in 1n
718sl local_address rem_address st tx_queue rx_queue tr rexmits tm->when uid
719 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
720 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
721 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
722.in
723.ft
724.fi
725.TP
726.I /proc/net/unix
727Lists the UNIX domain sockets present within the system and their
728status. The format is:
729.nf
730.sp .5
731.ft CW
732Num RefCount Protocol Flags Type St Path
733 0: 00000002 00000000 00000000 0001 03
734 1: 00000001 00000000 00010000 0001 01 /dev/printer
735.ft
736.sp .5
737.fi
738
739Here 'Num' is the kernel table slot number, 'RefCount' is the number
740of users of the socket, 'Protocol' is currently always 0, 'Flags'
741represent the internal kernel flags holding the status of the
742socket. Currently, type is always '1' (Unix domain datagram sockets are
743not yet supported in the kernel). 'St' is the internal state of the
744socket and Path is the bound path (if any) of the socket.
745.TP
746.I /proc/partitions
747Contains major and minor numbers of each partition as well as number
748of blocks and partition name.
749.TP
750.I /proc/pci
751This is a listing of all PCI devices found during kernel initialization
752and their configuration.
753.TP
754.I /proc/scsi
755A directory with the scsi midlevel pseudo-file and various SCSI lowlevel
756driver
757directories, which contain a file for each SCSI host in this system, all
758of
759which give the status of some part of the SCSI IO subsystem.
760These files contain ASCII structures and are, therefore, readable with
761cat.
762
763You can also write to some of the files to reconfigure the subsystem or
764switch
765certain features on or off.
766.TP
767.I /proc/scsi/scsi
768This is a listing of all SCSI devices known to the kernel. The listing is
769similar to the one seen during bootup.
770scsi currently supports only the \fIadd-single-device\fP command which
771allows
772root to add a hotplugged device to the list of known devices.
773
774An
775.B echo 'scsi add-single-device 1 0 5 0' > /proc/scsi/scsi
776will cause
777host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0. If there
778is already a device known on this address or the address is invalid, an
779error will be returned.
780.TP
781.I /proc/scsi/[drivername]
782\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
783aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
784scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
785These directories show up for all drivers that registered at least one
786SCSI
787HBA. Every directory contains one file per registered host. Every
788host-file is named after the number the host was assigned during
789initialization.
790
791Reading these files will usually show driver and host configuration,
792statistics etc.
793
794Writing to these files allows different things on different hosts.
795For example, with the \fIlatency\fP and \fInolatency\fP commands,
796root can switch on and off command latency measurement code in the
797eata_dma driver. With the \fIlockup\fP and \fIunlock\fP commands,
798root can control bus lockups simulated by the scsi_debug driver.
799.TP
800.I /proc/self
801This directory refers to the process accessing the /proc filesystem,
802and is identical to the /proc directory named by the process ID of the
803same process.
804.TP
805.I /proc/slabinfo
806Information about kernel caches. The columns are:
807.nf
808cache-name
809num-active-objs
810total-objs
811object-size
812num-active-slabs
813total-slabs
814num-pages-per-slab
815.fi
816See
817.BR slabinfo (5)
818for details.
819.TP
820.I /proc/stat
821kernel/system statistics. Varies with architecture. Common
822entries include:
823.RS
824.TP
825\fIcpu 3357 0 4313 1362393\fP
826The number of jiffies (1/100ths of a second) that the system spent in
827user mode, user mode with low priority (nice), system mode, and the
828idle task, respectively. The last value should be 100 times the
829second entry in the uptime pseudo-file.
830.TP
831\fIpage 5741 1808\fP
832The number of pages the system paged in and the number that were paged
833out (from disk).
834.TP
835\fIswap 1 0\fP
836The number of swap pages that have been brought in and out.
837.TP
838\fIintr 1462898\fP
839The number of interrupts received from the system boot.
840.TP
841\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
842(major,minor):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
843.TP
844\fIctxt 115315\fP
845The number of context switches that the system underwent.
846.TP
847\fIbtime 769041601\fP
848boot time, in seconds since the epoch (January 1, 1970).
849.TP
850\fIprocesses 86031\fP
851Number of forks since boot.
852.RE
853.TP
854.I /proc/swaps
855Swap areas in use. See also
856.BR swapon (8).
857.TP
858.I /proc/sys
859This directory (present since 1.3.57) contains a number of files
860and subdirectories corresponding to kernel variables.
861These variables can be read and sometimes modified using
862the \fIproc\fP file system, and the
863.BR sysctl (2)
864system call. Presently, there are subdirectories
865.IR abi ", " debug ", " dev ", " fs ", " kernel ", " net ", " proc ", "
866.IR rxrpc ", " sunrpc " and " vm
867that each contain more files and subdirectories.
868.TP
869.I /proc/sys/abi
870This directory may contain files with application binary information.
871On some systems, it is not present.
872.TP
873.I /proc/sys/debug
874This directory may be empty.
875.TP
876.I /proc/sys/dev
877This directory contains device specific information (eg dev/cdrom/info).
878On
879some systems, it may be empty.
880.TP
881.I /proc/sys/fs
882This contains the subdirectory
096a9c01
MK
883.\" FIXME: document /proc/sys/fs/mqueue/
884.\" (see Documentation/filesystems/proc.txt)
fea681da
MK
885.IR binfmt_misc
886and files
887.IR dentry-state ", " dir-notify-enable ", " dquot-nr ", " file-max ", "
888.IR file-nr ", " inode-max ", " inode-nr ", " inode-state ", "
889.IR lease-break-time ", " leases-enable ", " overflowgid ", " overflowuid
890.IR super-max " and " super-nr
891with function fairly clear from the name.
892.TP
893.I /proc/sys/fs/binfmt_misc
894Documentation for files in this directory can in the kernel sources in
895.IR Documentation/binfmt_misc.txt .
896.TP
897.I /proc/sys/fs/dentry-state
898This file contains six numbers,
899.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), "
900want_pages
901(pages requested by system) and two dummy values.
902nr_dentry seems to be 0 all the time.
903nr_unused seems to be the number of unused dentries.
904age_limit is the age in seconds after which dcache entries
905can be reclaimed when memory is short and want_pages is
f59a3f19 906non-zero when the kernel has called shrink_dcache_pages() and the
fea681da
MK
907dcache isn't pruned yet.
908.TP
909.I /proc/sys/fs/dir-notify-enable
910This file can be used to disable or enable the
911.I dnotify
912interface described in
913.BR fcntl (2)
914on a system-wide basis.
915A value of 0 in this file disables the interface,
916and a value of 1 enables it.
917.TP
918.I /proc/sys/fs/dquot-max
919This file shows the maximum number of cached disk quota entries.
920On some (2.4) systems, it is not present.
921If the number of free cached disk quota entries is very low and
922you have some awesome number of simultaneous system users,
923you might want to raise the limit.
924.TP
925.I /proc/sys/fs/dquot-nr
926This file shows the number of allocated disk quota
927entries and the number of free disk quota entries.
928.TP
929.I /proc/sys/fs/file-max
930This file defines
931a system-wide limit on the number of open files for all processes.
932(See also
933.BR setrlimit (2),
934which can be used by a process to set the per-process limit,
935.BR RLIMIT_NOFILE ,
936on the number of files it may open.)
937If you get lots
938of error messages about running out of file handles,
939try increasing this value:
940.br
941
942.br
943.nf
944.ft CW
945echo 100000 > /proc/sys/fs/file-max
946.fi
947.ft
948
949The kernel constant
950.I NR_OPEN
951imposes an upper limit on the value that may be placed in
952.IR file-max .
953
954If you increase
955.IR /proc/sys/fs/file-max ","
956be sure to increase
957.I /proc/sys/fs/inode-max
958to 3-4 times the new
959value of
960.IR /proc/sys/fs/file-max ","
961or you will run out of inodes.
962.TP
963.I /proc/sys/fs/file-nr
964This (read-only) file
965gives the number of files presently opened.
966It contains three numbers: The number of allocated
967file handles, the number of free file handles and the maximum
968number of file handles. The kernel allocates file handles dynamically,
969but it
970doesn't free them again. If the number of allocated files is close to the
971
972maximum, you should consider increasing the maximum.
973When the number of free file handles is
974large, you've encountered a peak in your usage of file
975handles and you probably don't need to increase the maximum.
976.TP
977.I /proc/sys/fs/inode-max
978This file contains the maximum number of in-memory inodes.
979On some (2.4) systems, it may not be
980present. This value should be 3-4 times larger
981than the value in file-max, since stdin, stdout and network sockets also
982need an inode to handle them. When you regularly run
983out of inodes, you need to increase this value.
984.TP
985.I /proc/sys/fs/inode-nr
986This file contains the first two values from inode-state.
987.TP
988.I /proc/sys/fs/inode-state
989This file
990contains seven numbers: nr_inodes, nr_free_inodes, preshrink and four
991dummy
992values.
993nr_inodes is the number of inodes the system has
994allocated. This can be slightly more than inode-max because
995Linux allocates them one pageful at a time.
996nr_free_inodes represents the number of free inodes.
f59a3f19 997preshrink is non-zero when the nr_inodes > inode-max and the
fea681da
MK
998system needs to prune the inode list instead of allocating
999more.
1000.TP
1001.I /proc/sys/fs/lease-break-time
1002This file
1003specifies the grace period that the kernel grants to a process
1004holding a file lease
1005.RB ( fcntl (2))
1006after it has sent a signal to that process notifying it
1007that another process is waiting to open the file.
1008If the lease holder does not remove or downgrade the lease within
1009this grace period, the kernel forcibly breaks the lease.
1010.TP
1011.I /proc/sys/fs/leases-enable
1012This file can be used to enable or disable file leases
1013.RB ( fcntl (2))
1014on a system-wide basis.
1015If this file contains the value 0, leases are disabled.
1016A non-zero value enables leases.
1017.TP
1018.IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid
1019These files
1020allow you to change the value of the fixed UID and GID.
1021The default is 65534.
1022Some filesystems only support 16-bit UIDs and GIDs, although in Linux
1023UIDs and GIDs are 32 bits. When one of these filesystems is mounted
1024with writes enabled, any UID or GID that would exceed 65535 is translated
1025to the overflow value before being written to disk.
1026.TP
1027.I /proc/sys/fs/super-max
1028This file
1029controls the maximum number of superblocks, and
1030thus the maximum number of mounted filesystems the kernel
1031can have. You only need to increase super-max if you need to
1032mount more filesystems than the current value in super-max
1033allows you to.
1034.TP
1035.I /proc/sys/fs/super-nr
1036This file
1037contains the number of filesystems currently mounted.
1038.TP
1039.I /proc/sys/kernel
1040This directory contains files
1041.IR acct ", " cad_pid ", " cap-bound ", "
1042.IR core_pattern ", " core_uses_pid ", "
1043.IR ctrl-alt-del ", " dentry-state ", " domainname ", "
1044.IR hotplug ", " hostname ", "
1045.IR htab-reclaim " (PowerPC only), "
1046.IR java-appletviewer " (binfmt_java, obsolete), "
1047.IR java-interpreter " (binfmt_java, obsolete), " l2cr " (PowerPC only), "
1048.IR modprobe ", " msgmax ", " msgmnb ", "
1049.IR msgmni ", " osrelease ", " ostype ", " overflowgid ", " overflowuid ,
1050.IR panic ", " panic_on_oops ", " pid_max ", "
1051.IR powersave-nap " (PowerPC only), " printk ", " pty ", " random ", "
1052.IR real-root-dev ", " reboot-cmd " (SPARC only), " rtsig-max ", "
1053.IR rtsig-nr ", " sem ", " sg-big-buff ", "
1054.IR shmall ", " shmmax ", " shmmni ", " sysrq ", " tainted ", " threads-max ,
1055.IR version " and " zero-paged " (PowerPC only) "
1056with function fairly clear from the name.
1057.TP
1058.I /proc/sys/kernel/acct
1059This file
1060contains three numbers: highwater, lowwater and frequency.
1061If BSD-style process accounting is enabled these values control
1062its behaviour. If free space on filesystem where the log lives
1063goes below lowwater percent accounting suspends. If free space gets
1064above highwater percent accounting resumes. Frequency determines
1065how often the kernel checks the amount of free space (value is in
1066seconds). Default values are 4, 2 and 30.
1067That is, suspend accounting if <= 2% of space is free; resume it
1068if >= 4% of space is free; consider information about amount of free space
1069valid for 30 seconds.
1070.TP
1071.I /proc/sys/kernel/cap-bound
1072This file holds the value of the kernel
1073.IR "capability bounding set"
1074(expressed as a signed decimal number).
1075This set is ANDed against the capabilities permitted to a process
1076during exec.
1077.TP
1078.I /proc/sys/kernel/core_pattern
1079This file
1080(new in Linux 2.5) provides finer control over the form of
1081a core filename than the obsolete
1082.IR /proc/sys/kernel/core_uses_pid
1083file described below.
1084The name for a core file is controlled by defining a template in
1085.IR /proc/sys/kernel/core_pattern .
1086The template can contain % specifiers which are substituted
1087by the following values when a core file is created:
1088.nf
1089
1090 %% A single % character
1091 %p PID of dumped process
1092 %u real UID of dumped process
1093 %g real GID of dumped process
1094 %s number of signal causing dump
1095 %t time of dump (secs since 0:00h, 1 Jan 1970)
1096 %h hostname (same as the 'nodename'
1097 returned by \fBuname\fP(2))
1098 %e executable filename
1099
1100.fi
1101A single % at the end of the template is dropped from the
1102core filename, as is the combination of a % followed by any
1103character other than those listed above.
1104All other characters in the template become a literal
1105part of the core filename.
1106The maximum size of the resulting core filename is 64 bytes.
1107The default value in this file is "core".
1108For backward compatibility, if
1109.I /proc/sys/kernel/core_pattern
1110does not include "%p" and
1111.I /proc/sys/kernel/core_uses_pid
1112is non-zero, then .PID will be appended to the core filename.
1113.TP
1114.I /proc/sys/kernel/core_uses_pid
1115This file
1116can be used control the naming of a core dump file on Linux 2.4.
1117If this file contains the value 0, then a core dump file is simply named
1118.IR core .
1119If this file contains a non-zero value, then the core dump file includes
1120the process ID in a name of the form
1121.IR core.PID .
1122.TP
1123.I /proc/sys/kernel/ctrl-alt-del
1124This file
1125controls the handling of Ctrl-Alt-Del from the keyboard.
1126When the value in this file is 0, Ctrl-Alt-Del is trapped and
1127sent to the
1128.BR init (1)
1129program to handle a graceful restart.
1130When the value is > 0, Linux's reaction to a Vulcan
1131Nerve Pinch (tm) will be an immediate reboot, without even
1132syncing its dirty buffers.
1133Note: when a program (like dosemu) has the keyboard in 'raw'
1134mode, the ctrl-alt-del is intercepted by the program before it
1135ever reaches the kernel tty layer, and it's up to the program
1136to decide what to do with it.
1137.TP
1138.I /proc/sys/kernel/hotplug
1139This file
1140contains the path for the hotplug policy agent.
1141The default value in this file "/sbin/hotplug".
1142.TP
1143.IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname
1144can be used to set the NIS/YP domainname and the
1145hostname of your box in exactly the same way as the commands
1146domainname and hostname, i.e.:
1147.br
1148
1149.br
1150# echo "darkstar" > /proc/sys/kernel/hostname
1151.br
1152# echo "mydomain" > /proc/sys/kernel/domainname
1153.br
1154
1155.br
1156has the same effect as
1157.br
1158
1159.br
1160# hostname "darkstar"
1161.br
1162# domainname "mydomain"
1163.br
1164
1165.br
1166Note, however, that the classic darkstar.frop.org has the
1167hostname "darkstar" and DNS (Internet Domain Name Server)
1168domainname "frop.org", not to be confused with the NIS (Network
1169Information Service) or YP (Yellow Pages) domainname. These two
1170domain names are in general different. For a detailed discussion
1171see the
1172.BR hostname (1)
1173man page.
1174.TP
1175.I /proc/sys/kernel/htab-reclaim
1176(PowerPC only) If this file is set to a non-zero value,
1177the PowerPC htab
1178(see kernel file Documentation/powerpc/ppc_htab.txt) is pruned
1179each time the system hits the idle loop.
1180.TP
1181.I /proc/sys/kernel/l2cr
1182(PowerPC only) This file
1183contains a flag that controls the L2 cache of G3 processor
f59a3f19 1184boards. If 0, the cache is disabled. Enabled if non-zero.
fea681da
MK
1185.TP
1186.I /proc/sys/kernel/modprobe
1187This file
1188is described by the kernel source file Documentation/kmod.txt.
1189.TP
1190.I /proc/sys/kernel/msgmax
1191This file defines
1192a system-wide limit specifying the maximum number of bytes in
1193a single message written on a System V message queue.
1194.TP
1195.I /proc/sys/kernel/msgmni
1196This file defines the system-wide limit on the number of
1197message queue identifiers.
1198(This file is only present in Linux 2.4 onwards.)
1199.TP
1200.I /proc/sys/kernel/msgmnb
568105c6 1201This file defines a system-wide parameter used to initialise the
fea681da 1202.I msg_qbytes
568105c6 1203setting for subsequently created message queues.
fea681da
MK
1204The
1205.I msg_qbytes
1206setting specifies the maximum number of bytes that may be written to the
1207message queue.
1208.TP
1209.IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease
1210These files
1211give substrings of
1212.IR /proc/version .
1213.TP
1214.IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid
1215These files duplicate the files
1216.I /proc/sys/fs/overflowgid
1217and
1218.IR /proc/sys/fs/overflowuid .
1219.TP
1220.I /proc/sys/kernel/panic
1221gives read/write access to the kernel variable
1222.IR panic_timeout .
f59a3f19 1223If this is zero, the kernel will loop on a panic; if non-zero
fea681da
MK
1224it indicates that the kernel should autoreboot after this number
1225of seconds. When you use the
1226software watchdog device driver, the recommended setting is 60.
1227.TP
1228.I /proc/sys/kernel/panic_on_oops
1229This file (new in Linux 2.5) controls the kernel's behaviour when an oops
1230or
1231BUG is encountered. If this file contains 0, then the system
1232tries to continue operation. If it contains 1, then the system
1233delays a few seconds (to give klogd time to record the oops output)
1234and then panics.
1235If the
1236.I /proc/sys/kernel/panic
1237file is also non-zero then the machine will be rebooted.
1238.TP
1239.I /proc/sys/kernel/pid_max
1240This file
1241(new in Linux 2.5)
1242specifies the value at which PIDs wrap around
1243(i.e., the value in this file is one greater than the maximum PID).
1244The default value for this file, 32768,
1245results in the same range of PIDs as on earlier kernels.
1246The value in this file can be set to any value up to 2^22
1247(PID_MAX_LIMIT, approximately 4 million).
1248.TP
1249.IR /proc/sys/kernel/powersave-nap " (PowerPC only)"
1250This file
1251contains a flag. If set, Linux-PPC will use the 'nap' mode of
1252powersaving,
1253otherwise the 'doze' mode will be used.
1254.TP
1255.I /proc/sys/kernel/printk
1256The four values in this file
1257are console_loglevel, default_message_loglevel, minimum_console_level and
1258default_console_loglevel.
1259These values influence printk() behavior when printing or
1260logging error messages. See
1261.BR syslog (2)
1262for more info on the different loglevels.
1263Messages with a higher priority than
1264console_loglevel will be printed to the console.
1265Messages without an explicit priority
1266will be printed with priority default_message_level.
1267minimum_console_loglevel is the minimum (highest) value to which
1268console_loglevel can be set.
1269default_console_loglevel is the default value for console_loglevel.
1270.TP
1271.IR /proc/sys/kernel/pty " (since Linux 2.6.4)"
1272This directory
1273contains two files relating to the number of Unix 98
1274pseudo-terminals (see
1275.BR pts (4))
1276on the system.
1277.TP
1278.I /proc/sys/kernel/pty/max
1279This file defines the maximum number of pseudo-terminals.
1280.TP
1281.I /proc/sys/kernel/pty/nr
1282This read-only file
1283indicates how many pseudo-terminals are currently in use.
1284.TP
1285.\" FIXME say more about random
1286.I /proc/sys/kernel/random
1287This directory
1288contains various parameters controlling the operation of the file
1289.IR /dev/random .
1290.TP
1291.I /proc/sys/kernel/real-root-dev
1292This file
1293is documented in the kernel source file Documentation/initrd.txt.
1294.TP
1295.IR /proc/sys/kernel/reboot-cmd " (Sparc only) "
1296This file seems to be a way to give an argument to the SPARC
1297ROM/Flash boot loader. Maybe to tell it what to do after
1298rebooting?
1299.TP
1300.I /proc/sys/kernel/rtsig-max
70556c17
MK
1301(Only in kernels up to and including 2.6.7; see
1302.BR setrlimit (2))
fea681da
MK
1303This file can be used to tune the maximum number
1304of POSIX realtime (queued) signals that can be outstanding
1305in the system.
1306.TP
1307.I /proc/sys/kernel/rtsig-nr
70556c17 1308(Only in kernels up to and including 2.6.7.)
fea681da
MK
1309This file shows the number POSIX realtime signals currently queued.
1310.TP
1311.IR /proc/sys/kernel/sem " (since Linux 2.4)"
1312This file contains 4 numbers defining limits for System V IPC semaphores.
1313These fields are, in order:
1314.RS
1315.IP SEMMSL 8
1316The maximum semaphores per semaphore set.
1317.IP SEMMNS 8
1318A system-wide limit on the number of semaphores in all semaphore sets.
1319.IP SEMOPM 8
1320The maximum number of operations that may be specified in a
1321.BR semop (2)
1322call.
1323.IP SEMMNI 8
1324A system-wide limit on the maximum number of semaphore identifiers.
1325.RE
1326.TP
1327.I /proc/sys/kernel/sg-big-buff
1328This file
1329shows the size of the generic SCSI device (sg) buffer.
1330You can't tune it just yet, but you could change it on
1331compile time by editing include/scsi/sg.h and changing
1332the value of SG_BIG_BUFF. However, there shouldn't be any reason to
1333change
1334this value.
1335.TP
1336.I /proc/sys/kernel/shmall
1337This file
1338contains the system-wide limit on the total number of pages of
1339System V shared memory.
1340.TP
1341.I /proc/sys/kernel/shmmax
1342This file
1343can be used to query and set the run time limit
1344on the maximum (System V IPC) shared memory segment size that can be
1345created.
1346Shared memory segments up to 1Gb are now supported in the
1347kernel. This value defaults to SHMMAX.
1348.TP
1349.I /proc/sys/kernel/shmmni
1350(available in Linux 2.4 and onwards)
1351This file
1352specifies the system-wide maximum number of System V shared memory
1353segments that can be created.
1354.TP
1355.I /proc/sys/kernel/version
1356contains a string like:
1357.br
1358
1359.br
1360#5 Wed Feb 25 21:49:24 MET 1998.TP
1361.br
1362
1363.br
1364The '#5' means that
1365this is the fifth kernel built from this source base and the
1366date behind it indicates the time the kernel was built.
1367.TP
1368.IR /proc/sys/kernel/zero-paged " (PowerPC only) "
1369This file
1370contains a flag. When enabled (non-zero), Linux-PPC will pre-zero pages in
1371the idle loop, possibly speeding up get_free_pages.
1372.TP
1373.I /proc/sys/net
1374This directory contains networking stuff.
81c6dd6c
MK
1375Explanations for some of the files under this directory can be found in
1376.BR tcp (7)
1377and
1378.BR ip (7).
fea681da
MK
1379.TP
1380.I /proc/sys/proc
1381This directory may be empty.
1382.TP
1383.I /proc/sys/sunrpc
1384This directory supports Sun remote procedure call for network file system
1385(NFS). On some systems, it is not present.
1386.TP
1387.I /proc/sys/vm
1388This directory contains files for memory management tuning, buffer and
1389cache
1390management.
1391.TP
1392.I /proc/sys/vm/overcommit_memory
1393This file contains the kernel virtual memory accounting mode. Values are:
1394.br
13950: heuristic overcommit (this is the default)
1396.br
13971: always overcommit, never check
1398.br
13992: always check, never overcommit
1400.br
1401In mode 0, calls of
1402.BR mmap (2)
1403with MAP_NORESERVE set are not checked, and the default check is very weak,
1404leading to the risk of getting a process "OOM-killed".
f59a3f19 1405Under Linux 2.4 any non-zero value implies mode 1.
fea681da
MK
1406In mode 2 (available since Linux 2.6), the total virtual address space
1407on the system is limited to (SS + RAM*(r/100)),
1408where SS is the size of the swap space, and RAM
1409is the size of the physical memory, and r is the contents of the file
1410.IR /proc/sys/vm/overcommit_ratio .
1411.TP
1412.I /proc/sys/vm/overcommit_ratio
1413See the description of
1414.IR /proc/sys/vm/overcommit_memory .
1415.TP
1416.I /proc/sysvipc
1417Subdirectory containing the pseudo-files
1418.IR msg ", " sem " and " shm "."
1419These files list the System V Interprocess Communication (IPC) objects
1420(respectively: message queues, semaphores, and shared memory)
1421that currently exist on the system,
1422providing similar information to that available via
1423.BR ipcs (1).
1424These files have headers and are formatted (one IPC object per line)
1425for easy understanding.
1426.BR ipc (5)
1427provides further background on the information shown by these files.
1428.TP
1429.I /proc/tty
9fdfa163 1430Subdirectory containing the pseudo-files and subdirectories for
fea681da
MK
1431tty drivers and line disciplines.
1432.TP
1433.I /proc/uptime
1434This file contains two numbers: the uptime of the system (seconds),
1435and the amount of time spent in idle process (seconds).
1436.TP
1437.I /proc/version
1438This string identifies the kernel version that is currently running.
1439It includes the contents of /proc/sys/ostype, /proc/sys/osrelease and
1440/proc/sys/version. For example:
1441.nf
1442.in -2
1443.ft CW
1444Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994
1445.ft
1446.in +2
1447.fi
1448.TP
1449.IR /proc/vmstat " (since Linux 2.6)"
1450This file displays various virtual memory statistics.
1451
1452.RE
1453.RE
1454.SH "SEE ALSO"
1455.BR cat (1),
1456.BR find (1),
1457.BR free (1),
1458.BR mount (1),
1459.BR ps (1),
1460.BR tr (1),
1461.BR uptime (1),
1462.BR chroot (2),
1463.BR mmap (2),
1464.BR readlink (2),
1465.BR syslog (2),
1466.BR slabinfo (5),
1467.BR hier (7),
1468.BR arp (8),
1469.BR dmesg (8),
1470.BR hdparm (8),
1471.BR ifconfig (8),
1472.BR init (8),
1473.BR lsmod (8),
1474.BR lspci (8),
1475.BR netstat (8),
1476.BR procinfo (8),
1477.BR route (8)
1478.br
1479.I /usr/src/linux/Documentation/filesystems/proc.txt
1480.SH CAVEATS
1481Note that many strings (i.e., the environment and command line) are in
1482the internal format, with sub-fields terminated by NUL bytes, so you
1483may find that things are more readable if you use \fIod -c\fP or \fItr
1484"\\000" "\\n"\fP to read them.
1485Alternatively, \fIecho `cat <file>`\fP works well.
1486
1487This manual page is incomplete, possibly inaccurate, and is the kind
1488of thing that needs to be updated very often.
1489.SH ACKNOWLEDGEMENTS
1490The material on /proc/sys/fs and /proc/sys/kernel is closely based on
1491kernel source documentation files written by Rik van Riel.