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