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