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