]>
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 | 8 | .\" |
1dd72f9c | 9 | .\" %%%LICENSE_START(GPLv2+_DOC_FULL) |
fea681da MK |
10 | .\" This is free documentation; you can redistribute it and/or |
11 | .\" modify it under the terms of the GNU General Public License as | |
12 | .\" published by the Free Software Foundation; either version 2 of | |
13 | .\" the License, or (at your option) any later version. | |
14 | .\" | |
15 | .\" The GNU General Public License's references to "object code" | |
16 | .\" and "executables" are to be interpreted as the output of any | |
17 | .\" document formatting or typesetting system, including | |
18 | .\" intermediate and printed output. | |
19 | .\" | |
20 | .\" This manual is distributed in the hope that it will be useful, | |
21 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | .\" GNU General Public License for more details. | |
24 | .\" | |
25 | .\" You should have received a copy of the GNU General Public | |
c715f741 MK |
26 | .\" License along with this manual; if not, see |
27 | .\" <http://www.gnu.org/licenses/>. | |
6a8d8745 | 28 | .\" %%%LICENSE_END |
fea681da MK |
29 | .\" |
30 | .\" Modified 1995-05-17 by faith@cs.unc.edu | |
31 | .\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com). | |
32 | .\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl | |
33 | .\" Modified 2001-12-16 by rwhron@earthlink.net | |
34 | .\" Modified 2002-07-13 by jbelton@shaw.ca | |
35 | .\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25 | |
c11b1abf | 36 | .\" by Michael Kerrisk <mtk.manpages@gmail.com> |
5d6d14a0 MK |
37 | .\" 2004-11-17, mtk -- updated notes on /proc/loadavg |
38 | .\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8 | |
568105c6 MK |
39 | .\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list |
40 | .\" 2005-05-12, mtk, updated 'stat' | |
6d64ca9c | 41 | .\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/* |
363f747c MK |
42 | .\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable |
43 | .\" 2005-09-19, mtk, added /proc/zoneinfo | |
b4e9ee8f | 44 | .\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7. |
69119dc7 MK |
45 | .\" 2008-06-05, mtk, Added /proc/[pid]/oom_score, /proc/[pid]/oom_adj, |
46 | .\" /proc/[pid]/limits, /proc/[pid]/mountinfo, /proc/[pid]/mountstats, | |
47 | .\" and /proc/[pid]/fdinfo/*. | |
48 | .\" 2008-06-19, mtk, Documented /proc/[pid]/status. | |
cc2d5c36 | 49 | .\" 2008-07-15, mtk, added /proc/config.gz |
363f747c | 50 | .\" |
c533af9d | 51 | .\" FIXME 2.6.13 seems to have /proc/vmcore implemented |
c13182ef MK |
52 | .\" in the source code, but there is no option available under |
53 | .\" 'make xconfig'; eventually this should be fixed, and then info | |
54 | .\" from the patch-2.6.13 and change log could be used to write an | |
c533af9d | 55 | .\" entry in this man page. |
cc2d5c36 | 56 | .\" Needs CONFIG_VMCORE |
8cf9de1b | 57 | .\" |
c13182ef MK |
58 | .\" FIXME cross check against Documentation/filesystems/proc.txt |
59 | .\" to see what information could be imported from that file | |
c533af9d | 60 | .\" into this file. |
fea681da | 61 | .\" |
c77eace5 | 62 | .TH PROC 5 2014-07-08 "Linux" "Linux Programmer's Manual" |
fea681da | 63 | .SH NAME |
9ee4a2b6 | 64 | proc \- process information pseudo-filesystem |
fea681da MK |
65 | .SH DESCRIPTION |
66 | The | |
67 | .I proc | |
ac8727b6 | 68 | filesystem is a pseudo-filesystem which provides an interface to |
c13182ef MK |
69 | kernel data structures. |
70 | It is commonly mounted at | |
fea681da | 71 | .IR /proc . |
c13182ef | 72 | Most of it is read-only, but some files allow kernel variables to be |
fea681da MK |
73 | changed. |
74 | .LP | |
ac8727b6 | 75 | The following list describes many of the files and directories under the |
743638fd MK |
76 | .I /proc |
77 | hierarchy. | |
fea681da MK |
78 | .PD 1 |
79 | .TP | |
69119dc7 | 80 | .I /proc/[pid] |
fea681da MK |
81 | There is a numerical subdirectory for each running process; the |
82 | subdirectory is named by the process ID. | |
83 | Each such subdirectory contains the following | |
84 | pseudo-files and directories. | |
69119dc7 | 85 | .\" FIXME Describe /proc/[pid]/attr and |
b3fb99e8 MK |
86 | .\" /proc/[pid]/task/[tid]/attr |
87 | .\" This is a directory | |
88 | .\" Added in 2.6.0 | |
89 | .\" CONFIG_SECURITY | |
90 | .\" https://lwn.net/Articles/28222/ | |
91 | .\" http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml | |
92 | .\" | |
93 | .\" fscreate, current, prev, and exec present in Linux 2.6.0 | |
94 | .\" keycreate added in Linux 2.6.18 | |
95 | .\" commit 4eb582cf1fbd7b9e5f466e3718a59c957e75254e | |
96 | .\" /Documentation/keys.txt | |
97 | .\" sockcreate added in Linux 2.6.18 | |
98 | .\" commit 42c3e03ef6b298813557cdb997bd6db619cd65a2 | |
99 | .\" | |
100 | .\" FIXME Describe /proc/[pid]/autogroup | |
101 | .\" 2.6.38 | |
102 | .\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a | |
103 | .\" CONFIG_SCHED_AUTOGROUP | |
b4e9ee8f | 104 | .\" |
fea681da | 105 | .TP |
69119dc7 | 106 | .IR /proc/[pid]/auxv " (since 2.6.0-test7)" |
857f1942 | 107 | This contains the contents of the ELF interpreter information passed |
c13182ef | 108 | to the process at exec time. |
857f1942 | 109 | The format is one \fIunsigned long\fP ID |
c13182ef | 110 | plus one \fIunsigned long\fP value for each entry. |
857f1942 | 111 | The last entry contains two zeros. |
4c69c692 MK |
112 | See also |
113 | .BR getauxval (3). | |
b5d204d0 | 114 | .TP |
8d708d6b | 115 | .IR /proc/[pid]/cgroup " (since Linux 2.6.24)" |
b5d204d0 MK |
116 | .\" Info in Documentation/cgroups/cgroups.txt |
117 | This file describes control groups to which the process/task belongs. | |
118 | For each cgroup hierarchy there is one entry containing | |
119 | colon-separated fields of the form: | |
120 | .nf | |
121 | .ft CW | |
122 | ||
123 | 5:cpuacct,cpu,cpuset:/daemons | |
124 | .ft | |
125 | .fi | |
126 | .IP | |
127 | The colon-separated fields are, from left to right: | |
128 | .RS 11 | |
129 | .IP 1. 3 | |
130 | hierarchy ID number | |
131 | .IP 2. | |
132 | set of subsystems bound to the hierarchy | |
133 | .IP 3. | |
134 | control group in the hierarchy to which the process belongs | |
135 | .RE | |
136 | .IP | |
90878f7c | 137 | This file is present only if the |
b5d204d0 MK |
138 | .B CONFIG_CGROUPS |
139 | kernel configuration option is enabled. | |
76e0451c MK |
140 | .TP |
141 | .IR /proc/[pid]/clear_refs " (since Linux 2.6.22)" | |
142 | .\" commit b813e931b4c8235bb42e301096ea97dbdee3e8fe (2.6.22) | |
143 | .\" commit 398499d5f3613c47f2143b8c54a04efb5d7a6da9 (2.6.32) | |
144 | .\" commit 040fa02077de01c7e08fa75be6125e4ca5636011 (3.11) | |
b4e9ee8f | 145 | .\" |
b4e9ee8f | 146 | .\" "Clears page referenced bits shown in smaps output" |
76e0451c MK |
147 | .\" write-only, writable only by the owner of the process |
148 | ||
149 | This is a write-only file, writable only by owner of the process. | |
150 | ||
151 | The following values may be written to the file: | |
152 | .RS | |
153 | .TP | |
154 | 1 (since Linux 2.6.22) | |
155 | .\" Internally: CLEAR_REFS_ALL | |
156 | Reset the PG_Referenced and ACCESSED/YOUNG | |
157 | bits for all the pages associated with the process. | |
158 | (Before kernel 2.6.32, writing any nonzero value to this file | |
159 | had this effect.) | |
160 | .TP | |
161 | 2 (since Linux 2.6.32) | |
162 | .\" Internally: CLEAR_REFS_ANON | |
163 | Reset the PG_Referenced and ACCESSED/YOUNG | |
164 | bits for all anonymous pages associated with the process. | |
165 | .TP | |
166 | 3 (since Linux 2.6.32) | |
167 | .\" Internally: CLEAR_REFS_MAPPED | |
168 | Reset the PG_Referenced and ACCESSED/YOUNG | |
169 | bits for all file-mapped pages associated with the process. | |
170 | .RE | |
171 | .IP | |
172 | Clearing the PG_Referenced and ACCESSED/YOUNG bits provides a method | |
173 | to measure approximately how much memory a process is using. | |
322d49fb | 174 | One first inspects the values in the "Referenced" fields |
76e0451c MK |
175 | for the VMAs shown in |
176 | .IR /proc/[pid]/smaps | |
177 | to get an idea of the memory footprint of the | |
178 | process. | |
179 | One then clears the PG_Referenced and ACCESSED/YOUNG bits | |
180 | and, after some measured time interval, | |
322d49fb | 181 | once again inspects the values in the "Referenced" fields |
76e0451c MK |
182 | to get an idea of the change in memory footprint of the |
183 | process during the measured interval. | |
184 | If one is interested only in inspecting the selected mapping types, | |
185 | then the value 2 or 3 can be used instead of 1. | |
186 | ||
187 | A further value can be written to affect a different bit: | |
188 | .RS | |
189 | .TP | |
190 | 4 (since Linux 3.11) | |
191 | Clear the soft-dirty bit for all the pages associated with the process. | |
192 | .\" Internally: CLEAR_REFS_SOFT_DIRTY | |
193 | This is used (in conjunction with | |
194 | .IR /proc/[pid]/pagemap ) | |
195 | by the check-point restore system to discover which pages of a process | |
196 | have been dirtied since the file | |
197 | .IR /proc/[pid]/clear_refs | |
198 | was written to. | |
199 | .RE | |
200 | .IP | |
201 | Writing any value to | |
202 | .IR /proc/[pid]/clear_refs | |
203 | other than those listed above has no effect. | |
204 | ||
205 | The | |
206 | .IR /proc/[pid]/clear_refs | |
207 | file is present only if the | |
208 | .B CONFIG_PROC_PAGE_MONITOR | |
209 | kernel configuration option is enabled. | |
857f1942 | 210 | .TP |
69119dc7 | 211 | .I /proc/[pid]/cmdline |
6975c16e | 212 | This read-only file holds the complete command line for the process, |
b447cd58 MK |
213 | unless the process is a zombie. |
214 | .\" In 2.3.26, this also used to be true if the process was swapped out. | |
215 | In the latter case, there is nothing in this file: | |
75b94dc3 | 216 | that is, a read on this file will return 0 characters. |
b447cd58 | 217 | The command-line arguments appear in this file as a set of |
6596d270 MK |
218 | strings separated by null bytes (\(aq\\0\(aq), |
219 | with a further null byte after the last string. | |
32d7ef00 MK |
220 | .TP |
221 | .IR /proc/[pid]/comm " (since Linux 2.6.33)" | |
222 | .\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4 | |
223 | This file exposes the process's | |
224 | .I comm | |
225 | value\(emthat is, the command name associated with the process. | |
226 | Different threads in the same process may have different | |
227 | .I comm | |
228 | values, accessible via | |
229 | .IR /proc/[pid]/task/[tid]/comm . | |
230 | A thread may modify its | |
231 | .I comm | |
232 | value, or that of any of other thread in the same thread group (see | |
233 | the discussion of | |
234 | .B CLONE_THREAD | |
235 | in | |
236 | .BR clone (2)), | |
237 | by writing to the file | |
238 | .IR /proc/self/task/[tid]/comm . | |
239 | Strings longer than | |
240 | .B TASK_COMM_LEN | |
241 | (16) characters are silently truncated. | |
242 | ||
243 | This file provides a superset of the | |
244 | .BR prctl (2) | |
245 | .B PR_SET_NAME | |
246 | and | |
247 | .B PR_GET_NAME | |
248 | operations, and is employed by | |
249 | .BR pthread_setname_np (3) | |
250 | when used to rename threads other than the caller. | |
fea681da | 251 | .TP |
69119dc7 | 252 | .IR /proc/[pid]/coredump_filter " (since kernel 2.6.23)" |
b4e9ee8f MK |
253 | See |
254 | .BR core (5). | |
5c411b17 | 255 | .TP |
69119dc7 | 256 | .IR /proc/[pid]/cpuset " (since kernel 2.6.12)" |
b3fb99e8 | 257 | .\" and /proc/[pid]/task/[tid]/cpuset |
5c411b17 MK |
258 | See |
259 | .BR cpuset (7). | |
b4e9ee8f | 260 | .TP |
69119dc7 | 261 | .I /proc/[pid]/cwd |
c13182ef | 262 | This is a symbolic link to the current working directory of the process. |
59a40ed7 MK |
263 | To find out the current working directory of process 20, |
264 | for instance, you can do this: | |
fea681da | 265 | |
59a40ed7 | 266 | .in +4n |
fea681da | 267 | .nf |
b43a3b30 | 268 | .RB "$" " cd /proc/20/cwd; /bin/pwd" |
fea681da | 269 | .fi |
59a40ed7 | 270 | .in |
fea681da | 271 | |
c13182ef MK |
272 | Note that the |
273 | .I pwd | |
e7b489f0 | 274 | command is often a shell built-in, and might |
c13182ef | 275 | not work properly. |
743638fd MK |
276 | In |
277 | .BR bash (1), | |
278 | you may use | |
279 | .IR "pwd\ \-P" . | |
afcaf646 MK |
280 | |
281 | .\" The following was still true as at kernel 2.6.13 | |
c13182ef MK |
282 | In a multithreaded process, the contents of this symbolic link |
283 | are not available if the main thread has already terminated | |
afcaf646 | 284 | (typically by calling |
59a40ed7 | 285 | .BR pthread_exit (3)). |
fea681da | 286 | .TP |
69119dc7 | 287 | .I /proc/[pid]/environ |
fea681da | 288 | This file contains the environment for the process. |
f81fb444 | 289 | The entries are separated by null bytes (\(aq\\0\(aq), |
b4e9ee8f | 290 | and there may be a null byte at the end. |
fea681da | 291 | Thus, to print out the environment of process 1, you would do: |
a08ea57c | 292 | .in +4n |
fea681da | 293 | .nf |
a08ea57c | 294 | |
fea681da | 295 | .ft CW |
13912780 | 296 | .RB "$" " strings /proc/1/environ" |
fea681da MK |
297 | .fi |
298 | .ft P | |
a08ea57c | 299 | .in |
fea681da | 300 | .TP |
69119dc7 | 301 | .I /proc/[pid]/exe |
fea681da | 302 | Under Linux 2.2 and later, this file is a symbolic link |
2d7195b8 | 303 | containing the actual pathname of the executed command. |
c13182ef MK |
304 | This symbolic link can be dereferenced normally; attempting to open |
305 | it will open the executable. | |
306 | You can even type | |
69119dc7 | 307 | .I /proc/[pid]/exe |
c13182ef | 308 | to run another copy of the same executable as is being run by |
69119dc7 | 309 | process [pid]. |
afcaf646 | 310 | .\" The following was still true as at kernel 2.6.13 |
c13182ef MK |
311 | In a multithreaded process, the contents of this symbolic link |
312 | are not available if the main thread has already terminated | |
afcaf646 MK |
313 | (typically by calling |
314 | .BR pthread_exit (3)). | |
fea681da | 315 | |
eb9a0b2f | 316 | Under Linux 2.0 and earlier, |
69119dc7 | 317 | .I /proc/[pid]/exe |
c13182ef MK |
318 | is a pointer to the binary which was executed, |
319 | and appears as a symbolic link. | |
320 | A | |
fea681da MK |
321 | .BR readlink (2) |
322 | call on this file under Linux 2.0 returns a string in the format: | |
323 | ||
59a40ed7 | 324 | [device]:inode |
fea681da MK |
325 | |
326 | For example, [0301]:1502 would be inode 1502 on device major 03 (IDE, | |
327 | MFM, etc. drives) minor 01 (first partition on the first drive). | |
328 | ||
329 | .BR find (1) | |
59a40ed7 MK |
330 | with the |
331 | .I \-inum | |
332 | option can be used to locate the file. | |
fea681da | 333 | .TP |
d4529654 | 334 | .I /proc/[pid]/fd/ |
fea681da MK |
335 | This is a subdirectory containing one entry for each file which the |
336 | process has open, named by its file descriptor, and which is a | |
c13182ef | 337 | symbolic link to the actual file. |
f78ed33a | 338 | Thus, 0 is standard input, 1 standard output, 2 standard error, and so on. |
fea681da | 339 | |
f75715e0 MK |
340 | For file descriptors for pipes and sockets, |
341 | the entries will be symbolic links whose content is the | |
342 | file type with the inode. | |
d4529654 MF |
343 | A |
344 | .BR readlink (2) | |
345 | call on this file returns a string in the format: | |
f75715e0 | 346 | |
d4529654 | 347 | type:[inode] |
f75715e0 MK |
348 | |
349 | For example, | |
350 | .I socket:[2248868] | |
351 | will be a socket and its inode is 2248868. | |
352 | For sockets, that inode can be used to find more information | |
353 | in one of the files under | |
d4529654 MF |
354 | .IR /proc/net/ . |
355 | ||
2b7a2ac5 MK |
356 | For file descriptors that have no corresponding inode |
357 | (e.g., file descriptors produced by | |
358 | .BR epoll_create (2), | |
359 | .BR eventfd (2), | |
360 | .BR inotify_init (2), | |
361 | .BR signalfd (2), | |
362 | and | |
363 | .BR timerfd (2)), | |
364 | the entry will be a symbolic link with contents of the form | |
365 | ||
366 | anon_inode:<file-type> | |
367 | ||
368 | In some cases, the | |
369 | .I file-type | |
370 | is surrounded by square brackets. | |
371 | ||
372 | For example, an epoll file descriptor will have a symbolic link | |
373 | whose content is the string | |
374 | .IR "anon_inode:[eventpoll]" . | |
375 | ||
d4529654 | 376 | .\"The following was still true as at kernel 2.6.13 |
afcaf646 | 377 | In a multithreaded process, the contents of this directory |
c13182ef | 378 | are not available if the main thread has already terminated |
afcaf646 MK |
379 | (typically by calling |
380 | .BR pthread_exit (3)). | |
381 | ||
59a40ed7 MK |
382 | Programs that will take a filename as a command-line argument, |
383 | but will not take input from standard input if no argument is supplied, | |
384 | or that write to a file named as a command-line argument, | |
385 | but will not send their output to standard output | |
386 | if no argument is supplied, can nevertheless be made to use | |
387 | standard input or standard out using | |
69119dc7 | 388 | .IR /proc/[pid]/fd . |
59a40ed7 MK |
389 | For example, assuming that |
390 | .I \-i | |
391 | is the flag designating an input file and | |
392 | .I \-o | |
393 | is the flag designating an output file: | |
a08ea57c | 394 | .in +4n |
fea681da MK |
395 | .nf |
396 | ||
b43a3b30 | 397 | .RB "$" " foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ..." |
fea681da | 398 | .fi |
a08ea57c MK |
399 | .in |
400 | ||
fea681da MK |
401 | and you have a working filter. |
402 | .\" The following is not true in my tests (MTK): | |
403 | .\" Note that this will not work for | |
404 | .\" programs that seek on their files, as the files in the fd directory | |
405 | .\" are not seekable. | |
406 | ||
59a40ed7 MK |
407 | .I /proc/self/fd/N |
408 | is approximately the same as | |
409 | .I /dev/fd/N | |
008f1ecc | 410 | in some UNIX and UNIX-like systems. |
c13182ef | 411 | Most Linux MAKEDEV scripts symbolically link |
59a40ed7 MK |
412 | .I /dev/fd |
413 | to | |
414 | .IR /proc/self/fd , | |
415 | in fact. | |
416 | ||
417 | Most systems provide symbolic links | |
418 | .IR /dev/stdin , | |
419 | .IR /dev/stdout , | |
420 | and | |
421 | .IR /dev/stderr , | |
422 | which respectively link to the files | |
423 | .IR 0 , | |
424 | .IR 1 , | |
425 | and | |
426 | .IR 2 | |
427 | in | |
428 | .IR /proc/self/fd . | |
429 | Thus the example command above could be written as: | |
430 | .in +4n | |
431 | .nf | |
432 | ||
b43a3b30 | 433 | .RB "$" " foobar \-i /dev/stdin \-o /dev/stdout ..." |
59a40ed7 MK |
434 | .fi |
435 | .in | |
69ab425e MK |
436 | .\" FIXME Describe /proc/[pid]/loginuid |
437 | .\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL | |
438 | .\" CONFIG_AUDITSYSCALL | |
439 | .TP | |
440 | .IR /proc/[pid]/fdinfo/ " (since kernel 2.6.22)" | |
441 | This is a subdirectory containing one entry for each file which the | |
442 | process has open, named by its file descriptor. | |
443 | The contents of each file can be read to obtain information | |
444 | about the corresponding file descriptor, for example: | |
445 | .in +4n | |
446 | .nf | |
447 | ||
448 | .RB "$" " cat /proc/12015/fdinfo/4" | |
449 | pos: 1000 | |
450 | flags: 01002002 | |
451 | .fi | |
452 | .in | |
453 | ||
454 | The | |
455 | .I pos | |
456 | field is a decimal number showing the current file offset. | |
457 | The | |
458 | .I flags | |
459 | field is an octal number that displays the | |
460 | file access mode and file status flags (see | |
461 | .BR open (2)). | |
462 | ||
463 | The files in this directory are readable only by the owner of the process. | |
43a8bfc6 MK |
464 | .\" FIXME |
465 | .\" Certain file types include additional info; see | |
466 | .\" Documentation/filesystems/proc.txt | |
467 | .\" | |
468 | .\" Especially interesting is this: | |
469 | .\" | |
470 | .\" commit ab49bdecc3ebb46ab661f5f05d5c5ea9606406c6 | |
471 | .\" Author: Cyrill Gorcunov <gorcunov@openvz.org> | |
472 | .\" Date: Mon Dec 17 16:05:06 2012 -0800 | |
473 | .\" | |
fa1d49a6 | 474 | .\" Basically, the /proc/PID/fdinfo/ entry for an inotify FD |
43a8bfc6 MK |
475 | .\" includes the file handles for all watched FDs |
476 | .\" | |
0ca2fc4d PS |
477 | .TP |
478 | .IR /proc/[pid]/io " (since kernel 2.6.20)" | |
68f11066 MK |
479 | .\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2 |
480 | This file contains I/O statistics for the process, for example: | |
0ca2fc4d PS |
481 | .in +4n |
482 | .nf | |
483 | ||
484 | .RB "#" " cat /proc/3828/io" | |
485 | rchar: 323934931 | |
486 | wchar: 323929600 | |
487 | syscr: 632687 | |
488 | syscw: 632675 | |
489 | read_bytes: 0 | |
490 | write_bytes: 323932160 | |
491 | cancelled_write_bytes: 0 | |
492 | .fi | |
493 | .in | |
494 | ||
495 | The fields are as follows: | |
496 | .RS | |
68f11066 MK |
497 | .TP |
498 | .IR rchar ": characters read" | |
0ca2fc4d PS |
499 | The number of bytes which this task has caused to be read from storage. |
500 | This is simply the sum of bytes which this process passed to | |
501 | .BR read (2) | |
68f11066 | 502 | and similar system calls. |
11256884 | 503 | It includes things such as terminal I/O and |
68f11066 MK |
504 | is unaffected by whether or not actual |
505 | physical disk I/O was required (the read might have been satisfied from | |
0ca2fc4d | 506 | pagecache). |
68f11066 MK |
507 | .TP |
508 | .IR wchar ": characters written" | |
0ca2fc4d PS |
509 | The number of bytes which this task has caused, or shall cause to be written |
510 | to disk. | |
511 | Similar caveats apply here as with | |
512 | .IR rchar . | |
68f11066 MK |
513 | .TP |
514 | .IR syscr ": read syscalls" | |
515 | Attempt to count the number of read I/O operations\(emthat is, | |
516 | system calls such as | |
0ca2fc4d PS |
517 | .BR read (2) |
518 | and | |
519 | .BR pread (2). | |
68f11066 MK |
520 | .TP |
521 | .IR syscw ": write syscalls" | |
522 | Attempt to count the number of write I/O operations\(emthat is, | |
523 | system calls such as | |
0ca2fc4d PS |
524 | .BR write (2) |
525 | and | |
526 | .BR pwrite (2). | |
68f11066 MK |
527 | .TP |
528 | .IR read_bytes ": bytes read" | |
0ca2fc4d PS |
529 | Attempt to count the number of bytes which this process really did cause to |
530 | be fetched from the storage layer. | |
531 | This is accurate for block-backed filesystems. | |
68f11066 MK |
532 | .TP |
533 | .IR write_bytes ": bytes written" | |
0ca2fc4d PS |
534 | Attempt to count the number of bytes which this process caused to be sent to |
535 | the storage layer. | |
68f11066 | 536 | .TP |
0ca2fc4d | 537 | .IR cancelled_write_bytes : |
0ca2fc4d PS |
538 | The big inaccuracy here is truncate. |
539 | If a process writes 1MB to a file and then deletes the file, | |
540 | it will in fact perform no writeout. | |
541 | But it will have been accounted as having caused 1MB of write. | |
68f11066 | 542 | In other words: this field represents the number of bytes which this process |
0ca2fc4d | 543 | caused to not happen, by truncating pagecache. |
68f11066 | 544 | A task can cause "negative" I/O too. |
0ca2fc4d | 545 | If this task truncates some dirty pagecache, |
68f11066 MK |
546 | some I/O which another task has been accounted for |
547 | (in its | |
548 | .IR write_bytes ) | |
549 | will not be happening. | |
550 | .RE | |
0ca2fc4d PS |
551 | .IP |
552 | .IR Note : | |
68f11066 | 553 | In the current implementation, things are a bit racy on 32-bit systems: |
0ca2fc4d PS |
554 | if process A reads process B's |
555 | .I /proc/[pid]/io | |
68f11066 | 556 | while process B is updating one of these 64-bit counters, |
0ca2fc4d | 557 | process A could see an intermediate result. |
69ab425e MK |
558 | .TP |
559 | .IR /proc/[pid]/limits " (since kernel 2.6.24)" | |
560 | This file displays the soft limit, hard limit, and units of measurement | |
561 | for each of the process's resource limits (see | |
562 | .BR getrlimit (2)). | |
563 | Up to and including Linux 2.6.35, | |
564 | this file is protected to allow reading only by the real UID of the process. | |
565 | Since Linux 2.6.36, | |
566 | .\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589 | |
567 | this file is readable by all users on the system. | |
b4f89985 PE |
568 | .TP |
569 | .IR /proc/[pid]/map_files/ " (since kernel 3.3) | |
18cdd0ac MK |
570 | .\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e |
571 | This subdirectory contains entries corresponding to memory-mapped | |
b4f89985 PE |
572 | files (see |
573 | .BR mmap (2)). | |
18cdd0ac MK |
574 | Entries are named by memory region start and end |
575 | address pair (expressed as hexadecimal numbers), | |
576 | and are symbolic links to the mapped files themselves. | |
577 | Here is an example, with the output wrapped and reformatted to fit on an 80-column display: | |
b4f89985 PE |
578 | .in +4n |
579 | .nf | |
580 | ||
7d2e6d74 | 581 | .RB "$" " ls -l /proc/self/map_files/" |
18cdd0ac MK |
582 | lr\-\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:31 |
583 | 3252e00000\-3252e20000 \-> /usr/lib64/ld-2.15.so | |
b4f89985 PE |
584 | \&... |
585 | .fi | |
586 | .in | |
587 | ||
588 | Although these entries are present for memory regions that were | |
d6a56978 | 589 | mapped with the |
b4f89985 | 590 | .BR MAP_FILE |
18cdd0ac | 591 | flag, the way anonymous shared memory (regions created with the |
b4f89985 PE |
592 | .B MAP_ANON | MAP_SHARED |
593 | flags) | |
594 | is implemented in Linux | |
18cdd0ac MK |
595 | means that such regions also appear on this directory. |
596 | Here is an example where the target file is the deleted | |
597 | .I /dev/zero | |
598 | one: | |
b4f89985 PE |
599 | .in +4n |
600 | .nf | |
601 | ||
602 | .RB | |
18cdd0ac MK |
603 | lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33 |
604 | 7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted) | |
b4f89985 PE |
605 | .fi |
606 | .in | |
607 | ||
608 | This directory appears only if the | |
609 | .B CONFIG_CHECKPOINT_RESTORE | |
610 | kernel configuration option is enabled. | |
fea681da | 611 | .TP |
69119dc7 | 612 | .I /proc/[pid]/maps |
fea681da MK |
613 | A file containing the currently mapped memory regions and their access |
614 | permissions. | |
bbf9f397 MK |
615 | See |
616 | .BR mmap (2) | |
617 | for some further information about memory mappings. | |
fea681da | 618 | |
dd0c3b96 | 619 | The format of the file is: |
fea681da | 620 | |
21781757 | 621 | .in -7n |
fea681da MK |
622 | .nf |
623 | .ft CW | |
fea681da | 624 | .ft |
21781757 MK |
625 | .I "address perms offset dev inode pathname" |
626 | 00400000-00452000 r-xp 00000000 08:02 173521 /usr/bin/dbus-daemon | |
627 | 00651000-00652000 r--p 00051000 08:02 173521 /usr/bin/dbus-daemon | |
628 | 00652000-00655000 rw-p 00052000 08:02 173521 /usr/bin/dbus-daemon | |
629 | 00e03000-00e24000 rw-p 00000000 00:00 0 [heap] | |
630 | 00e24000-011f7000 rw-p 00000000 00:00 0 [heap] | |
182090db | 631 | \&... |
21781757 MK |
632 | 35b1800000-35b1820000 r-xp 00000000 08:02 135522 /usr/lib64/ld-2.15.so |
633 | 35b1a1f000-35b1a20000 r--p 0001f000 08:02 135522 /usr/lib64/ld-2.15.so | |
634 | 35b1a20000-35b1a21000 rw-p 00020000 08:02 135522 /usr/lib64/ld-2.15.so | |
7d2e6d74 | 635 | 35b1a21000-35b1a22000 rw-p 00000000 00:00 0 |
21781757 MK |
636 | 35b1c00000-35b1dac000 r-xp 00000000 08:02 135870 /usr/lib64/libc-2.15.so |
637 | 35b1dac000-35b1fac000 ---p 001ac000 08:02 135870 /usr/lib64/libc-2.15.so | |
638 | 35b1fac000-35b1fb0000 r--p 001ac000 08:02 135870 /usr/lib64/libc-2.15.so | |
639 | 35b1fb0000-35b1fb2000 rw-p 001b0000 08:02 135870 /usr/lib64/libc-2.15.so | |
182090db | 640 | \&... |
21781757 | 641 | f2c6ff8c000-7f2c7078c000 rw-p 00000000 00:00 0 [stack:986] |
182090db | 642 | \&... |
21781757 MK |
643 | 7fffb2c0d000-7fffb2c2e000 rw-p 00000000 00:00 0 [stack] |
644 | 7fffb2d48000-7fffb2d49000 r-xp 00000000 00:00 0 [vdso] | |
fea681da | 645 | .fi |
21781757 | 646 | .in |
fea681da | 647 | |
7d2e6d74 | 648 | The |
3eb8c588 MK |
649 | .I address |
650 | field is the address space in the process that the mapping occupies. | |
651 | The | |
652 | .I perms | |
653 | field is a set of permissions: | |
fea681da MK |
654 | |
655 | .nf | |
656 | .in +5 | |
657 | r = read | |
658 | w = write | |
659 | x = execute | |
660 | s = shared | |
661 | p = private (copy on write) | |
662 | .fi | |
663 | .in | |
664 | ||
3eb8c588 MK |
665 | The |
666 | .I offset | |
b844cf04 | 667 | field is the offset into the file/whatever; |
3eb8c588 MK |
668 | .I dev |
669 | is the device | |
dd0c3b96 | 670 | (major:minor); |
3eb8c588 MK |
671 | .I inode |
672 | is the inode on that device. | |
59a40ed7 | 673 | 0 indicates that no inode is associated with the memory region, |
16e64bae | 674 | as would be the case with BSS (uninitialized data). |
fea681da | 675 | |
3eb8c588 MK |
676 | The |
677 | .I pathname | |
678 | field will usually be the file that is backing the mapping. | |
491ea6f1 | 679 | For ELF files, |
3eb8c588 MK |
680 | you can easily coordinate with the |
681 | .I offset | |
682 | field by looking at the | |
491ea6f1 MK |
683 | Offset field in the ELF program headers |
684 | .RI ( "readelf\ \-l" ). | |
37d32c38 | 685 | |
491ea6f1 | 686 | There are additional helpful pseudo-paths: |
61b0b1f4 MK |
687 | .RS 12 |
688 | .TP | |
689 | .IR [stack] | |
16e64bae | 690 | The initial process's (also known as the main thread's) stack. |
61b0b1f4 | 691 | .TP |
3eb8c588 | 692 | .IR [stack:<tid>] " (since Linux 3.4)" |
a60894c5 | 693 | .\" commit b76437579d1344b612cf1851ae610c636cec7db0 |
61b0b1f4 | 694 | A thread's stack (where the |
3eb8c588 | 695 | .IR <tid> |
61b0b1f4 | 696 | is a thread ID). |
491ea6f1 | 697 | It corresponds to the |
3eb8c588 | 698 | .IR /proc/[pid]/task/[tid]/ |
37d32c38 | 699 | path. |
61b0b1f4 | 700 | .TP |
7d2e6d74 | 701 | .IR [vdso] |
61b0b1f4 MK |
702 | The virtual dynamically linked shared object. |
703 | .TP | |
7d2e6d74 | 704 | .IR [heap] |
61b0b1f4 MK |
705 | The process's heap. |
706 | .in | |
61b0b1f4 MK |
707 | .RE |
708 | .IP | |
3eb8c588 MK |
709 | If the |
710 | .I pathname | |
711 | field is blank, | |
491ea6f1 | 712 | this is an anonymous mapping as obtained via the |
37d32c38 | 713 | .BR mmap (2) |
491ea6f1 | 714 | function. |
61b0b1f4 MK |
715 | There is no easy way to coordinate this back to a process's source, |
716 | short of running it through | |
491ea6f1 MK |
717 | .BR gdb (1), |
718 | .BR strace (1), | |
719 | or similar. | |
37d32c38 | 720 | |
eb9a0b2f | 721 | Under Linux 2.0, there is no field giving pathname. |
fea681da | 722 | .TP |
69119dc7 | 723 | .I /proc/[pid]/mem |
fea681da MK |
724 | This file can be used to access the pages of a process's memory through |
725 | .BR open (2), | |
726 | .BR read (2), | |
727 | and | |
ccb2bb0d | 728 | .BR lseek (2). |
b4e9ee8f | 729 | .TP |
69119dc7 | 730 | .IR /proc/[pid]/mountinfo " (since Linux 2.6.26)" |
b4e9ee8f MK |
731 | .\" This info adapted from Documentation/filesystems/proc.txt |
732 | This file contains information about mount points. | |
733 | It contains lines of the form: | |
734 | .nf | |
735 | .ft CW | |
b4e9ee8f MK |
736 | |
737 | 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue | |
738 | (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) | |
b4e9ee8f MK |
739 | .ft |
740 | .fi | |
741 | .IP | |
742 | The numbers in parentheses are labels for the descriptions below: | |
3bc960c2 | 743 | .RS 7 |
b4e9ee8f MK |
744 | .TP 5 |
745 | (1) | |
746 | mount ID: unique identifier of the mount (may be reused after | |
747 | .BR umount (2)). | |
748 | .TP | |
749 | (2) | |
750 | parent ID: ID of parent mount (or of self for the top of the mount tree). | |
751 | .TP | |
752 | (3) | |
753 | major:minor: value of | |
754 | .I st_dev | |
9ee4a2b6 | 755 | for files on filesystem (see |
b4e9ee8f MK |
756 | .BR stat (2)). |
757 | .TP | |
758 | (4) | |
9ee4a2b6 | 759 | root: root of the mount within the filesystem. |
b4e9ee8f MK |
760 | .TP |
761 | (5) | |
762 | mount point: mount point relative to the process's root. | |
763 | .TP | |
764 | (6) | |
765 | mount options: per-mount options. | |
766 | .TP | |
767 | (7) | |
768 | optional fields: zero or more fields of the form "tag[:value]". | |
769 | .TP | |
770 | (8) | |
771 | separator: marks the end of the optional fields. | |
772 | .TP | |
773 | (9) | |
9ee4a2b6 | 774 | filesystem type: name of filesystem in the form "type[.subtype]". |
b4e9ee8f MK |
775 | .TP |
776 | (10) | |
9ee4a2b6 | 777 | mount source: filesystem-specific information or "none". |
b4e9ee8f MK |
778 | .TP |
779 | (11) | |
68d86eac | 780 | super options: per-superblock options. |
b4e9ee8f MK |
781 | .RE |
782 | .IP | |
783 | Parsers should ignore all unrecognized optional fields. | |
784 | Currently the possible optional fields are: | |
785 | .RS 12 | |
786 | .TP 18 | |
787 | shared:X | |
788 | mount is shared in peer group X | |
789 | .TP | |
790 | master:X | |
791 | mount is slave to peer group X | |
792 | .TP | |
793 | propagate_from:X | |
794 | mount is slave and receives propagation from peer group X (*) | |
795 | .TP | |
796 | unbindable | |
797 | mount is unbindable | |
798 | .RE | |
799 | .IP | |
800 | (*) X is the closest dominant peer group under the process's root. | |
801 | If X is the immediate master of the mount, | |
802 | or if there is no dominant peer group under the same root, | |
803 | then only the "master:X" field is present | |
804 | and not the "propagate_from:X" field. | |
805 | ||
806 | For more information on mount propagation see: | |
807 | .I Documentation/filesystems/sharedsubtree.txt | |
66a9882e | 808 | in the Linux kernel source tree. |
b4e9ee8f | 809 | .TP |
cea61382 | 810 | .IR /proc/[pid]/mounts " (since Linux 2.4.19)" |
9ee4a2b6 | 811 | This is a list of all the filesystems currently mounted in the |
732e54dd | 812 | process's mount namespace. |
cea61382 MK |
813 | The format of this file is documented in |
814 | .BR fstab (5). | |
815 | Since kernel version 2.6.15, this file is pollable: | |
816 | after opening the file for reading, a change in this file | |
9ee4a2b6 | 817 | (i.e., a filesystem mount or unmount) causes |
cea61382 MK |
818 | .BR select (2) |
819 | to mark the file descriptor as readable, and | |
820 | .BR poll (2) | |
821 | and | |
822 | .BR epoll_wait (2) | |
823 | mark the file as having an error condition. | |
824 | .TP | |
69119dc7 | 825 | .IR /proc/[pid]/mountstats " (since Linux 2.6.17)" |
783a6233 | 826 | This file exports information (statistics, configuration information) |
b4e9ee8f MK |
827 | about the mount points in the process's name space. |
828 | Lines in this file have the form: | |
829 | .nf | |
830 | ||
831 | device /dev/sda7 mounted on /home with fstype ext3 [statistics] | |
832 | ( 1 ) ( 2 ) (3 ) (4) | |
833 | .fi | |
834 | .IP | |
835 | The fields in each line are: | |
3bc960c2 | 836 | .RS 7 |
b4e9ee8f MK |
837 | .TP 5 |
838 | (1) | |
839 | The name of the mounted device | |
840 | (or "nodevice" if there is no corresponding device). | |
841 | .TP | |
842 | (2) | |
9ee4a2b6 | 843 | The mount point within the filesystem tree. |
b4e9ee8f MK |
844 | .TP |
845 | (3) | |
9ee4a2b6 | 846 | The filesystem type. |
b4e9ee8f MK |
847 | .TP |
848 | (4) | |
849 | Optional statistics and configuration information. | |
9ee4a2b6 | 850 | Currently (as at Linux 2.6.26), only NFS filesystems export |
b4e9ee8f MK |
851 | information via this field. |
852 | .RE | |
853 | .IP | |
90878f7c | 854 | This file is readable only by the owner of the process. |
b4e9ee8f | 855 | .TP |
b4a185e5 | 856 | .IR /proc/[pid]/ns/ " (since Linux 3.0)" |
2c4201f0 | 857 | .\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f |
b4a185e5 EB |
858 | This is a subdirectory containing one entry for each namespace that |
859 | supports being manipulated by | |
80e63655 MK |
860 | .BR setns (2). |
861 | For information about namespaces, see | |
862 | .BR clone (2). | |
b4a185e5 EB |
863 | .TP |
864 | .IR /proc/[pid]/ns/ipc " (since Linux 3.0)" | |
80e63655 MK |
865 | Bind mounting this file (see |
866 | .BR mount (2)) | |
867 | to somewhere else in the filesystem keeps | |
c409c4ff | 868 | the IPC namespace of the process specified by |
b4a185e5 | 869 | .I pid |
80e63655 | 870 | alive even if all processes currently in the namespace terminate. |
b4a185e5 | 871 | |
80e63655 | 872 | Opening this file returns a file handle for the IPC namespace |
b4a185e5 | 873 | of the process specified by |
80e63655 MK |
874 | .IR pid . |
875 | As long as this file descriptor remains open, | |
876 | the IPC namespace will remain alive, | |
877 | even if all processes in the namespace terminate. | |
878 | The file descriptor can be passed to | |
879 | .BR setns (2). | |
b4a185e5 EB |
880 | .TP |
881 | .IR /proc/[pid]/ns/net " (since Linux 3.0)" | |
80e63655 MK |
882 | Bind mounting this file (see |
883 | .BR mount (2)) | |
884 | to somewhere else in the filesystem keeps | |
c409c4ff | 885 | the network namespace of the process specified by |
b4a185e5 | 886 | .I pid |
80e63655 | 887 | alive even if all processes in the namespace terminate. |
b4a185e5 | 888 | |
80e63655 | 889 | Opening this file returns a file handle for the network namespace |
b4a185e5 | 890 | of the process specified by |
80e63655 MK |
891 | .IR pid . |
892 | As long as this file descriptor remains open, | |
893 | the network namespace will remain alive, | |
894 | even if all processes in the namespace terminate. | |
895 | The file descriptor can be passed to | |
896 | .BR setns (2). | |
b4a185e5 EB |
897 | .TP |
898 | .IR /proc/[pid]/ns/uts " (since Linux 3.0)" | |
80e63655 MK |
899 | Bind mounting this file (see |
900 | .BR mount (2)) | |
901 | to somewhere else in the filesystem keeps | |
c409c4ff | 902 | the UTS namespace of the process specified by |
b4a185e5 | 903 | .I pid |
80e63655 | 904 | alive even if all processes currently in the namespace terminate. |
b4a185e5 | 905 | |
80e63655 | 906 | Opening this file returns a file handle for the UTS namespace |
b4a185e5 | 907 | of the process specified by |
80e63655 MK |
908 | .IR pid . |
909 | As long as this file descriptor remains open, | |
910 | the UTS namespace will remain alive, | |
911 | even if all processes in the namespace terminate. | |
912 | The file descriptor can be passed to | |
913 | .BR setns (2). | |
b4a185e5 | 914 | .TP |
69119dc7 | 915 | .IR /proc/[pid]/numa_maps " (since Linux 2.6.14)" |
610f75cc MK |
916 | See |
917 | .BR numa (7). | |
7388733a | 918 | .TP |
69119dc7 | 919 | .IR /proc/[pid]/oom_adj " (since Linux 2.6.11)" |
b4e9ee8f | 920 | This file can be used to adjust the score used to select which process |
0425de01 | 921 | should be killed in an out-of-memory (OOM) situation. |
b4e9ee8f MK |
922 | The kernel uses this value for a bit-shift operation of the process's |
923 | .IR oom_score | |
924 | value: | |
5b8dbfd4 MK |
925 | valid values are in the range \-16 to +15, |
926 | plus the special value \-17, | |
b4e9ee8f MK |
927 | which disables OOM-killing altogether for this process. |
928 | A positive score increases the likelihood of this | |
929 | process being killed by the OOM-killer; | |
930 | a negative score decreases the likelihood. | |
de8e9cc1 | 931 | .IP |
b4e9ee8f MK |
932 | The default value for this file is 0; |
933 | a new process inherits its parent's | |
934 | .I oom_adj | |
935 | setting. | |
936 | A process must be privileged | |
937 | .RB ( CAP_SYS_RESOURCE ) | |
938 | to update this file. | |
f2c8b197 MK |
939 | .IP |
940 | Since Linux 2.6.36, use of this file is deprecated in favor of | |
941 | .IR /proc/[pid]/oom_score_adj . | |
b4e9ee8f | 942 | .TP |
69119dc7 | 943 | .IR /proc/[pid]/oom_score " (since Linux 2.6.11)" |
b4e9ee8f MK |
944 | .\" See mm/oom_kill.c::badness() in the 2.6.25 sources |
945 | This file displays the current score that the kernel gives to | |
946 | this process for the purpose of selecting a process | |
947 | for the OOM-killer. | |
948 | A higher score means that the process is more likely to be | |
949 | selected by the OOM-killer. | |
950 | The basis for this score is the amount of memory used by the process, | |
951 | with increases (+) or decreases (\-) for factors including: | |
952 | .\" See mm/oom_kill.c::badness() in the 2.6.25 sources | |
953 | .RS | |
954 | .IP * 2 | |
955 | whether the process creates a lot of children using | |
956 | .BR fork (2) | |
957 | (+); | |
958 | .IP * | |
959 | whether the process has been running a long time, | |
960 | or has used a lot of CPU time (\-); | |
961 | .IP * | |
962 | whether the process has a low nice value (i.e., > 0) (+); | |
963 | .IP * | |
964 | whether the process is privileged (\-); and | |
965 | .\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE | |
966 | .IP * | |
967 | whether the process is making direct hardware access (\-). | |
968 | .\" More precisely, if it has CAP_SYS_RAWIO | |
969 | .RE | |
970 | .IP | |
971 | The | |
972 | .I oom_score | |
f2c8b197 MK |
973 | also reflects the adjustment specified by the |
974 | .I oom_score_adj | |
975 | or | |
b4e9ee8f MK |
976 | .I oom_adj |
977 | setting for the process. | |
f2c8b197 MK |
978 | .TP |
979 | .IR /proc/[pid]/oom_score_adj " (since Linux 2.6.36)" | |
980 | .\" Text taken from 3.7 Documentation/filesystems/proc.txt | |
981 | This file can be used to adjust the badness heuristic used to select which | |
982 | process gets killed in out-of-memory conditions. | |
983 | ||
984 | The badness heuristic assigns a value to each candidate task ranging from 0 | |
985 | (never kill) to 1000 (always kill) to determine which process is targeted. | |
986 | The units are roughly a proportion along that range of | |
987 | allowed memory the process may allocate from, | |
988 | based on an estimation of its current memory and swap use. | |
989 | For example, if a task is using all allowed memory, | |
990 | its badness score will be 1000. | |
991 | If it is using half of its allowed memory, its score will be 500. | |
992 | ||
993 | There is an additional factor included in the badness score: root | |
994 | processes are given 3% extra memory over other tasks. | |
995 | ||
996 | The amount of "allowed" memory depends on the context | |
0633f951 | 997 | in which the OOM-killer was called. |
f2c8b197 MK |
998 | If it is due to the memory assigned to the allocating task's cpuset |
999 | being exhausted, | |
1000 | the allowed memory represents the set of mems assigned to that | |
1001 | cpuset (see | |
1002 | .BR cpuset (7)). | |
1003 | If it is due to a mempolicy's node(s) being exhausted, | |
1004 | the allowed memory represents the set of mempolicy nodes. | |
1005 | If it is due to a memory limit (or swap limit) being reached, | |
1006 | the allowed memory is that configured limit. | |
1007 | Finally, if it is due to the entire system being out of memory, the | |
1008 | allowed memory represents all allocatable resources. | |
1009 | ||
1010 | The value of | |
0633f951 | 1011 | .I oom_score_adj |
f2c8b197 MK |
1012 | is added to the badness score before it |
1013 | is used to determine which task to kill. | |
1014 | Acceptable values range from \-1000 | |
1015 | (OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX). | |
0633f951 | 1016 | This allows user space to control the preference for OOM-killing, |
f2c8b197 | 1017 | ranging from always preferring a certain |
0633f951 | 1018 | task or completely disabling it from OOM-killing. |
f2c8b197 | 1019 | The lowest possible value, \-1000, is |
0633f951 | 1020 | equivalent to disabling OOM-killing entirely for that task, |
f2c8b197 MK |
1021 | since it will always report a badness score of 0. |
1022 | ||
1023 | Consequently, it is very simple for user space to define | |
1024 | the amount of memory to consider for each task. | |
1025 | Setting a | |
1026 | .I oom_score_adj | |
1027 | value of +500, for example, | |
1028 | is roughly equivalent to allowing the remainder of tasks sharing the | |
1029 | same system, cpuset, mempolicy, or memory controller resources | |
1030 | to use at least 50% more memory. | |
1031 | A value of \-500, on the other hand, would be roughly | |
1032 | equivalent to discounting 50% of the task's | |
1033 | allowed memory from being considered as scoring against the task. | |
1034 | ||
0633f951 | 1035 | For backward compatibility with previous kernels, |
f2c8b197 MK |
1036 | .I /proc/[pid]/oom_adj |
1037 | can still be used to tune the badness score. | |
1038 | Its value is | |
9f1b9726 | 1039 | scaled linearly with |
f2c8b197 MK |
1040 | .IR oom_score_adj . |
1041 | ||
1042 | Writing to | |
1043 | .IR /proc/[pid]/oom_score_adj | |
1044 | or | |
1045 | .IR /proc/[pid]/oom_adj | |
1046 | will change the other with its scaled value. | |
b0aa1e51 MK |
1047 | .TP |
1048 | .IR /proc/[pid]/pagemap " (since Linux 2.6.25)" | |
1049 | This file shows the mapping of each of the process's virtual pages | |
1050 | into physical page frames or swap area. | |
1051 | It contains one 64-bit value for each virtual page, | |
1052 | with the bits set as follows: | |
1053 | .RS 12 | |
1054 | .TP | |
1055 | 63 | |
1056 | If set, the page is present in RAM. | |
1057 | .TP | |
1058 | 62 | |
1059 | If set, the page is in swap space | |
1060 | .TP | |
1061 | 61 (since Linux 3.5) | |
1062 | The page is a file-mapped page or a shared anonymous page. | |
1063 | .TP | |
1064 | 60-56 (since Linux 3.11) | |
1065 | Zero | |
1066 | .\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f | |
1067 | .TP | |
1068 | 55 (Since Linux 3.11) | |
1069 | PTE is soft-dirty | |
1070 | (see the kernel source file | |
1071 | .IR Documentation/vm/soft-dirty.txt ). | |
1072 | .TP | |
1073 | 54-0 | |
1074 | If the page is present in RAM (bit 63), then these bits | |
1075 | provide the page frame number, which can be used to index | |
1076 | .IR /proc/kpageflags | |
1077 | and | |
1078 | .IR /proc/kpagecount . | |
1079 | If the page is present in swap (bit 62), | |
1080 | then bits 4-0 give the swap type, and bits 54-5 encode the swap offset. | |
1081 | .RE | |
1082 | .IP | |
1083 | Before Linux 3.11, bits 60-55 were | |
1084 | used to encode the base-2 log of the page size. | |
1085 | .IP | |
1086 | To employ | |
1087 | .IR /proc/[pid]/pagemap | |
1088 | efficiently, use | |
1089 | .IR /proc/[pid]/maps | |
1090 | to determine which areas of memory are actually mapped and seek | |
1091 | to skip over unmapped regions. | |
1092 | .IP | |
1093 | The | |
1094 | .IR /proc/[pid]/pagemap | |
1095 | file is present only if the | |
1096 | .B CONFIG_PROC_PAGE_MONITOR | |
1097 | kernel configuration option is enabled. | |
7c2905d1 MK |
1098 | .TP |
1099 | .IR /proc/[pid]/personality " (since Linux 2.6.28)" | |
1100 | .\" commit 478307230810d7e2a753ed220db9066dfdf88718 | |
1101 | This read-only file exposes the process's execution domain, as set by | |
1102 | .BR personality (2). | |
1103 | The value is displayed in hexadecimal notation. | |
fea681da | 1104 | .TP |
69119dc7 | 1105 | .I /proc/[pid]/root |
008f1ecc | 1106 | UNIX and Linux support the idea of a per-process root of the |
9ee4a2b6 | 1107 | filesystem, set by the |
fea681da | 1108 | .BR chroot (2) |
c13182ef MK |
1109 | system call. |
1110 | This file is a symbolic link that points to the process's | |
14d70713 MK |
1111 | root directory, and behaves in the same way as |
1112 | .IR exe , | |
1113 | and | |
1114 | .IR fd/* . | |
afcaf646 MK |
1115 | |
1116 | .\" The following was still true as at kernel 2.6.13 | |
c13182ef MK |
1117 | In a multithreaded process, the contents of this symbolic link |
1118 | are not available if the main thread has already terminated | |
afcaf646 MK |
1119 | (typically by calling |
1120 | .BR pthread_exit (3)). | |
69119dc7 | 1121 | .\" FIXME Describe /proc/[pid]/seccomp |
6aefb6df | 1122 | .\" Added in 2.6.12 |
69119dc7 | 1123 | .\" FIXME Describe /proc/[pid]/sessionid |
b4e9ee8f | 1124 | .\" Added in 2.6.25; read-only; only readable by real UID |
b3fb99e8 | 1125 | .\" commit 1e0bd7550ea9cf474b1ad4c6ff5729a507f75fdc |
b4e9ee8f | 1126 | .\" CONFIG_AUDITSYSCALL |
69119dc7 | 1127 | .\" FIXME Describe /proc/[pid]/sched |
b4e9ee8f MK |
1128 | .\" Added in 2.6.23 |
1129 | .\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS | |
1130 | .\" Displays various scheduling parameters | |
1131 | .\" This file can be written, to reset stats | |
b3fb99e8 MK |
1132 | .\" The set of fields exposed by this file have changed |
1133 | .\" significantly over time. | |
1134 | .\" commit 43ae34cb4cd650d1eb4460a8253a8e747ba052ac | |
1135 | .\" | |
69119dc7 MK |
1136 | .\" FIXME Describe /proc/[pid]/schedstats and |
1137 | .\" /proc/[pid]/task/[tid]/schedstats | |
b4e9ee8f MK |
1138 | .\" Added in 2.6.9 |
1139 | .\" CONFIG_SCHEDSTATS | |
fea681da | 1140 | .TP |
69119dc7 | 1141 | .IR /proc/[pid]/smaps " (since Linux 2.6.14)" |
b07b19c4 | 1142 | This file shows memory consumption for each of the process's mappings. |
1f0add28 | 1143 | For each mapping there is a series of lines such as the following: |
a08ea57c | 1144 | .in +4n |
b07b19c4 MK |
1145 | .nf |
1146 | ||
1f0add28 | 1147 | 00400000-0048a000 r-xp 00000000 fd:03 960637 /bin/bash |
95fe794d PG |
1148 | Size: 552 kB |
1149 | Rss: 460 kB | |
1150 | Pss: 100 kB | |
1151 | Shared_Clean: 452 kB | |
1152 | Shared_Dirty: 0 kB | |
1153 | Private_Clean: 8 kB | |
1154 | Private_Dirty: 0 kB | |
1155 | Referenced: 460 kB | |
1156 | Anonymous: 0 kB | |
1157 | AnonHugePages: 0 kB | |
1158 | Swap: 0 kB | |
1159 | KernelPageSize: 4 kB | |
1160 | MMUPageSize: 4 kB | |
1161 | Locked: 0 kB | |
b07b19c4 MK |
1162 | |
1163 | .fi | |
a08ea57c | 1164 | .in |
b07b19c4 MK |
1165 | The first of these lines shows the same information as is displayed |
1166 | for the mapping in | |
69119dc7 | 1167 | .IR /proc/[pid]/maps . |
b07b19c4 | 1168 | The remaining lines show the size of the mapping, |
95fe794d PG |
1169 | the amount of the mapping that is currently resident in RAM ("Rss"), |
1170 | the process' proportional share of this mapping ("Pss"), | |
1f0add28 | 1171 | the number of clean and dirty shared pages in the mapping, |
c7ce200d | 1172 | and the number of clean and dirty private pages in the mapping. |
95fe794d | 1173 | "Referenced" indicates the amount of memory currently marked as |
1f0add28 MK |
1174 | referenced or accessed. |
1175 | "Anonymous" shows the amount of memory | |
1176 | that does not belong to any file. | |
1177 | "Swap" shows how much | |
95fe794d PG |
1178 | would-be-anonymous memory is also used, but out on swap. |
1179 | ||
d6a56978 | 1180 | The "KernelPageSize" entry is the page size used by the kernel to back a VMA. |
1f0add28 MK |
1181 | This matches the size used by the MMU in the majority of cases. |
1182 | However, one counter-example occurs on PPC64 kernels | |
1183 | whereby a kernel using 64K as a base page size may still use 4K | |
1184 | pages for the MMU on older processors. | |
1185 | To distinguish, this | |
1186 | patch reports "MMUPageSize" as the page size used by the MMU. | |
95fe794d PG |
1187 | |
1188 | The "Locked" indicates whether the mapping is locked in memory | |
1189 | or not. | |
1190 | ||
1191 | "VmFlags" field represents the kernel flags associated with | |
1f0add28 MK |
1192 | the particular virtual memory area in two letter encoded manner. |
1193 | The codes are the following: | |
1194 | ||
95fe794d | 1195 | rd - readable |
1f0add28 | 1196 | wr - writable |
95fe794d PG |
1197 | ex - executable |
1198 | sh - shared | |
1199 | mr - may read | |
1200 | mw - may write | |
1201 | me - may execute | |
1202 | ms - may share | |
723e333c | 1203 | gd - stack segment grows down |
95fe794d PG |
1204 | pf - pure PFN range |
1205 | dw - disabled write to the mapped file | |
1206 | lo - pages are locked in memory | |
1207 | io - memory mapped I/O area | |
1208 | sr - sequential read advise provided | |
1209 | rr - random read advise provided | |
1210 | dc - do not copy area on fork | |
1211 | de - do not expand area on remapping | |
1212 | ac - area is accountable | |
1213 | nr - swap space is not reserved for the area | |
1214 | ht - area uses huge tlb pages | |
1215 | nl - non-linear mapping | |
1216 | ar - architecture specific flag | |
1217 | dd - do not include area into core dump | |
1218 | sd - soft-dirty flag | |
1219 | mm - mixed map area | |
1220 | hg - huge page advise flag | |
1221 | nh - no-huge page advise flag | |
b5408a0f | 1222 | mg - mergeable advise flag |
b07b19c4 | 1223 | |
e618d945 MK |
1224 | The |
1225 | .IR /proc/[pid]/smaps | |
1226 | file is present only if the | |
1227 | .B CONFIG_PROC_PAGE_MONITOR | |
1228 | kernel configuration option is enabled. | |
b07b19c4 | 1229 | .TP |
67aac6fb MK |
1230 | .IR /proc/[pid]/stack " (since Linux 2.6.29)" |
1231 | .\" 2ec220e27f5040aec1e88901c1b6ea3d135787ad | |
1232 | This file provides a symbolic trace of the function calls in this | |
1233 | process's kernel stack. | |
1234 | This file is provided only if the kernel was built with the | |
1235 | .B CONFIG_STACKTRACE | |
1236 | configuration option. | |
1237 | .TP | |
69119dc7 | 1238 | .I /proc/[pid]/stat |
c13182ef MK |
1239 | Status information about the process. |
1240 | This is used by | |
1241 | .BR ps (1). | |
082bf5b8 MK |
1242 | It is defined in the kernel source file |
1243 | .IR fs/proc/array.c "." | |
fea681da MK |
1244 | |
1245 | The fields, in order, with their proper | |
1246 | .BR scanf (3) | |
1247 | format specifiers, are: | |
1248 | .RS | |
62e4a418 MK |
1249 | .TP 10 |
1250 | (1) \fIpid\fP \ %d | |
1251 | .br | |
1252 | The process ID. | |
fea681da | 1253 | .TP |
62e4a418 MK |
1254 | (2) \fIcomm\fP \ %s |
1255 | The filename of the executable, in parentheses. | |
c13182ef | 1256 | This is visible whether or not the executable is swapped out. |
fea681da | 1257 | .TP |
62e4a418 | 1258 | (3) \fIstate\fP \ %c |
ef2eb7e0 MK |
1259 | .\" FIXME There were changes to this set of characters in: |
1260 | .\" 2.6.0 | |
1261 | .\" 2.6.33 | |
1262 | .\" 3.9 | |
1263 | .\" 3.14 | |
62e4a418 | 1264 | One character from the string "RSDZTW" where R is running, S is |
fea681da MK |
1265 | sleeping in an interruptible wait, D is waiting in uninterruptible |
1266 | disk sleep, Z is zombie, T is traced or stopped (on a signal), | |
1267 | and W is paging. | |
1268 | .TP | |
62e4a418 | 1269 | (4) \fIppid\fP \ %d |
e0fdc57c | 1270 | The PID of the parent of this process. |
fea681da | 1271 | .TP |
62e4a418 MK |
1272 | (5) \fIpgrp\fP \ %d |
1273 | The process group ID of the process. | |
fea681da | 1274 | .TP |
62e4a418 MK |
1275 | (6) \fIsession\fP \ %d |
1276 | The session ID of the process. | |
fea681da | 1277 | .TP |
62e4a418 MK |
1278 | (7) \fItty_nr\fP \ %d |
1279 | The controlling terminal of the process. | |
59a40ed7 MK |
1280 | (The minor device number is contained in the combination of bits |
1281 | 31 to 20 and 7 to 0; | |
b97deb97 | 1282 | the major device number is in bits 15 to 8.) |
fea681da | 1283 | .TP |
62e4a418 | 1284 | (8) \fItpgid\fP \ %d |
fea681da | 1285 | .\" This field and following, up to and including wchan added 0.99.1 |
62e4a418 | 1286 | The ID of the foreground process group of the controlling |
59a40ed7 | 1287 | terminal of the process. |
fea681da | 1288 | .TP |
62e4a418 MK |
1289 | (9) \fIflags\fP \ %u |
1290 | The kernel flags word of the process. | |
c13182ef | 1291 | For bit meanings, |
66a9882e | 1292 | see the PF_* defines in the Linux kernel source file |
00702acc | 1293 | .IR include/linux/sched.h . |
fea681da | 1294 | Details depend on the kernel version. |
62e4a418 MK |
1295 | |
1296 | The format for this field was %lu before Linux 2.6. | |
fea681da | 1297 | .TP |
62e4a418 MK |
1298 | (1) \fIminflt\fP \ %lu |
1299 | The number of minor faults the process has made which have not | |
fea681da MK |
1300 | required loading a memory page from disk. |
1301 | .TP | |
62e4a418 MK |
1302 | (11) \fIcminflt\fP \ %lu |
1303 | The number of minor faults that the process's | |
fea681da MK |
1304 | waited-for children have made. |
1305 | .TP | |
62e4a418 MK |
1306 | (12) \fImajflt\fP \ %lu |
1307 | The number of major faults the process has made which have | |
fea681da MK |
1308 | required loading a memory page from disk. |
1309 | .TP | |
62e4a418 MK |
1310 | (13) \fIcmajflt\fP \ %lu |
1311 | The number of major faults that the process's | |
fea681da MK |
1312 | waited-for children have made. |
1313 | .TP | |
62e4a418 MK |
1314 | (14) \fIutime\fP \ %lu |
1315 | Amount of time that this process has been scheduled in user mode, | |
7a017e24 | 1316 | measured in clock ticks (divide by |
67914165 | 1317 | .IR sysconf(_SC_CLK_TCK) ). |
a1c9dc59 MK |
1318 | This includes guest time, \fIguest_time\fP |
1319 | (time spent running a virtual CPU, see below), | |
1320 | so that applications that are not aware of the guest time field | |
1321 | do not lose that time from their calculations. | |
fea681da | 1322 | .TP |
62e4a418 MK |
1323 | (15) \fIstime\fP \ %lu |
1324 | Amount of time that this process has been scheduled in kernel mode, | |
7a017e24 | 1325 | measured in clock ticks (divide by |
67914165 | 1326 | .IR sysconf(_SC_CLK_TCK) ). |
fea681da | 1327 | .TP |
62e4a418 MK |
1328 | (16) \fIcutime\fP \ %ld |
1329 | Amount of time that this process's | |
7a017e24 MK |
1330 | waited-for children have been scheduled in user mode, |
1331 | measured in clock ticks (divide by | |
67914165 | 1332 | .IR sysconf(_SC_CLK_TCK) ). |
c13182ef | 1333 | (See also |
fea681da | 1334 | .BR times (2).) |
a1c9dc59 MK |
1335 | This includes guest time, \fIcguest_time\fP |
1336 | (time spent running a virtual CPU, see below). | |
fea681da | 1337 | .TP |
62e4a418 MK |
1338 | (17) \fIcstime\fP \ %ld |
1339 | Amount of time that this process's | |
7a017e24 MK |
1340 | waited-for children have been scheduled in kernel mode, |
1341 | measured in clock ticks (divide by | |
67914165 | 1342 | .IR sysconf(_SC_CLK_TCK) ). |
fea681da | 1343 | .TP |
62e4a418 MK |
1344 | (18) \fIpriority\fP \ %ld |
1345 | (Explanation for Linux 2.6) | |
59a40ed7 MK |
1346 | For processes running a real-time scheduling policy |
1347 | .RI ( policy | |
1348 | below; see | |
1349 | .BR sched_setscheduler (2)), | |
1350 | this is the negated scheduling priority, minus one; | |
1351 | that is, a number in the range \-2 to \-100, | |
1352 | corresponding to real-time priorities 1 to 99. | |
1353 | For processes running under a non-real-time scheduling policy, | |
1354 | this is the raw nice value | |
1355 | .RB ( setpriority (2)) | |
1356 | as represented in the kernel. | |
1357 | The kernel stores nice values as numbers | |
1358 | in the range 0 (high) to 39 (low), | |
1359 | corresponding to the user-visible nice range of \-20 to 19. | |
1360 | ||
1361 | Before Linux 2.6, this was a scaled value based on | |
1362 | the scheduler weighting given to this process. | |
1363 | .\" And back in kernel 1.2 days things were different again. | |
fea681da | 1364 | .TP |
62e4a418 MK |
1365 | (19) \fInice\fP \ %ld |
1366 | The nice value (see | |
59a40ed7 MK |
1367 | .BR setpriority (2)), |
1368 | a value in the range 19 (low priority) to \-20 (high priority). | |
1369 | .\" Back in kernel 1.2 days things were different. | |
fea681da MK |
1370 | .\" .TP |
1371 | .\" \fIcounter\fP %ld | |
1372 | .\" The current maximum size in jiffies of the process's next timeslice, | |
1373 | .\" or what is currently left of its current timeslice, if it is the | |
1374 | .\" currently running process. | |
1375 | .\" .TP | |
1376 | .\" \fItimeout\fP %u | |
1377 | .\" The time in jiffies of the process's next timeout. | |
0e94f77b | 1378 | .\" timeout was removed sometime around 2.1/2.2 |
aa610245 | 1379 | .TP |
62e4a418 MK |
1380 | (20) \fInum_threads\fP \ %ld |
1381 | Number of threads in this process (since Linux 2.6). | |
bb83d1b9 | 1382 | Before kernel 2.6, this field was hard coded to 0 as a placeholder |
0e94f77b | 1383 | for an earlier removed field. |
fea681da | 1384 | .TP |
62e4a418 MK |
1385 | (21) \fIitrealvalue\fP \ %ld |
1386 | The time in jiffies before the next | |
8bd58774 MK |
1387 | .B SIGALRM |
1388 | is sent to the process due to an interval timer. | |
0e94f77b MK |
1389 | Since kernel 2.6.17, this field is no longer maintained, |
1390 | and is hard coded as 0. | |
fea681da | 1391 | .TP |
62e4a418 MK |
1392 | (22) \fIstarttime\fP \ %llu |
1393 | The time the process started after system boot. | |
055024ed MK |
1394 | In kernels before Linux 2.6, this value was expressed in jiffies. |
1395 | Since Linux 2.6, the value is expressed in clock ticks (divide by | |
1396 | .IR sysconf(_SC_CLK_TCK) ). | |
62e4a418 MK |
1397 | |
1398 | The format for this field was %lu before Linux 2.6. | |
fea681da | 1399 | .TP |
62e4a418 MK |
1400 | (23) \fIvsize\fP \ %lu |
1401 | Virtual memory size in bytes. | |
fea681da | 1402 | .TP |
62e4a418 MK |
1403 | (24) \fIrss\fP \ %ld |
1404 | Resident Set Size: number of pages the process has in real memory. | |
c13182ef | 1405 | This is just the pages which |
5fab2e7c | 1406 | count toward text, data, or stack space. |
c13182ef | 1407 | This does not include pages |
fea681da MK |
1408 | which have not been demand-loaded in, or which are swapped out. |
1409 | .TP | |
62e4a418 MK |
1410 | (25) \fIrsslim\fP \ %lu |
1411 | Current soft limit in bytes on the rss of the process; | |
59a40ed7 MK |
1412 | see the description of |
1413 | .B RLIMIT_RSS | |
1414 | in | |
2b5407af | 1415 | .BR getrlimit (2). |
fea681da | 1416 | .TP |
62e4a418 MK |
1417 | (26) \fIstartcode\fP \ %lu |
1418 | The address above which program text can run. | |
fea681da | 1419 | .TP |
62e4a418 MK |
1420 | (27) \fIendcode\fP \ %lu |
1421 | The address below which program text can run. | |
fea681da | 1422 | .TP |
62e4a418 MK |
1423 | (28) \fIstartstack\fP \ %lu |
1424 | The address of the start (i.e., bottom) of the stack. | |
fea681da | 1425 | .TP |
62e4a418 MK |
1426 | (29) \fIkstkesp\fP \ %lu |
1427 | The current value of ESP (stack pointer), as found in the | |
fea681da MK |
1428 | kernel stack page for the process. |
1429 | .TP | |
62e4a418 MK |
1430 | (30) \fIkstkeip\fP \ %lu |
1431 | The current EIP (instruction pointer). | |
fea681da | 1432 | .TP |
62e4a418 MK |
1433 | (31) \fIsignal\fP \ %lu |
1434 | The bitmap of pending signals, displayed as a decimal number. | |
59a40ed7 | 1435 | Obsolete, because it does not provide information on real-time signals; use |
69119dc7 | 1436 | .I /proc/[pid]/status |
59a40ed7 | 1437 | instead. |
fea681da | 1438 | .TP |
62e4a418 MK |
1439 | (32) \fIblocked\fP \ %lu |
1440 | The bitmap of blocked signals, displayed as a decimal number. | |
59a40ed7 | 1441 | Obsolete, because it does not provide information on real-time signals; use |
69119dc7 | 1442 | .I /proc/[pid]/status |
59a40ed7 | 1443 | instead. |
fea681da | 1444 | .TP |
62e4a418 MK |
1445 | (33) \fIsigignore\fP \ %lu |
1446 | The bitmap of ignored signals, displayed as a decimal number. | |
59a40ed7 | 1447 | Obsolete, because it does not provide information on real-time signals; use |
69119dc7 | 1448 | .I /proc/[pid]/status |
59a40ed7 | 1449 | instead. |
fea681da | 1450 | .TP |
62e4a418 MK |
1451 | (34) \fIsigcatch\fP \ %lu |
1452 | The bitmap of caught signals, displayed as a decimal number. | |
59a40ed7 | 1453 | Obsolete, because it does not provide information on real-time signals; use |
69119dc7 | 1454 | .I /proc/[pid]/status |
59a40ed7 | 1455 | instead. |
fea681da | 1456 | .TP |
62e4a418 MK |
1457 | (35) \fIwchan\fP \ %lu |
1458 | This is the "channel" in which the process is waiting. | |
2054f761 MK |
1459 | It is the address of a location in the kernel where the process is sleeping. |
1460 | The corresponding symbolic name can be found in | |
1461 | .IR /proc/[pid]/wchan . | |
fea681da | 1462 | .TP |
62e4a418 | 1463 | (36) \fInswap\fP \ %lu |
0633f951 | 1464 | .\" nswap was added in 2.0 |
4d9b6984 | 1465 | Number of pages swapped (not maintained). |
fea681da | 1466 | .TP |
62e4a418 | 1467 | (37) \fIcnswap\fP \ %lu |
0633f951 | 1468 | .\" cnswap was added in 2.0 |
4d9b6984 | 1469 | Cumulative \fInswap\fP for child processes (not maintained). |
fea681da | 1470 | .TP |
62e4a418 MK |
1471 | (38) \fIexit_signal\fP \ %d \ (since Linux 2.1.22) |
1472 | Signal to be sent to parent when we die. | |
fea681da | 1473 | .TP |
62e4a418 MK |
1474 | (39) \fIprocessor\fP \ %d \ (since Linux 2.2.8) |
1475 | CPU number last executed on. | |
568105c6 | 1476 | .TP |
62e4a418 MK |
1477 | (40) \fIrt_priority\fP \ %u \ (since Linux 2.5.19) |
1478 | Real-time scheduling priority, a number in the range 1 to 99 for | |
59a40ed7 MK |
1479 | processes scheduled under a real-time policy, |
1480 | or 0, for non-real-time processes (see | |
568105c6 MK |
1481 | .BR sched_setscheduler (2)). |
1482 | .TP | |
62e4a418 MK |
1483 | (41) \fIpolicy\fP \ %u \ (since Linux 2.5.19) |
1484 | Scheduling policy (see | |
568105c6 | 1485 | .BR sched_setscheduler (2)). |
cd60dedd | 1486 | Decode using the SCHED_* constants in |
59a40ed7 | 1487 | .IR linux/sched.h . |
62e4a418 MK |
1488 | |
1489 | The format for this field was %lu before Linux 2.6.22. | |
167450d6 | 1490 | .TP |
62e4a418 MK |
1491 | (42) \fIdelayacct_blkio_ticks\fP \ %llu \ (since Linux 2.6.18) |
1492 | Aggregated block I/O delays, measured in clock ticks (centiseconds). | |
14c06953 | 1493 | .TP |
62e4a418 MK |
1494 | (43) \fIguest_time\fP \ %lu \ (since Linux 2.6.24) |
1495 | Guest time of the process (time spent running a virtual CPU | |
7a017e24 | 1496 | for a guest operating system), measured in clock ticks (divide by |
67914165 | 1497 | .IR sysconf(_SC_CLK_TCK) ). |
14c06953 | 1498 | .TP |
62e4a418 MK |
1499 | (44) \fIcguest_time\fP \ %ld \ (since Linux 2.6.24) |
1500 | Guest time of the process's children, measured in clock ticks (divide by | |
67914165 | 1501 | .IR sysconf(_SC_CLK_TCK) ). |
fea681da | 1502 | .TP |
62e4a418 | 1503 | (45) \fIstart_data\fP \ %lu \ (since Linux 3.3) |
0be30a54 | 1504 | .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff |
62e4a418 | 1505 | Address above which program initialized and |
426bc8d7 | 1506 | uninitialized (BSS) data are placed. |
12449ae3 | 1507 | .TP |
62e4a418 | 1508 | (46) \fIend_data\fP \ %lu \ (since Linux 3.3) |
0be30a54 | 1509 | .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff |
62e4a418 | 1510 | Address below which program initialized and |
426bc8d7 | 1511 | uninitialized (BSS) data are placed. |
12449ae3 | 1512 | .TP |
62e4a418 | 1513 | (47) \fIstart_brk\fP \ %lu \ (since Linux 3.3) |
0be30a54 | 1514 | .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff |
62e4a418 | 1515 | Address above which program heap can be expanded with |
426bc8d7 | 1516 | .BR brk (2). |
12449ae3 | 1517 | .TP |
62e4a418 | 1518 | (48) \fIarg_start\fP \ %lu \ (since Linux 3.5) |
0be30a54 | 1519 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 |
62e4a418 | 1520 | Address above which program command-line arguments |
426bc8d7 MK |
1521 | .RI ( argv ) |
1522 | are placed. | |
12449ae3 | 1523 | .TP |
62e4a418 | 1524 | (49) \fIarg_end\fP \ %lu \ (since Linux 3.5) |
0be30a54 | 1525 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 |
62e4a418 | 1526 | Address below program command-line arguments |
426bc8d7 MK |
1527 | .RI ( argv ) |
1528 | are placed. | |
12449ae3 | 1529 | .TP |
62e4a418 | 1530 | (50) \fIenv_start\fP \ %lu \ (since Linux 3.5) |
0be30a54 | 1531 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 |
62e4a418 | 1532 | Address above which program environment is placed. |
12449ae3 | 1533 | .TP |
62e4a418 | 1534 | (51) \fIenv_end\fP \ %lu \ (since Linux 3.5) |
0be30a54 | 1535 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 |
62e4a418 | 1536 | Address below which program environment is placed. |
12449ae3 | 1537 | .TP |
62e4a418 | 1538 | (52) \fIexit_code\fP \ %d \ (since Linux 3.5) |
0be30a54 | 1539 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 |
62e4a418 | 1540 | The thread's exit status in the form reported by |
426bc8d7 | 1541 | .BR waitpid (2). |
12449ae3 | 1542 | .RE |
1543 | .TP | |
69119dc7 | 1544 | .I /proc/[pid]/statm |
59a40ed7 | 1545 | Provides information about memory usage, measured in pages. |
c13182ef | 1546 | The columns are: |
a08ea57c MK |
1547 | .in +4n |
1548 | .nf | |
1549 | ||
cb42fb56 | 1550 | size (1) total program size |
69119dc7 | 1551 | (same as VmSize in \fI/proc/[pid]/status\fP) |
cb42fb56 | 1552 | resident (2) resident set size |
69119dc7 | 1553 | (same as VmRSS in \fI/proc/[pid]/status\fP) |
cb42fb56 MK |
1554 | share (3) shared pages (i.e., backed by a file) |
1555 | text (4) text (code) | |
59a40ed7 | 1556 | .\" (not including libs; broken, includes data segment) |
cb42fb56 MK |
1557 | lib (5) library (unused in Linux 2.6) |
1558 | data (6) data + stack | |
59a40ed7 | 1559 | .\" (including libs; broken, includes library text) |
cb42fb56 | 1560 | dt (7) dirty pages (unused in Linux 2.6) |
a08ea57c MK |
1561 | .fi |
1562 | .in | |
fea681da | 1563 | .TP |
69119dc7 | 1564 | .I /proc/[pid]/status |
fea681da | 1565 | Provides much of the information in |
69119dc7 | 1566 | .I /proc/[pid]/stat |
fea681da | 1567 | and |
69119dc7 | 1568 | .I /proc/[pid]/statm |
fea681da | 1569 | in a format that's easier for humans to parse. |
16b5f7ba MK |
1570 | Here's an example: |
1571 | .in +4n | |
1572 | .nf | |
1573 | ||
b43a3b30 | 1574 | .RB "$" " cat /proc/$$/status" |
16b5f7ba MK |
1575 | Name: bash |
1576 | State: S (sleeping) | |
1577 | Tgid: 3515 | |
1578 | Pid: 3515 | |
1579 | PPid: 3452 | |
1580 | TracerPid: 0 | |
1581 | Uid: 1000 1000 1000 1000 | |
1582 | Gid: 100 100 100 100 | |
1583 | FDSize: 256 | |
1584 | Groups: 16 33 100 | |
1585 | VmPeak: 9136 kB | |
1586 | VmSize: 7896 kB | |
1587 | VmLck: 0 kB | |
1588 | VmHWM: 7572 kB | |
1589 | VmRSS: 6316 kB | |
1590 | VmData: 5224 kB | |
1591 | VmStk: 88 kB | |
1592 | VmExe: 572 kB | |
1593 | VmLib: 1708 kB | |
1594 | VmPTE: 20 kB | |
1595 | Threads: 1 | |
1596 | SigQ: 0/3067 | |
1597 | SigPnd: 0000000000000000 | |
1598 | ShdPnd: 0000000000000000 | |
1599 | SigBlk: 0000000000010000 | |
1600 | SigIgn: 0000000000384004 | |
1601 | SigCgt: 000000004b813efb | |
1602 | CapInh: 0000000000000000 | |
1603 | CapPrm: 0000000000000000 | |
1604 | CapEff: 0000000000000000 | |
1605 | CapBnd: ffffffffffffffff | |
1606 | Cpus_allowed: 00000001 | |
1607 | Cpus_allowed_list: 0 | |
1608 | Mems_allowed: 1 | |
1609 | Mems_allowed_list: 0 | |
1610 | voluntary_ctxt_switches: 150 | |
1611 | nonvoluntary_ctxt_switches: 545 | |
1612 | .fi | |
1613 | .in | |
1614 | .IP | |
1615 | The fields are as follows: | |
1616 | .RS | |
1617 | .IP * 2 | |
1618 | .IR Name : | |
1619 | Command run by this process. | |
1620 | .IP * | |
1621 | .IR State : | |
4175f999 MK |
1622 | Current state of the process. |
1623 | One of | |
16b5f7ba MK |
1624 | "R (running)", |
1625 | "S (sleeping)", | |
1626 | "D (disk sleep)", | |
1627 | "T (stopped)", | |
1628 | "T (tracing stop)", | |
1629 | "Z (zombie)", | |
1630 | or | |
1631 | "X (dead)". | |
1632 | .IP * | |
1633 | .IR Tgid : | |
1634 | Thread group ID (i.e., Process ID). | |
1635 | .IP * | |
1636 | .IR Pid : | |
1637 | Thread ID (see | |
1638 | .BR gettid (2)). | |
1639 | .IP * | |
a1bc91d5 MK |
1640 | .IR PPid : |
1641 | PID of parent process. | |
1642 | .IP * | |
16b5f7ba MK |
1643 | .IR TracerPid : |
1644 | PID of process tracing this process (0 if not being traced). | |
1645 | .IP * | |
1646 | .IR Uid ", " Gid : | |
9ee4a2b6 | 1647 | Real, effective, saved set, and filesystem UIDs (GIDs). |
16b5f7ba MK |
1648 | .IP * |
1649 | .IR FDSize : | |
1650 | Number of file descriptor slots currently allocated. | |
1651 | .IP * | |
1652 | .IR Groups : | |
1653 | Supplementary group list. | |
1654 | .IP * | |
1655 | .IR VmPeak : | |
1656 | Peak virtual memory size. | |
1657 | .IP * | |
1658 | .IR VmSize : | |
1659 | Virtual memory size. | |
1660 | .IP * | |
1661 | .IR VmLck : | |
fde39195 MK |
1662 | Locked memory size (see |
1663 | .BR mlock (3)). | |
16b5f7ba MK |
1664 | .IP * |
1665 | .IR VmHWM : | |
1666 | Peak resident set size ("high water mark"). | |
1667 | .IP * | |
1668 | .IR VmRSS : | |
1669 | Resident set size. | |
1670 | .IP * | |
1671 | .IR VmData ", " VmStk ", " VmExe : | |
1672 | Size of data, stack, and text segments. | |
1673 | .IP * | |
1674 | .IR VmLib : | |
1675 | Shared library code size. | |
1676 | .IP * | |
1677 | .IR VmPTE : | |
1678 | Page table entries size (since Linux 2.6.10). | |
1679 | .IP * | |
1680 | .IR Threads : | |
1681 | Number of threads in process containing this thread. | |
1682 | .IP * | |
6ee625eb MK |
1683 | .IR SigQ : |
1684 | This field contains two slash-separated numbers that relate to | |
1685 | queued signals for the real user ID of this process. | |
1686 | The first of these is the number of currently queued | |
1687 | signals for this real user ID, and the second is the | |
1688 | resource limit on the number of queued signals for this process | |
1689 | (see the description of | |
1690 | .BR RLIMIT_SIGPENDING | |
1691 | in | |
1692 | .BR getrlimit (2)). | |
1693 | .IP * | |
16b5f7ba MK |
1694 | .IR SigPnd ", " ShdPnd : |
1695 | Number of signals pending for thread and for process as a whole (see | |
1696 | .BR pthreads (7) | |
1697 | and | |
1698 | .BR signal (7)). | |
1699 | .IP * | |
1700 | .IR SigBlk ", " SigIgn ", " SigCgt : | |
1701 | Masks indicating signals being blocked, ignored, and caught (see | |
1702 | .BR signal (7)). | |
1703 | .IP * | |
1704 | .IR CapInh ", " CapPrm ", " CapEff : | |
1705 | Masks of capabilities enabled in inheritable, permitted, and effective sets | |
1706 | (see | |
1707 | .BR capabilities (7)). | |
1708 | .IP * | |
1709 | .IR CapBnd : | |
1710 | Capability Bounding set | |
1711 | (since kernel 2.6.26, see | |
1712 | .BR capabilities (7)). | |
1713 | .IP * | |
1714 | .IR Cpus_allowed : | |
1715 | Mask of CPUs on which this process may run | |
1716 | (since Linux 2.6.24, see | |
1717 | .BR cpuset (7)). | |
1718 | .IP * | |
1719 | .IR Cpus_allowed_list : | |
1720 | Same as previous, but in "list format" | |
1721 | (since Linux 2.6.26, see | |
1722 | .BR cpuset (7)). | |
1723 | .IP * | |
1724 | .IR Mems_allowed : | |
1725 | Mask of memory nodes allowed to this process | |
1726 | (since Linux 2.6.24, see | |
1727 | .BR cpuset (7)). | |
1728 | .IP * | |
1729 | .IR Mems_allowed_list : | |
1730 | Same as previous, but in "list format" | |
1731 | (since Linux 2.6.26, see | |
1732 | .BR cpuset (7)). | |
1733 | .IP * | |
1734 | .IR voluntary_context_switches ", " nonvoluntary_context_switches : | |
1735 | Number of voluntary and involuntary context switches (since Linux 2.6.23). | |
1736 | .RE | |
b3fb99e8 | 1737 | .\" FIXME /proc/[pid]/syscall |
afb7b014 MK |
1738 | .TP |
1739 | .IR /proc/[pid]/syscall " (since Linux 2.6.27)" | |
1740 | .\" commit ebcb67341fee34061430f3367f2e507e52ee051b | |
1741 | This file exposes the system call number and argument registers for the | |
1742 | system call currently being executed by the process, | |
1743 | followed by the values of the stack pointer and program counter registers. | |
1744 | The values of all six argument registers are exposed, | |
1745 | although most system calls use fewer registers. | |
1746 | ||
1747 | If the process is blocked, but not in a system call, | |
1748 | then the file displays -1 in place of the system call number, | |
1749 | followed by just the values of the stack pointer and program counter. | |
1750 | If process is not blocked, then file contains just the string "running". | |
1751 | ||
1752 | This file is present only if the kernel was configured with | |
1753 | .BR CONFIG_HAVE_ARCH_TRACEHOOK . | |
fea681da | 1754 | .TP |
69119dc7 | 1755 | .IR /proc/[pid]/task " (since Linux 2.6.0-test6)" |
afcaf646 MK |
1756 | This is a directory that contains one subdirectory |
1757 | for each thread in the process. | |
69119dc7 MK |
1758 | The name of each subdirectory is the numerical thread ID |
1759 | .RI ( [tid] ) | |
1760 | of the thread (see | |
afcaf646 MK |
1761 | .BR gettid (2)). |
1762 | Within each of these subdirectories, there is a set of | |
1763 | files with the same names and contents as under the | |
69119dc7 | 1764 | .I /proc/[pid] |
afcaf646 MK |
1765 | directories. |
1766 | For attributes that are shared by all threads, the contents for | |
1767 | each of the files under the | |
69119dc7 | 1768 | .I task/[tid] |
afcaf646 | 1769 | subdirectories will be the same as in the corresponding |
c13182ef | 1770 | file in the parent |
69119dc7 | 1771 | .I /proc/[pid] |
afcaf646 | 1772 | directory |
c13182ef | 1773 | (e.g., in a multithreaded process, all of the |
69119dc7 | 1774 | .I task/[tid]/cwd |
c13182ef | 1775 | files will have the same value as the |
69119dc7 | 1776 | .I /proc/[pid]/cwd |
c13182ef | 1777 | file in the parent directory, since all of the threads in a process |
afcaf646 MK |
1778 | share a working directory). |
1779 | For attributes that are distinct for each thread, | |
c13182ef | 1780 | the corresponding files under |
69119dc7 | 1781 | .I task/[tid] |
afcaf646 | 1782 | may have different values (e.g., various fields in each of the |
69119dc7 | 1783 | .I task/[tid]/status |
afcaf646 MK |
1784 | files may be different for each thread). |
1785 | ||
1786 | .\" The following was still true as at kernel 2.6.13 | |
1787 | In a multithreaded process, the contents of the | |
69119dc7 | 1788 | .I /proc/[pid]/task |
c13182ef | 1789 | directory are not available if the main thread has already terminated |
afcaf646 MK |
1790 | (typically by calling |
1791 | .BR pthread_exit (3)). | |
1792 | .TP | |
2054f761 MK |
1793 | .IR /proc/[pid]/wchan " (since Linux 2.6.0)" |
1794 | The symbolic name corresponding to the location | |
1795 | in the kernel where the process is sleeping. | |
1796 | .TP | |
fea681da | 1797 | .I /proc/apm |
097585ed MK |
1798 | Advanced power management version and battery information when |
1799 | .B CONFIG_APM | |
1800 | is defined at kernel compilation time. | |
fea681da MK |
1801 | .TP |
1802 | .I /proc/bus | |
1803 | Contains subdirectories for installed busses. | |
1804 | .TP | |
1805 | .I /proc/bus/pccard | |
59a40ed7 | 1806 | Subdirectory for PCMCIA devices when |
097585ed MK |
1807 | .B CONFIG_PCMCIA |
1808 | is set at kernel compilation time. | |
fea681da | 1809 | .TP |
1509ca0e MK |
1810 | .IR /proc/[pid]/timers " (since Linux 3.10)" |
1811 | .\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5 | |
1812 | .\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0 | |
1813 | A list of the POSIX timers for this process. | |
9d54c087 | 1814 | Each timer is listed with a line that started with the string "ID:". |
1509ca0e MK |
1815 | For example: |
1816 | ||
1817 | .in +4n | |
1818 | .nf | |
1819 | ID: 1 | |
1820 | signal: 60/00007fff86e452a8 | |
1821 | notify: signal/pid.2634 | |
1822 | ClockID: 0 | |
1823 | ID: 0 | |
1824 | signal: 60/00007fff86e452a8 | |
1825 | notify: signal/pid.2634 | |
1826 | ClockID: 1 | |
1827 | .fi | |
1828 | .in | |
1829 | ||
1830 | The lines shown for each timer have the following meanings: | |
1831 | .RS | |
1832 | .TP | |
1833 | .I ID | |
1834 | The ID for this timer. | |
1835 | This is not the same as the timer ID returned by | |
1836 | .BR timer_create (2); | |
1837 | rather, it is the same kernel-internal ID that is available via the | |
1838 | .I si_timerid | |
1839 | field of the | |
1840 | .IR siginfo_t | |
1841 | structure (see | |
1842 | .BR sigaction (2)). | |
1843 | .TP | |
1844 | .I signal | |
1845 | This is the signal number that this timer uses to deliver notifications | |
1846 | followed by a slash, and then the | |
1847 | .I sigev_value.sival_ptr | |
1848 | value supplied to the signal handler. | |
1849 | Valid only for timers that notify via a signal. | |
1850 | .TP | |
1851 | .I notify | |
1852 | The part before the slash specifies the mechanism | |
1853 | that this timer uses to deliver notifications, | |
1854 | and is one of "thread", "signal", or "none". | |
1855 | Immediately following the slash is either the string "tid" for timers | |
1856 | with | |
1857 | .B SIGEV_THREAD_ID | |
1858 | notification, or "pid" for timers that notify by other mechanisms. | |
1859 | Following the "." is the PID of the process that will be delivered | |
1860 | a signal if the timer delivers notifications via a signal. | |
1861 | .TP | |
1862 | .I ClockID | |
1863 | This field identifies the clock that the timer uses for measuring time. | |
1864 | For most clocks, this is a number that matches one of the user-space | |
1865 | .BR CLOCK_* | |
9d54c087 | 1866 | constants exposed via |
1509ca0e MK |
1867 | .IR <time.h> . |
1868 | .B CLOCK_PROCESS_CPUTIME_ID | |
1869 | timers display with a value of -6 | |
1870 | in this field. | |
1871 | .B CLOCK_THREAD_CPUTIME_ID | |
1872 | timers display with a value of -2 | |
1873 | in this field. | |
1874 | .RE | |
1875 | .TP | |
fea681da MK |
1876 | .I /proc/bus/pccard/drivers |
1877 | .TP | |
1878 | .I /proc/bus/pci | |
c13182ef | 1879 | Contains various bus subdirectories and pseudo-files containing |
59a40ed7 | 1880 | information about PCI busses, installed devices, and device |
c13182ef MK |
1881 | drivers. |
1882 | Some of these files are not ASCII. | |
fea681da MK |
1883 | .TP |
1884 | .I /proc/bus/pci/devices | |
59a40ed7 | 1885 | Information about PCI devices. |
c13182ef | 1886 | They may be accessed through |
fea681da MK |
1887 | .BR lspci (8) |
1888 | and | |
1889 | .BR setpci (8). | |
1890 | .TP | |
1891 | .I /proc/cmdline | |
c13182ef MK |
1892 | Arguments passed to the Linux kernel at boot time. |
1893 | Often done via a boot manager such as | |
59a40ed7 MK |
1894 | .BR lilo (8) |
1895 | or | |
1896 | .BR grub (8). | |
f6e524c4 MK |
1897 | .TP |
1898 | .IR /proc/config.gz " (since Linux 2.6)" | |
1899 | This file exposes the configuration options that were used | |
c3d9780d | 1900 | to build the currently running kernel, |
f6e524c4 MK |
1901 | in the same format as they would be shown in the |
1902 | .I .config | |
1903 | file that resulted when configuring the kernel (using | |
1904 | .IR "make xconfig" , | |
1905 | .IR "make config" , | |
1906 | or similar). | |
1907 | The file contents are compressed; view or search them using | |
f78ed33a MK |
1908 | .BR zcat (1) |
1909 | and | |
1910 | .BR zgrep (1). | |
f6e524c4 | 1911 | As long as no changes have been made to the following file, |
250e01ec MK |
1912 | the contents of |
1913 | .I /proc/config.gz | |
1914 | are the same as those provided by : | |
f6e524c4 MK |
1915 | .in +4n |
1916 | .nf | |
1917 | ||
c3074d70 | 1918 | cat /lib/modules/$(uname \-r)/build/.config |
f6e524c4 MK |
1919 | .fi |
1920 | .in | |
250e01ec MK |
1921 | .IP |
1922 | .I /proc/config.gz | |
90878f7c | 1923 | is provided only if the kernel is configured with |
250e01ec | 1924 | .BR CONFIG_IKCONFIG_PROC . |
fea681da MK |
1925 | .TP |
1926 | .I /proc/cpuinfo | |
1927 | This is a collection of CPU and system architecture dependent items, | |
1928 | for each supported architecture a different list. | |
1929 | Two common entries are \fIprocessor\fP which gives CPU number and | |
c13182ef MK |
1930 | \fIbogomips\fP; a system constant that is calculated |
1931 | during kernel initialization. | |
1932 | SMP machines have information for | |
fea681da | 1933 | each CPU. |
a091f002 MK |
1934 | The |
1935 | .BR lscpu (1) | |
1936 | command gathers its information from this file. | |
fea681da MK |
1937 | .TP |
1938 | .I /proc/devices | |
c13182ef MK |
1939 | Text listing of major numbers and device groups. |
1940 | This can be used by MAKEDEV scripts for consistency with the kernel. | |
fea681da MK |
1941 | .TP |
1942 | .IR /proc/diskstats " (since Linux 2.5.69)" | |
1943 | This file contains disk I/O statistics for each disk device. | |
66a9882e | 1944 | See the Linux kernel source file |
fea681da MK |
1945 | .I Documentation/iostats.txt |
1946 | for further information. | |
1947 | .TP | |
1948 | .I /proc/dma | |
c13182ef | 1949 | This is a list of the registered \fIISA\fP DMA (direct memory access) |
fea681da MK |
1950 | channels in use. |
1951 | .TP | |
1952 | .I /proc/driver | |
1953 | Empty subdirectory. | |
1954 | .TP | |
1955 | .I /proc/execdomains | |
1956 | List of the execution domains (ABI personalities). | |
1957 | .TP | |
1958 | .I /proc/fb | |
097585ed MK |
1959 | Frame buffer information when |
1960 | .B CONFIG_FB | |
1961 | is defined during kernel compilation. | |
fea681da MK |
1962 | .TP |
1963 | .I /proc/filesystems | |
9ee4a2b6 MK |
1964 | A text listing of the filesystems which are supported by the kernel, |
1965 | namely filesystems which were compiled into the kernel or whose kernel | |
6387216b MK |
1966 | modules are currently loaded. |
1967 | (See also | |
fb477da2 | 1968 | .BR filesystems (5).) |
9ee4a2b6 | 1969 | If a filesystem is marked with "nodev", |
809d0164 | 1970 | this means that it does not require a block device to be mounted |
9ee4a2b6 | 1971 | (e.g., virtual filesystem, network filesystem). |
809d0164 MK |
1972 | |
1973 | Incidentally, this file may be used by | |
1974 | .BR mount (8) | |
9ee4a2b6 MK |
1975 | when no filesystem is specified and it didn't manage to determine the |
1976 | filesystem type. | |
1977 | Then filesystems contained in this file are tried | |
809d0164 | 1978 | (excepted those that are marked with "nodev"). |
fea681da MK |
1979 | .TP |
1980 | .I /proc/fs | |
df352acc | 1981 | .\" FIXME Much more needs to be said about /proc/fs |
91085d85 | 1982 | .\" |
df352acc MK |
1983 | Contains subdirectories that in turn contain files |
1984 | with information about (certain) mounted filesystems. | |
fea681da MK |
1985 | .TP |
1986 | .I /proc/ide | |
1987 | This directory | |
59a40ed7 MK |
1988 | exists on systems with the IDE bus. |
1989 | There are directories for each IDE channel and attached device. | |
c13182ef | 1990 | Files include: |
fea681da | 1991 | |
a08ea57c | 1992 | .in +4n |
fea681da MK |
1993 | .nf |
1994 | cache buffer size in KB | |
1995 | capacity number of sectors | |
1996 | driver driver version | |
1997 | geometry physical and logical geometry | |
9fdfa163 | 1998 | identify in hexadecimal |
fea681da MK |
1999 | media media type |
2000 | model manufacturer's model number | |
2001 | settings drive settings | |
9fdfa163 MK |
2002 | smart_thresholds in hexadecimal |
2003 | smart_values in hexadecimal | |
fea681da | 2004 | .fi |
a08ea57c | 2005 | .in |
fea681da | 2006 | |
c13182ef | 2007 | The |
fea681da MK |
2008 | .BR hdparm (8) |
2009 | utility provides access to this information in a friendly format. | |
2010 | .TP | |
2011 | .I /proc/interrupts | |
23ec6ff0 MK |
2012 | This is used to record the number of interrupts per CPU per IO device. |
2013 | Since Linux 2.6.24, | |
2014 | for the i386 and x86_64 architectures, at least, this also includes | |
2015 | interrupts internal to the system (that is, not associated with a device | |
2016 | as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt), | |
2017 | and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling | |
2018 | interrupt), CAL (remote function call interrupt), and possibly others. | |
2019 | Very easy to read formatting, done in ASCII. | |
fea681da MK |
2020 | .TP |
2021 | .I /proc/iomem | |
2022 | I/O memory map in Linux 2.4. | |
2023 | .TP | |
2024 | .I /proc/ioports | |
c13182ef | 2025 | This is a list of currently registered Input-Output port regions that |
fea681da MK |
2026 | are in use. |
2027 | .TP | |
2028 | .IR /proc/kallsyms " (since Linux 2.5.71)" | |
2029 | This holds the kernel exported symbol definitions used by the | |
2030 | .BR modules (X) | |
2031 | tools to dynamically link and bind loadable modules. | |
2032 | In Linux 2.5.47 and earlier, a similar file with slightly different syntax | |
2033 | was named | |
2034 | .IR ksyms . | |
2035 | .TP | |
2036 | .I /proc/kcore | |
2037 | This file represents the physical memory of the system and is stored | |
c13182ef MK |
2038 | in the ELF core file format. |
2039 | With this pseudo-file, and an unstripped | |
9a67332e MK |
2040 | kernel |
2041 | .RI ( /usr/src/linux/vmlinux ) | |
2042 | binary, GDB can be used to | |
fea681da MK |
2043 | examine the current state of any kernel data structures. |
2044 | ||
2045 | The total length of the file is the size of physical memory (RAM) plus | |
2046 | 4KB. | |
2047 | .TP | |
2048 | .I /proc/kmsg | |
2049 | This file can be used instead of the | |
2050 | .BR syslog (2) | |
c13182ef MK |
2051 | system call to read kernel messages. |
2052 | A process must have superuser | |
fea681da | 2053 | privileges to read this file, and only one process should read this |
c13182ef MK |
2054 | file. |
2055 | This file should not be read if a syslog process is running | |
fea681da MK |
2056 | which uses the |
2057 | .BR syslog (2) | |
2058 | system call facility to log kernel messages. | |
2059 | ||
2060 | Information in this file is retrieved with the | |
c4517613 | 2061 | .BR dmesg (1) |
fea681da MK |
2062 | program. |
2063 | .TP | |
ff56ac8b MK |
2064 | .IR /proc/kpagecount " (since Linux 2.6.25)" |
2065 | This file contains a 64-bit count of the number of | |
2066 | times each physical page frame is mapped, | |
2067 | indexed by page frame number (see the discussion of | |
2068 | .IR /proc/[pid]/pagemap ). | |
2069 | .IP | |
2070 | The | |
2071 | .IR /proc/kpagecount | |
2072 | file is present only if the | |
2073 | .B CONFIG_PROC_PAGE_MONITOR | |
59d566a9 MK |
2074 | kernel configuration option is enabled. |
2075 | .TP | |
2076 | .IR /proc/kpageflags " (since Linux 2.6.25)" | |
2077 | This file contains 64-bit masks corresponding to each physical page frame; | |
2078 | it is indexed by page frame number (see the discussion of | |
2079 | .IR /proc/[pid]/pagemap ). | |
2080 | The bits are as follows: | |
2081 | ||
2082 | 0 - KPF_LOCKED | |
2083 | 1 - KPF_ERROR | |
2084 | 2 - KPF_REFERENCED | |
2085 | 3 - KPF_UPTODATE | |
2086 | 4 - KPF_DIRTY | |
2087 | 5 - KPF_LRU | |
2088 | 6 - KPF_ACTIVE | |
2089 | 7 - KPF_SLAB | |
2090 | 8 - KPF_WRITEBACK | |
2091 | 9 - KPF_RECLAIM | |
2092 | 10 - KPF_BUDDY | |
2093 | 11 - KPF_MMAP (since Linux 2.6.31) | |
2094 | 12 - KPF_ANON (since Linux 2.6.31) | |
2095 | 13 - KPF_SWAPCACHE (since Linux 2.6.31) | |
2096 | 14 - KPF_SWAPBACKED (since Linux 2.6.31) | |
2097 | 15 - KPF_COMPOUND_HEAD (since Linux 2.6.31) | |
2098 | 16 - KPF_COMPOUND_TAIL (since Linux 2.6.31) | |
2099 | 16 - KPF_HUGE (since Linux 2.6.31) | |
2100 | 18 - KPF_UNEVICTABLE (since Linux 2.6.31) | |
2101 | 19 - KPF_HWPOISON (since Linux 2.6.31) | |
2102 | 20 - KPF_NOPAGE (since Linux 2.6.31) | |
2103 | 21 - KPF_KSM (since Linux 2.6.32) | |
2104 | 22 - KPF_THP (since Linux 3.4) | |
2105 | ||
2106 | For further details on the meanings of these bits, | |
2107 | see the kernel source file | |
2108 | .IR Documentation/vm/pagemap.txt . | |
2109 | Before kernel 2.6.29, | |
2110 | .\" commit ad3bdefe877afb47480418fdb05ecd42842de65e | |
2111 | .\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110 | |
2112 | .BR KPF_WRITEBACK , | |
2113 | .BR KPF_RECLAIM , | |
2114 | .BR KPF_BUDDY , | |
2115 | and | |
2116 | .BR KPF_LOCKED | |
2117 | did not report correctly. | |
2118 | .IP | |
2119 | The | |
2120 | .IR /proc/kpageflags | |
2121 | file is present only if the | |
2122 | .B CONFIG_PROC_PAGE_MONITOR | |
ff56ac8b MK |
2123 | kernel configuration option is enabled. |
2124 | .TP | |
fea681da MK |
2125 | .IR /proc/ksyms " (Linux 1.1.23-2.5.47)" |
2126 | See | |
2127 | .IR /proc/kallsyms . | |
2128 | .TP | |
2129 | .I /proc/loadavg | |
6b05dc38 MK |
2130 | The first three fields in this file are load average figures |
2131 | giving the number of jobs in the run queue (state R) | |
fea681da MK |
2132 | or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes. |
2133 | They are the same as the load average numbers given by | |
2134 | .BR uptime (1) | |
2135 | and other programs. | |
6b05dc38 | 2136 | The fourth field consists of two numbers separated by a slash (/). |
78fc91ec EDB |
2137 | The first of these is the number of currently runnable kernel |
2138 | scheduling entities (processes, threads). | |
6b05dc38 MK |
2139 | The value after the slash is the number of kernel scheduling entities |
2140 | that currently exist on the system. | |
2141 | The fifth field is the PID of the process that was most | |
2142 | recently created on the system. | |
fea681da MK |
2143 | .TP |
2144 | .I /proc/locks | |
2145 | This file shows current file locks | |
2146 | .RB ( flock "(2) and " fcntl (2)) | |
2147 | and leases | |
2148 | .RB ( fcntl (2)). | |
2149 | .TP | |
89dd5f8a | 2150 | .IR /proc/malloc " (only up to and including Linux 2.2)" |
59a40ed7 | 2151 | .\" It looks like this only ever did something back in 1.0 days |
90878f7c | 2152 | This file is present only if |
89dd5f8a | 2153 | .B CONFIG_DEBUG_MALLOC |
097585ed | 2154 | was defined during compilation. |
fea681da MK |
2155 | .TP |
2156 | .I /proc/meminfo | |
77b802ec MK |
2157 | This file reports statistics about memory usage on the system. |
2158 | It is used by | |
fea681da MK |
2159 | .BR free (1) |
2160 | to report the amount of free and used memory (both physical and swap) | |
2161 | on the system as well as the shared memory and buffers used by the | |
2162 | kernel. | |
3ba3d5b1 MK |
2163 | Each line of the file consists of a parameter name, followed by a colon, |
2164 | the value of the parameter, and an option unit of measurement (e.g., "kB"). | |
2165 | The list below describes the parameter names and | |
2166 | the format specifier required to read the field value. | |
2167 | Except as noted below, | |
2168 | all of the fields have been present since at least Linux 2.6.0. | |
86cf87d7 | 2169 | Some fields are displayed only if the kernel was configured |
3ba3d5b1 MK |
2170 | with various options; those dependencies are noted in the list. |
2171 | .RS | |
2172 | .TP | |
2173 | .IR MemTotal " %lu" | |
449dd4e2 | 2174 | Total usable RAM (i.e., physical RAM minus a few reserved |
99e91586 | 2175 | bits and the kernel binary code). |
3ba3d5b1 MK |
2176 | .TP |
2177 | .IR MemFree " %lu" | |
7bccb7d4 DP |
2178 | The sum of |
2179 | .IR LowFree + HighFree . | |
3ba3d5b1 MK |
2180 | .TP |
2181 | .IR Buffers " %lu" | |
99e91586 | 2182 | Relatively temporary storage for raw disk blocks that |
3ba3d5b1 MK |
2183 | shouldn't get tremendously large (20MB or so). |
2184 | .TP | |
2185 | .IR Cached " %lu" | |
2186 | In-memory cache for files read from the disk (the page cache). | |
2187 | Doesn't include | |
2188 | .IR SwapCached . | |
2189 | .TP | |
2190 | .IR SwapCached " %lu" | |
2191 | Memory that once was swapped out, is swapped back in but | |
2192 | still also is in the swap file. | |
fa1d2749 | 2193 | (If memory pressure is high, these pages |
3ba3d5b1 | 2194 | don't need to be swapped out again because they are already |
99e91586 | 2195 | in the swap file. |
3ba3d5b1 MK |
2196 | This saves I/O.) |
2197 | .TP | |
2198 | .IR Active " %lu" | |
2199 | Memory that has been used more recently and usually not | |
2200 | reclaimed unless absolutely necessary. | |
2201 | .TP | |
2202 | .IR Inactive " %lu" | |
2203 | Memory which has been less recently used. | |
2204 | It is more eligible to be reclaimed for other purposes. | |
2205 | .TP | |
2206 | .IR Active(anon) " %lu (since Linux 2.6.28)" | |
2207 | [To be documented.] | |
2208 | .TP | |
2209 | .IR Inactive(anon) " %lu (since Linux 2.6.28)" | |
2210 | [To be documented.] | |
2211 | .TP | |
2212 | .IR Active(file) " %lu (since Linux 2.6.28)" | |
2213 | [To be documented.] | |
2214 | .TP | |
2215 | .IR Inactive(file) " %lu (since Linux 2.6.28)" | |
2216 | [To be documented.] | |
2217 | .TP | |
2218 | .IR Unevictable " %lu (since Linux 2.6.28)" | |
2219 | (From Linux 2.6.28 to 2.6.30, | |
2220 | \fBCONFIG_UNEVICTABLE_LRU\fP was required.) | |
2221 | [To be documented.] | |
2222 | .TP | |
46fbfc07 | 2223 | .IR Mlocked " %lu (since Linux 2.6.28)" |
3ba3d5b1 MK |
2224 | (From Linux 2.6.28 to 2.6.30, |
2225 | \fBCONFIG_UNEVICTABLE_LRU\fP was required.) | |
2226 | [To be documented.] | |
2227 | .TP | |
2228 | .IR HighTotal " %lu" | |
2229 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
2230 | Total amount of highmem. | |
99e91586 | 2231 | Highmem is all memory above ~860MB of physical memory. |
3ba3d5b1 MK |
2232 | Highmem areas are for use by user-space programs, |
2233 | or for the page cache. | |
2234 | The kernel must use tricks to access | |
2235 | this memory, making it slower to access than lowmem. | |
2236 | .TP | |
2237 | .IR HighFree " %lu | |
2238 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
2239 | Amount of free highmem. | |
2240 | .TP | |
2241 | .IR LowTotal " %lu | |
2242 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
2243 | Total amount of lowmem. | |
2244 | Lowmem is memory which can be used for everything that | |
2245 | highmem can be used for, but it is also available for the | |
2246 | kernel's use for its own data structures. | |
2247 | Among many other things, | |
99e91586 | 2248 | it is where everything from |
7bccb7d4 DP |
2249 | .I Slab |
2250 | is allocated. | |
3ba3d5b1 MK |
2251 | Bad things happen when you're out of lowmem. |
2252 | .TP | |
2253 | .IR LowFree " %lu | |
2254 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
2255 | Amount of free lowmem. | |
2256 | .TP | |
2257 | .IR MmapCopy " %lu (since Linux 2.6.29)" | |
99e91586 DP |
2258 | .RB ( CONFIG_MMU |
2259 | is required.) | |
3ba3d5b1 MK |
2260 | [To be documented.] |
2261 | .TP | |
2262 | .IR SwapTotal " %lu" | |
2263 | Total amount of swap space available. | |
2264 | .TP | |
2265 | .IR SwapFree " %lu" | |
c16d4f25 | 2266 | Amount of swap space that is currently unused. |
3ba3d5b1 MK |
2267 | .TP |
2268 | .IR Dirty " %lu" | |
2269 | Memory which is waiting to get written back to the disk. | |
2270 | .TP | |
2271 | .IR Writeback " %lu" | |
2272 | Memory which is actively being written back to the disk. | |
2273 | .TP | |
2274 | .IR AnonPages " %lu (since Linux 2.6.18)" | |
2275 | Non-file backed pages mapped into user-space page tables. | |
2276 | .TP | |
2277 | .IR Mapped " %lu" | |
fda70f5b MK |
2278 | Files which have been mapped into memory (with |
2279 | .BR mmap (2)), | |
2280 | such as libraries. | |
3ba3d5b1 MK |
2281 | .TP |
2282 | .IR Shmem " %lu (since Linux 2.6.32)" | |
2283 | [To be documented.] | |
2284 | .TP | |
2285 | .IR Slab " %lu" | |
2286 | In-kernel data structures cache. | |
2287 | .TP | |
2288 | .IR SReclaimable " %lu (since Linux 2.6.19)" | |
7bccb7d4 DP |
2289 | Part of |
2290 | .IR Slab , | |
2291 | that might be reclaimed, such as caches. | |
3ba3d5b1 MK |
2292 | .TP |
2293 | .IR SUnreclaim " %lu (since Linux 2.6.19)" | |
7bccb7d4 DP |
2294 | Part of |
2295 | .IR Slab , | |
2296 | that cannot be reclaimed on memory pressure. | |
3ba3d5b1 MK |
2297 | .TP |
2298 | .IR KernelStack " %lu (since Linux 2.6.32)" | |
2299 | Amount of memory allocated to kernel stacks. | |
2300 | .TP | |
2301 | .IR PageTables " %lu (since Linux 2.6.18)" | |
2302 | Amount of memory dedicated to the lowest level of page tables. | |
2303 | .TP | |
2304 | .IR Quicklists " %lu (since Linux 2.6.27)" | |
2305 | (\fBCONFIG_QUICKLIST\fP is required.) | |
2306 | [To be documented.] | |
2307 | .TP | |
2308 | .IR NFS_Unstable " %lu (since Linux 2.6.18)" | |
2309 | NFS pages sent to the server, but not yet committed to stable storage. | |
2310 | .TP | |
2311 | .IR Bounce " %lu (since Linux 2.6.18)" | |
2312 | Memory used for block device "bounce buffers". | |
2313 | .TP | |
2314 | .IR WritebackTmp " %lu (since Linux 2.6.26)" | |
2315 | Memory used by FUSE for temporary writeback buffers. | |
2316 | .TP | |
2317 | .IR CommitLimit " %lu (since Linux 2.6.10)" | |
2318 | Based on the overcommit ratio ('vm.overcommit_ratio'), | |
d6a56978 | 2319 | this is the total amount of memory currently available to |
90878f7c MK |
2320 | be allocated on the system. |
2321 | This limit is adhered to | |
2322 | only if strict overcommit accounting is enabled (mode 2 in | |
3ba3d5b1 MK |
2323 | .IR /proc/sys/vm/overcommit_ratio ). |
2324 | The | |
2325 | .I CommitLimit | |
2326 | is calculated using the following formula: | |
2327 | ||
d102a673 | 2328 | CommitLimit = |
d3532647 | 2329 | ([total RAM pages] - [total huge TLB pages]) * |
d102a673 | 2330 | overcommit_ratio / 100 + [total swap pages] |
3ba3d5b1 MK |
2331 | |
2332 | For example, on a system with 1GB of physical RAM and 7GB | |
2333 | of swap with a | |
2334 | .I overcommit_ratio | |
2335 | of 30, this formula yields a | |
2336 | .I CommitLimit | |
99e91586 | 2337 | of 7.3GB. |
3ba3d5b1 | 2338 | For more details, see the memory overcommit documentation |
99e91586 | 2339 | in the kernel source file |
3ba3d5b1 MK |
2340 | .IR Documentation/vm/overcommit-accounting . |
2341 | .TP | |
2342 | .IR Committed_AS " %lu" | |
2343 | The amount of memory presently allocated on the system. | |
2344 | The committed memory is a sum of all of the memory which | |
2345 | has been allocated by processes, even if it has not been | |
2346 | "used" by them as of yet. | |
2347 | A process which allocates 1GB of memory (using | |
2348 | .BR malloc (3) | |
33a0ccb2 | 2349 | or similar), but touches only 300MB of that memory will show up |
90878f7c | 2350 | as using only 300MB of memory even if it has the address space |
3ba3d5b1 MK |
2351 | allocated for the entire 1GB. |
2352 | This 1GB is memory which has been "committed" to by the VM | |
2353 | and can be used at any time by the allocating application. | |
2354 | With strict overcommit enabled on the system (mode 2 | |
99e91586 | 2355 | .IR /proc/sys/vm/overcommit_memory ), |
3ba3d5b1 MK |
2356 | allocations which would exceed the |
2357 | .I CommitLimit | |
2358 | (detailed above) will not be permitted. | |
2359 | This is useful if one needs to guarantee that processes will not | |
2360 | fail due to lack of memory once that memory has been successfully allocated. | |
2361 | .TP | |
2362 | .IR VmallocTotal " %lu" | |
2363 | Total size of vmalloc memory area. | |
2364 | .TP | |
2365 | .IR VmallocUsed " %lu" | |
2366 | Amount of vmalloc area which is used. | |
2367 | .TP | |
2368 | .IR VmallocChunk " %lu" | |
2369 | Largest contiguous block of vmalloc area which is free. | |
2370 | .TP | |
2371 | .IR HardwareCorrupted " %lu (since Linux 2.6.32)" | |
2372 | (\fBCONFIG_MEMORY_FAILURE\fP is required.) | |
2373 | [To be documented.] | |
2374 | .TP | |
2375 | .IR AnonHugePages " %lu (since Linux 2.6.38)" | |
2376 | (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.) | |
7fac88a9 | 2377 | Non-file backed huge pages mapped into user-space page tables. |
3ba3d5b1 MK |
2378 | .TP |
2379 | .IR HugePages_Total " %lu" | |
2380 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
2381 | The size of the pool of huge pages. | |
2382 | .TP | |
2383 | .IR HugePages_Free " %lu" | |
2384 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
2385 | The number of huge pages in the pool that are not yet allocated. | |
2386 | .TP | |
2387 | .IR HugePages_Rsvd " %lu (since Linux 2.6.17)" | |
2388 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
2389 | This is the number of huge pages for | |
2390 | which a commitment to allocate from the pool has been made, | |
2391 | but no allocation has yet been made. | |
2392 | These reserved huge pages | |
2393 | guarantee that an application will be able to allocate a | |
2394 | huge page from the pool of huge pages at fault time. | |
2395 | .TP | |
aa8a6b4f | 2396 | .IR HugePages_Surp " %lu (since Linux 2.6.24)" |
3ba3d5b1 MK |
2397 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) |
2398 | This is the number of huge pages in | |
2399 | the pool above the value in | |
2400 | .IR /proc/sys/vm/nr_hugepages . | |
2401 | The maximum number of surplus huge pages is controlled by | |
2402 | .IR /proc/sys/vm/nr_overcommit_hugepages . | |
2403 | .TP | |
2404 | .IR Hugepagesize " %lu" | |
2405 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
2406 | The size of huge pages. | |
2407 | .RE | |
fea681da | 2408 | .TP |
aa341984 MK |
2409 | .I /proc/modules |
2410 | A text list of the modules that have been loaded by the system. | |
2411 | See also | |
2412 | .BR lsmod (8). | |
2413 | .TP | |
fea681da | 2414 | .I /proc/mounts |
c1eea65a | 2415 | Before kernel 2.4.19, this file was a list |
9ee4a2b6 | 2416 | of all the filesystems currently mounted on the system. |
732e54dd | 2417 | With the introduction of per-process mount namespaces in |
c1eea65a MK |
2418 | Linux 2.4.19, this file became a link to |
2419 | .IR /proc/self/mounts , | |
732e54dd | 2420 | which lists the mount points of the process's own mount namespace. |
fea681da | 2421 | The format of this file is documented in |
31e9a9ec | 2422 | .BR fstab (5). |
fea681da | 2423 | .TP |
fea681da | 2424 | .I /proc/mtrr |
c13182ef | 2425 | Memory Type Range Registers. |
66a9882e | 2426 | See the Linux kernel source file |
cfe70b66 | 2427 | .I Documentation/mtrr.txt |
fea681da MK |
2428 | for details. |
2429 | .TP | |
2430 | .I /proc/net | |
2431 | various net pseudo-files, all of which give the status of some part of | |
c13182ef MK |
2432 | the networking layer. |
2433 | These files contain ASCII structures and are, | |
59a40ed7 MK |
2434 | therefore, readable with |
2435 | .BR cat (1). | |
c13182ef | 2436 | However, the standard |
fea681da MK |
2437 | .BR netstat (8) |
2438 | suite provides much cleaner access to these files. | |
2439 | .TP | |
2440 | .I /proc/net/arp | |
2441 | This holds an ASCII readable dump of the kernel ARP table used for | |
c13182ef | 2442 | address resolutions. |
01d0a447 | 2443 | It will show both dynamically learned and preprogrammed ARP entries. |
c13182ef | 2444 | The format is: |
fea681da MK |
2445 | |
2446 | .nf | |
2447 | .ft CW | |
2448 | .in 8n | |
2449 | IP address HW type Flags HW address Mask Device | |
2450 | 192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0 | |
2451 | 192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0 | |
2452 | .ft | |
2453 | .fi | |
2454 | .in | |
2455 | ||
6c04f928 | 2456 | Here "IP address" is the IPv4 address of the machine and the "HW type" |
c13182ef MK |
2457 | is the hardware type of the address from RFC\ 826. |
2458 | The flags are the internal | |
9a67332e MK |
2459 | flags of the ARP structure (as defined in |
2460 | .IR /usr/include/linux/if_arp.h ) | |
2461 | and | |
6c04f928 | 2462 | the "HW address" is the data link layer mapping for that IP address if |
fea681da MK |
2463 | it is known. |
2464 | .TP | |
2465 | .I /proc/net/dev | |
c13182ef MK |
2466 | The dev pseudo-file contains network device status information. |
2467 | This gives | |
2468 | the number of received and sent packets, the number of errors and | |
fea681da | 2469 | collisions |
c13182ef MK |
2470 | and other basic statistics. |
2471 | These are used by the | |
fea681da | 2472 | .BR ifconfig (8) |
c13182ef MK |
2473 | program to report device status. |
2474 | The format is: | |
fea681da MK |
2475 | |
2476 | .nf | |
2477 | .ft CW | |
2478 | .in 1n | |
2479 | Inter-| Receive | Transmit | |
2480 | face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed | |
2481 | lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0 | |
2482 | eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0 | |
2483 | ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0 | |
2484 | tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0 | |
2485 | .in | |
2486 | .ft | |
2487 | .fi | |
2488 | .\" .TP | |
2489 | .\" .I /proc/net/ipx | |
2490 | .\" No information. | |
2491 | .\" .TP | |
2492 | .\" .I /proc/net/ipx_route | |
2493 | .\" No information. | |
2494 | .TP | |
2495 | .I /proc/net/dev_mcast | |
2496 | Defined in | |
2497 | .IR /usr/src/linux/net/core/dev_mcast.c : | |
2498 | .nf | |
2499 | .in +5 | |
9fdfa163 | 2500 | indx interface_name dmi_u dmi_g dmi_address |
fea681da MK |
2501 | 2 eth0 1 0 01005e000001 |
2502 | 3 eth1 1 0 01005e000001 | |
2503 | 4 eth2 1 0 01005e000001 | |
2504 | .in | |
2505 | .fi | |
2506 | .TP | |
2507 | .I /proc/net/igmp | |
c13182ef MK |
2508 | Internet Group Management Protocol. |
2509 | Defined in | |
fea681da MK |
2510 | .IR /usr/src/linux/net/core/igmp.c . |
2511 | .TP | |
2512 | .I /proc/net/rarp | |
2513 | This file uses the same format as the | |
2514 | .I arp | |
2515 | file and contains the current reverse mapping database used to provide | |
2516 | .BR rarp (8) | |
c13182ef MK |
2517 | reverse address lookup services. |
2518 | If RARP is not configured into the | |
fea681da MK |
2519 | kernel, |
2520 | this file will not be present. | |
2521 | .TP | |
2522 | .I /proc/net/raw | |
c13182ef MK |
2523 | Holds a dump of the RAW socket table. |
2524 | Much of the information is not of | |
fea681da | 2525 | use |
c13182ef | 2526 | apart from debugging. |
6c04f928 | 2527 | The "sl" value is the kernel hash slot for the |
fea681da | 2528 | socket, |
6c04f928 MK |
2529 | the "local_address" is the local address and protocol number pair. |
2530 | \&"St" is | |
c13182ef MK |
2531 | the internal status of the socket. |
2532 | The "tx_queue" and "rx_queue" are the | |
fea681da | 2533 | outgoing and incoming data queue in terms of kernel memory usage. |
94e9d9fe | 2534 | The "tr", "tm\->when", and "rexmits" fields are not used by RAW. |
fdc196f5 MK |
2535 | The "uid" |
2536 | field holds the effective UID of the creator of the socket. | |
fea681da MK |
2537 | .\" .TP |
2538 | .\" .I /proc/net/route | |
2539 | .\" No information, but looks similar to | |
2540 | .\" .BR route (8). | |
2541 | .TP | |
2542 | .I /proc/net/snmp | |
c13182ef | 2543 | This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP |
fea681da | 2544 | management |
763f0e47 | 2545 | information bases for an SNMP agent. |
fea681da MK |
2546 | .TP |
2547 | .I /proc/net/tcp | |
c13182ef MK |
2548 | Holds a dump of the TCP socket table. |
2549 | Much of the information is not | |
2550 | of use apart from debugging. | |
2551 | The "sl" value is the kernel hash slot | |
6beb1671 MK |
2552 | for the socket, the "local_address" is the local address and port number pair. |
2553 | The "rem_address" is the remote address and port number pair | |
6c04f928 MK |
2554 | (if connected). |
2555 | \&"St" is the internal status of the socket. | |
2556 | The "tx_queue" and "rx_queue" are the | |
fea681da | 2557 | outgoing and incoming data queue in terms of kernel memory usage. |
94e9d9fe | 2558 | The "tr", "tm\->when", and "rexmits" fields hold internal information of |
fdc196f5 MK |
2559 | the kernel socket state and are only useful for debugging. |
2560 | The "uid" | |
2561 | field holds the effective UID of the creator of the socket. | |
fea681da MK |
2562 | .TP |
2563 | .I /proc/net/udp | |
c13182ef MK |
2564 | Holds a dump of the UDP socket table. |
2565 | Much of the information is not of | |
2566 | use apart from debugging. | |
2567 | The "sl" value is the kernel hash slot for the | |
6beb1671 MK |
2568 | socket, the "local_address" is the local address and port number pair. |
2569 | The "rem_address" is the remote address and port number pair | |
fea681da MK |
2570 | (if connected). "St" is the internal status of the socket. |
2571 | The "tx_queue" and "rx_queue" are the outgoing and incoming data queue | |
c13182ef | 2572 | in terms of kernel memory usage. |
94e9d9fe | 2573 | The "tr", "tm\->when", and "rexmits" fields |
c13182ef | 2574 | are not used by UDP. |
fdc196f5 MK |
2575 | The "uid" |
2576 | field holds the effective UID of the creator of the socket. | |
fea681da MK |
2577 | The format is: |
2578 | ||
2579 | .nf | |
2580 | .ft CW | |
2581 | .in 1n | |
94e9d9fe | 2582 | sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid |
fea681da MK |
2583 | 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0 |
2584 | 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0 | |
2585 | 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 | |
2586 | .in | |
2587 | .ft | |
2588 | .fi | |
2589 | .TP | |
2590 | .I /proc/net/unix | |
008f1ecc | 2591 | Lists the UNIX domain sockets present within the system and their |
c13182ef MK |
2592 | status. |
2593 | The format is: | |
fea681da MK |
2594 | .nf |
2595 | .sp .5 | |
2596 | .ft CW | |
2597 | Num RefCount Protocol Flags Type St Path | |
2598 | 0: 00000002 00000000 00000000 0001 03 | |
2599 | 1: 00000001 00000000 00010000 0001 01 /dev/printer | |
2600 | .ft | |
2601 | .sp .5 | |
2602 | .fi | |
2603 | ||
6c04f928 MK |
2604 | Here "Num" is the kernel table slot number, "RefCount" is the number |
2605 | of users of the socket, "Protocol" is currently always 0, "Flags" | |
fea681da | 2606 | represent the internal kernel flags holding the status of the |
c13182ef | 2607 | socket. |
008f1ecc | 2608 | Currently, type is always "1" (UNIX domain datagram sockets are |
6c04f928 MK |
2609 | not yet supported in the kernel). |
2610 | \&"St" is the internal state of the | |
fea681da MK |
2611 | socket and Path is the bound path (if any) of the socket. |
2612 | .TP | |
2613 | .I /proc/partitions | |
f042d149 MK |
2614 | Contains the major and minor numbers of each partition as well as the number |
2615 | of 1024-byte blocks and the partition name. | |
fea681da MK |
2616 | .TP |
2617 | .I /proc/pci | |
2618 | This is a listing of all PCI devices found during kernel initialization | |
2619 | and their configuration. | |
2990d781 | 2620 | |
59a40ed7 MK |
2621 | This file has been deprecated in favor of a new |
2622 | .I /proc | |
2990d781 MK |
2623 | interface for PCI |
2624 | .RI ( /proc/bus/pci ). | |
2625 | It became optional in Linux 2.2 (available with | |
2626 | .B CONFIG_PCI_OLD_PROC | |
2627 | set at kernel compilation). | |
24b74457 | 2628 | It became once more nonoptionally enabled in Linux 2.4. |
2990d781 MK |
2629 | Next, it was deprecated in Linux 2.6 (still available with |
2630 | .B CONFIG_PCI_LEGACY_PROC | |
2631 | set), and finally removed altogether since Linux 2.6.17. | |
b4e9ee8f MK |
2632 | .\" FIXME /proc/sched_debug |
2633 | .\" .TP | |
2634 | .\" .IR /proc/sched_debug " (since Linux 2.6.23)" | |
69119dc7 | 2635 | .\" See also /proc/[pid]/sched |
caea7868 MK |
2636 | .TP |
2637 | .IR /proc/profile " (since Linux 2.4)" | |
2638 | This file is present only if the kernel was booted with the | |
2639 | .I profile=1 | |
2640 | command-line option. | |
2641 | It exposes kernel profiling information in a binary format for use by | |
2642 | .BR readprofile (1). | |
2643 | Writing (e.g., an empty string) to this file resets the profiling counters; | |
2644 | on some architectures, | |
2645 | writing a binary integer "profiling multiplier" of size | |
2646 | .IR sizeof(int) | |
8a3ac89a | 2647 | sets the profiling interrupt frequency. |
fea681da MK |
2648 | .TP |
2649 | .I /proc/scsi | |
59a40ed7 MK |
2650 | A directory with the |
2651 | .I scsi | |
2652 | mid-level pseudo-file and various SCSI low-level | |
2990d781 MK |
2653 | driver directories, |
2654 | which contain a file for each SCSI host in this system, all of | |
c13182ef MK |
2655 | which give the status of some part of the SCSI IO subsystem. |
2656 | These files contain ASCII structures and are, therefore, readable with | |
2990d781 | 2657 | .BR cat (1). |
fea681da | 2658 | |
c13182ef | 2659 | You can also write to some of the files to reconfigure the subsystem or |
59a40ed7 | 2660 | switch certain features on or off. |
fea681da MK |
2661 | .TP |
2662 | .I /proc/scsi/scsi | |
c13182ef | 2663 | This is a listing of all SCSI devices known to the kernel. |
59a40ed7 | 2664 | The listing is similar to the one seen during bootup. |
c13182ef | 2665 | scsi currently supports only the \fIadd-single-device\fP command which |
59a40ed7 MK |
2666 | allows root to add a hotplugged device to the list of known devices. |
2667 | ||
2668 | The command | |
2669 | .in +4n | |
2670 | .nf | |
2671 | ||
2672 | echo \(aqscsi add-single-device 1 0 5 0\(aq > /proc/scsi/scsi | |
fea681da | 2673 | |
59a40ed7 MK |
2674 | .fi |
2675 | .in | |
c13182ef MK |
2676 | will cause |
2677 | host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0. | |
2678 | If there | |
fea681da MK |
2679 | is already a device known on this address or the address is invalid, an |
2680 | error will be returned. | |
2681 | .TP | |
2682 | .I /proc/scsi/[drivername] | |
c13182ef MK |
2683 | \fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740, |
2684 | aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic, | |
2685 | scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000. | |
2686 | These directories show up for all drivers that registered at least one | |
59a40ed7 | 2687 | SCSI HBA. |
c13182ef | 2688 | Every directory contains one file per registered host. |
59a40ed7 | 2689 | Every host-file is named after the number the host was assigned during |
c13182ef | 2690 | initialization. |
fea681da | 2691 | |
c13182ef | 2692 | Reading these files will usually show driver and host configuration, |
f78ed33a | 2693 | statistics, and so on. |
fea681da MK |
2694 | |
2695 | Writing to these files allows different things on different hosts. | |
2696 | For example, with the \fIlatency\fP and \fInolatency\fP commands, | |
2697 | root can switch on and off command latency measurement code in the | |
c13182ef MK |
2698 | eata_dma driver. |
2699 | With the \fIlockup\fP and \fIunlock\fP commands, | |
2700 | root can control bus lockups simulated by the scsi_debug driver. | |
fea681da MK |
2701 | .TP |
2702 | .I /proc/self | |
59a40ed7 MK |
2703 | This directory refers to the process accessing the |
2704 | .I /proc | |
9ee4a2b6 | 2705 | filesystem, |
59a40ed7 MK |
2706 | and is identical to the |
2707 | .I /proc | |
2708 | directory named by the process ID of the same process. | |
fea681da MK |
2709 | .TP |
2710 | .I /proc/slabinfo | |
c13182ef | 2711 | Information about kernel caches. |
90878f7c | 2712 | Since Linux 2.6.16 this file is present only if the |
821643a8 MK |
2713 | .B CONFIG_SLAB |
2714 | kernel configuration option is enabled. | |
350038ff | 2715 | The columns in |
38f76cd2 | 2716 | .I /proc/slabinfo |
350038ff | 2717 | are: |
a08ea57c | 2718 | .in +4n |
fea681da | 2719 | .nf |
a08ea57c | 2720 | |
fea681da MK |
2721 | cache-name |
2722 | num-active-objs | |
2723 | total-objs | |
2724 | object-size | |
2725 | num-active-slabs | |
2726 | total-slabs | |
2727 | num-pages-per-slab | |
2728 | .fi | |
a08ea57c MK |
2729 | .in |
2730 | ||
c13182ef | 2731 | See |
fea681da MK |
2732 | .BR slabinfo (5) |
2733 | for details. | |
2734 | .TP | |
2735 | .I /proc/stat | |
c13182ef MK |
2736 | kernel/system statistics. |
2737 | Varies with architecture. | |
2738 | Common | |
fea681da MK |
2739 | entries include: |
2740 | .RS | |
2741 | .TP | |
2742 | \fIcpu 3357 0 4313 1362393\fP | |
bfbfcd18 | 2743 | The amount of time, measured in units of |
268f000b MK |
2744 | USER_HZ (1/100ths of a second on most architectures, use |
2745 | .IR sysconf(_SC_CLK_TCK) | |
2746 | to obtain the right value), | |
b81087ab | 2747 | .\" 1024 on Alpha and ia64 |
ae3b8047 MK |
2748 | that the system spent in various states: |
2749 | .RS | |
2750 | .TP | |
2751 | .I user | |
ea0841f6 | 2752 | (1) Time spent in user mode. |
ae3b8047 MK |
2753 | .TP |
2754 | .I nice | |
0633f951 | 2755 | (2) Time spent in user mode with low priority (nice). |
9f1b9726 | 2756 | .TP |
ae3b8047 | 2757 | .I system |
0633f951 | 2758 | (3) Time spent in system mode. |
ae3b8047 MK |
2759 | .TP |
2760 | .I idle | |
ea0841f6 | 2761 | (4) Time spent in the idle task. |
b09b8526 | 2762 | .\" FIXME Actually, the following info about the /proc/stat 'cpu' field |
e04a1f93 MK |
2763 | .\" does not seem to be quite right (at least in 2.6.12 or 3.6): |
2764 | .\" the idle time in /proc/uptime does not quite match this value | |
2765 | This value should be USER_HZ times the | |
4cb1deb7 MK |
2766 | second entry in the |
2767 | .I /proc/uptime | |
2768 | pseudo-file. | |
ae3b8047 MK |
2769 | .TP |
2770 | .IR iowait " (since Linux 2.5.41)" | |
ea0841f6 | 2771 | (5) Time waiting for I/O to complete. |
ae3b8047 MK |
2772 | .TP |
2773 | .IR irq " (since Linux 2.6.0-test4)" | |
ea0841f6 | 2774 | (6) Time servicing interrupts. |
ae3b8047 | 2775 | .TP |
0633f951 | 2776 | .IR softirq " (since Linux 2.6.0-test4)" |
ea0841f6 | 2777 | (7) Time servicing softirqs. |
ae3b8047 MK |
2778 | .TP |
2779 | .IR steal " (since Linux 2.6.11)" | |
ea0841f6 | 2780 | (8) Stolen time, which is the time spent in other operating systems when |
9de1f6cc | 2781 | running in a virtualized environment |
ae3b8047 MK |
2782 | .TP |
2783 | .IR guest " (since Linux 2.6.24)" | |
0633f951 | 2784 | (9) Time spent running a virtual CPU for guest |
afef1764 | 2785 | operating systems under the control of the Linux kernel. |
14c06953 | 2786 | .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de |
d4fd4120 MK |
2787 | .TP |
2788 | .IR guest_nice " (since Linux 2.6.33)" | |
2789 | .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797 | |
2790 | (10) Time spent running a niced guest (virtual CPU for guest | |
2791 | operating systems under the control of the Linux kernel). | |
ae3b8047 | 2792 | .RE |
fea681da MK |
2793 | .TP |
2794 | \fIpage 5741 1808\fP | |
2795 | The number of pages the system paged in and the number that were paged | |
2796 | out (from disk). | |
2797 | .TP | |
2798 | \fIswap 1 0\fP | |
2799 | The number of swap pages that have been brought in and out. | |
2800 | .TP | |
c13182ef | 2801 | .\" FIXME The following is not the full picture for the 'intr' of |
777f5a9e | 2802 | .\" /proc/stat on 2.6: |
fea681da | 2803 | \fIintr 1462898\fP |
bfbfcd18 MK |
2804 | This line shows counts of interrupts serviced since boot time, |
2805 | for each of the possible system interrupts. | |
d63ff76e | 2806 | The first column is the total of all interrupts serviced |
d6a56978 MK |
2807 | including unnumbered architecture specific interrupts; |
2808 | each subsequent column is the total for that particular numbered interrupt. | |
d63ff76e | 2809 | Unnumbered interrupts are not shown, only summed into the total. |
fea681da MK |
2810 | .TP |
2811 | \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP... | |
636297e9 | 2812 | (major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written) |
bfbfcd18 MK |
2813 | .br |
2814 | (Linux 2.4 only) | |
fea681da MK |
2815 | .TP |
2816 | \fIctxt 115315\fP | |
2817 | The number of context switches that the system underwent. | |
2818 | .TP | |
2819 | \fIbtime 769041601\fP | |
f49c451a | 2820 | boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). |
fea681da MK |
2821 | .TP |
2822 | \fIprocesses 86031\fP | |
2823 | Number of forks since boot. | |
bfbfcd18 MK |
2824 | .TP |
2825 | \fIprocs_running 6\fP | |
2826 | Number of processes in runnable state. | |
5fab2e7c | 2827 | (Linux 2.5.45 onward.) |
bfbfcd18 MK |
2828 | .TP |
2829 | \fIprocs_blocked 2\fP | |
2830 | Number of processes blocked waiting for I/O to complete. | |
5fab2e7c | 2831 | (Linux 2.5.45 onward.) |
fea681da MK |
2832 | .RE |
2833 | .TP | |
2834 | .I /proc/swaps | |
c13182ef MK |
2835 | Swap areas in use. |
2836 | See also | |
fea681da MK |
2837 | .BR swapon (8). |
2838 | .TP | |
2839 | .I /proc/sys | |
2840 | This directory (present since 1.3.57) contains a number of files | |
2841 | and subdirectories corresponding to kernel variables. | |
2842 | These variables can be read and sometimes modified using | |
9ee4a2b6 | 2843 | the \fI/proc\fP filesystem, and the (deprecated) |
fea681da | 2844 | .BR sysctl (2) |
c13182ef | 2845 | system call. |
fea681da | 2846 | .TP |
6ab7c0aa | 2847 | .IR /proc/sys/abi " (since Linux 2.4.10)" |
fea681da | 2848 | This directory may contain files with application binary information. |
6ab7c0aa | 2849 | .\" On some systems, it is not present. |
66a9882e | 2850 | See the Linux kernel source file |
6ab7c0aa MK |
2851 | .I Documentation/sysctl/abi.txt |
2852 | for more information. | |
fea681da MK |
2853 | .TP |
2854 | .I /proc/sys/debug | |
2855 | This directory may be empty. | |
2856 | .TP | |
2857 | .I /proc/sys/dev | |
e2badfdf | 2858 | This directory contains device-specific information (e.g., |
9a67332e | 2859 | .IR dev/cdrom/info ). |
fea681da MK |
2860 | On |
2861 | some systems, it may be empty. | |
2862 | .TP | |
2863 | .I /proc/sys/fs | |
49236d3c | 2864 | This directory contains the files and subdirectories for kernel variables |
9ee4a2b6 | 2865 | related to filesystems. |
fea681da MK |
2866 | .TP |
2867 | .I /proc/sys/fs/binfmt_misc | |
c13182ef | 2868 | Documentation for files in this directory can be found |
66a9882e | 2869 | in the Linux kernel sources in |
fea681da MK |
2870 | .IR Documentation/binfmt_misc.txt . |
2871 | .TP | |
59a40ed7 MK |
2872 | .IR /proc/sys/fs/dentry-state " (since Linux 2.2)" |
2873 | This file contains information about the status of the | |
2874 | directory cache (dcache). | |
2875 | The file contains six numbers, | |
c13182ef | 2876 | .IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), " |
59a40ed7 | 2877 | .I want_pages |
fea681da | 2878 | (pages requested by system) and two dummy values. |
59a40ed7 MK |
2879 | .RS |
2880 | .IP * 2 | |
2881 | .I nr_dentry | |
2882 | is the number of allocated dentries (dcache entries). | |
2883 | This field is unused in Linux 2.2. | |
2884 | .IP * | |
2885 | .I nr_unused | |
2886 | is the number of unused dentries. | |
2887 | .IP * | |
2888 | .I age_limit | |
2889 | .\" looks like this is unused in kernels 2.2 to 2.6 | |
2890 | is the age in seconds after which dcache entries | |
2891 | can be reclaimed when memory is short. | |
2892 | .IP * | |
2893 | .I want_pages | |
2894 | .\" looks like this is unused in kernels 2.2 to 2.6 | |
c7094399 | 2895 | is nonzero when the kernel has called shrink_dcache_pages() and the |
fea681da | 2896 | dcache isn't pruned yet. |
59a40ed7 | 2897 | .RE |
fea681da MK |
2898 | .TP |
2899 | .I /proc/sys/fs/dir-notify-enable | |
2900 | This file can be used to disable or enable the | |
2901 | .I dnotify | |
2902 | interface described in | |
2903 | .BR fcntl (2) | |
2904 | on a system-wide basis. | |
2905 | A value of 0 in this file disables the interface, | |
2906 | and a value of 1 enables it. | |
2907 | .TP | |
2908 | .I /proc/sys/fs/dquot-max | |
2909 | This file shows the maximum number of cached disk quota entries. | |
2910 | On some (2.4) systems, it is not present. | |
2911 | If the number of free cached disk quota entries is very low and | |
2912 | you have some awesome number of simultaneous system users, | |
2913 | you might want to raise the limit. | |
2914 | .TP | |
2915 | .I /proc/sys/fs/dquot-nr | |
2916 | This file shows the number of allocated disk quota | |
2917 | entries and the number of free disk quota entries. | |
2918 | .TP | |
24cb4a4b | 2919 | .IR /proc/sys/fs/epoll " (since Linux 2.6.28)" |
242b46af MK |
2920 | This directory contains the file |
2921 | .IR max_user_watches , | |
24cb4a4b MK |
2922 | which can be used to limit the amount of kernel memory consumed by the |
2923 | .I epoll | |
2924 | interface. | |
2925 | For further details, see | |