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