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