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