]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com) |
b4e9ee8f | 2 | .\" and Copyright (C) 2002-2008 Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da MK |
3 | .\" with networking additions from Alan Cox (A.Cox@swansea.ac.uk) |
4 | .\" and scsi additions from Michael Neuffer (neuffer@mail.uni-mainz.de) | |
5 | .\" and sysctl additions from Andries Brouwer (aeb@cwi.nl) | |
6 | .\" and System V IPC (as well as various other) additions from | |
c11b1abf | 7 | .\" Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da MK |
8 | .\" |
9 | .\" This is free documentation; you can redistribute it and/or | |
10 | .\" modify it under the terms of the GNU General Public License as | |
11 | .\" published by the Free Software Foundation; either version 2 of | |
12 | .\" the License, or (at your option) any later version. | |
13 | .\" | |
14 | .\" The GNU General Public License's references to "object code" | |
15 | .\" and "executables" are to be interpreted as the output of any | |
16 | .\" document formatting or typesetting system, including | |
17 | .\" intermediate and printed output. | |
18 | .\" | |
19 | .\" This manual is distributed in the hope that it will be useful, | |
20 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | .\" GNU General Public License for more details. | |
23 | .\" | |
24 | .\" You should have received a copy of the GNU General Public | |
25 | .\" License along with this manual; if not, write to the Free | |
26 | .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, | |
27 | .\" USA. | |
28 | .\" | |
29 | .\" Modified 1995-05-17 by faith@cs.unc.edu | |
30 | .\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com). | |
31 | .\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl | |
32 | .\" Modified 2001-12-16 by rwhron@earthlink.net | |
33 | .\" Modified 2002-07-13 by jbelton@shaw.ca | |
34 | .\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25 | |
c11b1abf | 35 | .\" by Michael Kerrisk <mtk.manpages@gmail.com> |
5d6d14a0 MK |
36 | .\" 2004-11-17, mtk -- updated notes on /proc/loadavg |
37 | .\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8 | |
568105c6 MK |
38 | .\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list |
39 | .\" 2005-05-12, mtk, updated 'stat' | |
6d64ca9c | 40 | .\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/* |
363f747c MK |
41 | .\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable |
42 | .\" 2005-09-19, mtk, added /proc/zoneinfo | |
b4e9ee8f | 43 | .\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7. |
16b5f7ba | 44 | .\" 2008-06-05, mtk, Added /proc/PID/oom_score, /proc/PID/oom_adj, |
c3d9780d | 45 | .\" /proc/PID/limits, /proc/PID/mountinfo, /proc/PID/mountstats, |
b4e9ee8f | 46 | .\" and /proc/PID/fdinfo/*. |
16b5f7ba | 47 | .\" 2008-06-19, mtk, Documented /proc/PID/status. |
cc2d5c36 | 48 | .\" 2008-07-15, mtk, added /proc/config.gz |
363f747c | 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. |
cc2d5c36 | 55 | .\" Needs CONFIG_VMCORE |
8cf9de1b | 56 | .\" |
c13182ef MK |
57 | .\" FIXME cross check against Documentation/filesystems/proc.txt |
58 | .\" to see what information could be imported from that file | |
c533af9d | 59 | .\" into this file. |
fea681da | 60 | .\" |
610f75cc | 61 | .TH PROC 5 2008-08-13 "Linux" "Linux Programmer's Manual" |
fea681da | 62 | .SH NAME |
24d01c53 | 63 | proc \- process information pseudo-file system |
fea681da MK |
64 | .SH DESCRIPTION |
65 | The | |
66 | .I proc | |
24d01c53 | 67 | file system is a pseudo-file system which is used as an interface to |
c13182ef MK |
68 | kernel data structures. |
69 | It is commonly mounted at | |
fea681da | 70 | .IR /proc . |
c13182ef | 71 | Most of it is read-only, but some files allow kernel variables to be |
fea681da MK |
72 | changed. |
73 | .LP | |
743638fd MK |
74 | The following outline gives a quick tour through the |
75 | .I /proc | |
76 | hierarchy. | |
fea681da MK |
77 | .PD 1 |
78 | .TP | |
79 | .I /proc/[number] | |
80 | There is a numerical subdirectory for each running process; the | |
81 | subdirectory is named by the process ID. | |
82 | Each such subdirectory contains the following | |
83 | pseudo-files and directories. | |
b4e9ee8f MK |
84 | .\" FIXME Describe /proc/[number]/attr and |
85 | .\" /proc/PID/task/TID/attr | |
86 | .\" This is a directory | |
87 | .\" Added in ??? | |
88 | .\" CONFIG_SECURITY | |
89 | .\" | |
fea681da | 90 | .TP |
857f1942 MK |
91 | .IR /proc/[number]/auxv " (since 2.6.0-test7)" |
92 | This contains the contents of the ELF interpreter information passed | |
c13182ef | 93 | to the process at exec time. |
857f1942 | 94 | The format is one \fIunsigned long\fP ID |
c13182ef | 95 | plus one \fIunsigned long\fP value for each entry. |
857f1942 | 96 | The last entry contains two zeros. |
b4e9ee8f MK |
97 | .\" FIXME Describe /proc/[number]/cgroup and |
98 | .\" /proc/PID/task/TID/cgroup | |
99 | .\" Info in Documentation/cgroups.txt | |
100 | .\" Added in 2.6.24 | |
101 | .\" CONFIG_CGROUPS | |
102 | .\" | |
103 | .\" FIXME Describe /proc/[number]/clear_refs | |
104 | .\" Added in 2.6.22 | |
105 | .\" "Clears page referenced bits shown in smaps output" | |
106 | .\" write-only | |
107 | .\" CONFIG_PROC_PAGE_MONITOR | |
857f1942 | 108 | .TP |
fea681da | 109 | .I /proc/[number]/cmdline |
b447cd58 MK |
110 | This holds the complete command line for the process, |
111 | unless the process is a zombie. | |
112 | .\" In 2.3.26, this also used to be true if the process was swapped out. | |
113 | In the latter case, there is nothing in this file: | |
75b94dc3 | 114 | that is, a read on this file will return 0 characters. |
b447cd58 | 115 | The command-line arguments appear in this file as a set of |
59a40ed7 MK |
116 | null-separated strings, |
117 | with a further null byte (\(aq\\0\(aq) after the last string. | |
fea681da | 118 | .TP |
b4e9ee8f MK |
119 | .IR /proc/[number]/coredump_filter " (since kernel 2.6.23)" |
120 | See | |
121 | .BR core (5). | |
5c411b17 MK |
122 | .TP |
123 | .IR /proc/[number]/cpuset " (since kernel 2.6.12)" | |
124 | .\" and/proc/PID/task/TID/cpuset | |
125 | See | |
126 | .BR cpuset (7). | |
b4e9ee8f | 127 | .TP |
fea681da | 128 | .I /proc/[number]/cwd |
c13182ef | 129 | This is a symbolic link to the current working directory of the process. |
59a40ed7 MK |
130 | To find out the current working directory of process 20, |
131 | for instance, you can do this: | |
fea681da | 132 | |
59a40ed7 | 133 | .in +4n |
fea681da | 134 | .nf |
fea681da MK |
135 | cd /proc/20/cwd; /bin/pwd |
136 | .fi | |
59a40ed7 | 137 | .in |
fea681da | 138 | |
c13182ef MK |
139 | Note that the |
140 | .I pwd | |
e7b489f0 | 141 | command is often a shell built-in, and might |
c13182ef | 142 | not work properly. |
743638fd MK |
143 | In |
144 | .BR bash (1), | |
145 | you may use | |
146 | .IR "pwd\ \-P" . | |
afcaf646 MK |
147 | |
148 | .\" The following was still true as at kernel 2.6.13 | |
c13182ef MK |
149 | In a multithreaded process, the contents of this symbolic link |
150 | are not available if the main thread has already terminated | |
afcaf646 | 151 | (typically by calling |
59a40ed7 | 152 | .BR pthread_exit (3)). |
fea681da MK |
153 | .TP |
154 | .I /proc/[number]/environ | |
155 | This file contains the environment for the process. | |
f81fb444 | 156 | The entries are separated by null bytes (\(aq\\0\(aq), |
b4e9ee8f | 157 | and there may be a null byte at the end. |
fea681da | 158 | Thus, to print out the environment of process 1, you would do: |
a08ea57c | 159 | .in +4n |
fea681da | 160 | .nf |
a08ea57c | 161 | |
fea681da MK |
162 | .ft CW |
163 | (cat /proc/1/environ; echo) | tr "\\000" "\\n" | |
164 | .fi | |
165 | .ft P | |
a08ea57c | 166 | .in |
fea681da MK |
167 | |
168 | (For a reason why one should want to do this, see | |
f41d1d3d MK |
169 | .BR lilo (8) |
170 | or | |
171 | .BR grub (8).) | |
fea681da MK |
172 | .TP |
173 | .I /proc/[number]/exe | |
174 | Under Linux 2.2 and later, this file is a symbolic link | |
2d7195b8 | 175 | containing the actual pathname of the executed command. |
c13182ef MK |
176 | This symbolic link can be dereferenced normally; attempting to open |
177 | it will open the executable. | |
178 | You can even type | |
fea681da | 179 | .I /proc/[number]/exe |
c13182ef | 180 | to run another copy of the same executable as is being run by |
6931a324 | 181 | process [number]. |
afcaf646 | 182 | .\" The following was still true as at kernel 2.6.13 |
c13182ef MK |
183 | In a multithreaded process, the contents of this symbolic link |
184 | are not available if the main thread has already terminated | |
afcaf646 MK |
185 | (typically by calling |
186 | .BR pthread_exit (3)). | |
fea681da MK |
187 | |
188 | Under Linux 2.0 and earlier | |
189 | .I /proc/[number]/exe | |
c13182ef MK |
190 | is a pointer to the binary which was executed, |
191 | and appears as a symbolic link. | |
192 | A | |
fea681da MK |
193 | .BR readlink (2) |
194 | call on this file under Linux 2.0 returns a string in the format: | |
195 | ||
59a40ed7 | 196 | [device]:inode |
fea681da MK |
197 | |
198 | For example, [0301]:1502 would be inode 1502 on device major 03 (IDE, | |
199 | MFM, etc. drives) minor 01 (first partition on the first drive). | |
200 | ||
201 | .BR find (1) | |
59a40ed7 MK |
202 | with the |
203 | .I \-inum | |
204 | option can be used to locate the file. | |
fea681da MK |
205 | .TP |
206 | .I /proc/[number]/fd | |
207 | This is a subdirectory containing one entry for each file which the | |
208 | process has open, named by its file descriptor, and which is a | |
c13182ef MK |
209 | symbolic link to the actual file. |
210 | Thus, 0 is standard input, 1 standard output, 2 standard error, etc. | |
fea681da | 211 | |
afcaf646 MK |
212 | .\" The following was still true as at kernel 2.6.13 |
213 | In a multithreaded process, the contents of this directory | |
c13182ef | 214 | are not available if the main thread has already terminated |
afcaf646 MK |
215 | (typically by calling |
216 | .BR pthread_exit (3)). | |
217 | ||
59a40ed7 MK |
218 | Programs that will take a filename as a command-line argument, |
219 | but will not take input from standard input if no argument is supplied, | |
220 | or that write to a file named as a command-line argument, | |
221 | but will not send their output to standard output | |
222 | if no argument is supplied, can nevertheless be made to use | |
223 | standard input or standard out using | |
c4fe9aef | 224 | .IR /proc/[number]/fd . |
59a40ed7 MK |
225 | For example, assuming that |
226 | .I \-i | |
227 | is the flag designating an input file and | |
228 | .I \-o | |
229 | is the flag designating an output file: | |
a08ea57c | 230 | .in +4n |
fea681da MK |
231 | .nf |
232 | ||
59a40ed7 | 233 | foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ... |
fea681da | 234 | .fi |
a08ea57c MK |
235 | .in |
236 | ||
fea681da MK |
237 | and you have a working filter. |
238 | .\" The following is not true in my tests (MTK): | |
239 | .\" Note that this will not work for | |
240 | .\" programs that seek on their files, as the files in the fd directory | |
241 | .\" are not seekable. | |
242 | ||
59a40ed7 MK |
243 | .I /proc/self/fd/N |
244 | is approximately the same as | |
245 | .I /dev/fd/N | |
8ee190da | 246 | in some Unix and Unix-like systems. |
c13182ef | 247 | Most Linux MAKEDEV scripts symbolically link |
59a40ed7 MK |
248 | .I /dev/fd |
249 | to | |
250 | .IR /proc/self/fd , | |
251 | in fact. | |
252 | ||
253 | Most systems provide symbolic links | |
254 | .IR /dev/stdin , | |
255 | .IR /dev/stdout , | |
256 | and | |
257 | .IR /dev/stderr , | |
258 | which respectively link to the files | |
259 | .IR 0 , | |
260 | .IR 1 , | |
261 | and | |
262 | .IR 2 | |
263 | in | |
264 | .IR /proc/self/fd . | |
265 | Thus the example command above could be written as: | |
266 | .in +4n | |
267 | .nf | |
268 | ||
269 | foobar \-i /dev/stdin \-o /dev/stdout ... | |
270 | .fi | |
271 | .in | |
6aefb6df | 272 | .\" FIXME Describe /proc/[number]/loginuid |
b877b392 | 273 | .\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL |
b4e9ee8f MK |
274 | .\" CONFIG_AUDITSYSCALL |
275 | .TP | |
59a40ed7 | 276 | .IR /proc/[number]/fdinfo/ " (since kernel 2.6.22)" |
b4e9ee8f MK |
277 | This is a subdirectory containing one entry for each file which the |
278 | process has open, named by its file descriptor. | |
279 | The contents of each file can be read to obtain information | |
280 | about the corresponding file descriptor, for example: | |
281 | .in +4n | |
282 | .nf | |
283 | ||
284 | $ cat /proc/12015/fdinfo/4 | |
285 | pos: 1000 | |
286 | flags: 01002002 | |
287 | .fi | |
288 | .in | |
289 | ||
290 | The | |
291 | .I pos | |
292 | field is a decimal number showing the current file offset. | |
293 | The | |
294 | .I flags | |
295 | field is an octal number that displays the | |
296 | file access mode and file status flags (see | |
297 | .BR open (2)). | |
298 | ||
299 | The files in this directory are readable only by the owner of the process. | |
300 | .\" FIXME document /proc/[number]/io | |
301 | .\" .TP | |
302 | .\" .IR /proc/[number]/io " (since kernel 2.6.20)" | |
303 | .TP | |
304 | .IR /proc/[number]/limits " (since kernel 2.6.24)" | |
305 | This file displays the soft limit, hard limit, and units of measurement | |
306 | for each of the process's resource limits (see | |
59a40ed7 | 307 | .BR getrlimit (2)). |
b4e9ee8f | 308 | The file is protected to only allow reading by the real UID of the process. |
fea681da MK |
309 | .TP |
310 | .I /proc/[number]/maps | |
311 | A file containing the currently mapped memory regions and their access | |
312 | permissions. | |
313 | ||
314 | The format is: | |
315 | ||
316 | .nf | |
317 | .ft CW | |
3bc960c2 MK |
318 | address perms offset dev inode pathname |
319 | 08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm | |
320 | 08056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm | |
fea681da | 321 | 08058000-0805b000 rwxp 00000000 00:00 0 |
3bc960c2 MK |
322 | 40000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so |
323 | 40013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so | |
324 | 4001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so | |
325 | 40135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so | |
fea681da MK |
326 | 4013e000-40142000 rw-p 00000000 00:00 0 |
327 | bffff000-c0000000 rwxp 00000000 00:00 0 | |
328 | .ft | |
329 | .fi | |
fea681da | 330 | |
59a40ed7 MK |
331 | where "address" is the address space in the process that it occupies, |
332 | "perms" is a set of permissions: | |
fea681da MK |
333 | |
334 | .nf | |
335 | .in +5 | |
336 | r = read | |
337 | w = write | |
338 | x = execute | |
339 | s = shared | |
340 | p = private (copy on write) | |
341 | .fi | |
342 | .in | |
343 | ||
59a40ed7 MK |
344 | "offset" is the offset into the file/whatever, "dev" is the device |
345 | (major:minor), and "inode" is the inode on that device. | |
346 | 0 indicates that no inode is associated with the memory region, | |
347 | as the case would be with BSS (uninitialized data). | |
fea681da MK |
348 | |
349 | Under Linux 2.0 there is no field giving pathname. | |
350 | .TP | |
351 | .I /proc/[number]/mem | |
352 | This file can be used to access the pages of a process's memory through | |
353 | .BR open (2), | |
354 | .BR read (2), | |
355 | and | |
ccb2bb0d | 356 | .BR lseek (2). |
b4e9ee8f MK |
357 | .TP |
358 | .IR /proc/[number]/mountinfo " (since Linux 2.6.26)" | |
359 | .\" This info adapted from Documentation/filesystems/proc.txt | |
360 | This file contains information about mount points. | |
361 | It contains lines of the form: | |
362 | .nf | |
363 | .ft CW | |
b4e9ee8f MK |
364 | |
365 | 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue | |
366 | (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) | |
b4e9ee8f MK |
367 | .ft |
368 | .fi | |
369 | .IP | |
370 | The numbers in parentheses are labels for the descriptions below: | |
3bc960c2 | 371 | .RS 7 |
b4e9ee8f MK |
372 | .TP 5 |
373 | (1) | |
374 | mount ID: unique identifier of the mount (may be reused after | |
375 | .BR umount (2)). | |
376 | .TP | |
377 | (2) | |
378 | parent ID: ID of parent mount (or of self for the top of the mount tree). | |
379 | .TP | |
380 | (3) | |
381 | major:minor: value of | |
382 | .I st_dev | |
383 | for files on file system (see | |
384 | .BR stat (2)). | |
385 | .TP | |
386 | (4) | |
387 | root: root of the mount within the file system. | |
388 | .TP | |
389 | (5) | |
390 | mount point: mount point relative to the process's root. | |
391 | .TP | |
392 | (6) | |
393 | mount options: per-mount options. | |
394 | .TP | |
395 | (7) | |
396 | optional fields: zero or more fields of the form "tag[:value]". | |
397 | .TP | |
398 | (8) | |
399 | separator: marks the end of the optional fields. | |
400 | .TP | |
401 | (9) | |
402 | file system type: name of file system in the form "type[.subtype]". | |
403 | .TP | |
404 | (10) | |
405 | mount source: file system-specific information or "none". | |
406 | .TP | |
407 | (11) | |
408 | super options: per-super block options. | |
409 | .RE | |
410 | .IP | |
411 | Parsers should ignore all unrecognized optional fields. | |
412 | Currently the possible optional fields are: | |
413 | .RS 12 | |
414 | .TP 18 | |
415 | shared:X | |
416 | mount is shared in peer group X | |
417 | .TP | |
418 | master:X | |
419 | mount is slave to peer group X | |
420 | .TP | |
421 | propagate_from:X | |
422 | mount is slave and receives propagation from peer group X (*) | |
423 | .TP | |
424 | unbindable | |
425 | mount is unbindable | |
426 | .RE | |
427 | .IP | |
428 | (*) X is the closest dominant peer group under the process's root. | |
429 | If X is the immediate master of the mount, | |
430 | or if there is no dominant peer group under the same root, | |
431 | then only the "master:X" field is present | |
432 | and not the "propagate_from:X" field. | |
433 | ||
434 | For more information on mount propagation see: | |
435 | .I Documentation/filesystems/sharedsubtree.txt | |
436 | in the kernel source tree. | |
437 | .TP | |
438 | .IR /proc/[number]/mountstats " (since Linux 2.6.17)" | |
439 | This file system exports information (statistics, configuration information) | |
440 | about the mount points in the process's name space. | |
441 | Lines in this file have the form: | |
442 | .nf | |
443 | ||
444 | device /dev/sda7 mounted on /home with fstype ext3 [statistics] | |
445 | ( 1 ) ( 2 ) (3 ) (4) | |
446 | .fi | |
447 | .IP | |
448 | The fields in each line are: | |
3bc960c2 | 449 | .RS 7 |
b4e9ee8f MK |
450 | .TP 5 |
451 | (1) | |
452 | The name of the mounted device | |
453 | (or "nodevice" if there is no corresponding device). | |
454 | .TP | |
455 | (2) | |
456 | The mount point within the file system tree. | |
457 | .TP | |
458 | (3) | |
459 | The file system type. | |
460 | .TP | |
461 | (4) | |
462 | Optional statistics and configuration information. | |
463 | Currently (as at Linux 2.6.26), only NFS file systems export | |
464 | information via this field. | |
465 | .RE | |
466 | .IP | |
467 | This file is only readable by the owner of the process. | |
468 | .\" | |
469 | .\" FIXME Describe /proc/[number]/mountstats and | |
470 | .\" /proc/PID/task/TID/mountstats | |
471 | .\" Some information can be found in the 2.6.17 change log. | |
472 | .\" Added in 2.6.17 | |
473 | .\" | |
474 | .TP | |
7388733a | 475 | .IR /proc/[number]/numa_maps " (since Linux 2.6.14)" |
610f75cc MK |
476 | See |
477 | .BR numa (7). | |
7388733a | 478 | .TP |
b4e9ee8f | 479 | .IR /proc/[number]/oom_adj " (since Linux 2.6.11)" |
b4e9ee8f | 480 | This file can be used to adjust the score used to select which process |
0425de01 | 481 | should be killed in an out-of-memory (OOM) situation. |
b4e9ee8f MK |
482 | The kernel uses this value for a bit-shift operation of the process's |
483 | .IR oom_score | |
484 | value: | |
5b8dbfd4 MK |
485 | valid values are in the range \-16 to +15, |
486 | plus the special value \-17, | |
b4e9ee8f MK |
487 | which disables OOM-killing altogether for this process. |
488 | A positive score increases the likelihood of this | |
489 | process being killed by the OOM-killer; | |
490 | a negative score decreases the likelihood. | |
491 | The default value for this file is 0; | |
492 | a new process inherits its parent's | |
493 | .I oom_adj | |
494 | setting. | |
495 | A process must be privileged | |
496 | .RB ( CAP_SYS_RESOURCE ) | |
497 | to update this file. | |
498 | .TP | |
499 | .IR /proc/[number]/oom_score " (since Linux 2.6.11)" | |
500 | .\" See mm/oom_kill.c::badness() in the 2.6.25 sources | |
501 | This file displays the current score that the kernel gives to | |
502 | this process for the purpose of selecting a process | |
503 | for the OOM-killer. | |
504 | A higher score means that the process is more likely to be | |
505 | selected by the OOM-killer. | |
506 | The basis for this score is the amount of memory used by the process, | |
507 | with increases (+) or decreases (\-) for factors including: | |
508 | .\" See mm/oom_kill.c::badness() in the 2.6.25 sources | |
509 | .RS | |
510 | .IP * 2 | |
511 | whether the process creates a lot of children using | |
512 | .BR fork (2) | |
513 | (+); | |
514 | .IP * | |
515 | whether the process has been running a long time, | |
516 | or has used a lot of CPU time (\-); | |
517 | .IP * | |
518 | whether the process has a low nice value (i.e., > 0) (+); | |
519 | .IP * | |
520 | whether the process is privileged (\-); and | |
521 | .\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE | |
522 | .IP * | |
523 | whether the process is making direct hardware access (\-). | |
524 | .\" More precisely, if it has CAP_SYS_RAWIO | |
525 | .RE | |
526 | .IP | |
527 | The | |
528 | .I oom_score | |
529 | also reflects the bit-shift adjustment specified by the | |
530 | .I oom_adj | |
531 | setting for the process. | |
532 | .\" FIXME Describe /proc/[number]/pagemap | |
533 | .\" Added in 2.6.25 | |
534 | .\" CONFIG_PROC_PAGE_MONITOR | |
fea681da MK |
535 | .TP |
536 | .I /proc/[number]/root | |
537 | Unix and Linux support the idea of a per-process root of the | |
24d01c53 | 538 | file system, set by the |
fea681da | 539 | .BR chroot (2) |
c13182ef MK |
540 | system call. |
541 | This file is a symbolic link that points to the process's | |
fea681da | 542 | root directory, and behaves as exe, fd/*, etc. do. |
afcaf646 MK |
543 | |
544 | .\" The following was still true as at kernel 2.6.13 | |
c13182ef MK |
545 | In a multithreaded process, the contents of this symbolic link |
546 | are not available if the main thread has already terminated | |
afcaf646 MK |
547 | (typically by calling |
548 | .BR pthread_exit (3)). | |
6aefb6df MK |
549 | .\" FIXME Describe /proc/[number]/seccomp |
550 | .\" Added in 2.6.12 | |
b4e9ee8f MK |
551 | .\" FIXME Describe /proc/[number]/sessionid |
552 | .\" Added in 2.6.25; read-only; only readable by real UID | |
553 | .\" CONFIG_AUDITSYSCALL | |
554 | .\" FIXME Describe /proc/[number]/sched | |
555 | .\" Added in 2.6.23 | |
556 | .\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS | |
557 | .\" Displays various scheduling parameters | |
558 | .\" This file can be written, to reset stats | |
559 | .\" FIXME Describe /proc/[number]/schedstats and | |
560 | .\" /proc/[number]/task/TID/schedstats | |
561 | .\" Added in 2.6.9 | |
562 | .\" CONFIG_SCHEDSTATS | |
fea681da | 563 | .TP |
b07b19c4 | 564 | .IR /proc/[number]/smaps " (since Linux 2.6.14)" |
b4e9ee8f | 565 | .\" CONFIG_PROC_PAGE_MONITOR |
b07b19c4 | 566 | This file shows memory consumption for each of the process's mappings. |
59a40ed7 | 567 | For each of mappings there is a series of lines such as the following: |
a08ea57c | 568 | .in +4n |
b07b19c4 MK |
569 | .nf |
570 | ||
571 | 08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash | |
572 | Size: 464 kB | |
573 | Rss: 424 kB | |
574 | Shared_Clean: 424 kB | |
575 | Shared_Dirty: 0 kB | |
576 | Private_Clean: 0 kB | |
577 | Private_Dirty: 0 kB | |
578 | ||
579 | .fi | |
a08ea57c | 580 | .in |
b07b19c4 MK |
581 | The first of these lines shows the same information as is displayed |
582 | for the mapping in | |
583 | .IR /proc/[number]/maps . | |
584 | The remaining lines show the size of the mapping, | |
585 | the amount of the mapping that is currently resident in RAM, | |
586 | the number clean and dirty shared pages in the mapping, | |
587 | and the number clean and dirty private pages in the mapping. | |
588 | ||
097585ed MK |
589 | This file is only present if the |
590 | .B CONFIG_MMU | |
591 | kernel configuration | |
b07b19c4 MK |
592 | option is enabled. |
593 | .TP | |
fea681da | 594 | .I /proc/[number]/stat |
c13182ef MK |
595 | Status information about the process. |
596 | This is used by | |
597 | .BR ps (1). | |
598 | It is defined in | |
fea681da MK |
599 | .IR /usr/src/linux/fs/proc/array.c "." |
600 | ||
601 | The fields, in order, with their proper | |
602 | .BR scanf (3) | |
603 | format specifiers, are: | |
604 | .RS | |
59a40ed7 | 605 | .TP 12 |
fea681da | 606 | \fIpid\fP %d |
357cf3fe | 607 | The process ID. |
fea681da MK |
608 | .TP |
609 | \fIcomm\fP %s | |
c13182ef MK |
610 | The filename of the executable, in parentheses. |
611 | This is visible whether or not the executable is swapped out. | |
fea681da MK |
612 | .TP |
613 | \fIstate\fP %c | |
614 | One character from the string "RSDZTW" where R is running, S is | |
615 | sleeping in an interruptible wait, D is waiting in uninterruptible | |
616 | disk sleep, Z is zombie, T is traced or stopped (on a signal), | |
617 | and W is paging. | |
618 | .TP | |
619 | \fIppid\fP %d | |
620 | The PID of the parent. | |
621 | .TP | |
622 | \fIpgrp\fP %d | |
623 | The process group ID of the process. | |
624 | .TP | |
625 | \fIsession\fP %d | |
626 | The session ID of the process. | |
627 | .TP | |
fea681da | 628 | \fItty_nr\fP %d |
59a40ed7 MK |
629 | The controlling terminal of the process. |
630 | (The minor device number is contained in the combination of bits | |
631 | 31 to 20 and 7 to 0; | |
632 | the major device number is in bits 15 t0 8.) | |
fea681da MK |
633 | .TP |
634 | \fItpgid\fP %d | |
635 | .\" This field and following, up to and including wchan added 0.99.1 | |
59a40ed7 MK |
636 | The ID of the foreground process group of the controlling |
637 | terminal of the process. | |
fea681da | 638 | .TP |
2ebfeb1b | 639 | \fIflags\fP %u (%lu before Linux 2.6.22) |
c13182ef MK |
640 | The kernel flags word of the process. |
641 | For bit meanings, | |
fea681da MK |
642 | see the PF_* defines in |
643 | .IR <linux/sched.h> . | |
644 | Details depend on the kernel version. | |
645 | .TP | |
646 | \fIminflt\fP %lu | |
647 | The number of minor faults the process has made which have not | |
648 | required loading a memory page from disk. | |
649 | .TP | |
59a40ed7 | 650 | .\" field 11 |
fea681da MK |
651 | \fIcminflt\fP %lu |
652 | The number of minor faults that the process's | |
653 | waited-for children have made. | |
654 | .TP | |
655 | \fImajflt\fP %lu | |
656 | The number of major faults the process has made which have | |
657 | required loading a memory page from disk. | |
658 | .TP | |
659 | \fIcmajflt\fP %lu | |
660 | The number of major faults that the process's | |
661 | waited-for children have made. | |
662 | .TP | |
663 | \fIutime\fP %lu | |
7a017e24 MK |
664 | Amount of time that this process has been scheduled in user mode, |
665 | measured in clock ticks (divide by | |
666 | .IR sysconf(_SC_CLK_TCK) . | |
a1c9dc59 MK |
667 | This includes guest time, \fIguest_time\fP |
668 | (time spent running a virtual CPU, see below), | |
669 | so that applications that are not aware of the guest time field | |
670 | do not lose that time from their calculations. | |
fea681da MK |
671 | .TP |
672 | \fIstime\fP %lu | |
7a017e24 MK |
673 | Amount of time that this process has been scheduled in kernel mode, |
674 | measured in clock ticks (divide by | |
675 | .IR sysconf(_SC_CLK_TCK) . | |
fea681da MK |
676 | .TP |
677 | \fIcutime\fP %ld | |
7a017e24 MK |
678 | Amount of time that this process's |
679 | waited-for children have been scheduled in user mode, | |
680 | measured in clock ticks (divide by | |
681 | .IR sysconf(_SC_CLK_TCK) . | |
c13182ef | 682 | (See also |
fea681da | 683 | .BR times (2).) |
a1c9dc59 MK |
684 | This includes guest time, \fIcguest_time\fP |
685 | (time spent running a virtual CPU, see below). | |
fea681da MK |
686 | .TP |
687 | \fIcstime\fP %ld | |
7a017e24 MK |
688 | Amount of time that this process's |
689 | waited-for children have been scheduled in kernel mode, | |
690 | measured in clock ticks (divide by | |
691 | .IR sysconf(_SC_CLK_TCK) . | |
fea681da MK |
692 | .TP |
693 | \fIpriority\fP %ld | |
59a40ed7 MK |
694 | (Explanation for Linux 2.6) |
695 | For processes running a real-time scheduling policy | |
696 | .RI ( policy | |
697 | below; see | |
698 | .BR sched_setscheduler (2)), | |
699 | this is the negated scheduling priority, minus one; | |
700 | that is, a number in the range \-2 to \-100, | |
701 | corresponding to real-time priorities 1 to 99. | |
702 | For processes running under a non-real-time scheduling policy, | |
703 | this is the raw nice value | |
704 | .RB ( setpriority (2)) | |
705 | as represented in the kernel. | |
706 | The kernel stores nice values as numbers | |
707 | in the range 0 (high) to 39 (low), | |
708 | corresponding to the user-visible nice range of \-20 to 19. | |
709 | ||
710 | Before Linux 2.6, this was a scaled value based on | |
711 | the scheduler weighting given to this process. | |
712 | .\" And back in kernel 1.2 days things were different again. | |
fea681da MK |
713 | .TP |
714 | \fInice\fP %ld | |
59a40ed7 MK |
715 | The nice value (see |
716 | .BR setpriority (2)), | |
717 | a value in the range 19 (low priority) to \-20 (high priority). | |
718 | .\" Back in kernel 1.2 days things were different. | |
fea681da MK |
719 | .TP |
720 | .\" .TP | |
721 | .\" \fIcounter\fP %ld | |
722 | .\" The current maximum size in jiffies of the process's next timeslice, | |
723 | .\" or what is currently left of its current timeslice, if it is the | |
724 | .\" currently running process. | |
725 | .\" .TP | |
726 | .\" \fItimeout\fP %u | |
727 | .\" The time in jiffies of the process's next timeout. | |
0e94f77b MK |
728 | .\" timeout was removed sometime around 2.1/2.2 |
729 | \fInum_threads\fP %ld | |
2ebfeb1b | 730 | Number of threads in this process (since Linux 2.6). |
bb83d1b9 | 731 | Before kernel 2.6, this field was hard coded to 0 as a placeholder |
0e94f77b | 732 | for an earlier removed field. |
fea681da | 733 | .TP |
59a40ed7 | 734 | .\" field 21 |
fea681da | 735 | \fIitrealvalue\fP %ld |
8bd58774 MK |
736 | The time in jiffies before the next |
737 | .B SIGALRM | |
738 | is sent to the process due to an interval timer. | |
0e94f77b MK |
739 | Since kernel 2.6.17, this field is no longer maintained, |
740 | and is hard coded as 0. | |
fea681da | 741 | .TP |
0e94f77b | 742 | \fIstarttime\fP %llu (was %lu before Linux 2.6) |
fea681da MK |
743 | The time in jiffies the process started after system boot. |
744 | .TP | |
745 | \fIvsize\fP %lu | |
746 | Virtual memory size in bytes. | |
747 | .TP | |
748 | \fIrss\fP %ld | |
59a40ed7 | 749 | Resident Set Size: number of pages the process has in real memory. |
c13182ef MK |
750 | This is just the pages which |
751 | count towards text, data, or stack space. | |
752 | This does not include pages | |
fea681da MK |
753 | which have not been demand-loaded in, or which are swapped out. |
754 | .TP | |
59a40ed7 MK |
755 | \fIrsslim\fP %lu |
756 | Current soft limit in bytes on the rss of the process; | |
757 | see the description of | |
758 | .B RLIMIT_RSS | |
759 | in | |
760 | .BR getpriority (2). | |
fea681da MK |
761 | .TP |
762 | \fIstartcode\fP %lu | |
763 | The address above which program text can run. | |
764 | .TP | |
765 | \fIendcode\fP %lu | |
766 | The address below which program text can run. | |
767 | .TP | |
768 | \fIstartstack\fP %lu | |
59a40ed7 | 769 | The address of the start (i.e., bottom) of the stack. |
fea681da MK |
770 | .TP |
771 | \fIkstkesp\fP %lu | |
59a40ed7 | 772 | The current value of ESP (stack pointer), as found in the |
fea681da MK |
773 | kernel stack page for the process. |
774 | .TP | |
775 | \fIkstkeip\fP %lu | |
776 | The current EIP (instruction pointer). | |
777 | .TP | |
59a40ed7 | 778 | .\" field 31 |
fea681da | 779 | \fIsignal\fP %lu |
59a40ed7 MK |
780 | The bitmap of pending signals, displayed as a decimal number. |
781 | Obsolete, because it does not provide information on real-time signals; use | |
782 | .I /proc/[number]/status | |
783 | instead. | |
fea681da MK |
784 | .TP |
785 | \fIblocked\fP %lu | |
59a40ed7 MK |
786 | The bitmap of blocked signals, displayed as a decimal number. |
787 | Obsolete, because it does not provide information on real-time signals; use | |
788 | .I /proc/[number]/status | |
789 | instead. | |
fea681da MK |
790 | .TP |
791 | \fIsigignore\fP %lu | |
59a40ed7 MK |
792 | The bitmap of ignored signals, displayed as a decimal number. |
793 | Obsolete, because it does not provide information on real-time signals; use | |
794 | .I /proc/[number]/status | |
795 | instead. | |
fea681da MK |
796 | .TP |
797 | \fIsigcatch\fP %lu | |
59a40ed7 MK |
798 | The bitmap of caught signals, displayed as a decimal number. |
799 | Obsolete, because it does not provide information on real-time signals; use | |
800 | .I /proc/[number]/status | |
801 | instead. | |
fea681da MK |
802 | .TP |
803 | \fIwchan\fP %lu | |
c13182ef MK |
804 | This is the "channel" in which the process is waiting. |
805 | It is the | |
fea681da | 806 | address of a system call, and can be looked up in a namelist if you |
c13182ef | 807 | need a textual name. |
9a67332e MK |
808 | (If you have an up-to-date |
809 | .IR /etc/psdatabase , | |
810 | then | |
4d9b6984 | 811 | try \fIps \-l\fP to see the WCHAN field in action.) |
fea681da MK |
812 | .TP |
813 | \fInswap\fP %lu | |
0e94f77b | 814 | .\" nswap was added in 2.0 |
4d9b6984 | 815 | Number of pages swapped (not maintained). |
fea681da MK |
816 | .TP |
817 | \fIcnswap\fP %lu | |
0e94f77b | 818 | .\" cnswap was added in 2.0 |
4d9b6984 | 819 | Cumulative \fInswap\fP for child processes (not maintained). |
fea681da | 820 | .TP |
2ebfeb1b | 821 | \fIexit_signal\fP %d (since Linux 2.1.22) |
fea681da MK |
822 | Signal to be sent to parent when we die. |
823 | .TP | |
2ebfeb1b | 824 | \fIprocessor\fP %d (since Linux 2.2.8) |
fea681da | 825 | CPU number last executed on. |
568105c6 | 826 | .TP |
2ebfeb1b | 827 | \fIrt_priority\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22) |
59a40ed7 MK |
828 | Real-time scheduling priority, a number in the range 1 to 99 for |
829 | processes scheduled under a real-time policy, | |
830 | or 0, for non-real-time processes (see | |
568105c6 MK |
831 | .BR sched_setscheduler (2)). |
832 | .TP | |
59a40ed7 | 833 | .\" field 41 |
2ebfeb1b | 834 | \fIpolicy\fP %u (since Linux 2.5.19; was %lu before Linux 2.6.22) |
568105c6 MK |
835 | Scheduling policy (see |
836 | .BR sched_setscheduler (2)). | |
cd60dedd | 837 | Decode using the SCHED_* constants in |
59a40ed7 | 838 | .IR linux/sched.h . |
167450d6 | 839 | .TP |
2ebfeb1b | 840 | \fIdelayacct_blkio_ticks\fP %llu (since Linux 2.6.18) |
0e94f77b | 841 | Aggregated block I/O delays, measured in clock ticks (centiseconds). |
14c06953 MK |
842 | .TP |
843 | \fIguest_time\fP %lu (since Linux 2.6.24) | |
844 | Guest time of the process (time spent running a virtual CPU | |
7a017e24 MK |
845 | for a guest operating system), measured in clock ticks (divide by |
846 | .IR sysconf(_SC_CLK_TCK) . | |
14c06953 MK |
847 | .TP |
848 | \fIcguest_time\fP %ld (since Linux 2.6.24) | |
7a017e24 MK |
849 | Guest time of the process's children, measured in clock ticks (divide by |
850 | .IR sysconf(_SC_CLK_TCK) . | |
fea681da MK |
851 | .RE |
852 | .TP | |
853 | .I /proc/[number]/statm | |
59a40ed7 | 854 | Provides information about memory usage, measured in pages. |
c13182ef | 855 | The columns are: |
a08ea57c MK |
856 | .in +4n |
857 | .nf | |
858 | ||
859 | size total program size | |
59a40ed7 | 860 | (same as VmSize in \fI/proc/[number]/status\fP) |
a08ea57c | 861 | resident resident set size |
59a40ed7 MK |
862 | (same as VmRSS in \fI/proc/[number]/status\fP) |
863 | share shared pages (from shared mappings) | |
a08ea57c | 864 | text text (code) |
59a40ed7 MK |
865 | .\" (not including libs; broken, includes data segment) |
866 | lib library (unused in Linux 2.6) | |
867 | data data + stack | |
868 | .\" (including libs; broken, includes library text) | |
a08ea57c MK |
869 | dt dirty pages (unused in Linux 2.6) |
870 | .fi | |
871 | .in | |
fea681da MK |
872 | .TP |
873 | .I /proc/[number]/status | |
874 | Provides much of the information in | |
875 | .I /proc/[number]/stat | |
876 | and | |
877 | .I /proc/[number]/statm | |
878 | in a format that's easier for humans to parse. | |
16b5f7ba MK |
879 | Here's an example: |
880 | .in +4n | |
881 | .nf | |
882 | ||
883 | $ cat /proc/$$/status | |
884 | Name: bash | |
885 | State: S (sleeping) | |
886 | Tgid: 3515 | |
887 | Pid: 3515 | |
888 | PPid: 3452 | |
889 | TracerPid: 0 | |
890 | Uid: 1000 1000 1000 1000 | |
891 | Gid: 100 100 100 100 | |
892 | FDSize: 256 | |
893 | Groups: 16 33 100 | |
894 | VmPeak: 9136 kB | |
895 | VmSize: 7896 kB | |
896 | VmLck: 0 kB | |
897 | VmHWM: 7572 kB | |
898 | VmRSS: 6316 kB | |
899 | VmData: 5224 kB | |
900 | VmStk: 88 kB | |
901 | VmExe: 572 kB | |
902 | VmLib: 1708 kB | |
903 | VmPTE: 20 kB | |
904 | Threads: 1 | |
905 | SigQ: 0/3067 | |
906 | SigPnd: 0000000000000000 | |
907 | ShdPnd: 0000000000000000 | |
908 | SigBlk: 0000000000010000 | |
909 | SigIgn: 0000000000384004 | |
910 | SigCgt: 000000004b813efb | |
911 | CapInh: 0000000000000000 | |
912 | CapPrm: 0000000000000000 | |
913 | CapEff: 0000000000000000 | |
914 | CapBnd: ffffffffffffffff | |
915 | Cpus_allowed: 00000001 | |
916 | Cpus_allowed_list: 0 | |
917 | Mems_allowed: 1 | |
918 | Mems_allowed_list: 0 | |
919 | voluntary_ctxt_switches: 150 | |
920 | nonvoluntary_ctxt_switches: 545 | |
921 | .fi | |
922 | .in | |
923 | .IP | |
924 | The fields are as follows: | |
925 | .RS | |
926 | .IP * 2 | |
927 | .IR Name : | |
928 | Command run by this process. | |
929 | .IP * | |
930 | .IR State : | |
931 | Current state of the process. One of | |
932 | "R (running)", | |
933 | "S (sleeping)", | |
934 | "D (disk sleep)", | |
935 | "T (stopped)", | |
936 | "T (tracing stop)", | |
937 | "Z (zombie)", | |
938 | or | |
939 | "X (dead)". | |
940 | .IP * | |
941 | .IR Tgid : | |
942 | Thread group ID (i.e., Process ID). | |
943 | .IP * | |
944 | .IR Pid : | |
945 | Thread ID (see | |
946 | .BR gettid (2)). | |
947 | .IP * | |
948 | .IR TracerPid : | |
949 | PID of process tracing this process (0 if not being traced). | |
950 | .IP * | |
951 | .IR Uid ", " Gid : | |
952 | Real, effective, saved set, and file system UIDs (GIDs). | |
953 | .IP * | |
954 | .IR FDSize : | |
955 | Number of file descriptor slots currently allocated. | |
956 | .IP * | |
957 | .IR Groups : | |
958 | Supplementary group list. | |
959 | .IP * | |
960 | .IR VmPeak : | |
961 | Peak virtual memory size. | |
962 | .IP * | |
963 | .IR VmSize : | |
964 | Virtual memory size. | |
965 | .IP * | |
966 | .IR VmLck : | |
967 | Locked memory size. | |
968 | .IP * | |
969 | .IR VmHWM : | |
970 | Peak resident set size ("high water mark"). | |
971 | .IP * | |
972 | .IR VmRSS : | |
973 | Resident set size. | |
974 | .IP * | |
975 | .IR VmData ", " VmStk ", " VmExe : | |
976 | Size of data, stack, and text segments. | |
977 | .IP * | |
978 | .IR VmLib : | |
979 | Shared library code size. | |
980 | .IP * | |
981 | .IR VmPTE : | |
982 | Page table entries size (since Linux 2.6.10). | |
983 | .IP * | |
984 | .IR Threads : | |
985 | Number of threads in process containing this thread. | |
986 | .IP * | |
987 | .IR SigPnd ", " ShdPnd : | |
988 | Number of signals pending for thread and for process as a whole (see | |
989 | .BR pthreads (7) | |
990 | and | |
991 | .BR signal (7)). | |
992 | .IP * | |
993 | .IR SigBlk ", " SigIgn ", " SigCgt : | |
994 | Masks indicating signals being blocked, ignored, and caught (see | |
995 | .BR signal (7)). | |
996 | .IP * | |
997 | .IR CapInh ", " CapPrm ", " CapEff : | |
998 | Masks of capabilities enabled in inheritable, permitted, and effective sets | |
999 | (see | |
1000 | .BR capabilities (7)). | |
1001 | .IP * | |
1002 | .IR CapBnd : | |
1003 | Capability Bounding set | |
1004 | (since kernel 2.6.26, see | |
1005 | .BR capabilities (7)). | |
1006 | .IP * | |
1007 | .IR Cpus_allowed : | |
1008 | Mask of CPUs on which this process may run | |
1009 | (since Linux 2.6.24, see | |
1010 | .BR cpuset (7)). | |
1011 | .IP * | |
1012 | .IR Cpus_allowed_list : | |
1013 | Same as previous, but in "list format" | |
1014 | (since Linux 2.6.26, see | |
1015 | .BR cpuset (7)). | |
1016 | .IP * | |
1017 | .IR Mems_allowed : | |
1018 | Mask of memory nodes allowed to this process | |
1019 | (since Linux 2.6.24, see | |
1020 | .BR cpuset (7)). | |
1021 | .IP * | |
1022 | .IR Mems_allowed_list : | |
1023 | Same as previous, but in "list format" | |
1024 | (since Linux 2.6.26, see | |
1025 | .BR cpuset (7)). | |
1026 | .IP * | |
1027 | .IR voluntary_context_switches ", " nonvoluntary_context_switches : | |
1028 | Number of voluntary and involuntary context switches (since Linux 2.6.23). | |
1029 | .RE | |
fea681da | 1030 | .TP |
2ebfeb1b | 1031 | .IR /proc/[number]/task " (since Linux 2.6.0-test6)" |
afcaf646 MK |
1032 | This is a directory that contains one subdirectory |
1033 | for each thread in the process. | |
1034 | The name of each subdirectory is the numerical thread ID of the | |
1035 | thread (see | |
1036 | .BR gettid (2)). | |
1037 | Within each of these subdirectories, there is a set of | |
1038 | files with the same names and contents as under the | |
1039 | .I /proc/[number] | |
1040 | directories. | |
1041 | For attributes that are shared by all threads, the contents for | |
1042 | each of the files under the | |
1043 | .I task/[thread-ID] | |
1044 | subdirectories will be the same as in the corresponding | |
c13182ef | 1045 | file in the parent |
afcaf646 MK |
1046 | .I /proc/[number] |
1047 | directory | |
c13182ef | 1048 | (e.g., in a multithreaded process, all of the |
afcaf646 | 1049 | .I task/[thread-ID]/cwd |
c13182ef | 1050 | files will have the same value as the |
afcaf646 | 1051 | .I /proc/[number]/cwd |
c13182ef | 1052 | file in the parent directory, since all of the threads in a process |
afcaf646 MK |
1053 | share a working directory). |
1054 | For attributes that are distinct for each thread, | |
c13182ef | 1055 | the corresponding files under |
afcaf646 MK |
1056 | .I task/[thread-ID] |
1057 | may have different values (e.g., various fields in each of the | |
1058 | .I task/[thread-ID]/status | |
1059 | files may be different for each thread). | |
1060 | ||
1061 | .\" The following was still true as at kernel 2.6.13 | |
1062 | In a multithreaded process, the contents of the | |
1063 | .I /proc/[number]/task | |
c13182ef | 1064 | directory are not available if the main thread has already terminated |
afcaf646 MK |
1065 | (typically by calling |
1066 | .BR pthread_exit (3)). | |
1067 | .TP | |
fea681da | 1068 | .I /proc/apm |
097585ed MK |
1069 | Advanced power management version and battery information when |
1070 | .B CONFIG_APM | |
1071 | is defined at kernel compilation time. | |
fea681da MK |
1072 | .TP |
1073 | .I /proc/bus | |
1074 | Contains subdirectories for installed busses. | |
1075 | .TP | |
1076 | .I /proc/bus/pccard | |
59a40ed7 | 1077 | Subdirectory for PCMCIA devices when |
097585ed MK |
1078 | .B CONFIG_PCMCIA |
1079 | is set at kernel compilation time. | |
fea681da MK |
1080 | .TP |
1081 | .I /proc/bus/pccard/drivers | |
1082 | .TP | |
1083 | .I /proc/bus/pci | |
c13182ef | 1084 | Contains various bus subdirectories and pseudo-files containing |
59a40ed7 | 1085 | information about PCI busses, installed devices, and device |
c13182ef MK |
1086 | drivers. |
1087 | Some of these files are not ASCII. | |
fea681da MK |
1088 | .TP |
1089 | .I /proc/bus/pci/devices | |
59a40ed7 | 1090 | Information about PCI devices. |
c13182ef | 1091 | They may be accessed through |
fea681da MK |
1092 | .BR lspci (8) |
1093 | and | |
1094 | .BR setpci (8). | |
1095 | .TP | |
1096 | .I /proc/cmdline | |
c13182ef MK |
1097 | Arguments passed to the Linux kernel at boot time. |
1098 | Often done via a boot manager such as | |
59a40ed7 MK |
1099 | .BR lilo (8) |
1100 | or | |
1101 | .BR grub (8). | |
f6e524c4 MK |
1102 | .TP |
1103 | .IR /proc/config.gz " (since Linux 2.6)" | |
1104 | This file exposes the configuration options that were used | |
c3d9780d | 1105 | to build the currently running kernel, |
f6e524c4 MK |
1106 | in the same format as they would be shown in the |
1107 | .I .config | |
1108 | file that resulted when configuring the kernel (using | |
1109 | .IR "make xconfig" , | |
1110 | .IR "make config" , | |
1111 | or similar). | |
1112 | The file contents are compressed; view or search them using | |
1113 | .BR zcat (1), | |
1114 | .BR zgrep (1), | |
1115 | etc. | |
1116 | As long as no changes have been made to the following file, | |
250e01ec MK |
1117 | the contents of |
1118 | .I /proc/config.gz | |
1119 | are the same as those provided by : | |
f6e524c4 MK |
1120 | .in +4n |
1121 | .nf | |
1122 | ||
9fd8b185 | 1123 | cat /lib/modules/$(uname -r)/build/.config |
f6e524c4 MK |
1124 | .fi |
1125 | .in | |
250e01ec MK |
1126 | .IP |
1127 | .I /proc/config.gz | |
1128 | is only provided if the kernel is configured with | |
250e01ec | 1129 | .BR CONFIG_IKCONFIG_PROC . |
fea681da MK |
1130 | .TP |
1131 | .I /proc/cpuinfo | |
1132 | This is a collection of CPU and system architecture dependent items, | |
1133 | for each supported architecture a different list. | |
1134 | Two common entries are \fIprocessor\fP which gives CPU number and | |
c13182ef MK |
1135 | \fIbogomips\fP; a system constant that is calculated |
1136 | during kernel initialization. | |
1137 | SMP machines have information for | |
fea681da MK |
1138 | each CPU. |
1139 | .TP | |
1140 | .I /proc/devices | |
c13182ef MK |
1141 | Text listing of major numbers and device groups. |
1142 | This can be used by MAKEDEV scripts for consistency with the kernel. | |
fea681da MK |
1143 | .TP |
1144 | .IR /proc/diskstats " (since Linux 2.5.69)" | |
1145 | This file contains disk I/O statistics for each disk device. | |
1146 | See the kernel source file | |
1147 | .I Documentation/iostats.txt | |
1148 | for further information. | |
1149 | .TP | |
1150 | .I /proc/dma | |
c13182ef | 1151 | This is a list of the registered \fIISA\fP DMA (direct memory access) |
fea681da MK |
1152 | channels in use. |
1153 | .TP | |
1154 | .I /proc/driver | |
1155 | Empty subdirectory. | |
1156 | .TP | |
1157 | .I /proc/execdomains | |
1158 | List of the execution domains (ABI personalities). | |
1159 | .TP | |
1160 | .I /proc/fb | |
097585ed MK |
1161 | Frame buffer information when |
1162 | .B CONFIG_FB | |
1163 | is defined during kernel compilation. | |
fea681da MK |
1164 | .TP |
1165 | .I /proc/filesystems | |
24d01c53 MK |
1166 | A text listing of the file systems which are supported by the kernel, |
1167 | namely file systems which were compiled into the kernel or whose kernel | |
6387216b MK |
1168 | modules are currently loaded. |
1169 | (See also | |
fb477da2 | 1170 | .BR filesystems (5).) |
24d01c53 | 1171 | If a file system is marked with "nodev", |
809d0164 | 1172 | this means that it does not require a block device to be mounted |
24d01c53 | 1173 | (e.g., virtual file system, network file system). |
809d0164 MK |
1174 | |
1175 | Incidentally, this file may be used by | |
1176 | .BR mount (8) | |
24d01c53 MK |
1177 | when no file system is specified and it didn't manage to determine the |
1178 | file system type. | |
1179 | Then file systems contained in this file are tried | |
809d0164 | 1180 | (excepted those that are marked with "nodev"). |
fea681da MK |
1181 | .TP |
1182 | .I /proc/fs | |
1183 | Empty subdirectory. | |
1184 | .TP | |
1185 | .I /proc/ide | |
1186 | This directory | |
59a40ed7 MK |
1187 | exists on systems with the IDE bus. |
1188 | There are directories for each IDE channel and attached device. | |
c13182ef | 1189 | Files include: |
fea681da | 1190 | |
a08ea57c | 1191 | .in +4n |
fea681da MK |
1192 | .nf |
1193 | cache buffer size in KB | |
1194 | capacity number of sectors | |
1195 | driver driver version | |
1196 | geometry physical and logical geometry | |
9fdfa163 | 1197 | identify in hexadecimal |
fea681da MK |
1198 | media media type |
1199 | model manufacturer's model number | |
1200 | settings drive settings | |
9fdfa163 MK |
1201 | smart_thresholds in hexadecimal |
1202 | smart_values in hexadecimal | |
fea681da | 1203 | .fi |
a08ea57c | 1204 | .in |
fea681da | 1205 | |
c13182ef | 1206 | The |
fea681da MK |
1207 | .BR hdparm (8) |
1208 | utility provides access to this information in a friendly format. | |
1209 | .TP | |
1210 | .I /proc/interrupts | |
59a40ed7 | 1211 | This is used to record the number of interrupts for each IRQ on (at |
c13182ef MK |
1212 | least) the i386 architecture. |
1213 | Very easy to read formatting, done in | |
fea681da MK |
1214 | ASCII. |
1215 | .TP | |
1216 | .I /proc/iomem | |
1217 | I/O memory map in Linux 2.4. | |
1218 | .TP | |
1219 | .I /proc/ioports | |
c13182ef | 1220 | This is a list of currently registered Input-Output port regions that |
fea681da MK |
1221 | are in use. |
1222 | .TP | |
1223 | .IR /proc/kallsyms " (since Linux 2.5.71)" | |
1224 | This holds the kernel exported symbol definitions used by the | |
1225 | .BR modules (X) | |
1226 | tools to dynamically link and bind loadable modules. | |
1227 | In Linux 2.5.47 and earlier, a similar file with slightly different syntax | |
1228 | was named | |
1229 | .IR ksyms . | |
1230 | .TP | |
1231 | .I /proc/kcore | |
1232 | This file represents the physical memory of the system and is stored | |
c13182ef MK |
1233 | in the ELF core file format. |
1234 | With this pseudo-file, and an unstripped | |
9a67332e MK |
1235 | kernel |
1236 | .RI ( /usr/src/linux/vmlinux ) | |
1237 | binary, GDB can be used to | |
fea681da MK |
1238 | examine the current state of any kernel data structures. |
1239 | ||
1240 | The total length of the file is the size of physical memory (RAM) plus | |
1241 | 4KB. | |
1242 | .TP | |
1243 | .I /proc/kmsg | |
1244 | This file can be used instead of the | |
1245 | .BR syslog (2) | |
c13182ef MK |
1246 | system call to read kernel messages. |
1247 | A process must have superuser | |
fea681da | 1248 | privileges to read this file, and only one process should read this |
c13182ef MK |
1249 | file. |
1250 | This file should not be read if a syslog process is running | |
fea681da MK |
1251 | which uses the |
1252 | .BR syslog (2) | |
1253 | system call facility to log kernel messages. | |
1254 | ||
1255 | Information in this file is retrieved with the | |
1256 | .BR dmesg (8) | |
1257 | program. | |
1258 | .TP | |
1259 | .IR /proc/ksyms " (Linux 1.1.23-2.5.47)" | |
1260 | See | |
1261 | .IR /proc/kallsyms . | |
1262 | .TP | |
1263 | .I /proc/loadavg | |
6b05dc38 MK |
1264 | The first three fields in this file are load average figures |
1265 | giving the number of jobs in the run queue (state R) | |
fea681da MK |
1266 | or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes. |
1267 | They are the same as the load average numbers given by | |
1268 | .BR uptime (1) | |
1269 | and other programs. | |
6b05dc38 MK |
1270 | The fourth field consists of two numbers separated by a slash (/). |
1271 | The first of these is the number of currently executing kernel | |
c13182ef | 1272 | scheduling entities (processes, threads); |
6b05dc38 MK |
1273 | this will be less than or equal to the number of CPUs. |
1274 | The value after the slash is the number of kernel scheduling entities | |
1275 | that currently exist on the system. | |
1276 | The fifth field is the PID of the process that was most | |
1277 | recently created on the system. | |
fea681da MK |
1278 | .TP |
1279 | .I /proc/locks | |
1280 | This file shows current file locks | |
1281 | .RB ( flock "(2) and " fcntl (2)) | |
1282 | and leases | |
1283 | .RB ( fcntl (2)). | |
1284 | .TP | |
89dd5f8a | 1285 | .IR /proc/malloc " (only up to and including Linux 2.2)" |
59a40ed7 | 1286 | .\" It looks like this only ever did something back in 1.0 days |
097585ed | 1287 | This file is only present if |
89dd5f8a | 1288 | .B CONFIG_DEBUG_MALLOC |
097585ed | 1289 | was defined during compilation. |
fea681da MK |
1290 | .TP |
1291 | .I /proc/meminfo | |
1292 | This is used by | |
1293 | .BR free (1) | |
1294 | to report the amount of free and used memory (both physical and swap) | |
1295 | on the system as well as the shared memory and buffers used by the | |
1296 | kernel. | |
1297 | ||
1298 | It is in the same format as | |
1299 | .BR free (1), | |
1300 | except in bytes rather than KB. | |
1301 | .TP | |
1302 | .I /proc/mounts | |
1303 | This is a list of all the file systems currently mounted on the system. | |
1304 | The format of this file is documented in | |
31e9a9ec | 1305 | .BR fstab (5). |
c13182ef | 1306 | Since kernel version 2.6.15, this file is pollable: |
57651c15 MK |
1307 | after opening the file for reading, a change in this file |
1308 | (i.e., a file system mount or unmount) causes | |
1309 | .BR select (2) | |
1310 | to mark the file descriptor as readable, and | |
1311 | .BR poll (2) | |
1312 | and | |
1313 | .BR epoll_wait (2) | |
1314 | mark the file as having an error condition. | |
fea681da MK |
1315 | .TP |
1316 | .I /proc/modules | |
1317 | A text list of the modules that have been loaded by the system. | |
1318 | See also | |
1319 | .BR lsmod (8). | |
1320 | .TP | |
1321 | .I /proc/mtrr | |
c13182ef MK |
1322 | Memory Type Range Registers. |
1323 | See | |
fea681da MK |
1324 | .I /usr/src/linux/Documentation/mtrr.txt |
1325 | for details. | |
1326 | .TP | |
1327 | .I /proc/net | |
1328 | various net pseudo-files, all of which give the status of some part of | |
c13182ef MK |
1329 | the networking layer. |
1330 | These files contain ASCII structures and are, | |
59a40ed7 MK |
1331 | therefore, readable with |
1332 | .BR cat (1). | |
c13182ef | 1333 | However, the standard |
fea681da MK |
1334 | .BR netstat (8) |
1335 | suite provides much cleaner access to these files. | |
1336 | .TP | |
1337 | .I /proc/net/arp | |
1338 | This holds an ASCII readable dump of the kernel ARP table used for | |
c13182ef | 1339 | address resolutions. |
59a40ed7 | 1340 | It will show both dynamically learned and pre-programmed ARP entries. |
c13182ef | 1341 | The format is: |
fea681da MK |
1342 | |
1343 | .nf | |
1344 | .ft CW | |
1345 | .in 8n | |
1346 | IP address HW type Flags HW address Mask Device | |
1347 | 192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0 | |
1348 | 192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0 | |
1349 | .ft | |
1350 | .fi | |
1351 | .in | |
1352 | ||
6c04f928 | 1353 | Here "IP address" is the IPv4 address of the machine and the "HW type" |
c13182ef MK |
1354 | is the hardware type of the address from RFC\ 826. |
1355 | The flags are the internal | |
9a67332e MK |
1356 | flags of the ARP structure (as defined in |
1357 | .IR /usr/include/linux/if_arp.h ) | |
1358 | and | |
6c04f928 | 1359 | the "HW address" is the data link layer mapping for that IP address if |
fea681da MK |
1360 | it is known. |
1361 | .TP | |
1362 | .I /proc/net/dev | |
c13182ef MK |
1363 | The dev pseudo-file contains network device status information. |
1364 | This gives | |
1365 | the number of received and sent packets, the number of errors and | |
fea681da | 1366 | collisions |
c13182ef MK |
1367 | and other basic statistics. |
1368 | These are used by the | |
fea681da | 1369 | .BR ifconfig (8) |
c13182ef MK |
1370 | program to report device status. |
1371 | The format is: | |
fea681da MK |
1372 | |
1373 | .nf | |
1374 | .ft CW | |
1375 | .in 1n | |
1376 | Inter-| Receive | Transmit | |
1377 | face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed | |
1378 | lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0 | |
1379 | eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0 | |
1380 | ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0 | |
1381 | tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0 | |
1382 | .in | |
1383 | .ft | |
1384 | .fi | |
1385 | .\" .TP | |
1386 | .\" .I /proc/net/ipx | |
1387 | .\" No information. | |
1388 | .\" .TP | |
1389 | .\" .I /proc/net/ipx_route | |
1390 | .\" No information. | |
1391 | .TP | |
1392 | .I /proc/net/dev_mcast | |
1393 | Defined in | |
1394 | .IR /usr/src/linux/net/core/dev_mcast.c : | |
1395 | .nf | |
1396 | .in +5 | |
9fdfa163 | 1397 | indx interface_name dmi_u dmi_g dmi_address |
fea681da MK |
1398 | 2 eth0 1 0 01005e000001 |
1399 | 3 eth1 1 0 01005e000001 | |
1400 | 4 eth2 1 0 01005e000001 | |
1401 | .in | |
1402 | .fi | |
1403 | .TP | |
1404 | .I /proc/net/igmp | |
c13182ef MK |
1405 | Internet Group Management Protocol. |
1406 | Defined in | |
fea681da MK |
1407 | .IR /usr/src/linux/net/core/igmp.c . |
1408 | .TP | |
1409 | .I /proc/net/rarp | |
1410 | This file uses the same format as the | |
1411 | .I arp | |
1412 | file and contains the current reverse mapping database used to provide | |
1413 | .BR rarp (8) | |
c13182ef MK |
1414 | reverse address lookup services. |
1415 | If RARP is not configured into the | |
fea681da MK |
1416 | kernel, |
1417 | this file will not be present. | |
1418 | .TP | |
1419 | .I /proc/net/raw | |
c13182ef MK |
1420 | Holds a dump of the RAW socket table. |
1421 | Much of the information is not of | |
fea681da | 1422 | use |
c13182ef | 1423 | apart from debugging. |
6c04f928 | 1424 | The "sl" value is the kernel hash slot for the |
fea681da | 1425 | socket, |
6c04f928 MK |
1426 | the "local_address" is the local address and protocol number pair. |
1427 | \&"St" is | |
c13182ef MK |
1428 | the internal status of the socket. |
1429 | The "tx_queue" and "rx_queue" are the | |
fea681da | 1430 | outgoing and incoming data queue in terms of kernel memory usage. |
94e9d9fe | 1431 | The "tr", "tm\->when", and "rexmits" fields are not used by RAW. |
fdc196f5 MK |
1432 | The "uid" |
1433 | field holds the effective UID of the creator of the socket. | |
fea681da MK |
1434 | .\" .TP |
1435 | .\" .I /proc/net/route | |
1436 | .\" No information, but looks similar to | |
1437 | .\" .BR route (8). | |
1438 | .TP | |
1439 | .I /proc/net/snmp | |
c13182ef | 1440 | This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP |
fea681da | 1441 | management |
763f0e47 | 1442 | information bases for an SNMP agent. |
fea681da MK |
1443 | .TP |
1444 | .I /proc/net/tcp | |
c13182ef MK |
1445 | Holds a dump of the TCP socket table. |
1446 | Much of the information is not | |
1447 | of use apart from debugging. | |
1448 | The "sl" value is the kernel hash slot | |
6beb1671 MK |
1449 | for the socket, the "local_address" is the local address and port number pair. |
1450 | The "rem_address" is the remote address and port number pair | |
6c04f928 MK |
1451 | (if connected). |
1452 | \&"St" is the internal status of the socket. | |
1453 | The "tx_queue" and "rx_queue" are the | |
fea681da | 1454 | outgoing and incoming data queue in terms of kernel memory usage. |
94e9d9fe | 1455 | The "tr", "tm\->when", and "rexmits" fields hold internal information of |
fdc196f5 MK |
1456 | the kernel socket state and are only useful for debugging. |
1457 | The "uid" | |
1458 | field holds the effective UID of the creator of the socket. | |
fea681da MK |
1459 | .TP |
1460 | .I /proc/net/udp | |
c13182ef MK |
1461 | Holds a dump of the UDP socket table. |
1462 | Much of the information is not of | |
1463 | use apart from debugging. | |
1464 | The "sl" value is the kernel hash slot for the | |
6beb1671 MK |
1465 | socket, the "local_address" is the local address and port number pair. |
1466 | The "rem_address" is the remote address and port number pair | |
fea681da MK |
1467 | (if connected). "St" is the internal status of the socket. |
1468 | The "tx_queue" and "rx_queue" are the outgoing and incoming data queue | |
c13182ef | 1469 | in terms of kernel memory usage. |
94e9d9fe | 1470 | The "tr", "tm\->when", and "rexmits" fields |
c13182ef | 1471 | are not used by UDP. |
fdc196f5 MK |
1472 | The "uid" |
1473 | field holds the effective UID of the creator of the socket. | |
fea681da MK |
1474 | The format is: |
1475 | ||
1476 | .nf | |
1477 | .ft CW | |
1478 | .in 1n | |
94e9d9fe | 1479 | sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid |
fea681da MK |
1480 | 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0 |
1481 | 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0 | |
1482 | 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 | |
1483 | .in | |
1484 | .ft | |
1485 | .fi | |
1486 | .TP | |
1487 | .I /proc/net/unix | |
8ee190da | 1488 | Lists the Unix domain sockets present within the system and their |
c13182ef MK |
1489 | status. |
1490 | The format is: | |
fea681da MK |
1491 | .nf |
1492 | .sp .5 | |
1493 | .ft CW | |
1494 | Num RefCount Protocol Flags Type St Path | |
1495 | 0: 00000002 00000000 00000000 0001 03 | |
1496 | 1: 00000001 00000000 00010000 0001 01 /dev/printer | |
1497 | .ft | |
1498 | .sp .5 | |
1499 | .fi | |
1500 | ||
6c04f928 MK |
1501 | Here "Num" is the kernel table slot number, "RefCount" is the number |
1502 | of users of the socket, "Protocol" is currently always 0, "Flags" | |
fea681da | 1503 | represent the internal kernel flags holding the status of the |
c13182ef | 1504 | socket. |
6c04f928 MK |
1505 | Currently, type is always "1" (Unix domain datagram sockets are |
1506 | not yet supported in the kernel). | |
1507 | \&"St" is the internal state of the | |
fea681da MK |
1508 | socket and Path is the bound path (if any) of the socket. |
1509 | .TP | |
1510 | .I /proc/partitions | |
1511 | Contains major and minor numbers of each partition as well as number | |
1512 | of blocks and partition name. | |
1513 | .TP | |
1514 | .I /proc/pci | |
1515 | This is a listing of all PCI devices found during kernel initialization | |
1516 | and their configuration. | |
2990d781 | 1517 | |
59a40ed7 MK |
1518 | This file has been deprecated in favor of a new |
1519 | .I /proc | |
2990d781 MK |
1520 | interface for PCI |
1521 | .RI ( /proc/bus/pci ). | |
1522 | It became optional in Linux 2.2 (available with | |
1523 | .B CONFIG_PCI_OLD_PROC | |
1524 | set at kernel compilation). | |
1525 | It became once more non-optionally enabled in Linux 2.4. | |
1526 | Next, it was deprecated in Linux 2.6 (still available with | |
1527 | .B CONFIG_PCI_LEGACY_PROC | |
1528 | set), and finally removed altogether since Linux 2.6.17. | |
b4e9ee8f MK |
1529 | .\" FIXME /proc/sched_debug |
1530 | .\" .TP | |
1531 | .\" .IR /proc/sched_debug " (since Linux 2.6.23)" | |
1532 | .\" See also /proc/PID/sched | |
fea681da MK |
1533 | .TP |
1534 | .I /proc/scsi | |
59a40ed7 MK |
1535 | A directory with the |
1536 | .I scsi | |
1537 | mid-level pseudo-file and various SCSI low-level | |
2990d781 MK |
1538 | driver directories, |
1539 | which contain a file for each SCSI host in this system, all of | |
c13182ef MK |
1540 | which give the status of some part of the SCSI IO subsystem. |
1541 | These files contain ASCII structures and are, therefore, readable with | |
2990d781 | 1542 | .BR cat (1). |
fea681da | 1543 | |
c13182ef | 1544 | You can also write to some of the files to reconfigure the subsystem or |
59a40ed7 | 1545 | switch certain features on or off. |
fea681da MK |
1546 | .TP |
1547 | .I /proc/scsi/scsi | |
c13182ef | 1548 | This is a listing of all SCSI devices known to the kernel. |
59a40ed7 | 1549 | The listing is similar to the one seen during bootup. |
c13182ef | 1550 | scsi currently supports only the \fIadd-single-device\fP command which |
59a40ed7 MK |
1551 | allows root to add a hotplugged device to the list of known devices. |
1552 | ||
1553 | The command | |
1554 | .in +4n | |
1555 | .nf | |
1556 | ||
1557 | echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi | |
fea681da | 1558 | |
59a40ed7 MK |
1559 | .fi |
1560 | .in | |
c13182ef MK |
1561 | will cause |
1562 | host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0. | |
1563 | If there | |
fea681da MK |
1564 | is already a device known on this address or the address is invalid, an |
1565 | error will be returned. | |
1566 | .TP | |
1567 | .I /proc/scsi/[drivername] | |
c13182ef MK |
1568 | \fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740, |
1569 | aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic, | |
1570 | scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000. | |
1571 | These directories show up for all drivers that registered at least one | |
59a40ed7 | 1572 | SCSI HBA. |
c13182ef | 1573 | Every directory contains one file per registered host. |
59a40ed7 | 1574 | Every host-file is named after the number the host was assigned during |
c13182ef | 1575 | initialization. |
fea681da | 1576 | |
c13182ef | 1577 | Reading these files will usually show driver and host configuration, |
59a40ed7 | 1578 | statistics, etc. |
fea681da MK |
1579 | |
1580 | Writing to these files allows different things on different hosts. | |
1581 | For example, with the \fIlatency\fP and \fInolatency\fP commands, | |
1582 | root can switch on and off command latency measurement code in the | |
c13182ef MK |
1583 | eata_dma driver. |
1584 | With the \fIlockup\fP and \fIunlock\fP commands, | |
1585 | root can control bus lockups simulated by the scsi_debug driver. | |
fea681da MK |
1586 | .TP |
1587 | .I /proc/self | |
59a40ed7 MK |
1588 | This directory refers to the process accessing the |
1589 | .I /proc | |
1590 | file system, | |
1591 | and is identical to the | |
1592 | .I /proc | |
1593 | directory named by the process ID of the same process. | |
fea681da MK |
1594 | .TP |
1595 | .I /proc/slabinfo | |
c13182ef | 1596 | Information about kernel caches. |
821643a8 MK |
1597 | Since Linux 2.6.16 this file is only present if the |
1598 | .B CONFIG_SLAB | |
1599 | kernel configuration option is enabled. | |
350038ff | 1600 | The columns in |
38f76cd2 | 1601 | .I /proc/slabinfo |
350038ff | 1602 | are: |
a08ea57c | 1603 | .in +4n |
fea681da | 1604 | .nf |
a08ea57c | 1605 | |
fea681da MK |
1606 | cache-name |
1607 | num-active-objs | |
1608 | total-objs | |
1609 | object-size | |
1610 | num-active-slabs | |
1611 | total-slabs | |
1612 | num-pages-per-slab | |
1613 | .fi | |
a08ea57c MK |
1614 | .in |
1615 | ||
c13182ef | 1616 | See |
fea681da MK |
1617 | .BR slabinfo (5) |
1618 | for details. | |
1619 | .TP | |
1620 | .I /proc/stat | |
c13182ef MK |
1621 | kernel/system statistics. |
1622 | Varies with architecture. | |
1623 | Common | |
fea681da MK |
1624 | entries include: |
1625 | .RS | |
1626 | .TP | |
1627 | \fIcpu 3357 0 4313 1362393\fP | |
bfbfcd18 | 1628 | The amount of time, measured in units of |
268f000b MK |
1629 | USER_HZ (1/100ths of a second on most architectures, use |
1630 | .IR sysconf(_SC_CLK_TCK) | |
1631 | to obtain the right value), | |
b81087ab | 1632 | .\" 1024 on Alpha and ia64 |
bfbfcd18 MK |
1633 | that the system spent in user mode, |
1634 | user mode with low priority (nice), system mode, and the | |
1635 | idle task, respectively. | |
b09b8526 | 1636 | .\" FIXME Actually, the following info about the /proc/stat 'cpu' field |
777f5a9e | 1637 | .\" does not seem to be quite right (at least in 2.6.12) |
bfbfcd18 | 1638 | The last value should be USER_HZ times the |
fea681da | 1639 | second entry in the uptime pseudo-file. |
ca92ce95 | 1640 | |
bfbfcd18 MK |
1641 | In Linux 2.6 this line includes three additional columns: |
1642 | .I iowait | |
1643 | \- time waiting for I/O to complete (since 2.5.41); | |
1644 | .I irq | |
1645 | \- time servicing interrupts (since 2.6.0-test4); | |
1646 | .I softirq | |
1647 | \- time servicing softirqs (since 2.6.0-test4). | |
ca92ce95 | 1648 | |
9de1f6cc MK |
1649 | Since Linux 2.6.11, there is an eighth column, |
1650 | .I steal | |
1651 | \- stolen time, which is the time spent in other operating systems when | |
1652 | running in a virtualized environment | |
14c06953 MK |
1653 | |
1654 | Since Linux 2.6.24, there is a ninth column, | |
1655 | .IR guest , | |
1656 | which is the time spent running a virtual CPU for guest | |
afef1764 | 1657 | operating systems under the control of the Linux kernel. |
14c06953 | 1658 | .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de |
fea681da MK |
1659 | .TP |
1660 | \fIpage 5741 1808\fP | |
1661 | The number of pages the system paged in and the number that were paged | |
1662 | out (from disk). | |
1663 | .TP | |
1664 | \fIswap 1 0\fP | |
1665 | The number of swap pages that have been brought in and out. | |
1666 | .TP | |
c13182ef | 1667 | .\" FIXME The following is not the full picture for the 'intr' of |
777f5a9e | 1668 | .\" /proc/stat on 2.6: |
fea681da | 1669 | \fIintr 1462898\fP |
bfbfcd18 MK |
1670 | This line shows counts of interrupts serviced since boot time, |
1671 | for each of the possible system interrupts. | |
1672 | The first column is the total of all interrupts serviced; | |
1673 | each subsequent column is the total for a particular interrupt. | |
fea681da MK |
1674 | .TP |
1675 | \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP... | |
1676 | (major,minor):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written) | |
bfbfcd18 MK |
1677 | .br |
1678 | (Linux 2.4 only) | |
fea681da MK |
1679 | .TP |
1680 | \fIctxt 115315\fP | |
1681 | The number of context switches that the system underwent. | |
1682 | .TP | |
1683 | \fIbtime 769041601\fP | |
be9634cf | 1684 | boot time, in seconds since the Epoch (January 1, 1970). |
fea681da MK |
1685 | .TP |
1686 | \fIprocesses 86031\fP | |
1687 | Number of forks since boot. | |
bfbfcd18 MK |
1688 | .TP |
1689 | \fIprocs_running 6\fP | |
1690 | Number of processes in runnable state. | |
1691 | (Linux 2.5.45 onwards.) | |
1692 | .TP | |
1693 | \fIprocs_blocked 2\fP | |
1694 | Number of processes blocked waiting for I/O to complete. | |
1695 | (Linux 2.5.45 onwards.) | |
fea681da MK |
1696 | .RE |
1697 | .TP | |
1698 | .I /proc/swaps | |
c13182ef MK |
1699 | Swap areas in use. |
1700 | See also | |
fea681da MK |
1701 | .BR swapon (8). |
1702 | .TP | |
1703 | .I /proc/sys | |
1704 | This directory (present since 1.3.57) contains a number of files | |
1705 | and subdirectories corresponding to kernel variables. | |
1706 | These variables can be read and sometimes modified using | |
59a40ed7 | 1707 | the \fI/proc\fP file system, and the |
fea681da | 1708 | .BR sysctl (2) |
c13182ef MK |
1709 | system call. |
1710 | Presently, there are subdirectories | |
fea681da MK |
1711 | .IR abi ", " debug ", " dev ", " fs ", " kernel ", " net ", " proc ", " |
1712 | .IR rxrpc ", " sunrpc " and " vm | |
1713 | that each contain more files and subdirectories. | |
1714 | .TP | |
6ab7c0aa | 1715 | .IR /proc/sys/abi " (since Linux 2.4.10)" |
fea681da | 1716 | This directory may contain files with application binary information. |
6ab7c0aa MK |
1717 | .\" On some systems, it is not present. |
1718 | See the kernel source file | |
1719 | .I Documentation/sysctl/abi.txt | |
1720 | for more information. | |
fea681da MK |
1721 | .TP |
1722 | .I /proc/sys/debug | |
1723 | This directory may be empty. | |
1724 | .TP | |
1725 | .I /proc/sys/dev | |
e2badfdf | 1726 | This directory contains device-specific information (e.g., |
9a67332e | 1727 | .IR dev/cdrom/info ). |
fea681da MK |
1728 | On |
1729 | some systems, it may be empty. | |
1730 | .TP | |
1731 | .I /proc/sys/fs | |
6d64ca9c | 1732 | This contains the subdirectories |
b877b392 | 1733 | .IR binfmt_misc ", " inotify ", and " mqueue , |
fea681da | 1734 | and files |
c13182ef MK |
1735 | .IR dentry-state ", " dir-notify-enable ", " dquot-nr ", " file-max ", " |
1736 | .IR file-nr ", " inode-max ", " inode-nr ", " inode-state ", " | |
1737 | .IR lease-break-time ", " leases-enable ", " | |
43da96f2 MK |
1738 | .IR overflowgid ", " overflowuid ", " |
1739 | .IR suid_dumpable ", " | |
1740 | .IR super-max ", and " super-nr . | |
fea681da MK |
1741 | .TP |
1742 | .I /proc/sys/fs/binfmt_misc | |
c13182ef | 1743 | Documentation for files in this directory can be found |
b877b392 | 1744 | in the kernel sources in |
fea681da MK |
1745 | .IR Documentation/binfmt_misc.txt . |
1746 | .TP | |
59a40ed7 MK |
1747 | .IR /proc/sys/fs/dentry-state " (since Linux 2.2)" |
1748 | This file contains information about the status of the | |
1749 | directory cache (dcache). | |
1750 | The file contains six numbers, | |
c13182ef | 1751 | .IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), " |
59a40ed7 | 1752 | .I want_pages |
fea681da | 1753 | (pages requested by system) and two dummy values. |
59a40ed7 MK |
1754 | .RS |
1755 | .IP * 2 | |
1756 | .I nr_dentry | |
1757 | is the number of allocated dentries (dcache entries). | |
1758 | This field is unused in Linux 2.2. | |
1759 | .IP * | |
1760 | .I nr_unused | |
1761 | is the number of unused dentries. | |
1762 | .IP * | |
1763 | .I age_limit | |
1764 | .\" looks like this is unused in kernels 2.2 to 2.6 | |
1765 | is the age in seconds after which dcache entries | |
1766 | can be reclaimed when memory is short. | |
1767 | .IP * | |
1768 | .I want_pages | |
1769 | .\" looks like this is unused in kernels 2.2 to 2.6 | |
1770 | is non-zero when the kernel has called shrink_dcache_pages() and the | |
fea681da | 1771 | dcache isn't pruned yet. |
59a40ed7 | 1772 | .RE |
fea681da MK |
1773 | .TP |
1774 | .I /proc/sys/fs/dir-notify-enable | |
1775 | This file can be used to disable or enable the | |
1776 | .I dnotify | |
1777 | interface described in | |
1778 | .BR fcntl (2) | |
1779 | on a system-wide basis. | |
1780 | A value of 0 in this file disables the interface, | |
1781 | and a value of 1 enables it. | |
1782 | .TP | |
1783 | .I /proc/sys/fs/dquot-max | |
1784 | This file shows the maximum number of cached disk quota entries. | |
1785 | On some (2.4) systems, it is not present. | |
1786 | If the number of free cached disk quota entries is very low and | |
1787 | you have some awesome number of simultaneous system users, | |
1788 | you might want to raise the limit. | |
1789 | .TP | |
1790 | .I /proc/sys/fs/dquot-nr | |
1791 | This file shows the number of allocated disk quota | |
1792 | entries and the number of free disk quota entries. | |
1793 | .TP | |
1794 | .I /proc/sys/fs/file-max | |
1795 | This file defines | |
1796 | a system-wide limit on the number of open files for all processes. | |
1797 | (See also | |
1798 | .BR setrlimit (2), | |
1799 | which can be used by a process to set the per-process limit, | |
1800 | .BR RLIMIT_NOFILE , | |
1801 | on the number of files it may open.) | |
1802 | If you get lots | |
1803 | of error messages about running out of file handles, | |
1804 | try increasing this value: | |
1805 | .br | |
1806 | ||
1807 | .br | |
1808 | .nf | |
1809 | .ft CW | |
1810 | echo 100000 > /proc/sys/fs/file-max | |
1811 | .fi | |
1812 | .ft | |
1813 | ||
1814 | The kernel constant | |
7b2b5ea4 | 1815 | .B NR_OPEN |
fea681da MK |
1816 | imposes an upper limit on the value that may be placed in |
1817 | .IR file-max . | |
1818 | ||
c13182ef | 1819 | If you increase |
fea681da MK |
1820 | .IR /proc/sys/fs/file-max "," |
1821 | be sure to increase | |
1822 | .I /proc/sys/fs/inode-max | |
1823 | to 3-4 times the new | |
c13182ef | 1824 | value of |
fea681da MK |
1825 | .IR /proc/sys/fs/file-max "," |
1826 | or you will run out of inodes. | |
1827 | .TP | |
1828 | .I /proc/sys/fs/file-nr | |
59a40ed7 MK |
1829 | This (read-only) file gives the number of files presently opened. |
1830 | It contains three numbers: the number of allocated file handles; | |
1831 | the number of free file handles; and the maximum number of file handles. | |
c13182ef MK |
1832 | The kernel allocates file handles dynamically, but it |
1833 | doesn't free them again. | |
1834 | If the number of allocated files is close to the | |
fea681da MK |
1835 | maximum, you should consider increasing the maximum. |
1836 | When the number of free file handles is | |
1837 | large, you've encountered a peak in your usage of file | |
1838 | handles and you probably don't need to increase the maximum. | |
1839 | .TP | |
c13182ef | 1840 | .I /proc/sys/fs/inode-max |
fea681da | 1841 | This file contains the maximum number of in-memory inodes. |
59a40ed7 | 1842 | On some (2.4) systems, it may not be present. |
c13182ef | 1843 | This value should be 3-4 times larger |
59a40ed7 MK |
1844 | than the value in |
1845 | .IR file-max , | |
1846 | since \fIstdin\fP, \fIstdout\fP | |
1847 | and network sockets also need an inode to handle them. | |
1848 | When you regularly run out of inodes, you need to increase this value. | |
fea681da MK |
1849 | .TP |
1850 | .I /proc/sys/fs/inode-nr | |
59a40ed7 MK |
1851 | This file contains the first two values from |
1852 | .IR inode-state . | |
fea681da MK |
1853 | .TP |
1854 | .I /proc/sys/fs/inode-state | |
1855 | This file | |
59a40ed7 MK |
1856 | contains seven numbers: |
1857 | .IR nr_inodes , | |
1858 | .IR nr_free_inodes , | |
1859 | .IR preshrink , | |
1860 | and four dummy values. | |
1861 | .I nr_inodes | |
1862 | is the number of inodes the system has allocated. | |
1863 | This can be slightly more than | |
1864 | .I inode-max | |
1865 | because Linux allocates them one page full at a time. | |
1866 | .I nr_free_inodes | |
1867 | represents the number of free inodes. | |
1868 | .I preshrink | |
1869 | is non-zero when the | |
1870 | .I nr_inodes | |
1871 | > | |
1872 | .I inode-max | |
1873 | and the system needs to prune the inode list instead of allocating more. | |
fea681da | 1874 | .TP |
b877b392 | 1875 | .IR /proc/sys/fs/inotify " (since Linux 2.6.13)" |
c13182ef | 1876 | This directory contains files |
b877b392 MK |
1877 | .IR max_queued_events ", " max_user_instances ", and " max_user_watches , |
1878 | that can be used to limit the amount of kernel memory consumed by the | |
1879 | .I inotify | |
1880 | interface. | |
c13182ef | 1881 | For further details, see |
435b27cc | 1882 | .BR inotify (7). |
b877b392 | 1883 | .TP |
fea681da | 1884 | .I /proc/sys/fs/lease-break-time |
59a40ed7 | 1885 | This file specifies the grace period that the kernel grants to a process |
fea681da MK |
1886 | holding a file lease |
1887 | .RB ( fcntl (2)) | |
1888 | after it has sent a signal to that process notifying it | |
1889 | that another process is waiting to open the file. | |
1890 | If the lease holder does not remove or downgrade the lease within | |
1891 | this grace period, the kernel forcibly breaks the lease. | |
1892 | .TP | |
1893 | .I /proc/sys/fs/leases-enable | |
1894 | This file can be used to enable or disable file leases | |
1895 | .RB ( fcntl (2)) | |
1896 | on a system-wide basis. | |
1897 | If this file contains the value 0, leases are disabled. | |
eba72288 | 1898 | A non-zero value enables leases. |
6d64ca9c MK |
1899 | .TP |
1900 | .IR /proc/sys/fs/mqueue " (since Linux 2.6.6)" | |
c13182ef | 1901 | This directory contains files |
6d64ca9c MK |
1902 | .IR msg_max ", " msgsize_max ", and " queues_max , |
1903 | controlling the resources used by POSIX message queues. | |
96018ebe | 1904 | See |
c13182ef | 1905 | .BR mq_overview (7) |
96018ebe | 1906 | for details. |
6d64ca9c MK |
1907 | .TP |
1908 | .IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid | |
1909 | These files | |
1910 | allow you to change the value of the fixed UID and GID. | |
1911 | The default is 65534. | |
24d01c53 | 1912 | Some file systems only support 16-bit UIDs and GIDs, although in Linux |
c13182ef | 1913 | UIDs and GIDs are 32 bits. |
24d01c53 | 1914 | When one of these file systems is mounted |
6d64ca9c MK |
1915 | with writes enabled, any UID or GID that would exceed 65535 is translated |
1916 | to the overflow value before being written to disk. | |
1917 | .TP | |
43da96f2 MK |
1918 | .IR /proc/sys/fs/suid_dumpable " (since Linux 2.6.13)" |
1919 | .\" The following is based on text from Documentation/sysctl/kernel.txt | |
c13182ef | 1920 | The value in this file determines whether core dump files are |
f1162930 MK |
1921 | produced for set-user-ID or otherwise protected/tainted binaries. |
1922 | Three different integer values can be specified: | |
43da96f2 MK |
1923 | .sp |
1924 | \fI0\ (default)\fP | |
d9bfdb9c | 1925 | This provides the traditional (pre-Linux 2.6.13) behavior. |
c13182ef | 1926 | A core dump will not be produced for a process which has |
f1162930 | 1927 | changed credentials (by calling |
c13182ef MK |
1928 | .BR seteuid (2), |
1929 | .BR setgid (2), | |
1930 | or similar, or by executing a set-user-ID or set-group-ID program) | |
f1162930 | 1931 | or whose binary does not have read permission enabled. |
43da96f2 | 1932 | .sp |
f1162930 | 1933 | \fI1\ ("debug")\fP |
43da96f2 | 1934 | All processes dump core when possible. |
c13182ef | 1935 | The core dump is owned by the file system user ID of the dumping process |
f1162930 | 1936 | and no security is applied. |
43da96f2 MK |
1937 | This is intended for system debugging situations only. |
1938 | Ptrace is unchecked. | |
1939 | .sp | |
f1162930 | 1940 | \fI2\ ("suidsafe")\fP |
c13182ef MK |
1941 | Any binary which normally would not be dumped (see "0" above) |
1942 | is dumped readable by root only. | |
f1162930 | 1943 | This allows the user to remove the core dump file but not to read it. |
c13182ef | 1944 | For security reasons core dumps in this mode will not overwrite one |
43da96f2 | 1945 | another or other files. |
b877b392 | 1946 | This mode is appropriate when administrators are |
43da96f2 | 1947 | attempting to debug problems in a normal environment. |
fea681da | 1948 | .TP |
c13182ef MK |
1949 | .I /proc/sys/fs/super-max |
1950 | This file | |
fea681da | 1951 | controls the maximum number of superblocks, and |
24d01c53 | 1952 | thus the maximum number of mounted file systems the kernel |
c13182ef | 1953 | can have. |
59a40ed7 MK |
1954 | You only need to increase |
1955 | .I super-max | |
1956 | if you need to mount more file systems than the current value in | |
1957 | .I super-max | |
fea681da MK |
1958 | allows you to. |
1959 | .TP | |
1960 | .I /proc/sys/fs/super-nr | |
c13182ef | 1961 | This file |
24d01c53 | 1962 | contains the number of file systems currently mounted. |
fea681da MK |
1963 | .TP |
1964 | .I /proc/sys/kernel | |
417fceb7 MK |
1965 | This directory contains files controlling a range of kernel parameters, |
1966 | a described below. | |
fea681da MK |
1967 | .TP |
1968 | .I /proc/sys/kernel/acct | |
c13182ef | 1969 | This file |
59a40ed7 MK |
1970 | contains three numbers: |
1971 | .IR highwater , | |
1972 | .IR lowwater , | |
1973 | and | |
1974 | .IR frequency . | |
fea681da | 1975 | If BSD-style process accounting is enabled these values control |
d9bfdb9c | 1976 | its behavior. |
59a40ed7 MK |
1977 | If free space on file system where the log lives goes below |
1978 | .I lowwater | |
1979 | percent accounting suspends. | |
1980 | If free space gets above | |
1981 | .I highwater | |
1982 | percent accounting resumes. | |
1983 | .I frequency | |
1984 | determines | |
fea681da | 1985 | how often the kernel checks the amount of free space (value is in |
c13182ef MK |
1986 | seconds). |
1987 | Default values are 4, 2 and 30. | |
74aace8a MK |
1988 | That is, suspend accounting if 2% or less space is free; resume it |
1989 | if 4% or more space is free; consider information about amount of free space | |
fea681da MK |
1990 | valid for 30 seconds. |
1991 | .TP | |
59a40ed7 | 1992 | .IR /proc/sys/kernel/cap-bound " (from Linux 2.2 to 2.6.24)" |
fea681da | 1993 | This file holds the value of the kernel |
0daa9e92 | 1994 | .I "capability bounding set" |
fea681da MK |
1995 | (expressed as a signed decimal number). |
1996 | This set is ANDed against the capabilities permitted to a process | |
c13182ef | 1997 | during |
ee6e96c1 | 1998 | .BR execve (2). |
59a40ed7 MK |
1999 | Starting with Linux 2.6.25, |
2000 | the system-wide capability bounding set disappeared, | |
2001 | and was replaced by a per-thread bounding set; see | |
2002 | .BR capabilities (7). | |
fea681da MK |
2003 | .TP |
2004 | .I /proc/sys/kernel/core_pattern | |
5937fccd MK |
2005 | See |
2006 | .BR core (5). | |
654cc098 | 2007 | .TP |
fea681da | 2008 | .I /proc/sys/kernel/core_uses_pid |
5937fccd MK |
2009 | See |
2010 | .BR core (5). | |
fea681da MK |
2011 | .TP |
2012 | .I /proc/sys/kernel/ctrl-alt-del | |
2013 | This file | |
2014 | controls the handling of Ctrl-Alt-Del from the keyboard. | |
2015 | When the value in this file is 0, Ctrl-Alt-Del is trapped and | |
2016 | sent to the | |
49ec013c | 2017 | .BR init (8) |
fea681da | 2018 | program to handle a graceful restart. |
87174b3a | 2019 | When the value is greater than zero, Linux's reaction to a Vulcan |
fea681da MK |
2020 | Nerve Pinch (tm) will be an immediate reboot, without even |
2021 | syncing its dirty buffers. | |
6c04f928 | 2022 | Note: when a program (like dosemu) has the keyboard in "raw" |
fea681da MK |
2023 | mode, the ctrl-alt-del is intercepted by the program before it |
2024 | ever reaches the kernel tty layer, and it's up to the program | |
2025 | to decide what to do with it. | |
2026 | .TP | |
2027 | .I /proc/sys/kernel/hotplug | |
2028 | This file | |
2029 | contains the path for the hotplug policy agent. | |
60849763 | 2030 | The default value in this file is |
9a67332e | 2031 | .IR /sbin/hotplug . |
fea681da MK |
2032 | .TP |
2033 | .IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname | |
2034 | can be used to set the NIS/YP domainname and the | |
2035 | hostname of your box in exactly the same way as the commands | |
8b49407f MK |
2036 | .BR domainname (1) |
2037 | and | |
03d2434e MK |
2038 | .BR hostname (1), |
2039 | that is: | |
fea681da | 2040 | |
a08ea57c MK |
2041 | .in +4n |
2042 | .nf | |
fea681da | 2043 | # echo "darkstar" > /proc/sys/kernel/hostname |
fea681da | 2044 | # echo "mydomain" > /proc/sys/kernel/domainname |
a08ea57c MK |
2045 | .fi |
2046 | .in | |
fea681da | 2047 | |
fea681da | 2048 | has the same effect as |
fea681da | 2049 | |
a08ea57c MK |
2050 | .in +4n |
2051 | .nf | |
fea681da | 2052 | # hostname "darkstar" |
fea681da | 2053 | # domainname "mydomain" |
a08ea57c MK |
2054 | .fi |
2055 | .in | |
fea681da | 2056 | |
fea681da MK |
2057 | Note, however, that the classic darkstar.frop.org has the |
2058 | hostname "darkstar" and DNS (Internet Domain Name Server) | |
2059 | domainname "frop.org", not to be confused with the NIS (Network | |
c13182ef MK |
2060 | Information Service) or YP (Yellow Pages) domainname. |
2061 | These two | |
2062 | domain names are in general different. | |
2063 | For a detailed discussion | |
fea681da MK |
2064 | see the |
2065 | .BR hostname (1) | |
2066 | man page. | |
2067 | .TP | |
2068 | .I /proc/sys/kernel/htab-reclaim | |
eba72288 | 2069 | (PowerPC only) If this file is set to a non-zero value, |
fea681da | 2070 | the PowerPC htab |
9a67332e MK |
2071 | (see kernel file |
2072 | .IR Documentation/powerpc/ppc_htab.txt ) | |
2073 | is pruned | |
fea681da MK |
2074 | each time the system hits the idle loop. |
2075 | .TP | |
2076 | .I /proc/sys/kernel/l2cr | |
2077 | (PowerPC only) This file | |
2078 | contains a flag that controls the L2 cache of G3 processor | |
c13182ef MK |
2079 | boards. |
2080 | If 0, the cache is disabled. | |
eba72288 | 2081 | Enabled if non-zero. |
fea681da MK |
2082 | .TP |
2083 | .I /proc/sys/kernel/modprobe | |
6ab7c0aa MK |
2084 | This file contains the path for the kernel module loader. |
2085 | The default value is | |
2086 | .IR /sbin/modprobe . | |
2087 | The file is only present if the kernel is built with the | |
821643a8 MK |
2088 | .B CONFIG_KMOD |
2089 | option enabled. | |
6ab7c0aa MK |
2090 | It is described by the kernel source file |
2091 | .I Documentation/kmod.txt | |
2092 | (only present in kernel 2.4 and earlier). | |
fea681da MK |
2093 | .TP |
2094 | .I /proc/sys/kernel/msgmax | |
2095 | This file defines | |
2096 | a system-wide limit specifying the maximum number of bytes in | |
2097 | a single message written on a System V message queue. | |
2098 | .TP | |
2099 | .I /proc/sys/kernel/msgmni | |
2100 | This file defines the system-wide limit on the number of | |
2101 | message queue identifiers. | |
2102 | (This file is only present in Linux 2.4 onwards.) | |
2103 | .TP | |
2104 | .I /proc/sys/kernel/msgmnb | |
d9bfdb9c | 2105 | This file defines a system-wide parameter used to initialize the |
fea681da | 2106 | .I msg_qbytes |
568105c6 | 2107 | setting for subsequently created message queues. |
fea681da MK |
2108 | The |
2109 | .I msg_qbytes | |
2110 | setting specifies the maximum number of bytes that may be written to the | |
2111 | message queue. | |
2112 | .TP | |
2113 | .IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease | |
2114 | These files | |
2115 | give substrings of | |
2116 | .IR /proc/version . | |
2117 | .TP | |
2118 | .IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid | |
2119 | These files duplicate the files | |
2120 | .I /proc/sys/fs/overflowgid | |
2121 | and | |
2122 | .IR /proc/sys/fs/overflowuid . | |
2123 | .TP | |
2124 | .I /proc/sys/kernel/panic | |
59a40ed7 | 2125 | This file gives read/write access to the kernel variable |
fea681da | 2126 | .IR panic_timeout . |
eba72288 | 2127 | If this is zero, the kernel will loop on a panic; if non-zero |
fea681da | 2128 | it indicates that the kernel should autoreboot after this number |
c13182ef MK |
2129 | of seconds. |
2130 | When you use the | |
fea681da MK |
2131 | software watchdog device driver, the recommended setting is 60. |
2132 | .TP | |
bfde23a2 MK |
2133 | .IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)" |
2134 | This file controls the kernel's behavior when an oops | |
c13182ef MK |
2135 | or BUG is encountered. |
2136 | If this file contains 0, then the system | |
2137 | tries to continue operation. | |
2138 | If it contains 1, then the system | |
fea681da | 2139 | delays a few seconds (to give klogd time to record the oops output) |
c13182ef | 2140 | and then panics. |
fea681da MK |
2141 | If the |
2142 | .I /proc/sys/kernel/panic | |
eba72288 | 2143 | file is also non-zero then the machine will be rebooted. |
fea681da | 2144 | .TP |
bfde23a2 MK |
2145 | .I /proc/sys/kernel/pid_max "( since Linux 2.5.34)" |
2146 | This file specifies the value at which PIDs wrap around | |
fea681da MK |
2147 | (i.e., the value in this file is one greater than the maximum PID). |
2148 | The default value for this file, 32768, | |
2149 | results in the same range of PIDs as on earlier kernels. | |
c13182ef | 2150 | On 32-bit platforms, 32768 is the maximum value for |
b3b8bd24 | 2151 | .IR pid_max . |
c13182ef | 2152 | On 64-bit systems, |
b3b8bd24 MK |
2153 | .I pid_max |
2154 | can be set to any value up to 2^22 | |
b1b0eb73 MK |
2155 | .RB ( PID_MAX_LIMIT , |
2156 | approximately 4 million). | |
c13182ef | 2157 | .\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit |
b3b8bd24 MK |
2158 | .\" platforms, but this broke /proc/PID |
2159 | .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2 | |
fea681da MK |
2160 | .TP |
2161 | .IR /proc/sys/kernel/powersave-nap " (PowerPC only)" | |
c13182ef | 2162 | This file contains a flag. |
6c04f928 | 2163 | If set, Linux-PPC will use the "nap" mode of |
fea681da | 2164 | powersaving, |
6c04f928 | 2165 | otherwise the "doze" mode will be used. |
fea681da MK |
2166 | .TP |
2167 | .I /proc/sys/kernel/printk | |
59a40ed7 MK |
2168 | The four values in this file are |
2169 | .IR console_loglevel , | |
2170 | .IR default_message_loglevel , | |
40374cfc MK |
2171 | .IR minimum_console_level , |
2172 | and | |
2173 | .IR default_console_loglevel . | |
59a40ed7 MK |
2174 | These values influence |
2175 | .I printk() | |
2176 | behavior when printing or logging error messages. | |
c13182ef | 2177 | See |
fea681da MK |
2178 | .BR syslog (2) |
2179 | for more info on the different loglevels. | |
2180 | Messages with a higher priority than | |
59a40ed7 MK |
2181 | .I console_loglevel |
2182 | will be printed to the console. | |
2183 | Messages without an explicit priority will be printed with priority | |
2184 | .IR default_message_level . | |
2185 | .I minimum_console_loglevel | |
2186 | is the minimum (highest) value to which | |
2187 | .I console_loglevel | |
2188 | can be set. | |
2189 | .I default_console_loglevel | |
2190 | is the default value for | |
2191 | .IR console_loglevel . | |
fea681da MK |
2192 | .TP |
2193 | .IR /proc/sys/kernel/pty " (since Linux 2.6.4)" | |
59a40ed7 | 2194 | This directory contains two files relating to the number of Unix 98 |
fea681da MK |
2195 | pseudo-terminals (see |
2196 | .BR pts (4)) | |
2197 | on the system. | |
2198 | .TP | |
2199 | .I /proc/sys/kernel/pty/max | |
2200 | This file defines the maximum number of pseudo-terminals. | |
2201 | .TP | |
2202 | .I /proc/sys/kernel/pty/nr | |
2203 | This read-only file | |
2204 | indicates how many pseudo-terminals are currently in use. | |
2205 | .TP | |
fea681da MK |
2206 | .I /proc/sys/kernel/random |
2207 | This directory | |
2208 | contains various parameters controlling the operation of the file | |
2209 | .IR /dev/random . | |
c13182ef | 2210 | See |
95a32af8 MK |
2211 | .BR random (4) |
2212 | for further information. | |
fea681da MK |
2213 | .TP |
2214 | .I /proc/sys/kernel/real-root-dev | |
59a40ed7 | 2215 | This file is documented in the kernel source file |
9a67332e | 2216 | .IR Documentation/initrd.txt . |
fea681da MK |
2217 | .TP |
2218 | .IR /proc/sys/kernel/reboot-cmd " (Sparc only) " | |
2219 | This file seems to be a way to give an argument to the SPARC | |
c13182ef MK |
2220 | ROM/Flash boot loader. |
2221 | Maybe to tell it what to do after | |
fea681da MK |
2222 | rebooting? |
2223 | .TP | |
2224 | .I /proc/sys/kernel/rtsig-max | |
c13182ef | 2225 | (Only in kernels up to and including 2.6.7; see |
70556c17 | 2226 | .BR setrlimit (2)) |
fea681da | 2227 | This file can be used to tune the maximum number |
6f36deb4 | 2228 | of POSIX real-time (queued) signals that can be outstanding |
fea681da MK |
2229 | in the system. |
2230 | .TP | |
2231 | .I /proc/sys/kernel/rtsig-nr | |
70556c17 | 2232 | (Only in kernels up to and including 2.6.7.) |
6f36deb4 | 2233 | This file shows the number POSIX real-time signals currently queued. |
fea681da MK |
2234 | .TP |
2235 | .IR /proc/sys/kernel/sem " (since Linux 2.4)" | |
2236 | This file contains 4 numbers defining limits for System V IPC semaphores. | |
c13182ef | 2237 | These fields are, in order: |
fea681da MK |
2238 | .RS |
2239 | .IP SEMMSL 8 | |
2240 | The maximum semaphores per semaphore set. | |
2241 | .IP SEMMNS 8 | |
2242 | A system-wide limit on the number of semaphores in all semaphore sets. | |
2243 | .IP SEMOPM 8 | |
2244 | The maximum number of operations that may be specified in a | |
2245 | .BR semop (2) | |
2246 | call. | |
2247 | .IP SEMMNI 8 | |
2248 | A system-wide limit on the maximum number of semaphore identifiers. | |
2249 | .RE | |
2250 | .TP | |
2251 | .I /proc/sys/kernel/sg-big-buff | |
c13182ef | 2252 | This file |
fea681da | 2253 | shows the size of the generic SCSI device (sg) buffer. |
5ec8d26f | 2254 | You can't tune it just yet, but you could change it at |
9a67332e MK |
2255 | compile time by editing |
2256 | .I include/scsi/sg.h | |
2257 | and changing | |
b1b0eb73 MK |
2258 | the value of |
2259 | .BR SG_BIG_BUFF . | |
c13182ef | 2260 | However, there shouldn't be any reason to change this value. |
fea681da MK |
2261 | .TP |
2262 | .I /proc/sys/kernel/shmall | |
2263 | This file | |
2264 | contains the system-wide limit on the total number of pages of | |
2265 | System V shared memory. | |
2266 | .TP | |
2267 | .I /proc/sys/kernel/shmmax | |
2268 | This file | |
cf50118f | 2269 | can be used to query and set the run-time limit |
c13182ef | 2270 | on the maximum (System V IPC) shared memory segment size that can be |
fea681da | 2271 | created. |
b1b0eb73 | 2272 | Shared memory segments up to 1GB are now supported in the |
c13182ef | 2273 | kernel. |
b1b0eb73 MK |
2274 | This value defaults to |
2275 | .BR SHMMAX . | |
fea681da MK |
2276 | .TP |
2277 | .I /proc/sys/kernel/shmmni | |
2278 | (available in Linux 2.4 and onwards) | |
2279 | This file | |
2280 | specifies the system-wide maximum number of System V shared memory | |
2281 | segments that can be created. | |
2282 | .TP | |
2283 | .I /proc/sys/kernel/version | |
59a40ed7 | 2284 | This file contains a string like: |
fea681da | 2285 | |
3c1a1cdc | 2286 | #5 Wed Feb 25 21:49:24 MET 1998 |
fea681da | 2287 | |
6c04f928 | 2288 | The "#5" means that |
fea681da MK |
2289 | this is the fifth kernel built from this source base and the |
2290 | date behind it indicates the time the kernel was built. | |
2291 | .TP | |
2292 | .IR /proc/sys/kernel/zero-paged " (PowerPC only) " | |
2293 | This file | |
c13182ef | 2294 | contains a flag. |
eba72288 | 2295 | When enabled (non-zero), Linux-PPC will pre-zero pages in |
fea681da MK |
2296 | the idle loop, possibly speeding up get_free_pages. |
2297 | .TP | |
2298 | .I /proc/sys/net | |
2299 | This directory contains networking stuff. | |
81c6dd6c MK |
2300 | Explanations for some of the files under this directory can be found in |
2301 | .BR tcp (7) | |
2302 | and | |
2303 | .BR ip (7). | |
fea681da | 2304 | .TP |
ec650cc1 MK |
2305 | .I /proc/sys/net/core/somaxconn |
2306 | This file defines a ceiling value for the | |
2307 | .I backlog | |
2308 | argument of | |
2309 | .BR listen (2); | |
2310 | see the | |
2311 | .BR listen (2) | |
2312 | manual page for details. | |
2313 | .TP | |
fea681da MK |
2314 | .I /proc/sys/proc |
2315 | This directory may be empty. | |
2316 | .TP | |
2317 | .I /proc/sys/sunrpc | |
2318 | This directory supports Sun remote procedure call for network file system | |
c13182ef MK |
2319 | (NFS). |
2320 | On some systems, it is not present. | |
fea681da MK |
2321 | .TP |
2322 | .I /proc/sys/vm | |
c13182ef | 2323 | This directory contains files for memory management tuning, buffer and |
fb8e1d1b | 2324 | cache management. |
fea681da | 2325 | .TP |
b6c40587 MK |
2326 | .IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)" |
2327 | Writing to this file causes the kernel to drop clean caches, dentries and | |
2328 | inodes from memory, causing that memory to become free. | |
2329 | ||
c13182ef | 2330 | To free pagecache, use |
b6c40587 MK |
2331 | .IR "echo 1 > /proc/sys/vm/drop_caches" ; |
2332 | to free dentries and inodes, use | |
2333 | .IR "echo 2 > /proc/sys/vm/drop_caches" ; | |
2334 | to free pagecache, dentries and inodes, use | |
2335 | .IR "echo 3 > /proc/sys/vm/drop_caches" . | |
2336 | ||
c13182ef | 2337 | Because this is a non-destructive operation and dirty objects |
b6c40587 | 2338 | are not freeable, the |
c13182ef | 2339 | user should run |
b6c40587 MK |
2340 | .BR sync (8) |
2341 | first. | |
2342 | .TP | |
473ad28f MK |
2343 | .IR /proc/sys/vm/legacy_va_layout " (since Linux 2.6.9)" |
2344 | .\" The following is from Documentation/filesystems/proc.txt | |
e10120df | 2345 | If non-zero, this disables the new 32-bit memory-mapping layout; |
473ad28f MK |
2346 | the kernel will use the legacy (2.4) layout for all processes. |
2347 | .TP | |
c3d9780d MK |
2348 | .IR /proc/sys/vm/oom_dump_tasks " (since Linux 2.6.25)" |
2349 | .\" The following is from Documentation/sysctl/vm.txt | |
2350 | Enables a system-wide task dump (excluding kernel threads) to be | |
2351 | produced when the kernel performs an OOM-killing. | |
2352 | The dump includes the following information | |
2353 | for each task (thread, process): | |
2354 | thread ID, real user ID, thread group ID (process ID), | |
2355 | virtual memory size, resident set size, | |
2356 | the CPU that the task is scheduled on, | |
2357 | oom_adj score (see the description of | |
2358 | .IR /proc/[number]/oom_adj ), | |
2359 | and command name. | |
2360 | This is helpful to determine why the OOM-killer was invoked | |
2361 | and to identify the rogue task that caused it. | |
2362 | ||
2363 | If this contains the value zero, this information is suppressed. | |
2364 | On very large systems with thousands of tasks, | |
2365 | it may not be feasible to dump the memory state information for each one. | |
2366 | Such systems should not be forced to incur a performance penalty in | |
2367 | OOM situations when the information may not be desired. | |
2368 | ||
2369 | If this is set to non-zero, this information is shown whenever the | |
2370 | OOM-killer actually kills a memory-hogging task. | |
2371 | ||
2372 | The default value is 0. | |
2373 | .TP | |
e10120df MK |
2374 | .IR /proc/sys/vm/oom_kill_allocating_task " (since Linux 2.6.24)" |
2375 | .\" The following is from Documentation/sysctl/vm.txt | |
2376 | This enables or disables killing the OOM-triggering task in | |
2377 | out-of-memory situations. | |
2378 | ||
c3d9780d | 2379 | If this is set to zero, the OOM-killer will scan through the entire |
e10120df MK |
2380 | tasklist and select a task based on heuristics to kill. |
2381 | This normally selects a rogue memory-hogging task that | |
2382 | frees up a large amount of memory when killed. | |
2383 | ||
c3d9780d | 2384 | If this is set to non-zero, the OOM-killer simply kills the task that |
e10120df MK |
2385 | triggered the out-of-memory condition. |
2386 | This avoids a possibly expensive tasklist scan. | |
2387 | ||
2388 | If | |
2389 | .I /proc/sys/vm/panic_on_oom | |
2390 | is non-zero, it takes precedence over whatever value is used in | |
2391 | .IR /proc/sys/vm/oom_kill_allocating_task . | |
2392 | ||
2393 | The default value is 0. | |
2394 | .TP | |
fea681da | 2395 | .I /proc/sys/vm/overcommit_memory |
c13182ef MK |
2396 | This file contains the kernel virtual memory accounting mode. |
2397 | Values are: | |
59a40ed7 MK |
2398 | .RS |
2399 | .IP | |
fea681da MK |
2400 | 0: heuristic overcommit (this is the default) |
2401 | .br | |
2402 | 1: always overcommit, never check | |
2403 | .br | |
2404 | 2: always check, never overcommit | |
59a40ed7 MK |
2405 | .RE |
2406 | .IP | |
fea681da MK |
2407 | In mode 0, calls of |
2408 | .BR mmap (2) | |
097585ed | 2409 | with |
0daa9e92 | 2410 | .B MAP_NORESERVE |
e10120df | 2411 | are not checked, and the default check is very weak, |
fea681da | 2412 | leading to the risk of getting a process "OOM-killed". |
eba72288 | 2413 | Under Linux 2.4 any non-zero value implies mode 1. |
fea681da MK |
2414 | In mode 2 (available since Linux 2.6), the total virtual address space |
2415 | on the system is limited to (SS + RAM*(r/100)), | |
2416 | where SS is the size of the swap space, and RAM | |
2417 | is the size of the physical memory, and r is the contents of the file | |
2418 | .IR /proc/sys/vm/overcommit_ratio . | |
2419 | .TP | |
2420 | .I /proc/sys/vm/overcommit_ratio | |
c13182ef | 2421 | See the description of |
fea681da MK |
2422 | .IR /proc/sys/vm/overcommit_memory . |
2423 | .TP | |
c3d9780d MK |
2424 | .IR /proc/sys/vm/panic_on_oom " (since Linux 2.6.18)" |
2425 | .\" The following is adapted from Documentation/sysctl/vm.txt | |
2426 | This enables or disables a kernel panic in | |
2427 | an out-of-memory situation. | |
2428 | ||
2429 | If this file is set to the value 0, | |
2430 | the kernel's OOM-killer will kill some rogue process. | |
2431 | Usually, the OOM-killer is able to kill a rogue process and the | |
2432 | system will survive. | |
2433 | ||
2434 | If this file is set to the value 1, | |
2435 | then the kernel normally panics when out-of-memory happens. | |
2436 | However, if a process limits allocations to certain nodes | |
2437 | using memory policies | |
2438 | .RB ( mbind (2) | |
2439 | .BR MPOL_BIND ) | |
2440 | or cpusets | |
2441 | .RB ( cpuset (7)) | |
2442 | and those nodes reach memory exhaustion status, | |
2443 | one process may be killed by the OOM-killer. | |
2444 | No panic occurs in this case: | |
fd7193f5 | 2445 | because other nodes' memory may be free, |
c3d9780d MK |
2446 | this means the system as a whole may not have reached |
2447 | an out-of-memory situation yet. | |
2448 | ||
2449 | If this file is set to the value 2, | |
2450 | the kernel always panics when an out-of-memory condition occurs. | |
2451 | ||
2452 | The default value is 0. | |
2453 | 1 and 2 are for failover of clustering. | |
2454 | Select either according to your policy of failover. | |
2455 | .TP | |
fea681da | 2456 | .I /proc/sysvipc |
c13182ef | 2457 | Subdirectory containing the pseudo-files |
fea681da | 2458 | .IR msg ", " sem " and " shm "." |
c13182ef | 2459 | These files list the System V Interprocess Communication (IPC) objects |
fea681da MK |
2460 | (respectively: message queues, semaphores, and shared memory) |
2461 | that currently exist on the system, | |
2462 | providing similar information to that available via | |
2463 | .BR ipcs (1). | |
2464 | These files have headers and are formatted (one IPC object per line) | |
2465 | for easy understanding. | |
2c5e151c | 2466 | .BR svipc (7) |
fea681da MK |
2467 | provides further background on the information shown by these files. |
2468 | .TP | |
2469 | .I /proc/tty | |
c13182ef | 2470 | Subdirectory containing the pseudo-files and subdirectories for |
fea681da MK |
2471 | tty drivers and line disciplines. |
2472 | .TP | |
2473 | .I /proc/uptime | |
2474 | This file contains two numbers: the uptime of the system (seconds), | |
2475 | and the amount of time spent in idle process (seconds). | |
2476 | .TP | |
2477 | .I /proc/version | |
2478 | This string identifies the kernel version that is currently running. | |
030d3025 MK |
2479 | It includes the contents of |
2480 | .IR /proc/sys/kernel/ostype , | |
0daa9e92 | 2481 | .I /proc/sys/kernel/osrelease |
030d3025 MK |
2482 | and |
2483 | .IR /proc/sys/kernel/version . | |
c13182ef | 2484 | For example: |
fea681da MK |
2485 | .nf |
2486 | .in -2 | |
2487 | .ft CW | |
2488 | Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994 | |
2489 | .ft | |
2490 | .in +2 | |
2491 | .fi | |
b4e9ee8f MK |
2492 | .\" FIXME Document /proc/timer_list |
2493 | .\" .TP | |
2494 | .\" .IR /proc/timer_list " (since Linux 2.6.21)" | |
2495 | .\" See the 2.6.21 Change log | |
2496 | .\" FIXME Document /proc/timer_stats | |
2497 | .\" .TP | |
2498 | .\" .IR /proc/timer_stats " (since Linux 2.6.21)" | |
2499 | .\" See the 2.6.21 Change log | |
fea681da MK |
2500 | .TP |
2501 | .IR /proc/vmstat " (since Linux 2.6)" | |
2502 | This file displays various virtual memory statistics. | |
363f747c MK |
2503 | .TP |
2504 | .IR /proc/zoneinfo " (since Linux 2.6.13)" | |
2505 | This file display information about memory zones. | |
d9bfdb9c | 2506 | This is useful for analyzing virtual memory behavior. |
218e46f8 | 2507 | .\" FIXME more should be said about /proc/zoneinfo |
e37e3282 MK |
2508 | .SH NOTES |
2509 | Many strings (i.e., the environment and command line) are in | |
f81fb444 | 2510 | the internal format, with sub-fields terminated by null bytes (\(aq\\0\(aq), |
e37e3282 MK |
2511 | so you |
2512 | may find that things are more readable if you use \fIod \-c\fP or \fItr | |
2513 | "\\000" "\\n"\fP to read them. | |
26868e5b | 2514 | Alternatively, \fIecho \`cat <file>\`\fP works well. |
e37e3282 MK |
2515 | |
2516 | This manual page is incomplete, possibly inaccurate, and is the kind | |
2517 | of thing that needs to be updated very often. | |
2518 | .\" .SH ACKNOWLEDGEMENTS | |
2519 | .\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on | |
2520 | .\" kernel source documentation files written by Rik van Riel. | |
fea681da MK |
2521 | .SH "SEE ALSO" |
2522 | .BR cat (1), | |
2523 | .BR find (1), | |
2524 | .BR free (1), | |
fea681da MK |
2525 | .BR ps (1), |
2526 | .BR tr (1), | |
2527 | .BR uptime (1), | |
2528 | .BR chroot (2), | |
2529 | .BR mmap (2), | |
2530 | .BR readlink (2), | |
2531 | .BR syslog (2), | |
2532 | .BR slabinfo (5), | |
2533 | .BR hier (7), | |
268f000b | 2534 | .BR time (7), |
fea681da MK |
2535 | .BR arp (8), |
2536 | .BR dmesg (8), | |
2537 | .BR hdparm (8), | |
2538 | .BR ifconfig (8), | |
2539 | .BR init (8), | |
2540 | .BR lsmod (8), | |
2541 | .BR lspci (8), | |
809d0164 | 2542 | .BR mount (8), |
fea681da MK |
2543 | .BR netstat (8), |
2544 | .BR procinfo (8), | |
2545 | .BR route (8) | |
2546 | .br | |
e98268b4 MK |
2547 | The kernel source files: |
2548 | .IR Documentation/filesystems/proc.txt , | |
2549 | .IR Documentation/sysctl/vm.txt |