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