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