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