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