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