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