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