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