]>
Commit | Line | Data |
---|---|---|
1 | .\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com) | |
2 | .\" and Copyright (C) 2002-2008,2017 Michael Kerrisk <mtk.manpages@gmail.com> | |
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 | |
7 | .\" Michael Kerrisk <mtk.manpages@gmail.com> | |
8 | .\" | |
9 | .\" SPDX-License-Identifier: GPL-2.0-or-later | |
10 | .\" | |
11 | .\" Modified 1995-05-17 by faith@cs.unc.edu | |
12 | .\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com). | |
13 | .\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl | |
14 | .\" Modified 2001-12-16 by rwhron@earthlink.net | |
15 | .\" Modified 2002-07-13 by jbelton@shaw.ca | |
16 | .\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25 | |
17 | .\" by Michael Kerrisk <mtk.manpages@gmail.com> | |
18 | .\" 2004-11-17, mtk -- updated notes on /proc/loadavg | |
19 | .\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8 | |
20 | .\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list | |
21 | .\" 2005-05-12, mtk, updated 'stat' | |
22 | .\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/* | |
23 | .\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable | |
24 | .\" 2005-09-19, mtk, added /proc/zoneinfo | |
25 | .\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7. | |
26 | .\" 2008-06-05, mtk, Added /proc/[pid]/oom_score, /proc/[pid]/oom_adj, | |
27 | .\" /proc/[pid]/limits, /proc/[pid]/mountinfo, /proc/[pid]/mountstats, | |
28 | .\" and /proc/[pid]/fdinfo/*. | |
29 | .\" 2008-06-19, mtk, Documented /proc/[pid]/status. | |
30 | .\" 2008-07-15, mtk, added /proc/config.gz | |
31 | .\" | |
32 | .\" FIXME cross check against Documentation/filesystems/proc.txt | |
33 | .\" to see what information could be imported from that file | |
34 | .\" into this file. | |
35 | .\" | |
36 | .TH PROC 5 2021-08-27 "Linux" "Linux Programmer's Manual" | |
37 | .SH NAME | |
38 | proc \- process information pseudo-filesystem | |
39 | .SH DESCRIPTION | |
40 | The | |
41 | .B proc | |
42 | filesystem is a pseudo-filesystem which provides an interface to | |
43 | kernel data structures. | |
44 | It is commonly mounted at | |
45 | .IR /proc . | |
46 | Typically, it is mounted automatically by the system, | |
47 | but it can also be mounted manually using a command such as: | |
48 | .PP | |
49 | .in +4n | |
50 | .EX | |
51 | mount \-t proc proc /proc | |
52 | .EE | |
53 | .in | |
54 | .PP | |
55 | Most of the files in the | |
56 | .B proc | |
57 | filesystem are read-only, | |
58 | but some files are writable, allowing kernel variables to be changed. | |
59 | .\" | |
60 | .SS Mount options | |
61 | The | |
62 | .B proc | |
63 | filesystem supports the following mount options: | |
64 | .TP | |
65 | .BR hidepid "=\fIn\fP (since Linux 3.3)" | |
66 | .\" commit 0499680a42141d86417a8fbaa8c8db806bea1201 | |
67 | This option controls who can access the information in | |
68 | .IR /proc/[pid] | |
69 | directories. | |
70 | The argument, | |
71 | .IR n , | |
72 | is one of the following values: | |
73 | .RS | |
74 | .TP 4 | |
75 | 0 | |
76 | Everybody may access all | |
77 | .IR /proc/[pid] | |
78 | directories. | |
79 | This is the traditional behavior, | |
80 | and the default if this mount option is not specified. | |
81 | .TP | |
82 | 1 | |
83 | Users may not access files and subdirectories inside any | |
84 | .IR /proc/[pid] | |
85 | directories but their own (the | |
86 | .IR /proc/[pid] | |
87 | directories themselves remain visible). | |
88 | Sensitive files such as | |
89 | .IR /proc/[pid]/cmdline | |
90 | and | |
91 | .IR /proc/[pid]/status | |
92 | are now protected against other users. | |
93 | This makes it impossible to learn whether any user is running a | |
94 | specific program | |
95 | (so long as the program doesn't otherwise reveal itself by its behavior). | |
96 | .\" As an additional bonus, since | |
97 | .\" .IR /proc/[pid]/cmdline | |
98 | .\" is inaccessible for other users, | |
99 | .\" poorly written programs passing sensitive information via | |
100 | .\" program arguments are now protected against local eavesdroppers. | |
101 | .TP | |
102 | 2 | |
103 | As for mode 1, but in addition the | |
104 | .IR /proc/[pid] | |
105 | directories belonging to other users become invisible. | |
106 | This means that | |
107 | .IR /proc/[pid] | |
108 | entries can no longer be used to discover the PIDs on the system. | |
109 | This doesn't hide the fact that a process with a specific PID value exists | |
110 | (it can be learned by other means, for example, by "kill \-0 $PID"), | |
111 | but it hides a process's UID and GID, | |
112 | which could otherwise be learned by employing | |
113 | .BR stat (2) | |
114 | on a | |
115 | .IR /proc/[pid] | |
116 | directory. | |
117 | This greatly complicates an attacker's task of gathering | |
118 | information about running processes (e.g., discovering whether | |
119 | some daemon is running with elevated privileges, | |
120 | whether another user is running some sensitive program, | |
121 | whether other users are running any program at all, and so on). | |
122 | .RE | |
123 | .TP | |
124 | .BR gid "=\fIgid\fP (since Linux 3.3)" | |
125 | .\" commit 0499680a42141d86417a8fbaa8c8db806bea1201 | |
126 | Specifies the ID of a group whose members are authorized to | |
127 | learn process information otherwise prohibited by | |
128 | .BR hidepid | |
129 | (i.e., users in this group behave as though | |
130 | .I /proc | |
131 | was mounted with | |
132 | .IR hidepid=0 ). | |
133 | This group should be used instead of approaches such as putting | |
134 | nonroot users into the | |
135 | .BR sudoers (5) | |
136 | file. | |
137 | .\" | |
138 | .SS Overview | |
139 | Underneath | |
140 | .IR /proc , | |
141 | there are the following general groups of files and subdirectories: | |
142 | .TP | |
143 | .IR /proc/[pid] " subdirectories" | |
144 | Each one of these subdirectories contains files and subdirectories | |
145 | exposing information about the process with the corresponding process ID. | |
146 | .IP | |
147 | Underneath each of the | |
148 | .I /proc/[pid] | |
149 | directories, a | |
150 | .I task | |
151 | subdirectory contains subdirectories of the form | |
152 | .IR task/[tid] , | |
153 | which contain corresponding information about each of the threads | |
154 | in the process, where | |
155 | .I tid | |
156 | is the kernel thread ID of the thread. | |
157 | .IP | |
158 | The | |
159 | .I /proc/[pid] | |
160 | subdirectories are visible when iterating through | |
161 | .I /proc | |
162 | with | |
163 | .BR getdents (2) | |
164 | (and thus are visible when one uses | |
165 | .BR ls (1) | |
166 | to view the contents of | |
167 | .IR /proc ). | |
168 | .TP | |
169 | .IR /proc/[tid] " subdirectories" | |
170 | Each one of these subdirectories contains files and subdirectories | |
171 | exposing information about the thread with the corresponding thread ID. | |
172 | The contents of these directories are the same as the corresponding | |
173 | .IR /proc/[pid]/task/[tid] | |
174 | directories. | |
175 | .IP | |
176 | The | |
177 | .I /proc/[tid] | |
178 | subdirectories are | |
179 | .I not | |
180 | visible when iterating through | |
181 | .I /proc | |
182 | with | |
183 | .BR getdents (2) | |
184 | (and thus are | |
185 | .I not | |
186 | visible when one uses | |
187 | .BR ls (1) | |
188 | to view the contents of | |
189 | .IR /proc ). | |
190 | .TP | |
191 | .I /proc/self | |
192 | When a process accesses this magic symbolic link, | |
193 | it resolves to the process's own | |
194 | .I /proc/[pid] | |
195 | directory. | |
196 | .TP | |
197 | .I /proc/thread\-self | |
198 | When a thread accesses this magic symbolic link, | |
199 | it resolves to the process's own | |
200 | .I /proc/self/task/[tid] | |
201 | directory. | |
202 | .TP | |
203 | .I /proc/[a\-z]* | |
204 | Various other files and subdirectories under | |
205 | .I /proc | |
206 | expose system-wide information. | |
207 | .PP | |
208 | All of the above are described in more detail below. | |
209 | .\" | |
210 | .SS Files and directories | |
211 | The following list provides details of many of the files and directories | |
212 | under the | |
213 | .I /proc | |
214 | hierarchy. | |
215 | .TP | |
216 | .I /proc/[pid] | |
217 | There is a numerical subdirectory for each running process; the | |
218 | subdirectory is named by the process ID. | |
219 | Each | |
220 | .I /proc/[pid] | |
221 | subdirectory contains the pseudo-files and directories described below. | |
222 | .IP | |
223 | The files inside each | |
224 | .I /proc/[pid] | |
225 | directory are normally owned by the effective user and | |
226 | effective group ID of the process. | |
227 | However, as a security measure, the ownership is made | |
228 | .IR root:root | |
229 | if the process's "dumpable" attribute is set to a value other than 1. | |
230 | .IP | |
231 | Before Linux 4.11, | |
232 | .\" commit 68eb94f16227336a5773b83ecfa8290f1d6b78ce | |
233 | .IR root:root | |
234 | meant the "global" root user ID and group ID | |
235 | (i.e., UID 0 and GID 0 in the initial user namespace). | |
236 | Since Linux 4.11, | |
237 | if the process is in a noninitial user namespace that has a | |
238 | valid mapping for user (group) ID 0 inside the namespace, then | |
239 | the user (group) ownership of the files under | |
240 | .I /proc/[pid] | |
241 | is instead made the same as the root user (group) ID of the namespace. | |
242 | This means that inside a container, | |
243 | things work as expected for the container "root" user. | |
244 | .IP | |
245 | The process's "dumpable" attribute may change for the following reasons: | |
246 | .RS | |
247 | .IP * 3 | |
248 | The attribute was explicitly set via the | |
249 | .BR prctl (2) | |
250 | .B PR_SET_DUMPABLE | |
251 | operation. | |
252 | .IP * | |
253 | The attribute was reset to the value in the file | |
254 | .IR /proc/sys/fs/suid_dumpable | |
255 | (described below), for the reasons described in | |
256 | .BR prctl (2). | |
257 | .RE | |
258 | .IP | |
259 | Resetting the "dumpable" attribute to 1 reverts the ownership of the | |
260 | .IR /proc/[pid]/* | |
261 | files to the process's effective UID and GID. | |
262 | Note, however, that if the effective UID or GID is subsequently modified, | |
263 | then the "dumpable" attribute may be reset, as described in | |
264 | .BR prctl (2). | |
265 | Therefore, it may be desirable to reset the "dumpable" attribute | |
266 | .I after | |
267 | making any desired changes to the process's effective UID or GID. | |
268 | .TP | |
269 | .I /proc/[pid]/attr | |
270 | .\" https://lwn.net/Articles/28222/ | |
271 | .\" From: Stephen Smalley <sds@epoch.ncsc.mil> | |
272 | .\" To: LKML and others | |
273 | .\" Subject: [RFC][PATCH] Process Attribute API for Security Modules | |
274 | .\" Date: 08 Apr 2003 16:17:52 -0400 | |
275 | .\" | |
276 | .\" http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml | |
277 | .\" | |
278 | The files in this directory provide an API for security modules. | |
279 | The contents of this directory are files that can be read and written | |
280 | in order to set security-related attributes. | |
281 | This directory was added to support SELinux, | |
282 | but the intention was that the API be general enough to support | |
283 | other security modules. | |
284 | For the purpose of explanation, | |
285 | examples of how SELinux uses these files are provided below. | |
286 | .IP | |
287 | This directory is present only if the kernel was configured with | |
288 | .BR CONFIG_SECURITY . | |
289 | .TP | |
290 | .IR /proc/[pid]/attr/current " (since Linux 2.6.0)" | |
291 | The contents of this file represent the current | |
292 | security attributes of the process. | |
293 | .IP | |
294 | In SELinux, this file is used to get the security context of a process. | |
295 | Prior to Linux 2.6.11, this file could not be used to set the security | |
296 | context (a write was always denied), since SELinux limited process security | |
297 | transitions to | |
298 | .BR execve (2) | |
299 | (see the description of | |
300 | .IR /proc/[pid]/attr/exec , | |
301 | below). | |
302 | Since Linux 2.6.11, SELinux lifted this restriction and began supporting | |
303 | "set" operations via writes to this node if authorized by policy, | |
304 | although use of this operation is only suitable for applications that are | |
305 | trusted to maintain any desired separation between the old and new security | |
306 | contexts. | |
307 | .IP | |
308 | Prior to Linux 2.6.28, SELinux did not allow threads within a | |
309 | multithreaded process to set their security context via this node | |
310 | as it would yield an inconsistency among the security contexts of the | |
311 | threads sharing the same memory space. | |
312 | Since Linux 2.6.28, SELinux lifted | |
313 | this restriction and began supporting "set" operations for threads within | |
314 | a multithreaded process if the new security context is bounded by the old | |
315 | security context, where the bounded relation is defined in policy and | |
316 | guarantees that the new security context has a subset of the permissions | |
317 | of the old security context. | |
318 | .IP | |
319 | Other security modules may choose to support "set" operations via | |
320 | writes to this node. | |
321 | .TP | |
322 | .IR /proc/[pid]/attr/exec " (since Linux 2.6.0)" | |
323 | This file represents the attributes to assign to the | |
324 | process upon a subsequent | |
325 | .BR execve (2). | |
326 | .IP | |
327 | In SELinux, | |
328 | this is needed to support role/domain transitions, and | |
329 | .BR execve (2) | |
330 | is the preferred point to make such transitions because it offers better | |
331 | control over the initialization of the process in the new security label | |
332 | and the inheritance of state. | |
333 | In SELinux, this attribute is reset on | |
334 | .BR execve (2) | |
335 | so that the new program reverts to the default behavior for any | |
336 | .BR execve (2) | |
337 | calls that it may make. | |
338 | In SELinux, a process can set | |
339 | only its own | |
340 | .I /proc/[pid]/attr/exec | |
341 | attribute. | |
342 | .TP | |
343 | .IR /proc/[pid]/attr/fscreate " (since Linux 2.6.0)" | |
344 | This file represents the attributes to assign to files | |
345 | created by subsequent calls to | |
346 | .BR open (2), | |
347 | .BR mkdir (2), | |
348 | .BR symlink (2), | |
349 | and | |
350 | .BR mknod (2) | |
351 | .IP | |
352 | SELinux employs this file to support creation of a file | |
353 | (using the aforementioned system calls) | |
354 | in a secure state, | |
355 | so that there is no risk of inappropriate access being obtained | |
356 | between the time of creation and the time that attributes are set. | |
357 | In SELinux, this attribute is reset on | |
358 | .BR execve (2), | |
359 | so that the new program reverts to the default behavior for | |
360 | any file creation calls it may make, but the attribute will persist | |
361 | across multiple file creation calls within a program unless it is | |
362 | explicitly reset. | |
363 | In SELinux, a process can set only its own | |
364 | .IR /proc/[pid]/attr/fscreate | |
365 | attribute. | |
366 | .TP | |
367 | .IR /proc/[pid]/attr/keycreate " (since Linux 2.6.18)" | |
368 | .\" commit 4eb582cf1fbd7b9e5f466e3718a59c957e75254e | |
369 | If a process writes a security context into this file, | |
370 | all subsequently created keys | |
371 | .RB ( add_key (2)) | |
372 | will be labeled with this context. | |
373 | For further information, see the kernel source file | |
374 | .I Documentation/security/keys/core.rst | |
375 | (or file | |
376 | .\" commit b68101a1e8f0263dbc7b8375d2a7c57c6216fb76 | |
377 | .I Documentation/security/keys.txt | |
378 | on Linux between 3.0 and 4.13, or | |
379 | .\" commit d410fa4ef99112386de5f218dd7df7b4fca910b4 | |
380 | .I Documentation/keys.txt | |
381 | before Linux 3.0). | |
382 | .TP | |
383 | .IR /proc/[pid]/attr/prev " (since Linux 2.6.0)" | |
384 | This file contains the security context of the process before the last | |
385 | .BR execve (2); | |
386 | that is, the previous value of | |
387 | .IR /proc/[pid]/attr/current . | |
388 | .TP | |
389 | .IR /proc/[pid]/attr/socketcreate " (since Linux 2.6.18)" | |
390 | .\" commit 42c3e03ef6b298813557cdb997bd6db619cd65a2 | |
391 | If a process writes a security context into this file, | |
392 | all subsequently created sockets will be labeled with this context. | |
393 | .TP | |
394 | .IR /proc/[pid]/autogroup " (since Linux 2.6.38)" | |
395 | .\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a | |
396 | See | |
397 | .BR sched (7). | |
398 | .TP | |
399 | .IR /proc/[pid]/auxv " (since 2.6.0)" | |
400 | .\" Precisely: Linux 2.6.0-test7 | |
401 | This contains the contents of the ELF interpreter information passed | |
402 | to the process at exec time. | |
403 | The format is one \fIunsigned long\fP ID | |
404 | plus one \fIunsigned long\fP value for each entry. | |
405 | The last entry contains two zeros. | |
406 | See also | |
407 | .BR getauxval (3). | |
408 | .IP | |
409 | Permission to access this file is governed by a ptrace access mode | |
410 | .B PTRACE_MODE_READ_FSCREDS | |
411 | check; see | |
412 | .BR ptrace (2). | |
413 | .TP | |
414 | .IR /proc/[pid]/cgroup " (since Linux 2.6.24)" | |
415 | See | |
416 | .BR cgroups (7). | |
417 | .TP | |
418 | .IR /proc/[pid]/clear_refs " (since Linux 2.6.22)" | |
419 | .\" commit b813e931b4c8235bb42e301096ea97dbdee3e8fe (2.6.22) | |
420 | .\" commit 398499d5f3613c47f2143b8c54a04efb5d7a6da9 (2.6.32) | |
421 | .\" commit 040fa02077de01c7e08fa75be6125e4ca5636011 (3.11) | |
422 | .\" | |
423 | .\" "Clears page referenced bits shown in smaps output" | |
424 | .\" write-only, writable only by the owner of the process | |
425 | .IP | |
426 | This is a write-only file, writable only by owner of the process. | |
427 | .IP | |
428 | The following values may be written to the file: | |
429 | .RS | |
430 | .TP | |
431 | 1 (since Linux 2.6.22) | |
432 | .\" Internally: CLEAR_REFS_ALL | |
433 | Reset the PG_Referenced and ACCESSED/YOUNG | |
434 | bits for all the pages associated with the process. | |
435 | (Before kernel 2.6.32, writing any nonzero value to this file | |
436 | had this effect.) | |
437 | .TP | |
438 | 2 (since Linux 2.6.32) | |
439 | .\" Internally: CLEAR_REFS_ANON | |
440 | Reset the PG_Referenced and ACCESSED/YOUNG | |
441 | bits for all anonymous pages associated with the process. | |
442 | .TP | |
443 | 3 (since Linux 2.6.32) | |
444 | .\" Internally: CLEAR_REFS_MAPPED | |
445 | Reset the PG_Referenced and ACCESSED/YOUNG | |
446 | bits for all file-mapped pages associated with the process. | |
447 | .RE | |
448 | .IP | |
449 | Clearing the PG_Referenced and ACCESSED/YOUNG bits provides a method | |
450 | to measure approximately how much memory a process is using. | |
451 | One first inspects the values in the "Referenced" fields | |
452 | for the VMAs shown in | |
453 | .IR /proc/[pid]/smaps | |
454 | to get an idea of the memory footprint of the | |
455 | process. | |
456 | One then clears the PG_Referenced and ACCESSED/YOUNG bits | |
457 | and, after some measured time interval, | |
458 | once again inspects the values in the "Referenced" fields | |
459 | to get an idea of the change in memory footprint of the | |
460 | process during the measured interval. | |
461 | If one is interested only in inspecting the selected mapping types, | |
462 | then the value 2 or 3 can be used instead of 1. | |
463 | .IP | |
464 | Further values can be written to affect different properties: | |
465 | .RS | |
466 | .TP | |
467 | 4 (since Linux 3.11) | |
468 | Clear the soft-dirty bit for all the pages associated with the process. | |
469 | .\" Internally: CLEAR_REFS_SOFT_DIRTY | |
470 | This is used (in conjunction with | |
471 | .IR /proc/[pid]/pagemap ) | |
472 | by the check-point restore system to discover which pages of a process | |
473 | have been dirtied since the file | |
474 | .IR /proc/[pid]/clear_refs | |
475 | was written to. | |
476 | .TP | |
477 | 5 (since Linux 4.0) | |
478 | .\" Internally: CLEAR_REFS_MM_HIWATER_RSS | |
479 | Reset the peak resident set size ("high water mark") to the process's | |
480 | current resident set size value. | |
481 | .RE | |
482 | .IP | |
483 | Writing any value to | |
484 | .IR /proc/[pid]/clear_refs | |
485 | other than those listed above has no effect. | |
486 | .IP | |
487 | The | |
488 | .IR /proc/[pid]/clear_refs | |
489 | file is present only if the | |
490 | .B CONFIG_PROC_PAGE_MONITOR | |
491 | kernel configuration option is enabled. | |
492 | .TP | |
493 | .I /proc/[pid]/cmdline | |
494 | This read-only file holds the complete command line for the process, | |
495 | unless the process is a zombie. | |
496 | .\" In 2.3.26, this also used to be true if the process was swapped out. | |
497 | In the latter case, there is nothing in this file: | |
498 | that is, a read on this file will return 0 characters. | |
499 | The command-line arguments appear in this file as a set of | |
500 | strings separated by null bytes (\(aq\e0\(aq), | |
501 | with a further null byte after the last string. | |
502 | .IP | |
503 | If, after an | |
504 | .BR execve (2), | |
505 | the process modifies its | |
506 | .I argv | |
507 | strings, those changes will show up here. | |
508 | This is not the same thing as modifying the | |
509 | .I argv | |
510 | array. | |
511 | .IP | |
512 | Furthermore, a process may change the memory location that this file refers via | |
513 | .BR prctl (2) | |
514 | operations such as | |
515 | .BR PR_SET_MM_ARG_START . | |
516 | .IP | |
517 | Think of this file as the command line that the process wants you to see. | |
518 | .TP | |
519 | .IR /proc/[pid]/comm " (since Linux 2.6.33)" | |
520 | .\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4 | |
521 | This file exposes the process's | |
522 | .I comm | |
523 | value\(emthat is, the command name associated with the process. | |
524 | Different threads in the same process may have different | |
525 | .I comm | |
526 | values, accessible via | |
527 | .IR /proc/[pid]/task/[tid]/comm . | |
528 | A thread may modify its | |
529 | .I comm | |
530 | value, or that of any of other thread in the same thread group (see | |
531 | the discussion of | |
532 | .B CLONE_THREAD | |
533 | in | |
534 | .BR clone (2)), | |
535 | by writing to the file | |
536 | .IR /proc/self/task/[tid]/comm . | |
537 | Strings longer than | |
538 | .B TASK_COMM_LEN | |
539 | (16) characters (including the terminating null byte) are silently truncated. | |
540 | .IP | |
541 | This file provides a superset of the | |
542 | .BR prctl (2) | |
543 | .B PR_SET_NAME | |
544 | and | |
545 | .B PR_GET_NAME | |
546 | operations, and is employed by | |
547 | .BR pthread_setname_np (3) | |
548 | when used to rename threads other than the caller. | |
549 | The value in this file is used for the | |
550 | .I %e | |
551 | specifier in | |
552 | .IR /proc/sys/kernel/core_pattern ; | |
553 | see | |
554 | .BR core (5). | |
555 | .TP | |
556 | .IR /proc/[pid]/coredump_filter " (since Linux 2.6.23)" | |
557 | See | |
558 | .BR core (5). | |
559 | .TP | |
560 | .IR /proc/[pid]/cpuset " (since Linux 2.6.12)" | |
561 | .\" and/proc/[pid]/task/[tid]/cpuset | |
562 | See | |
563 | .BR cpuset (7). | |
564 | .TP | |
565 | .I /proc/[pid]/cwd | |
566 | This is a symbolic link to the current working directory of the process. | |
567 | To find out the current working directory of process 20, | |
568 | for instance, you can do this: | |
569 | .IP | |
570 | .in +4n | |
571 | .EX | |
572 | .RB "$" " cd /proc/20/cwd; pwd \-P" | |
573 | .EE | |
574 | .in | |
575 | .IP | |
576 | .\" The following was still true as at kernel 2.6.13 | |
577 | In a multithreaded process, the contents of this symbolic link | |
578 | are not available if the main thread has already terminated | |
579 | (typically by calling | |
580 | .BR pthread_exit (3)). | |
581 | .IP | |
582 | Permission to dereference or read | |
583 | .RB ( readlink (2)) | |
584 | this symbolic link is governed by a ptrace access mode | |
585 | .B PTRACE_MODE_READ_FSCREDS | |
586 | check; see | |
587 | .BR ptrace (2). | |
588 | .TP | |
589 | .I /proc/[pid]/environ | |
590 | This file contains the initial environment that was set | |
591 | when the currently executing program was started via | |
592 | .BR execve (2). | |
593 | The entries are separated by null bytes (\(aq\e0\(aq), | |
594 | and there may be a null byte at the end. | |
595 | Thus, to print out the environment of process 1, you would do: | |
596 | .IP | |
597 | .in +4n | |
598 | .EX | |
599 | .RB "$" " cat /proc/1/environ | tr \(aq\e000\(aq \(aq\en\(aq" | |
600 | .EE | |
601 | .in | |
602 | .IP | |
603 | If, after an | |
604 | .BR execve (2), | |
605 | the process modifies its environment | |
606 | (e.g., by calling functions such as | |
607 | .BR putenv (3) | |
608 | or modifying the | |
609 | .BR environ (7) | |
610 | variable directly), | |
611 | this file will | |
612 | .I not | |
613 | reflect those changes. | |
614 | .IP | |
615 | Furthermore, a process may change the memory location that this file refers via | |
616 | .BR prctl (2) | |
617 | operations such as | |
618 | .BR PR_SET_MM_ENV_START . | |
619 | .IP | |
620 | Permission to access this file is governed by a ptrace access mode | |
621 | .B PTRACE_MODE_READ_FSCREDS | |
622 | check; see | |
623 | .BR ptrace (2). | |
624 | .TP | |
625 | .I /proc/[pid]/exe | |
626 | Under Linux 2.2 and later, this file is a symbolic link | |
627 | containing the actual pathname of the executed command. | |
628 | This symbolic link can be dereferenced normally; attempting to open | |
629 | it will open the executable. | |
630 | You can even type | |
631 | .I /proc/[pid]/exe | |
632 | to run another copy of the same executable that is being run by | |
633 | process [pid]. | |
634 | If the pathname has been unlinked, the symbolic link will contain the | |
635 | string \(aq(deleted)\(aq appended to the original pathname. | |
636 | .\" The following was still true as at kernel 2.6.13 | |
637 | In a multithreaded process, the contents of this symbolic link | |
638 | are not available if the main thread has already terminated | |
639 | (typically by calling | |
640 | .BR pthread_exit (3)). | |
641 | .IP | |
642 | Permission to dereference or read | |
643 | .RB ( readlink (2)) | |
644 | this symbolic link is governed by a ptrace access mode | |
645 | .B PTRACE_MODE_READ_FSCREDS | |
646 | check; see | |
647 | .BR ptrace (2). | |
648 | .IP | |
649 | Under Linux 2.0 and earlier, | |
650 | .I /proc/[pid]/exe | |
651 | is a pointer to the binary which was executed, | |
652 | and appears as a symbolic link. | |
653 | A | |
654 | .BR readlink (2) | |
655 | call on this file under Linux 2.0 returns a string in the format: | |
656 | .IP | |
657 | [device]:inode | |
658 | .IP | |
659 | For example, [0301]:1502 would be inode 1502 on device major 03 (IDE, | |
660 | MFM, etc. drives) minor 01 (first partition on the first drive). | |
661 | .IP | |
662 | .BR find (1) | |
663 | with the | |
664 | .I \-inum | |
665 | option can be used to locate the file. | |
666 | .TP | |
667 | .I /proc/[pid]/fd/ | |
668 | This is a subdirectory containing one entry for each file which the | |
669 | process has open, named by its file descriptor, and which is a | |
670 | symbolic link to the actual file. | |
671 | Thus, 0 is standard input, 1 standard output, 2 standard error, and so on. | |
672 | .IP | |
673 | For file descriptors for pipes and sockets, | |
674 | the entries will be symbolic links whose content is the | |
675 | file type with the inode. | |
676 | A | |
677 | .BR readlink (2) | |
678 | call on this file returns a string in the format: | |
679 | .IP | |
680 | type:[inode] | |
681 | .IP | |
682 | For example, | |
683 | .I socket:[2248868] | |
684 | will be a socket and its inode is 2248868. | |
685 | For sockets, that inode can be used to find more information | |
686 | in one of the files under | |
687 | .IR /proc/net/ . | |
688 | .IP | |
689 | For file descriptors that have no corresponding inode | |
690 | (e.g., file descriptors produced by | |
691 | .BR bpf (2), | |
692 | .BR epoll_create (2), | |
693 | .BR eventfd (2), | |
694 | .BR inotify_init (2), | |
695 | .BR perf_event_open (2), | |
696 | .BR signalfd (2), | |
697 | .BR timerfd_create (2), | |
698 | and | |
699 | .BR userfaultfd (2)), | |
700 | the entry will be a symbolic link with contents of the form | |
701 | .IP | |
702 | anon_inode:<file-type> | |
703 | .IP | |
704 | In many cases (but not all), the | |
705 | .I file-type | |
706 | is surrounded by square brackets. | |
707 | .IP | |
708 | For example, an epoll file descriptor will have a symbolic link | |
709 | whose content is the string | |
710 | .IR "anon_inode:[eventpoll]" . | |
711 | .IP | |
712 | .\"The following was still true as at kernel 2.6.13 | |
713 | In a multithreaded process, the contents of this directory | |
714 | are not available if the main thread has already terminated | |
715 | (typically by calling | |
716 | .BR pthread_exit (3)). | |
717 | .IP | |
718 | Programs that take a filename as a command-line argument, | |
719 | but don't take input from standard input if no argument is supplied, | |
720 | and programs that write to a file named as a command-line argument, | |
721 | but don't send their output to standard output | |
722 | if no argument is supplied, can nevertheless be made to use | |
723 | standard input or standard output by using | |
724 | .IR /proc/[pid]/fd | |
725 | files as command-line arguments. | |
726 | For example, assuming that | |
727 | .I \-i | |
728 | is the flag designating an input file and | |
729 | .I \-o | |
730 | is the flag designating an output file: | |
731 | .IP | |
732 | .in +4n | |
733 | .EX | |
734 | .RB "$" " foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ..." | |
735 | .EE | |
736 | .in | |
737 | .IP | |
738 | and you have a working filter. | |
739 | .\" The following is not true in my tests (MTK): | |
740 | .\" Note that this will not work for | |
741 | .\" programs that seek on their files, as the files in the fd directory | |
742 | .\" are not seekable. | |
743 | .IP | |
744 | .I /proc/self/fd/N | |
745 | is approximately the same as | |
746 | .I /dev/fd/N | |
747 | in some UNIX and UNIX-like systems. | |
748 | Most Linux MAKEDEV scripts symbolically link | |
749 | .I /dev/fd | |
750 | to | |
751 | .IR /proc/self/fd , | |
752 | in fact. | |
753 | .IP | |
754 | Most systems provide symbolic links | |
755 | .IR /dev/stdin , | |
756 | .IR /dev/stdout , | |
757 | and | |
758 | .IR /dev/stderr , | |
759 | which respectively link to the files | |
760 | .IR 0 , | |
761 | .IR 1 , | |
762 | and | |
763 | .IR 2 | |
764 | in | |
765 | .IR /proc/self/fd . | |
766 | Thus the example command above could be written as: | |
767 | .IP | |
768 | .in +4n | |
769 | .EX | |
770 | .RB "$" " foobar \-i /dev/stdin \-o /dev/stdout ..." | |
771 | .EE | |
772 | .in | |
773 | .IP | |
774 | Permission to dereference or read | |
775 | .RB ( readlink (2)) | |
776 | the symbolic links in this directory is governed by a ptrace access mode | |
777 | .B PTRACE_MODE_READ_FSCREDS | |
778 | check; see | |
779 | .BR ptrace (2). | |
780 | .IP | |
781 | Note that for file descriptors referring to inodes (pipes and sockets, see above), | |
782 | those inodes still have permission bits and ownership information | |
783 | distinct from those of the | |
784 | .I /proc/[pid]/fd | |
785 | entry, | |
786 | and that the owner may differ from the user and group IDs of the process. | |
787 | An unprivileged process may lack permissions to open them, as in this example: | |
788 | .IP | |
789 | .in +4n | |
790 | .EX | |
791 | .RB "$" " echo test | sudo \-u nobody cat" | |
792 | test | |
793 | .RB "$" " echo test | sudo \-u nobody cat /proc/self/fd/0" | |
794 | cat: /proc/self/fd/0: Permission denied | |
795 | .EE | |
796 | .in | |
797 | .IP | |
798 | File descriptor 0 refers to the pipe created by the shell | |
799 | and owned by that shell's user, which is not | |
800 | .IR nobody , | |
801 | so | |
802 | .B cat | |
803 | does not have permission to create a new file descriptor to read from that inode, | |
804 | even though it can still read from its existing file descriptor 0. | |
805 | .TP | |
806 | .IR /proc/[pid]/fdinfo/ " (since Linux 2.6.22)" | |
807 | This is a subdirectory containing one entry for each file which the | |
808 | process has open, named by its file descriptor. | |
809 | The files in this directory are readable only by the owner of the process. | |
810 | The contents of each file can be read to obtain information | |
811 | about the corresponding file descriptor. | |
812 | The content depends on the type of file referred to by the | |
813 | corresponding file descriptor. | |
814 | .IP | |
815 | For regular files and directories, we see something like: | |
816 | .IP | |
817 | .in +4n | |
818 | .EX | |
819 | .RB "$" " cat /proc/12015/fdinfo/4" | |
820 | pos: 1000 | |
821 | flags: 01002002 | |
822 | mnt_id: 21 | |
823 | .EE | |
824 | .in | |
825 | .IP | |
826 | The fields are as follows: | |
827 | .RS | |
828 | .TP | |
829 | .I pos | |
830 | This is a decimal number showing the file offset. | |
831 | .TP | |
832 | .I flags | |
833 | This is an octal number that displays the | |
834 | file access mode and file status flags (see | |
835 | .BR open (2)). | |
836 | If the close-on-exec file descriptor flag is set, then | |
837 | .I flags | |
838 | will also include the value | |
839 | .BR O_CLOEXEC . | |
840 | .IP | |
841 | Before Linux 3.1, | |
842 | .\" commit 1117f72ea0217ba0cc19f05adbbd8b9a397f5ab7 | |
843 | this field incorrectly displayed the setting of | |
844 | .B O_CLOEXEC | |
845 | at the time the file was opened, | |
846 | rather than the current setting of the close-on-exec flag. | |
847 | .TP | |
848 | .I | |
849 | .I mnt_id | |
850 | This field, present since Linux 3.15, | |
851 | .\" commit 49d063cb353265c3af701bab215ac438ca7df36d | |
852 | is the ID of the mount containing this file. | |
853 | See the description of | |
854 | .IR /proc/[pid]/mountinfo . | |
855 | .RE | |
856 | .IP | |
857 | For eventfd file descriptors (see | |
858 | .BR eventfd (2)), | |
859 | we see (since Linux 3.8) | |
860 | .\" commit cbac5542d48127b546a23d816380a7926eee1c25 | |
861 | the following fields: | |
862 | .IP | |
863 | .in +4n | |
864 | .EX | |
865 | pos: 0 | |
866 | flags: 02 | |
867 | mnt_id: 10 | |
868 | eventfd\-count: 40 | |
869 | .EE | |
870 | .in | |
871 | .IP | |
872 | .I eventfd\-count | |
873 | is the current value of the eventfd counter, in hexadecimal. | |
874 | .IP | |
875 | For epoll file descriptors (see | |
876 | .BR epoll (7)), | |
877 | we see (since Linux 3.8) | |
878 | .\" commit 138d22b58696c506799f8de759804083ff9effae | |
879 | the following fields: | |
880 | .IP | |
881 | .in +4n | |
882 | .EX | |
883 | pos: 0 | |
884 | flags: 02 | |
885 | mnt_id: 10 | |
886 | tfd: 9 events: 19 data: 74253d2500000009 | |
887 | tfd: 7 events: 19 data: 74253d2500000007 | |
888 | .EE | |
889 | .in | |
890 | .IP | |
891 | Each of the lines beginning | |
892 | .I tfd | |
893 | describes one of the file descriptors being monitored via | |
894 | the epoll file descriptor (see | |
895 | .BR epoll_ctl (2) | |
896 | for some details). | |
897 | The | |
898 | .IR tfd | |
899 | field is the number of the file descriptor. | |
900 | The | |
901 | .I events | |
902 | field is a hexadecimal mask of the events being monitored for this file | |
903 | descriptor. | |
904 | The | |
905 | .I data | |
906 | field is the data value associated with this file descriptor. | |
907 | .IP | |
908 | For signalfd file descriptors (see | |
909 | .BR signalfd (2)), | |
910 | we see (since Linux 3.8) | |
911 | .\" commit 138d22b58696c506799f8de759804083ff9effae | |
912 | the following fields: | |
913 | .IP | |
914 | .in +4n | |
915 | .EX | |
916 | pos: 0 | |
917 | flags: 02 | |
918 | mnt_id: 10 | |
919 | sigmask: 0000000000000006 | |
920 | .EE | |
921 | .in | |
922 | .IP | |
923 | .I sigmask | |
924 | is the hexadecimal mask of signals that are accepted via this | |
925 | signalfd file descriptor. | |
926 | (In this example, bits 2 and 3 are set, corresponding to the signals | |
927 | .B SIGINT | |
928 | and | |
929 | .BR SIGQUIT ; | |
930 | see | |
931 | .BR signal (7).) | |
932 | .IP | |
933 | For inotify file descriptors (see | |
934 | .BR inotify (7)), | |
935 | we see (since Linux 3.8) | |
936 | the following fields: | |
937 | .IP | |
938 | .in +4n | |
939 | .EX | |
940 | pos: 0 | |
941 | flags: 00 | |
942 | mnt_id: 11 | |
943 | inotify wd:2 ino:7ef82a sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:2af87e00220ffd73 | |
944 | inotify wd:1 ino:192627 sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:27261900802dfd73 | |
945 | .EE | |
946 | .in | |
947 | .IP | |
948 | Each of the lines beginning with "inotify" displays information about | |
949 | one file or directory that is being monitored. | |
950 | The fields in this line are as follows: | |
951 | .RS | |
952 | .TP | |
953 | .I wd | |
954 | A watch descriptor number (in decimal). | |
955 | .TP | |
956 | .I ino | |
957 | The inode number of the target file (in hexadecimal). | |
958 | .TP | |
959 | .I sdev | |
960 | The ID of the device where the target file resides (in hexadecimal). | |
961 | .TP | |
962 | .I mask | |
963 | The mask of events being monitored for the target file (in hexadecimal). | |
964 | .RE | |
965 | .IP | |
966 | If the kernel was built with exportfs support, the path to the target | |
967 | file is exposed as a file handle, via three hexadecimal fields: | |
968 | .IR fhandle\-bytes , | |
969 | .IR fhandle\-type , | |
970 | and | |
971 | .IR f_handle . | |
972 | .IP | |
973 | For fanotify file descriptors (see | |
974 | .BR fanotify (7)), | |
975 | we see (since Linux 3.8) | |
976 | the following fields: | |
977 | .IP | |
978 | .in +4n | |
979 | .EX | |
980 | pos: 0 | |
981 | flags: 02 | |
982 | mnt_id: 11 | |
983 | fanotify flags:0 event\-flags:88002 | |
984 | fanotify ino:19264f sdev:800001 mflags:0 mask:1 ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:4f261900a82dfd73 | |
985 | .EE | |
986 | .in | |
987 | .IP | |
988 | The fourth line displays information defined when the fanotify group | |
989 | was created via | |
990 | .BR fanotify_init (2): | |
991 | .RS | |
992 | .TP | |
993 | .I flags | |
994 | The | |
995 | .I flags | |
996 | argument given to | |
997 | .BR fanotify_init (2) | |
998 | (expressed in hexadecimal). | |
999 | .TP | |
1000 | .I event\-flags | |
1001 | The | |
1002 | .I event_f_flags | |
1003 | argument given to | |
1004 | .BR fanotify_init (2) | |
1005 | (expressed in hexadecimal). | |
1006 | .RE | |
1007 | .IP | |
1008 | Each additional line shown in the file contains information | |
1009 | about one of the marks in the fanotify group. | |
1010 | Most of these fields are as for inotify, except: | |
1011 | .RS | |
1012 | .TP | |
1013 | .I mflags | |
1014 | The flags associated with the mark | |
1015 | (expressed in hexadecimal). | |
1016 | .TP | |
1017 | .I mask | |
1018 | The events mask for this mark | |
1019 | (expressed in hexadecimal). | |
1020 | .TP | |
1021 | .I ignored_mask | |
1022 | The mask of events that are ignored for this mark | |
1023 | (expressed in hexadecimal). | |
1024 | .RE | |
1025 | .IP | |
1026 | For details on these fields, see | |
1027 | .BR fanotify_mark (2). | |
1028 | .IP | |
1029 | For timerfd file descriptors (see | |
1030 | .BR timerfd (2)), | |
1031 | we see (since Linux 3.17) | |
1032 | .\" commit af9c4957cf212ad9cf0bee34c95cb11de5426e85 | |
1033 | the following fields: | |
1034 | .IP | |
1035 | .in +4n | |
1036 | .EX | |
1037 | pos: 0 | |
1038 | flags: 02004002 | |
1039 | mnt_id: 13 | |
1040 | clockid: 0 | |
1041 | ticks: 0 | |
1042 | settime flags: 03 | |
1043 | it_value: (7695568592, 640020877) | |
1044 | it_interval: (0, 0) | |
1045 | .EE | |
1046 | .in | |
1047 | .RS | |
1048 | .TP | |
1049 | .I clockid | |
1050 | This is the numeric value of the clock ID | |
1051 | (corresponding to one of the | |
1052 | .B CLOCK_* | |
1053 | constants defined via | |
1054 | .IR <time.h> ) | |
1055 | that is used to mark the progress of the timer (in this example, 0 is | |
1056 | .BR CLOCK_REALTIME ). | |
1057 | .TP | |
1058 | .I ticks | |
1059 | This is the number of timer expirations that have occurred, | |
1060 | (i.e., the value that | |
1061 | .BR read (2) | |
1062 | on it would return). | |
1063 | .TP | |
1064 | .I settime flags | |
1065 | This field lists the flags with which the timerfd was last armed (see | |
1066 | .BR timerfd_settime (2)), | |
1067 | in octal | |
1068 | (in this example, both | |
1069 | .B TFD_TIMER_ABSTIME | |
1070 | and | |
1071 | .B TFD_TIMER_CANCEL_ON_SET | |
1072 | are set). | |
1073 | .TP | |
1074 | .I it_value | |
1075 | This field contains the amount of time until the timer will next expire, | |
1076 | expressed in seconds and nanoseconds. | |
1077 | This is always expressed as a relative value, | |
1078 | regardless of whether the timer was created using the | |
1079 | .B TFD_TIMER_ABSTIME | |
1080 | flag. | |
1081 | .TP | |
1082 | .I it_interval | |
1083 | This field contains the interval of the timer, | |
1084 | in seconds and nanoseconds. | |
1085 | (The | |
1086 | .I it_value | |
1087 | and | |
1088 | .I it_interval | |
1089 | fields contain the values that | |
1090 | .BR timerfd_gettime (2) | |
1091 | on this file descriptor would return.) | |
1092 | .RE | |
1093 | .TP | |
1094 | .IR /proc/[pid]/gid_map " (since Linux 3.5)" | |
1095 | See | |
1096 | .BR user_namespaces (7). | |
1097 | .TP | |
1098 | .IR /proc/[pid]/io " (since kernel 2.6.20)" | |
1099 | .\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2 | |
1100 | This file contains I/O statistics for the process, for example: | |
1101 | .IP | |
1102 | .in +4n | |
1103 | .EX | |
1104 | .RB "#" " cat /proc/3828/io" | |
1105 | rchar: 323934931 | |
1106 | wchar: 323929600 | |
1107 | syscr: 632687 | |
1108 | syscw: 632675 | |
1109 | read_bytes: 0 | |
1110 | write_bytes: 323932160 | |
1111 | cancelled_write_bytes: 0 | |
1112 | .EE | |
1113 | .in | |
1114 | .IP | |
1115 | The fields are as follows: | |
1116 | .RS | |
1117 | .TP | |
1118 | .IR rchar ": characters read" | |
1119 | The number of bytes which this task has caused to be read from storage. | |
1120 | This is simply the sum of bytes which this process passed to | |
1121 | .BR read (2) | |
1122 | and similar system calls. | |
1123 | It includes things such as terminal I/O and | |
1124 | is unaffected by whether or not actual | |
1125 | physical disk I/O was required (the read might have been satisfied from | |
1126 | pagecache). | |
1127 | .TP | |
1128 | .IR wchar ": characters written" | |
1129 | The number of bytes which this task has caused, or shall cause to be written | |
1130 | to disk. | |
1131 | Similar caveats apply here as with | |
1132 | .IR rchar . | |
1133 | .TP | |
1134 | .IR syscr ": read syscalls" | |
1135 | Attempt to count the number of read I/O operations\(emthat is, | |
1136 | system calls such as | |
1137 | .BR read (2) | |
1138 | and | |
1139 | .BR pread (2). | |
1140 | .TP | |
1141 | .IR syscw ": write syscalls" | |
1142 | Attempt to count the number of write I/O operations\(emthat is, | |
1143 | system calls such as | |
1144 | .BR write (2) | |
1145 | and | |
1146 | .BR pwrite (2). | |
1147 | .TP | |
1148 | .IR read_bytes ": bytes read" | |
1149 | Attempt to count the number of bytes which this process really did cause to | |
1150 | be fetched from the storage layer. | |
1151 | This is accurate for block-backed filesystems. | |
1152 | .TP | |
1153 | .IR write_bytes ": bytes written" | |
1154 | Attempt to count the number of bytes which this process caused to be sent to | |
1155 | the storage layer. | |
1156 | .TP | |
1157 | .IR cancelled_write_bytes : | |
1158 | The big inaccuracy here is truncate. | |
1159 | If a process writes 1 MB to a file and then deletes the file, | |
1160 | it will in fact perform no writeout. | |
1161 | But it will have been accounted as having caused 1 MB of write. | |
1162 | In other words: this field represents the number of bytes which this process | |
1163 | caused to not happen, by truncating pagecache. | |
1164 | A task can cause "negative" I/O too. | |
1165 | If this task truncates some dirty pagecache, | |
1166 | some I/O which another task has been accounted for | |
1167 | (in its | |
1168 | .IR write_bytes ) | |
1169 | will not be happening. | |
1170 | .RE | |
1171 | .IP | |
1172 | .IR Note : | |
1173 | In the current implementation, things are a bit racy on 32-bit systems: | |
1174 | if process A reads process B's | |
1175 | .I /proc/[pid]/io | |
1176 | while process B is updating one of these 64-bit counters, | |
1177 | process A could see an intermediate result. | |
1178 | .IP | |
1179 | Permission to access this file is governed by a ptrace access mode | |
1180 | .B PTRACE_MODE_READ_FSCREDS | |
1181 | check; see | |
1182 | .BR ptrace (2). | |
1183 | .TP | |
1184 | .IR /proc/[pid]/limits " (since Linux 2.6.24)" | |
1185 | This file displays the soft limit, hard limit, and units of measurement | |
1186 | for each of the process's resource limits (see | |
1187 | .BR getrlimit (2)). | |
1188 | Up to and including Linux 2.6.35, | |
1189 | this file is protected to allow reading only by the real UID of the process. | |
1190 | Since Linux 2.6.36, | |
1191 | .\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589 | |
1192 | this file is readable by all users on the system. | |
1193 | .\" FIXME Describe /proc/[pid]/loginuid | |
1194 | .\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL | |
1195 | .\" CONFIG_AUDITSYSCALL | |
1196 | .TP | |
1197 | .IR /proc/[pid]/map_files/ " (since kernel 3.3)" | |
1198 | .\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e | |
1199 | This subdirectory contains entries corresponding to memory-mapped | |
1200 | files (see | |
1201 | .BR mmap (2)). | |
1202 | Entries are named by memory region start and end | |
1203 | address pair (expressed as hexadecimal numbers), | |
1204 | and are symbolic links to the mapped files themselves. | |
1205 | Here is an example, with the output wrapped and reformatted to fit on an 80-column display: | |
1206 | .IP | |
1207 | .in +4n | |
1208 | .EX | |
1209 | .RB "#" " ls \-l /proc/self/map_files/" | |
1210 | lr\-\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:31 | |
1211 | 3252e00000\-3252e20000 \-> /usr/lib64/ld\-2.15.so | |
1212 | \&... | |
1213 | .EE | |
1214 | .in | |
1215 | .IP | |
1216 | Although these entries are present for memory regions that were | |
1217 | mapped with the | |
1218 | .BR MAP_FILE | |
1219 | flag, the way anonymous shared memory (regions created with the | |
1220 | .B MAP_ANON | MAP_SHARED | |
1221 | flags) | |
1222 | is implemented in Linux | |
1223 | means that such regions also appear on this directory. | |
1224 | Here is an example where the target file is the deleted | |
1225 | .I /dev/zero | |
1226 | one: | |
1227 | .IP | |
1228 | .in +4n | |
1229 | .EX | |
1230 | lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33 | |
1231 | 7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted) | |
1232 | .EE | |
1233 | .in | |
1234 | .IP | |
1235 | Permission to access this file is governed by a ptrace access mode | |
1236 | .B PTRACE_MODE_READ_FSCREDS | |
1237 | check; see | |
1238 | .BR ptrace (2). | |
1239 | .IP | |
1240 | Until kernel version 4.3, | |
1241 | .\" commit bdb4d100afe9818aebd1d98ced575c5ef143456c | |
1242 | this directory appeared only if the | |
1243 | .B CONFIG_CHECKPOINT_RESTORE | |
1244 | kernel configuration option was enabled. | |
1245 | .IP | |
1246 | Capabilities are required to read the contents of the symbolic links in | |
1247 | this directory: before Linux 5.9, the reading process requires | |
1248 | .BR CAP_SYS_ADMIN | |
1249 | in the initial user namespace; | |
1250 | since Linux 5.9, the reading process must have either | |
1251 | .BR CAP_SYS_ADMIN | |
1252 | or | |
1253 | .BR CAP_CHECKPOINT_RESTORE | |
1254 | in the user namespace where it resides. | |
1255 | .TP | |
1256 | .I /proc/[pid]/maps | |
1257 | A file containing the currently mapped memory regions and their access | |
1258 | permissions. | |
1259 | See | |
1260 | .BR mmap (2) | |
1261 | for some further information about memory mappings. | |
1262 | .IP | |
1263 | Permission to access this file is governed by a ptrace access mode | |
1264 | .B PTRACE_MODE_READ_FSCREDS | |
1265 | check; see | |
1266 | .BR ptrace (2). | |
1267 | .IP | |
1268 | The format of the file is: | |
1269 | .IP | |
1270 | .in +4n | |
1271 | .EX | |
1272 | .I "address perms offset dev inode pathname" | |
1273 | 00400000\-00452000 r\-xp 00000000 08:02 173521 /usr/bin/dbus\-daemon | |
1274 | 00651000\-00652000 r\-\-p 00051000 08:02 173521 /usr/bin/dbus\-daemon | |
1275 | 00652000\-00655000 rw\-p 00052000 08:02 173521 /usr/bin/dbus\-daemon | |
1276 | 00e03000\-00e24000 rw\-p 00000000 00:00 0 [heap] | |
1277 | 00e24000\-011f7000 rw\-p 00000000 00:00 0 [heap] | |
1278 | \&... | |
1279 | 35b1800000\-35b1820000 r\-xp 00000000 08:02 135522 /usr/lib64/ld\-2.15.so | |
1280 | 35b1a1f000\-35b1a20000 r\-\-p 0001f000 08:02 135522 /usr/lib64/ld\-2.15.so | |
1281 | 35b1a20000\-35b1a21000 rw\-p 00020000 08:02 135522 /usr/lib64/ld\-2.15.so | |
1282 | 35b1a21000\-35b1a22000 rw\-p 00000000 00:00 0 | |
1283 | 35b1c00000\-35b1dac000 r\-xp 00000000 08:02 135870 /usr/lib64/libc\-2.15.so | |
1284 | 35b1dac000\-35b1fac000 \-\-\-p 001ac000 08:02 135870 /usr/lib64/libc\-2.15.so | |
1285 | 35b1fac000\-35b1fb0000 r\-\-p 001ac000 08:02 135870 /usr/lib64/libc\-2.15.so | |
1286 | 35b1fb0000\-35b1fb2000 rw\-p 001b0000 08:02 135870 /usr/lib64/libc\-2.15.so | |
1287 | \&... | |
1288 | f2c6ff8c000\-7f2c7078c000 rw\-p 00000000 00:00 0 [stack:986] | |
1289 | \&... | |
1290 | 7fffb2c0d000\-7fffb2c2e000 rw\-p 00000000 00:00 0 [stack] | |
1291 | 7fffb2d48000\-7fffb2d49000 r\-xp 00000000 00:00 0 [vdso] | |
1292 | .EE | |
1293 | .in | |
1294 | .IP | |
1295 | The | |
1296 | .I address | |
1297 | field is the address space in the process that the mapping occupies. | |
1298 | The | |
1299 | .I perms | |
1300 | field is a set of permissions: | |
1301 | .IP | |
1302 | .in +4n | |
1303 | .EX | |
1304 | r = read | |
1305 | w = write | |
1306 | x = execute | |
1307 | s = shared | |
1308 | p = private (copy on write) | |
1309 | .EE | |
1310 | .in | |
1311 | .IP | |
1312 | The | |
1313 | .I offset | |
1314 | field is the offset into the file/whatever; | |
1315 | .I dev | |
1316 | is the device | |
1317 | (major:minor); | |
1318 | .I inode | |
1319 | is the inode on that device. | |
1320 | 0 indicates that no inode is associated with the memory region, | |
1321 | as would be the case with BSS (uninitialized data). | |
1322 | .IP | |
1323 | The | |
1324 | .I pathname | |
1325 | field will usually be the file that is backing the mapping. | |
1326 | For ELF files, | |
1327 | you can easily coordinate with the | |
1328 | .I offset | |
1329 | field by looking at the | |
1330 | Offset field in the ELF program headers | |
1331 | .RI ( "readelf\ \-l" ). | |
1332 | .IP | |
1333 | There are additional helpful pseudo-paths: | |
1334 | .RS | |
1335 | .TP | |
1336 | .IR [stack] | |
1337 | The initial process's (also known as the main thread's) stack. | |
1338 | .TP | |
1339 | .IR [stack:<tid>] " (from Linux 3.4 to 4.4)" | |
1340 | .\" commit b76437579d1344b612cf1851ae610c636cec7db0 (added) | |
1341 | .\" commit 65376df582174ffcec9e6471bf5b0dd79ba05e4a (removed) | |
1342 | A thread's stack (where the | |
1343 | .IR <tid> | |
1344 | is a thread ID). | |
1345 | It corresponds to the | |
1346 | .IR /proc/[pid]/task/[tid]/ | |
1347 | path. | |
1348 | This field was removed in Linux 4.5, since providing this information | |
1349 | for a process with large numbers of threads is expensive. | |
1350 | .TP | |
1351 | .IR [vdso] | |
1352 | The virtual dynamically linked shared object. | |
1353 | See | |
1354 | .BR vdso (7). | |
1355 | .TP | |
1356 | .IR [heap] | |
1357 | The process's heap. | |
1358 | .in | |
1359 | .RE | |
1360 | .IP | |
1361 | If the | |
1362 | .I pathname | |
1363 | field is blank, | |
1364 | this is an anonymous mapping as obtained via | |
1365 | .BR mmap (2). | |
1366 | There is no easy way to coordinate this back to a process's source, | |
1367 | short of running it through | |
1368 | .BR gdb (1), | |
1369 | .BR strace (1), | |
1370 | or similar. | |
1371 | .IP | |
1372 | .I pathname | |
1373 | is shown unescaped except for newline characters, which are replaced | |
1374 | with an octal escape sequence. | |
1375 | As a result, it is not possible to determine whether the original | |
1376 | pathname contained a newline character or the literal | |
1377 | .I \e012 | |
1378 | character sequence. | |
1379 | .IP | |
1380 | If the mapping is file-backed and the file has been deleted, the string | |
1381 | " (deleted)" is appended to the pathname. | |
1382 | Note that this is ambiguous too. | |
1383 | .IP | |
1384 | Under Linux 2.0, there is no field giving pathname. | |
1385 | .TP | |
1386 | .I /proc/[pid]/mem | |
1387 | This file can be used to access the pages of a process's memory through | |
1388 | .BR open (2), | |
1389 | .BR read (2), | |
1390 | and | |
1391 | .BR lseek (2). | |
1392 | .IP | |
1393 | Permission to access this file is governed by a ptrace access mode | |
1394 | .B PTRACE_MODE_ATTACH_FSCREDS | |
1395 | check; see | |
1396 | .BR ptrace (2). | |
1397 | .TP | |
1398 | .IR /proc/[pid]/mountinfo " (since Linux 2.6.26)" | |
1399 | .\" This info adapted from Documentation/filesystems/proc.txt | |
1400 | .\" commit 2d4d4864ac08caff5c204a752bd004eed4f08760 | |
1401 | This file contains information about mounts | |
1402 | in the process's mount namespace (see | |
1403 | .BR mount_namespaces (7)). | |
1404 | It supplies various information | |
1405 | (e.g., propagation state, root of mount for bind mounts, | |
1406 | identifier for each mount and its parent) that is missing from the (older) | |
1407 | .IR /proc/[pid]/mounts | |
1408 | file, and fixes various other problems with that file | |
1409 | (e.g., nonextensibility, | |
1410 | failure to distinguish per-mount versus per-superblock options). | |
1411 | .IP | |
1412 | The file contains lines of the form: | |
1413 | .IP | |
1414 | .EX | |
1415 | 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue | |
1416 | (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) | |
1417 | .EE | |
1418 | .IP | |
1419 | The numbers in parentheses are labels for the descriptions below: | |
1420 | .RS 7 | |
1421 | .TP 5 | |
1422 | (1) | |
1423 | mount ID: a unique ID for the mount (may be reused after | |
1424 | .BR umount (2)). | |
1425 | .TP | |
1426 | (2) | |
1427 | parent ID: the ID of the parent mount | |
1428 | (or of self for the root of this mount namespace's mount tree). | |
1429 | .IP | |
1430 | If a new mount is stacked on top of a previous existing mount | |
1431 | (so that it hides the existing mount) at pathname P, | |
1432 | then the parent of the new mount is the previous mount at that location. | |
1433 | Thus, when looking at all the mounts stacked at a particular location, | |
1434 | the top-most mount is the one that is not the parent | |
1435 | of any other mount at the same location. | |
1436 | (Note, however, that this top-most mount will be accessible only if | |
1437 | the longest path subprefix of P that is a mount point | |
1438 | is not itself hidden by a stacked mount.) | |
1439 | .IP | |
1440 | If the parent mount lies outside the process's root directory (see | |
1441 | .BR chroot (2)), | |
1442 | the ID shown here won't have a corresponding record in | |
1443 | .I mountinfo | |
1444 | whose mount ID (field 1) matches this parent mount ID | |
1445 | (because mounts that lie outside the process's root directory | |
1446 | are not shown in | |
1447 | .IR mountinfo ). | |
1448 | As a special case of this point, | |
1449 | the process's root mount may have a parent mount | |
1450 | (for the initramfs filesystem) that lies | |
1451 | .\" Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe | |
1452 | .\" mtk: In the initial mount namespace, this hidden ID has the value 0 | |
1453 | outside the process's root directory, | |
1454 | and an entry for that mount will not appear in | |
1455 | .IR mountinfo . | |
1456 | .TP | |
1457 | (3) | |
1458 | major:minor: the value of | |
1459 | .I st_dev | |
1460 | for files on this filesystem (see | |
1461 | .BR stat (2)). | |
1462 | .TP | |
1463 | (4) | |
1464 | root: the pathname of the directory in the filesystem | |
1465 | which forms the root of this mount. | |
1466 | .TP | |
1467 | (5) | |
1468 | mount point: the pathname of the mount point relative | |
1469 | to the process's root directory. | |
1470 | .TP | |
1471 | (6) | |
1472 | mount options: per-mount options (see | |
1473 | .BR mount (2)). | |
1474 | .TP | |
1475 | (7) | |
1476 | optional fields: zero or more fields of the form "tag[:value]"; see below. | |
1477 | .TP | |
1478 | (8) | |
1479 | separator: the end of the optional fields is marked by a single hyphen. | |
1480 | .TP | |
1481 | (9) | |
1482 | filesystem type: the filesystem type in the form "type[.subtype]". | |
1483 | .TP | |
1484 | (10) | |
1485 | mount source: filesystem-specific information or "none". | |
1486 | .TP | |
1487 | (11) | |
1488 | super options: per-superblock options (see | |
1489 | .BR mount (2)). | |
1490 | .RE | |
1491 | .IP | |
1492 | Currently, the possible optional fields are | |
1493 | .IR shared , | |
1494 | .IR master , | |
1495 | .IR propagate_from , | |
1496 | and | |
1497 | .IR unbindable . | |
1498 | See | |
1499 | .BR mount_namespaces (7) | |
1500 | for a description of these fields. | |
1501 | Parsers should ignore all unrecognized optional fields. | |
1502 | .IP | |
1503 | For more information on mount propagation see | |
1504 | .I Documentation/filesystems/sharedsubtree.rst | |
1505 | (or | |
1506 | .I Documentation/filesystems/sharedsubtree.txt | |
1507 | before Linux 5.8) | |
1508 | in the Linux kernel source tree. | |
1509 | .TP | |
1510 | .IR /proc/[pid]/mounts " (since Linux 2.4.19)" | |
1511 | This file lists all the filesystems currently mounted in the | |
1512 | process's mount namespace (see | |
1513 | .BR mount_namespaces (7)). | |
1514 | The format of this file is documented in | |
1515 | .BR fstab (5). | |
1516 | .IP | |
1517 | Since kernel version 2.6.15, this file is pollable: | |
1518 | after opening the file for reading, a change in this file | |
1519 | (i.e., a filesystem mount or unmount) causes | |
1520 | .BR select (2) | |
1521 | to mark the file descriptor as having an exceptional condition, and | |
1522 | .BR poll (2) | |
1523 | and | |
1524 | .BR epoll_wait (2) | |
1525 | mark the file as having a priority event | |
1526 | .RB ( POLLPRI ). | |
1527 | (Before Linux 2.6.30, | |
1528 | a change in this file was indicated by the file descriptor | |
1529 | being marked as readable for | |
1530 | .BR select (2), | |
1531 | and being marked as having an error condition for | |
1532 | .BR poll (2) | |
1533 | and | |
1534 | .BR epoll_wait (2).) | |
1535 | .TP | |
1536 | .IR /proc/[pid]/mountstats " (since Linux 2.6.17)" | |
1537 | This file exports information (statistics, configuration information) | |
1538 | about the mounts in the process's mount namespace (see | |
1539 | .BR mount_namespaces (7)). | |
1540 | Lines in this file have the form: | |
1541 | .IP | |
1542 | .in +4n | |
1543 | .EX | |
1544 | device /dev/sda7 mounted on /home with fstype ext3 [stats] | |
1545 | ( 1 ) ( 2 ) (3 ) ( 4 ) | |
1546 | .EE | |
1547 | .in | |
1548 | .IP | |
1549 | The fields in each line are: | |
1550 | .RS 7 | |
1551 | .TP 5 | |
1552 | (1) | |
1553 | The name of the mounted device | |
1554 | (or "nodevice" if there is no corresponding device). | |
1555 | .TP | |
1556 | (2) | |
1557 | The mount point within the filesystem tree. | |
1558 | .TP | |
1559 | (3) | |
1560 | The filesystem type. | |
1561 | .TP | |
1562 | (4) | |
1563 | Optional statistics and configuration information. | |
1564 | Currently (as at Linux 2.6.26), only NFS filesystems export | |
1565 | information via this field. | |
1566 | .RE | |
1567 | .IP | |
1568 | This file is readable only by the owner of the process. | |
1569 | .TP | |
1570 | .IR /proc/[pid]/net " (since Linux 2.6.25)" | |
1571 | See the description of | |
1572 | .IR /proc/net . | |
1573 | .TP | |
1574 | .IR /proc/[pid]/ns/ " (since Linux 3.0)" | |
1575 | .\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f | |
1576 | This is a subdirectory containing one entry for each namespace that | |
1577 | supports being manipulated by | |
1578 | .BR setns (2). | |
1579 | For more information, see | |
1580 | .BR namespaces (7). | |
1581 | .TP | |
1582 | .IR /proc/[pid]/numa_maps " (since Linux 2.6.14)" | |
1583 | See | |
1584 | .BR numa (7). | |
1585 | .TP | |
1586 | .IR /proc/[pid]/oom_adj " (since Linux 2.6.11)" | |
1587 | This file can be used to adjust the score used to select which process | |
1588 | should be killed in an out-of-memory (OOM) situation. | |
1589 | The kernel uses this value for a bit-shift operation of the process's | |
1590 | .IR oom_score | |
1591 | value: | |
1592 | valid values are in the range \-16 to +15, | |
1593 | plus the special value \-17, | |
1594 | which disables OOM-killing altogether for this process. | |
1595 | A positive score increases the likelihood of this | |
1596 | process being killed by the OOM-killer; | |
1597 | a negative score decreases the likelihood. | |
1598 | .IP | |
1599 | The default value for this file is 0; | |
1600 | a new process inherits its parent's | |
1601 | .I oom_adj | |
1602 | setting. | |
1603 | A process must be privileged | |
1604 | .RB ( CAP_SYS_RESOURCE ) | |
1605 | to update this file. | |
1606 | .IP | |
1607 | Since Linux 2.6.36, use of this file is deprecated in favor of | |
1608 | .IR /proc/[pid]/oom_score_adj . | |
1609 | .TP | |
1610 | .IR /proc/[pid]/oom_score " (since Linux 2.6.11)" | |
1611 | .\" See mm/oom_kill.c::badness() in pre 2.6.36 sources | |
1612 | .\" See mm/oom_kill.c::oom_badness() after 2.6.36 | |
1613 | .\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10 | |
1614 | This file displays the current score that the kernel gives to | |
1615 | this process for the purpose of selecting a process | |
1616 | for the OOM-killer. | |
1617 | A higher score means that the process is more likely to be | |
1618 | selected by the OOM-killer. | |
1619 | The basis for this score is the amount of memory used by the process, | |
1620 | with increases (+) or decreases (\-) for factors including: | |
1621 | .\" See mm/oom_kill.c::badness() in pre 2.6.36 sources | |
1622 | .\" See mm/oom_kill.c::oom_badness() after 2.6.36 | |
1623 | .\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10 | |
1624 | .RS | |
1625 | .IP * 2 | |
1626 | whether the process is privileged (\-). | |
1627 | .\" More precisely, if it has CAP_SYS_ADMIN or (pre 2.6.36) CAP_SYS_RESOURCE | |
1628 | .RE | |
1629 | .IP | |
1630 | Before kernel 2.6.36 the following factors were also used in the calculation of oom_score: | |
1631 | .RS | |
1632 | .IP * 2 | |
1633 | whether the process creates a lot of children using | |
1634 | .BR fork (2) | |
1635 | (+); | |
1636 | .IP * | |
1637 | whether the process has been running a long time, | |
1638 | or has used a lot of CPU time (\-); | |
1639 | .IP * | |
1640 | whether the process has a low nice value (i.e., > 0) (+); and | |
1641 | .IP * | |
1642 | whether the process is making direct hardware access (\-). | |
1643 | .\" More precisely, if it has CAP_SYS_RAWIO | |
1644 | .RE | |
1645 | .IP | |
1646 | The | |
1647 | .I oom_score | |
1648 | also reflects the adjustment specified by the | |
1649 | .I oom_score_adj | |
1650 | or | |
1651 | .I oom_adj | |
1652 | setting for the process. | |
1653 | .TP | |
1654 | .IR /proc/[pid]/oom_score_adj " (since Linux 2.6.36)" | |
1655 | .\" Text taken from 3.7 Documentation/filesystems/proc.txt | |
1656 | This file can be used to adjust the badness heuristic used to select which | |
1657 | process gets killed in out-of-memory conditions. | |
1658 | .IP | |
1659 | The badness heuristic assigns a value to each candidate task ranging from 0 | |
1660 | (never kill) to 1000 (always kill) to determine which process is targeted. | |
1661 | The units are roughly a proportion along that range of | |
1662 | allowed memory the process may allocate from, | |
1663 | based on an estimation of its current memory and swap use. | |
1664 | For example, if a task is using all allowed memory, | |
1665 | its badness score will be 1000. | |
1666 | If it is using half of its allowed memory, its score will be 500. | |
1667 | .IP | |
1668 | There is an additional factor included in the badness score: root | |
1669 | processes are given 3% extra memory over other tasks. | |
1670 | .IP | |
1671 | The amount of "allowed" memory depends on the context | |
1672 | in which the OOM-killer was called. | |
1673 | If it is due to the memory assigned to the allocating task's cpuset | |
1674 | being exhausted, | |
1675 | the allowed memory represents the set of mems assigned to that | |
1676 | cpuset (see | |
1677 | .BR cpuset (7)). | |
1678 | If it is due to a mempolicy's node(s) being exhausted, | |
1679 | the allowed memory represents the set of mempolicy nodes. | |
1680 | If it is due to a memory limit (or swap limit) being reached, | |
1681 | the allowed memory is that configured limit. | |
1682 | Finally, if it is due to the entire system being out of memory, the | |
1683 | allowed memory represents all allocatable resources. | |
1684 | .IP | |
1685 | The value of | |
1686 | .I oom_score_adj | |
1687 | is added to the badness score before it | |
1688 | is used to determine which task to kill. | |
1689 | Acceptable values range from \-1000 | |
1690 | (OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX). | |
1691 | This allows user space to control the preference for OOM-killing, | |
1692 | ranging from always preferring a certain | |
1693 | task or completely disabling it from OOM-killing. | |
1694 | The lowest possible value, \-1000, is | |
1695 | equivalent to disabling OOM-killing entirely for that task, | |
1696 | since it will always report a badness score of 0. | |
1697 | .IP | |
1698 | Consequently, it is very simple for user space to define | |
1699 | the amount of memory to consider for each task. | |
1700 | Setting an | |
1701 | .I oom_score_adj | |
1702 | value of +500, for example, | |
1703 | is roughly equivalent to allowing the remainder of tasks sharing the | |
1704 | same system, cpuset, mempolicy, or memory controller resources | |
1705 | to use at least 50% more memory. | |
1706 | A value of \-500, on the other hand, would be roughly | |
1707 | equivalent to discounting 50% of the task's | |
1708 | allowed memory from being considered as scoring against the task. | |
1709 | .IP | |
1710 | For backward compatibility with previous kernels, | |
1711 | .I /proc/[pid]/oom_adj | |
1712 | can still be used to tune the badness score. | |
1713 | Its value is | |
1714 | scaled linearly with | |
1715 | .IR oom_score_adj . | |
1716 | .IP | |
1717 | Writing to | |
1718 | .IR /proc/[pid]/oom_score_adj | |
1719 | or | |
1720 | .IR /proc/[pid]/oom_adj | |
1721 | will change the other with its scaled value. | |
1722 | .IP | |
1723 | The | |
1724 | .BR choom (1) | |
1725 | program provides a command-line interface for adjusting the | |
1726 | .I oom_score_adj | |
1727 | value of a running process or a newly executed command. | |
1728 | .TP | |
1729 | .IR /proc/[pid]/pagemap " (since Linux 2.6.25)" | |
1730 | This file shows the mapping of each of the process's virtual pages | |
1731 | into physical page frames or swap area. | |
1732 | It contains one 64-bit value for each virtual page, | |
1733 | with the bits set as follows: | |
1734 | .RS | |
1735 | .TP | |
1736 | 63 | |
1737 | If set, the page is present in RAM. | |
1738 | .TP | |
1739 | 62 | |
1740 | If set, the page is in swap space | |
1741 | .TP | |
1742 | 61 (since Linux 3.5) | |
1743 | The page is a file-mapped page or a shared anonymous page. | |
1744 | .TP | |
1745 | 60\(en57 (since Linux 3.11) | |
1746 | Zero | |
1747 | .\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f | |
1748 | .TP | |
1749 | 56 (since Linux 4.2) | |
1750 | .\" commit 77bb499bb60f4b79cca7d139c8041662860fcf87 | |
1751 | .\" commit 83b4b0bb635eee2b8e075062e4e008d1bc110ed7 | |
1752 | The page is exclusively mapped. | |
1753 | .TP | |
1754 | 55 (since Linux 3.11) | |
1755 | PTE is soft-dirty | |
1756 | (see the kernel source file | |
1757 | .IR Documentation/admin\-guide/mm/soft\-dirty.rst ). | |
1758 | .TP | |
1759 | 54\(en0 | |
1760 | If the page is present in RAM (bit 63), then these bits | |
1761 | provide the page frame number, which can be used to index | |
1762 | .IR /proc/kpageflags | |
1763 | and | |
1764 | .IR /proc/kpagecount . | |
1765 | If the page is present in swap (bit 62), | |
1766 | then bits 4\(en0 give the swap type, and bits 54\(en5 encode the swap offset. | |
1767 | .RE | |
1768 | .IP | |
1769 | Before Linux 3.11, bits 60\(en55 were | |
1770 | used to encode the base-2 log of the page size. | |
1771 | .IP | |
1772 | To employ | |
1773 | .IR /proc/[pid]/pagemap | |
1774 | efficiently, use | |
1775 | .IR /proc/[pid]/maps | |
1776 | to determine which areas of memory are actually mapped and seek | |
1777 | to skip over unmapped regions. | |
1778 | .IP | |
1779 | The | |
1780 | .IR /proc/[pid]/pagemap | |
1781 | file is present only if the | |
1782 | .B CONFIG_PROC_PAGE_MONITOR | |
1783 | kernel configuration option is enabled. | |
1784 | .IP | |
1785 | Permission to access this file is governed by a ptrace access mode | |
1786 | .B PTRACE_MODE_READ_FSCREDS | |
1787 | check; see | |
1788 | .BR ptrace (2). | |
1789 | .TP | |
1790 | .IR /proc/[pid]/personality " (since Linux 2.6.28)" | |
1791 | .\" commit 478307230810d7e2a753ed220db9066dfdf88718 | |
1792 | This read-only file exposes the process's execution domain, as set by | |
1793 | .BR personality (2). | |
1794 | The value is displayed in hexadecimal notation. | |
1795 | .IP | |
1796 | Permission to access this file is governed by a ptrace access mode | |
1797 | .B PTRACE_MODE_ATTACH_FSCREDS | |
1798 | check; see | |
1799 | .BR ptrace (2). | |
1800 | .TP | |
1801 | .I /proc/[pid]/root | |
1802 | UNIX and Linux support the idea of a per-process root of the | |
1803 | filesystem, set by the | |
1804 | .BR chroot (2) | |
1805 | system call. | |
1806 | This file is a symbolic link that points to the process's | |
1807 | root directory, and behaves in the same way as | |
1808 | .IR exe , | |
1809 | and | |
1810 | .IR fd/* . | |
1811 | .IP | |
1812 | Note however that this file is not merely a symbolic link. | |
1813 | It provides the same view of the filesystem (including namespaces and the | |
1814 | set of per-process mounts) as the process itself. | |
1815 | An example illustrates this point. | |
1816 | In one terminal, we start a shell in new user and mount namespaces, | |
1817 | and in that shell we create some new mounts: | |
1818 | .IP | |
1819 | .in +4n | |
1820 | .EX | |
1821 | $ \fBPS1=\(aqsh1# \(aq unshare \-Urnm\fP | |
1822 | sh1# \fBmount \-t tmpfs tmpfs /etc\fP # Mount empty tmpfs at /etc | |
1823 | sh1# \fBmount \-\-bind /usr /dev\fP # Mount /usr at /dev | |
1824 | sh1# \fBecho $$\fP | |
1825 | 27123 | |
1826 | .EE | |
1827 | .in | |
1828 | .IP | |
1829 | In a second terminal window, in the initial mount namespace, | |
1830 | we look at the contents of the corresponding mounts in | |
1831 | the initial and new namespaces: | |
1832 | .IP | |
1833 | .in +4n | |
1834 | .EX | |
1835 | $ \fBPS1=\(aqsh2# \(aq sudo sh\fP | |
1836 | sh2# \fBls /etc | wc \-l\fP # In initial NS | |
1837 | 309 | |
1838 | sh2# \fBls /proc/27123/root/etc | wc \-l\fP # /etc in other NS | |
1839 | 0 # The empty tmpfs dir | |
1840 | sh2# \fBls /dev | wc \-l\fP # In initial NS | |
1841 | 205 | |
1842 | sh2# \fBls /proc/27123/root/dev | wc \-l\fP # /dev in other NS | |
1843 | 11 # Actually bind | |
1844 | # mounted to /usr | |
1845 | sh2# \fBls /usr | wc \-l\fP # /usr in initial NS | |
1846 | 11 | |
1847 | .EE | |
1848 | .in | |
1849 | .IP | |
1850 | .\" The following was still true as at kernel 2.6.13 | |
1851 | In a multithreaded process, the contents of the | |
1852 | .I /proc/[pid]/root | |
1853 | symbolic link are not available if the main thread has already terminated | |
1854 | (typically by calling | |
1855 | .BR pthread_exit (3)). | |
1856 | .IP | |
1857 | Permission to dereference or read | |
1858 | .RB ( readlink (2)) | |
1859 | this symbolic link is governed by a ptrace access mode | |
1860 | .B PTRACE_MODE_READ_FSCREDS | |
1861 | check; see | |
1862 | .BR ptrace (2). | |
1863 | .TP | |
1864 | .IR /proc/[pid]/projid_map " (since Linux 3.7)" | |
1865 | .\" commit f76d207a66c3a53defea67e7d36c3eb1b7d6d61d | |
1866 | See | |
1867 | .BR user_namespaces (7). | |
1868 | .TP | |
1869 | .IR /proc/[pid]/seccomp " (Linux 2.6.12 to 2.6.22)" | |
1870 | This file can be used to read and change the process's | |
1871 | secure computing (seccomp) mode setting. | |
1872 | It contains the value 0 if the process is not in seccomp mode, | |
1873 | and 1 if the process is in strict seccomp mode (see | |
1874 | .BR seccomp (2)). | |
1875 | Writing 1 to this file places the process irreversibly in strict seccomp mode. | |
1876 | (Further attempts to write to the file fail with the | |
1877 | .B EPERM | |
1878 | error.) | |
1879 | .IP | |
1880 | In Linux 2.6.23, | |
1881 | this file went away, to be replaced by the | |
1882 | .BR prctl (2) | |
1883 | .BR PR_GET_SECCOMP | |
1884 | and | |
1885 | .BR PR_SET_SECCOMP | |
1886 | operations (and later by | |
1887 | .BR seccomp (2) | |
1888 | and the | |
1889 | .I Seccomp | |
1890 | field in | |
1891 | .IR /proc/[pid]/status ). | |
1892 | .\" FIXME Describe /proc/[pid]/sessionid | |
1893 | .\" commit 1e0bd7550ea9cf474b1ad4c6ff5729a507f75fdc | |
1894 | .\" CONFIG_AUDITSYSCALL | |
1895 | .\" Added in 2.6.25; read-only; only readable by real UID | |
1896 | .\" | |
1897 | .\" FIXME Describe /proc/[pid]/sched | |
1898 | .\" Added in 2.6.23 | |
1899 | .\" CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS | |
1900 | .\" Displays various scheduling parameters | |
1901 | .\" This file can be written, to reset stats | |
1902 | .\" The set of fields exposed by this file have changed | |
1903 | .\" significantly over time. | |
1904 | .\" commit 43ae34cb4cd650d1eb4460a8253a8e747ba052ac | |
1905 | .\" | |
1906 | .\" FIXME Describe /proc/[pid]/schedstats and | |
1907 | .\" /proc/[pid]/task/[tid]/schedstats | |
1908 | .\" Added in 2.6.9 | |
1909 | .\" CONFIG_SCHEDSTATS | |
1910 | .TP | |
1911 | .IR /proc/[pid]/setgroups " (since Linux 3.19)" | |
1912 | See | |
1913 | .BR user_namespaces (7). | |
1914 | .TP | |
1915 | .IR /proc/[pid]/smaps " (since Linux 2.6.14)" | |
1916 | This file shows memory consumption for each of the process's mappings. | |
1917 | (The | |
1918 | .BR pmap (1) | |
1919 | command displays similar information, | |
1920 | in a form that may be easier for parsing.) | |
1921 | For each mapping there is a series of lines such as the following: | |
1922 | .IP | |
1923 | .in +4n | |
1924 | .EX | |
1925 | 00400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash | |
1926 | Size: 552 kB | |
1927 | Rss: 460 kB | |
1928 | Pss: 100 kB | |
1929 | Shared_Clean: 452 kB | |
1930 | Shared_Dirty: 0 kB | |
1931 | Private_Clean: 8 kB | |
1932 | Private_Dirty: 0 kB | |
1933 | Referenced: 460 kB | |
1934 | Anonymous: 0 kB | |
1935 | AnonHugePages: 0 kB | |
1936 | ShmemHugePages: 0 kB | |
1937 | ShmemPmdMapped: 0 kB | |
1938 | Swap: 0 kB | |
1939 | KernelPageSize: 4 kB | |
1940 | MMUPageSize: 4 kB | |
1941 | KernelPageSize: 4 kB | |
1942 | MMUPageSize: 4 kB | |
1943 | Locked: 0 kB | |
1944 | ProtectionKey: 0 | |
1945 | VmFlags: rd ex mr mw me dw | |
1946 | .EE | |
1947 | .in | |
1948 | .IP | |
1949 | The first of these lines shows the same information as is displayed | |
1950 | for the mapping in | |
1951 | .IR /proc/[pid]/maps . | |
1952 | The following lines show the size of the mapping, | |
1953 | the amount of the mapping that is currently resident in RAM ("Rss"), | |
1954 | the process's proportional share of this mapping ("Pss"), | |
1955 | the number of clean and dirty shared pages in the mapping, | |
1956 | and the number of clean and dirty private pages in the mapping. | |
1957 | "Referenced" indicates the amount of memory currently marked as | |
1958 | referenced or accessed. | |
1959 | "Anonymous" shows the amount of memory | |
1960 | that does not belong to any file. | |
1961 | "Swap" shows how much | |
1962 | would-be-anonymous memory is also used, but out on swap. | |
1963 | .IP | |
1964 | The "KernelPageSize" line (available since Linux 2.6.29) | |
1965 | is the page size used by the kernel to back the virtual memory area. | |
1966 | This matches the size used by the MMU in the majority of cases. | |
1967 | However, one counter-example occurs on PPC64 kernels | |
1968 | whereby a kernel using 64 kB as a base page size may still use 4 kB | |
1969 | pages for the MMU on older processors. | |
1970 | To distinguish the two attributes, the "MMUPageSize" line | |
1971 | (also available since Linux 2.6.29) | |
1972 | reports the page size used by the MMU. | |
1973 | .IP | |
1974 | The "Locked" indicates whether the mapping is locked in memory | |
1975 | or not. | |
1976 | .IP | |
1977 | The "ProtectionKey" line (available since Linux 4.9, on x86 only) | |
1978 | contains the memory protection key (see | |
1979 | .BR pkeys (7)) | |
1980 | associated with the virtual memory area. | |
1981 | This entry is present only if the kernel was built with the | |
1982 | .B CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS | |
1983 | configuration option (since Linux 4.6). | |
1984 | .IP | |
1985 | The "VmFlags" line (available since Linux 3.8) | |
1986 | represents the kernel flags associated with the virtual memory area, | |
1987 | encoded using the following two-letter codes: | |
1988 | .IP | |
1989 | rd - readable | |
1990 | wr - writable | |
1991 | ex - executable | |
1992 | sh - shared | |
1993 | mr - may read | |
1994 | mw - may write | |
1995 | me - may execute | |
1996 | ms - may share | |
1997 | gd - stack segment grows down | |
1998 | pf - pure PFN range | |
1999 | dw - disabled write to the mapped file | |
2000 | lo - pages are locked in memory | |
2001 | io - memory mapped I/O area | |
2002 | sr - sequential read advise provided | |
2003 | rr - random read advise provided | |
2004 | dc - do not copy area on fork | |
2005 | de - do not expand area on remapping | |
2006 | ac - area is accountable | |
2007 | nr - swap space is not reserved for the area | |
2008 | ht - area uses huge tlb pages | |
2009 | sf - perform synchronous page faults (since Linux 4.15) | |
2010 | nl - non-linear mapping (removed in Linux 4.0) | |
2011 | ar - architecture specific flag | |
2012 | wf - wipe on fork (since Linux 4.14) | |
2013 | dd - do not include area into core dump | |
2014 | sd - soft-dirty flag (since Linux 3.13) | |
2015 | mm - mixed map area | |
2016 | hg - huge page advise flag | |
2017 | nh - no-huge page advise flag | |
2018 | mg - mergeable advise flag | |
2019 | um - userfaultfd missing pages tracking (since Linux 4.3) | |
2020 | uw - userfaultfd wprotect pages tracking (since Linux 4.3) | |
2021 | .IP | |
2022 | The | |
2023 | .IR /proc/[pid]/smaps | |
2024 | file is present only if the | |
2025 | .B CONFIG_PROC_PAGE_MONITOR | |
2026 | kernel configuration option is enabled. | |
2027 | .TP | |
2028 | .IR /proc/[pid]/stack " (since Linux 2.6.29)" | |
2029 | .\" 2ec220e27f5040aec1e88901c1b6ea3d135787ad | |
2030 | This file provides a symbolic trace of the function calls in this | |
2031 | process's kernel stack. | |
2032 | This file is provided only if the kernel was built with the | |
2033 | .B CONFIG_STACKTRACE | |
2034 | configuration option. | |
2035 | .IP | |
2036 | Permission to access this file is governed by a ptrace access mode | |
2037 | .B PTRACE_MODE_ATTACH_FSCREDS | |
2038 | check; see | |
2039 | .BR ptrace (2). | |
2040 | .TP | |
2041 | .I /proc/[pid]/stat | |
2042 | Status information about the process. | |
2043 | This is used by | |
2044 | .BR ps (1). | |
2045 | It is defined in the kernel source file | |
2046 | .IR fs/proc/array.c "." | |
2047 | .IP | |
2048 | The fields, in order, with their proper | |
2049 | .BR scanf (3) | |
2050 | format specifiers, are listed below. | |
2051 | Whether or not certain of these fields display valid information is governed by | |
2052 | a ptrace access mode | |
2053 | .BR PTRACE_MODE_READ_FSCREDS " | " PTRACE_MODE_NOAUDIT | |
2054 | check (refer to | |
2055 | .BR ptrace (2)). | |
2056 | If the check denies access, then the field value is displayed as 0. | |
2057 | The affected fields are indicated with the marking [PT]. | |
2058 | .RS | |
2059 | .TP | |
2060 | (1) \fIpid\fP \ %d | |
2061 | .br | |
2062 | The process ID. | |
2063 | .TP | |
2064 | (2) \fIcomm\fP \ %s | |
2065 | The filename of the executable, in parentheses. | |
2066 | Strings longer than | |
2067 | .B TASK_COMM_LEN | |
2068 | (16) characters (including the terminating null byte) are silently truncated. | |
2069 | This is visible whether or not the executable is swapped out. | |
2070 | .TP | |
2071 | (3) \fIstate\fP \ %c | |
2072 | One of the following characters, indicating process state: | |
2073 | .RS | |
2074 | .IP R 3 | |
2075 | Running | |
2076 | .IP S | |
2077 | Sleeping in an interruptible wait | |
2078 | .IP D | |
2079 | Waiting in uninterruptible | |
2080 | disk sleep | |
2081 | .IP Z | |
2082 | Zombie | |
2083 | .IP T | |
2084 | Stopped (on a signal) or (before Linux 2.6.33) trace stopped | |
2085 | .IP t | |
2086 | .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29 | |
2087 | Tracing stop (Linux 2.6.33 onward) | |
2088 | .IP W | |
2089 | Paging (only before Linux 2.6.0) | |
2090 | .IP X | |
2091 | Dead (from Linux 2.6.0 onward) | |
2092 | .IP x | |
2093 | .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29 | |
2094 | Dead (Linux 2.6.33 to | |
2095 | .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457 | |
2096 | 3.13 only) | |
2097 | .IP K | |
2098 | .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29 | |
2099 | Wakekill (Linux 2.6.33 to | |
2100 | .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457 | |
2101 | 3.13 only) | |
2102 | .IP W | |
2103 | .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29 | |
2104 | Waking (Linux 2.6.33 to | |
2105 | .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457 | |
2106 | 3.13 only) | |
2107 | .IP P | |
2108 | .\" commit f2530dc71cf0822f90bb63ea4600caaef33a66bb | |
2109 | Parked (Linux 3.9 to | |
2110 | .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457 | |
2111 | 3.13 only) | |
2112 | .RE | |
2113 | .TP | |
2114 | (4) \fIppid\fP \ %d | |
2115 | The PID of the parent of this process. | |
2116 | .TP | |
2117 | (5) \fIpgrp\fP \ %d | |
2118 | The process group ID of the process. | |
2119 | .TP | |
2120 | (6) \fIsession\fP \ %d | |
2121 | The session ID of the process. | |
2122 | .TP | |
2123 | (7) \fItty_nr\fP \ %d | |
2124 | The controlling terminal of the process. | |
2125 | (The minor device number is contained in the combination of bits | |
2126 | 31 to 20 and 7 to 0; | |
2127 | the major device number is in bits 15 to 8.) | |
2128 | .TP | |
2129 | (8) \fItpgid\fP \ %d | |
2130 | .\" This field and following, up to and including wchan added 0.99.1 | |
2131 | The ID of the foreground process group of the controlling | |
2132 | terminal of the process. | |
2133 | .TP | |
2134 | (9) \fIflags\fP \ %u | |
2135 | The kernel flags word of the process. | |
2136 | For bit meanings, | |
2137 | see the PF_* defines in the Linux kernel source file | |
2138 | .IR include/linux/sched.h . | |
2139 | Details depend on the kernel version. | |
2140 | .IP | |
2141 | The format for this field was %lu before Linux 2.6. | |
2142 | .TP | |
2143 | (10) \fIminflt\fP \ %lu | |
2144 | The number of minor faults the process has made which have not | |
2145 | required loading a memory page from disk. | |
2146 | .TP | |
2147 | (11) \fIcminflt\fP \ %lu | |
2148 | The number of minor faults that the process's | |
2149 | waited-for children have made. | |
2150 | .TP | |
2151 | (12) \fImajflt\fP \ %lu | |
2152 | The number of major faults the process has made which have | |
2153 | required loading a memory page from disk. | |
2154 | .TP | |
2155 | (13) \fIcmajflt\fP \ %lu | |
2156 | The number of major faults that the process's | |
2157 | waited-for children have made. | |
2158 | .TP | |
2159 | (14) \fIutime\fP \ %lu | |
2160 | Amount of time that this process has been scheduled in user mode, | |
2161 | measured in clock ticks (divide by | |
2162 | .IR sysconf(_SC_CLK_TCK) ). | |
2163 | This includes guest time, \fIguest_time\fP | |
2164 | (time spent running a virtual CPU, see below), | |
2165 | so that applications that are not aware of the guest time field | |
2166 | do not lose that time from their calculations. | |
2167 | .TP | |
2168 | (15) \fIstime\fP \ %lu | |
2169 | Amount of time that this process has been scheduled in kernel mode, | |
2170 | measured in clock ticks (divide by | |
2171 | .IR sysconf(_SC_CLK_TCK) ). | |
2172 | .TP | |
2173 | (16) \fIcutime\fP \ %ld | |
2174 | Amount of time that this process's | |
2175 | waited-for children have been scheduled in user mode, | |
2176 | measured in clock ticks (divide by | |
2177 | .IR sysconf(_SC_CLK_TCK) ). | |
2178 | (See also | |
2179 | .BR times (2).) | |
2180 | This includes guest time, \fIcguest_time\fP | |
2181 | (time spent running a virtual CPU, see below). | |
2182 | .TP | |
2183 | (17) \fIcstime\fP \ %ld | |
2184 | Amount of time that this process's | |
2185 | waited-for children have been scheduled in kernel mode, | |
2186 | measured in clock ticks (divide by | |
2187 | .IR sysconf(_SC_CLK_TCK) ). | |
2188 | .TP | |
2189 | (18) \fIpriority\fP \ %ld | |
2190 | (Explanation for Linux 2.6) | |
2191 | For processes running a real-time scheduling policy | |
2192 | .RI ( policy | |
2193 | below; see | |
2194 | .BR sched_setscheduler (2)), | |
2195 | this is the negated scheduling priority, minus one; | |
2196 | that is, a number in the range \-2 to \-100, | |
2197 | corresponding to real-time priorities 1 to 99. | |
2198 | For processes running under a non-real-time scheduling policy, | |
2199 | this is the raw nice value | |
2200 | .RB ( setpriority (2)) | |
2201 | as represented in the kernel. | |
2202 | The kernel stores nice values as numbers | |
2203 | in the range 0 (high) to 39 (low), | |
2204 | corresponding to the user-visible nice range of \-20 to 19. | |
2205 | .IP | |
2206 | Before Linux 2.6, this was a scaled value based on | |
2207 | the scheduler weighting given to this process. | |
2208 | .\" And back in kernel 1.2 days things were different again. | |
2209 | .TP | |
2210 | (19) \fInice\fP \ %ld | |
2211 | The nice value (see | |
2212 | .BR setpriority (2)), | |
2213 | a value in the range 19 (low priority) to \-20 (high priority). | |
2214 | .\" Back in kernel 1.2 days things were different. | |
2215 | .\" .TP | |
2216 | .\" \fIcounter\fP %ld | |
2217 | .\" The current maximum size in jiffies of the process's next timeslice, | |
2218 | .\" or what is currently left of its current timeslice, if it is the | |
2219 | .\" currently running process. | |
2220 | .\" .TP | |
2221 | .\" \fItimeout\fP %u | |
2222 | .\" The time in jiffies of the process's next timeout. | |
2223 | .\" timeout was removed sometime around 2.1/2.2 | |
2224 | .TP | |
2225 | (20) \fInum_threads\fP \ %ld | |
2226 | Number of threads in this process (since Linux 2.6). | |
2227 | Before kernel 2.6, this field was hard coded to 0 as a placeholder | |
2228 | for an earlier removed field. | |
2229 | .TP | |
2230 | (21) \fIitrealvalue\fP \ %ld | |
2231 | The time in jiffies before the next | |
2232 | .B SIGALRM | |
2233 | is sent to the process due to an interval timer. | |
2234 | Since kernel 2.6.17, this field is no longer maintained, | |
2235 | and is hard coded as 0. | |
2236 | .TP | |
2237 | (22) \fIstarttime\fP \ %llu | |
2238 | The time the process started after system boot. | |
2239 | In kernels before Linux 2.6, this value was expressed in jiffies. | |
2240 | Since Linux 2.6, the value is expressed in clock ticks (divide by | |
2241 | .IR sysconf(_SC_CLK_TCK) ). | |
2242 | .IP | |
2243 | The format for this field was %lu before Linux 2.6. | |
2244 | .TP | |
2245 | (23) \fIvsize\fP \ %lu | |
2246 | Virtual memory size in bytes. | |
2247 | .TP | |
2248 | (24) \fIrss\fP \ %ld | |
2249 | Resident Set Size: number of pages the process has in real memory. | |
2250 | This is just the pages which | |
2251 | count toward text, data, or stack space. | |
2252 | This does not include pages | |
2253 | which have not been demand-loaded in, or which are swapped out. | |
2254 | This value is inaccurate; see | |
2255 | .I /proc/[pid]/statm | |
2256 | below. | |
2257 | .TP | |
2258 | (25) \fIrsslim\fP \ %lu | |
2259 | Current soft limit in bytes on the rss of the process; | |
2260 | see the description of | |
2261 | .B RLIMIT_RSS | |
2262 | in | |
2263 | .BR getrlimit (2). | |
2264 | .TP | |
2265 | (26) \fIstartcode\fP \ %lu \ [PT] | |
2266 | The address above which program text can run. | |
2267 | .TP | |
2268 | (27) \fIendcode\fP \ %lu \ [PT] | |
2269 | The address below which program text can run. | |
2270 | .TP | |
2271 | (28) \fIstartstack\fP \ %lu \ [PT] | |
2272 | The address of the start (i.e., bottom) of the stack. | |
2273 | .TP | |
2274 | (29) \fIkstkesp\fP \ %lu \ [PT] | |
2275 | The current value of ESP (stack pointer), as found in the | |
2276 | kernel stack page for the process. | |
2277 | .TP | |
2278 | (30) \fIkstkeip\fP \ %lu \ [PT] | |
2279 | The current EIP (instruction pointer). | |
2280 | .TP | |
2281 | (31) \fIsignal\fP \ %lu | |
2282 | The bitmap of pending signals, displayed as a decimal number. | |
2283 | Obsolete, because it does not provide information on real-time signals; use | |
2284 | .I /proc/[pid]/status | |
2285 | instead. | |
2286 | .TP | |
2287 | (32) \fIblocked\fP \ %lu | |
2288 | The bitmap of blocked signals, displayed as a decimal number. | |
2289 | Obsolete, because it does not provide information on real-time signals; use | |
2290 | .I /proc/[pid]/status | |
2291 | instead. | |
2292 | .TP | |
2293 | (33) \fIsigignore\fP \ %lu | |
2294 | The bitmap of ignored signals, displayed as a decimal number. | |
2295 | Obsolete, because it does not provide information on real-time signals; use | |
2296 | .I /proc/[pid]/status | |
2297 | instead. | |
2298 | .TP | |
2299 | (34) \fIsigcatch\fP \ %lu | |
2300 | The bitmap of caught signals, displayed as a decimal number. | |
2301 | Obsolete, because it does not provide information on real-time signals; use | |
2302 | .I /proc/[pid]/status | |
2303 | instead. | |
2304 | .TP | |
2305 | (35) \fIwchan\fP \ %lu \ [PT] | |
2306 | This is the "channel" in which the process is waiting. | |
2307 | It is the address of a location in the kernel where the process is sleeping. | |
2308 | The corresponding symbolic name can be found in | |
2309 | .IR /proc/[pid]/wchan . | |
2310 | .TP | |
2311 | (36) \fInswap\fP \ %lu | |
2312 | .\" nswap was added in 2.0 | |
2313 | Number of pages swapped (not maintained). | |
2314 | .TP | |
2315 | (37) \fIcnswap\fP \ %lu | |
2316 | .\" cnswap was added in 2.0 | |
2317 | Cumulative \fInswap\fP for child processes (not maintained). | |
2318 | .TP | |
2319 | (38) \fIexit_signal\fP \ %d \ (since Linux 2.1.22) | |
2320 | Signal to be sent to parent when we die. | |
2321 | .TP | |
2322 | (39) \fIprocessor\fP \ %d \ (since Linux 2.2.8) | |
2323 | CPU number last executed on. | |
2324 | .TP | |
2325 | (40) \fIrt_priority\fP \ %u \ (since Linux 2.5.19) | |
2326 | Real-time scheduling priority, a number in the range 1 to 99 for | |
2327 | processes scheduled under a real-time policy, | |
2328 | or 0, for non-real-time processes (see | |
2329 | .BR sched_setscheduler (2)). | |
2330 | .TP | |
2331 | (41) \fIpolicy\fP \ %u \ (since Linux 2.5.19) | |
2332 | Scheduling policy (see | |
2333 | .BR sched_setscheduler (2)). | |
2334 | Decode using the SCHED_* constants in | |
2335 | .IR linux/sched.h . | |
2336 | .IP | |
2337 | The format for this field was %lu before Linux 2.6.22. | |
2338 | .TP | |
2339 | (42) \fIdelayacct_blkio_ticks\fP \ %llu \ (since Linux 2.6.18) | |
2340 | Aggregated block I/O delays, measured in clock ticks (centiseconds). | |
2341 | .TP | |
2342 | (43) \fIguest_time\fP \ %lu \ (since Linux 2.6.24) | |
2343 | Guest time of the process (time spent running a virtual CPU | |
2344 | for a guest operating system), measured in clock ticks (divide by | |
2345 | .IR sysconf(_SC_CLK_TCK) ). | |
2346 | .TP | |
2347 | (44) \fIcguest_time\fP \ %ld \ (since Linux 2.6.24) | |
2348 | Guest time of the process's children, measured in clock ticks (divide by | |
2349 | .IR sysconf(_SC_CLK_TCK) ). | |
2350 | .TP | |
2351 | (45) \fIstart_data\fP \ %lu \ (since Linux 3.3) \ [PT] | |
2352 | .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff | |
2353 | Address above which program initialized and | |
2354 | uninitialized (BSS) data are placed. | |
2355 | .TP | |
2356 | (46) \fIend_data\fP \ %lu \ (since Linux 3.3) \ [PT] | |
2357 | .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff | |
2358 | Address below which program initialized and | |
2359 | uninitialized (BSS) data are placed. | |
2360 | .TP | |
2361 | (47) \fIstart_brk\fP \ %lu \ (since Linux 3.3) \ [PT] | |
2362 | .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff | |
2363 | Address above which program heap can be expanded with | |
2364 | .BR brk (2). | |
2365 | .TP | |
2366 | (48) \fIarg_start\fP \ %lu \ (since Linux 3.5) \ [PT] | |
2367 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 | |
2368 | Address above which program command-line arguments | |
2369 | .RI ( argv ) | |
2370 | are placed. | |
2371 | .TP | |
2372 | (49) \fIarg_end\fP \ %lu \ (since Linux 3.5) \ [PT] | |
2373 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 | |
2374 | Address below program command-line arguments | |
2375 | .RI ( argv ) | |
2376 | are placed. | |
2377 | .TP | |
2378 | (50) \fIenv_start\fP \ %lu \ (since Linux 3.5) \ [PT] | |
2379 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 | |
2380 | Address above which program environment is placed. | |
2381 | .TP | |
2382 | (51) \fIenv_end\fP \ %lu \ (since Linux 3.5) \ [PT] | |
2383 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 | |
2384 | Address below which program environment is placed. | |
2385 | .TP | |
2386 | (52) \fIexit_code\fP \ %d \ (since Linux 3.5) \ [PT] | |
2387 | .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3 | |
2388 | The thread's exit status in the form reported by | |
2389 | .BR waitpid (2). | |
2390 | .RE | |
2391 | .TP | |
2392 | .I /proc/[pid]/statm | |
2393 | Provides information about memory usage, measured in pages. | |
2394 | The columns are: | |
2395 | .IP | |
2396 | .in +4n | |
2397 | .EX | |
2398 | size (1) total program size | |
2399 | (same as VmSize in \fI/proc/[pid]/status\fP) | |
2400 | resident (2) resident set size | |
2401 | (inaccurate; same as VmRSS in \fI/proc/[pid]/status\fP) | |
2402 | shared (3) number of resident shared pages | |
2403 | (i.e., backed by a file) | |
2404 | (inaccurate; same as RssFile+RssShmem in | |
2405 | \fI/proc/[pid]/status\fP) | |
2406 | text (4) text (code) | |
2407 | .\" (not including libs; broken, includes data segment) | |
2408 | lib (5) library (unused since Linux 2.6; always 0) | |
2409 | data (6) data + stack | |
2410 | .\" (including libs; broken, includes library text) | |
2411 | dt (7) dirty pages (unused since Linux 2.6; always 0) | |
2412 | .EE | |
2413 | .in | |
2414 | .IP | |
2415 | .\" See SPLIT_RSS_COUNTING in the kernel. | |
2416 | .\" Inaccuracy is bounded by TASK_RSS_EVENTS_THRESH. | |
2417 | Some of these values are inaccurate because | |
2418 | of a kernel-internal scalability optimization. | |
2419 | If accurate values are required, use | |
2420 | .I /proc/[pid]/smaps | |
2421 | or | |
2422 | .I /proc/[pid]/smaps_rollup | |
2423 | instead, which are much slower but provide accurate, detailed information. | |
2424 | .TP | |
2425 | .I /proc/[pid]/status | |
2426 | Provides much of the information in | |
2427 | .I /proc/[pid]/stat | |
2428 | and | |
2429 | .I /proc/[pid]/statm | |
2430 | in a format that's easier for humans to parse. | |
2431 | Here's an example: | |
2432 | .IP | |
2433 | .in +4n | |
2434 | .EX | |
2435 | .RB "$" " cat /proc/$$/status" | |
2436 | Name: bash | |
2437 | Umask: 0022 | |
2438 | State: S (sleeping) | |
2439 | Tgid: 17248 | |
2440 | Ngid: 0 | |
2441 | Pid: 17248 | |
2442 | PPid: 17200 | |
2443 | TracerPid: 0 | |
2444 | Uid: 1000 1000 1000 1000 | |
2445 | Gid: 100 100 100 100 | |
2446 | FDSize: 256 | |
2447 | Groups: 16 33 100 | |
2448 | NStgid: 17248 | |
2449 | NSpid: 17248 | |
2450 | NSpgid: 17248 | |
2451 | NSsid: 17200 | |
2452 | VmPeak: 131168 kB | |
2453 | VmSize: 131168 kB | |
2454 | VmLck: 0 kB | |
2455 | VmPin: 0 kB | |
2456 | VmHWM: 13484 kB | |
2457 | VmRSS: 13484 kB | |
2458 | RssAnon: 10264 kB | |
2459 | RssFile: 3220 kB | |
2460 | RssShmem: 0 kB | |
2461 | VmData: 10332 kB | |
2462 | VmStk: 136 kB | |
2463 | VmExe: 992 kB | |
2464 | VmLib: 2104 kB | |
2465 | VmPTE: 76 kB | |
2466 | VmPMD: 12 kB | |
2467 | VmSwap: 0 kB | |
2468 | HugetlbPages: 0 kB # 4.4 | |
2469 | CoreDumping: 0 # 4.15 | |
2470 | Threads: 1 | |
2471 | SigQ: 0/3067 | |
2472 | SigPnd: 0000000000000000 | |
2473 | ShdPnd: 0000000000000000 | |
2474 | SigBlk: 0000000000010000 | |
2475 | SigIgn: 0000000000384004 | |
2476 | SigCgt: 000000004b813efb | |
2477 | CapInh: 0000000000000000 | |
2478 | CapPrm: 0000000000000000 | |
2479 | CapEff: 0000000000000000 | |
2480 | CapBnd: ffffffffffffffff | |
2481 | CapAmb: 0000000000000000 | |
2482 | NoNewPrivs: 0 | |
2483 | Seccomp: 0 | |
2484 | Speculation_Store_Bypass: vulnerable | |
2485 | Cpus_allowed: 00000001 | |
2486 | Cpus_allowed_list: 0 | |
2487 | Mems_allowed: 1 | |
2488 | Mems_allowed_list: 0 | |
2489 | voluntary_ctxt_switches: 150 | |
2490 | nonvoluntary_ctxt_switches: 545 | |
2491 | .EE | |
2492 | .in | |
2493 | .IP | |
2494 | The fields are as follows: | |
2495 | .RS | |
2496 | .TP | |
2497 | .IR Name | |
2498 | Command run by this process. | |
2499 | Strings longer than | |
2500 | .B TASK_COMM_LEN | |
2501 | (16) characters (including the terminating null byte) are silently truncated. | |
2502 | .TP | |
2503 | .IR Umask | |
2504 | Process umask, expressed in octal with a leading zero; see | |
2505 | .BR umask (2). | |
2506 | (Since Linux 4.7.) | |
2507 | .TP | |
2508 | .IR State | |
2509 | Current state of the process. | |
2510 | One of | |
2511 | "R (running)", | |
2512 | "S (sleeping)", | |
2513 | "D (disk sleep)", | |
2514 | "T (stopped)", | |
2515 | "t (tracing stop)", | |
2516 | "Z (zombie)", | |
2517 | or | |
2518 | "X (dead)". | |
2519 | .TP | |
2520 | .IR Tgid | |
2521 | Thread group ID (i.e., Process ID). | |
2522 | .TP | |
2523 | .IR Ngid | |
2524 | NUMA group ID (0 if none; since Linux 3.13). | |
2525 | .TP | |
2526 | .IR Pid | |
2527 | Thread ID (see | |
2528 | .BR gettid (2)). | |
2529 | .TP | |
2530 | .IR PPid | |
2531 | PID of parent process. | |
2532 | .TP | |
2533 | .IR TracerPid | |
2534 | PID of process tracing this process (0 if not being traced). | |
2535 | .TP | |
2536 | .IR Uid ", " Gid | |
2537 | Real, effective, saved set, and filesystem UIDs (GIDs). | |
2538 | .TP | |
2539 | .IR FDSize | |
2540 | Number of file descriptor slots currently allocated. | |
2541 | .TP | |
2542 | .IR Groups | |
2543 | Supplementary group list. | |
2544 | .TP | |
2545 | .IR NStgid | |
2546 | Thread group ID (i.e., PID) in each of the PID namespaces of which | |
2547 | .I [pid] | |
2548 | is a member. | |
2549 | The leftmost entry shows the value with respect to the PID namespace | |
2550 | of the process that mounted this procfs (or the root namespace | |
2551 | if mounted by the kernel), | |
2552 | followed by the value in successively nested inner namespaces. | |
2553 | .\" commit e4bc33245124db69b74a6d853ac76c2976f472d5 | |
2554 | (Since Linux 4.1.) | |
2555 | .TP | |
2556 | .IR NSpid | |
2557 | Thread ID in each of the PID namespaces of which | |
2558 | .I [pid] | |
2559 | is a member. | |
2560 | The fields are ordered as for | |
2561 | .IR NStgid . | |
2562 | (Since Linux 4.1.) | |
2563 | .TP | |
2564 | .IR NSpgid | |
2565 | Process group ID in each of the PID namespaces of which | |
2566 | .I [pid] | |
2567 | is a member. | |
2568 | The fields are ordered as for | |
2569 | .IR NStgid . | |
2570 | (Since Linux 4.1.) | |
2571 | .TP | |
2572 | .IR NSsid | |
2573 | descendant namespace session ID hierarchy | |
2574 | Session ID in each of the PID namespaces of which | |
2575 | .I [pid] | |
2576 | is a member. | |
2577 | The fields are ordered as for | |
2578 | .IR NStgid . | |
2579 | (Since Linux 4.1.) | |
2580 | .TP | |
2581 | .IR VmPeak | |
2582 | Peak virtual memory size. | |
2583 | .TP | |
2584 | .IR VmSize | |
2585 | Virtual memory size. | |
2586 | .TP | |
2587 | .IR VmLck | |
2588 | Locked memory size (see | |
2589 | .BR mlock (2)). | |
2590 | .TP | |
2591 | .IR VmPin | |
2592 | Pinned memory size | |
2593 | .\" commit bc3e53f682d93df677dbd5006a404722b3adfe18 | |
2594 | (since Linux 3.2). | |
2595 | These are pages that can't be moved because something needs to | |
2596 | directly access physical memory. | |
2597 | .TP | |
2598 | .IR VmHWM | |
2599 | Peak resident set size ("high water mark"). | |
2600 | This value is inaccurate; see | |
2601 | .I /proc/[pid]/statm | |
2602 | above. | |
2603 | .TP | |
2604 | .IR VmRSS | |
2605 | Resident set size. | |
2606 | Note that the value here is the sum of | |
2607 | .IR RssAnon , | |
2608 | .IR RssFile , | |
2609 | and | |
2610 | .IR RssShmem . | |
2611 | This value is inaccurate; see | |
2612 | .I /proc/[pid]/statm | |
2613 | above. | |
2614 | .TP | |
2615 | .IR RssAnon | |
2616 | Size of resident anonymous memory. | |
2617 | .\" commit bf9683d6990589390b5178dafe8fd06808869293 | |
2618 | (since Linux 4.5). | |
2619 | This value is inaccurate; see | |
2620 | .I /proc/[pid]/statm | |
2621 | above. | |
2622 | .TP | |
2623 | .IR RssFile | |
2624 | Size of resident file mappings. | |
2625 | .\" commit bf9683d6990589390b5178dafe8fd06808869293 | |
2626 | (since Linux 4.5). | |
2627 | This value is inaccurate; see | |
2628 | .I /proc/[pid]/statm | |
2629 | above. | |
2630 | .TP | |
2631 | .IR RssShmem | |
2632 | Size of resident shared memory (includes System V shared memory, | |
2633 | mappings from | |
2634 | .BR tmpfs (5), | |
2635 | and shared anonymous mappings). | |
2636 | .\" commit bf9683d6990589390b5178dafe8fd06808869293 | |
2637 | (since Linux 4.5). | |
2638 | .TP | |
2639 | .IR VmData ", " VmStk ", " VmExe | |
2640 | Size of data, stack, and text segments. | |
2641 | This value is inaccurate; see | |
2642 | .I /proc/[pid]/statm | |
2643 | above. | |
2644 | .TP | |
2645 | .IR VmLib | |
2646 | Shared library code size. | |
2647 | .TP | |
2648 | .IR VmPTE | |
2649 | Page table entries size (since Linux 2.6.10). | |
2650 | .TP | |
2651 | .IR VmPMD | |
2652 | .\" commit dc6c9a35b66b520cf67e05d8ca60ebecad3b0479 | |
2653 | Size of second-level page tables (added in Linux 4.0; removed in Linux 4.15). | |
2654 | .TP | |
2655 | .IR VmSwap | |
2656 | .\" commit b084d4353ff99d824d3bc5a5c2c22c70b1fba722 | |
2657 | Swapped-out virtual memory size by anonymous private pages; | |
2658 | shmem swap usage is not included (since Linux 2.6.34). | |
2659 | This value is inaccurate; see | |
2660 | .I /proc/[pid]/statm | |
2661 | above. | |
2662 | .TP | |
2663 | .IR HugetlbPages | |
2664 | Size of hugetlb memory portions | |
2665 | .\" commit 5d317b2b6536592a9b51fe65faed43d65ca9158e | |
2666 | (since Linux 4.4). | |
2667 | .TP | |
2668 | .IR CoreDumping | |
2669 | Contains the value 1 if the process is currently dumping core, | |
2670 | and 0 if it is not | |
2671 | .\" commit c643401218be0f4ab3522e0c0a63016596d6e9ca | |
2672 | (since Linux 4.15). | |
2673 | This information can be used by a monitoring process to avoid killing | |
2674 | a process that is currently dumping core, | |
2675 | which could result in a corrupted core dump file. | |
2676 | .TP | |
2677 | .IR Threads | |
2678 | Number of threads in process containing this thread. | |
2679 | .TP | |
2680 | .IR SigQ | |
2681 | This field contains two slash-separated numbers that relate to | |
2682 | queued signals for the real user ID of this process. | |
2683 | The first of these is the number of currently queued | |
2684 | signals for this real user ID, and the second is the | |
2685 | resource limit on the number of queued signals for this process | |
2686 | (see the description of | |
2687 | .BR RLIMIT_SIGPENDING | |
2688 | in | |
2689 | .BR getrlimit (2)). | |
2690 | .TP | |
2691 | .IR SigPnd ", " ShdPnd | |
2692 | Mask (expressed in hexadecimal) | |
2693 | of signals pending for thread and for process as a whole (see | |
2694 | .BR pthreads (7) | |
2695 | and | |
2696 | .BR signal (7)). | |
2697 | .TP | |
2698 | .IR SigBlk ", " SigIgn ", " SigCgt | |
2699 | Masks (expressed in hexadecimal) | |
2700 | indicating signals being blocked, ignored, and caught (see | |
2701 | .BR signal (7)). | |
2702 | .TP | |
2703 | .IR CapInh ", " CapPrm ", " CapEff | |
2704 | Masks (expressed in hexadecimal) | |
2705 | of capabilities enabled in inheritable, permitted, and effective sets | |
2706 | (see | |
2707 | .BR capabilities (7)). | |
2708 | .TP | |
2709 | .IR CapBnd | |
2710 | Capability bounding set, expressed in hexadecimal | |
2711 | (since Linux 2.6.26, see | |
2712 | .BR capabilities (7)). | |
2713 | .TP | |
2714 | .IR CapAmb | |
2715 | Ambient capability set, expressed in hexadecimal | |
2716 | (since Linux 4.3, see | |
2717 | .BR capabilities (7)). | |
2718 | .TP | |
2719 | .IR NoNewPrivs | |
2720 | .\" commit af884cd4a5ae62fcf5e321fecf0ec1014730353d | |
2721 | Value of the | |
2722 | .I no_new_privs | |
2723 | bit | |
2724 | (since Linux 4.10, see | |
2725 | .BR prctl (2)). | |
2726 | .TP | |
2727 | .IR Seccomp | |
2728 | .\" commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816 | |
2729 | Seccomp mode of the process | |
2730 | (since Linux 3.8, see | |
2731 | .BR seccomp (2)). | |
2732 | 0 means | |
2733 | .BR SECCOMP_MODE_DISABLED ; | |
2734 | 1 means | |
2735 | .BR SECCOMP_MODE_STRICT ; | |
2736 | 2 means | |
2737 | .BR SECCOMP_MODE_FILTER . | |
2738 | This field is provided only if the kernel was built with the | |
2739 | .BR CONFIG_SECCOMP | |
2740 | kernel configuration option enabled. | |
2741 | .TP | |
2742 | .IR Speculation_Store_Bypass | |
2743 | .\" commit fae1fa0fc6cca8beee3ab8ed71d54f9a78fa3f64 | |
2744 | Speculation flaw mitigation state | |
2745 | (since Linux 4.17, see | |
2746 | .BR prctl (2)). | |
2747 | .TP | |
2748 | .IR Cpus_allowed | |
2749 | Hexadecimal mask of CPUs on which this process may run | |
2750 | (since Linux 2.6.24, see | |
2751 | .BR cpuset (7)). | |
2752 | .TP | |
2753 | .IR Cpus_allowed_list | |
2754 | Same as previous, but in "list format" | |
2755 | (since Linux 2.6.26, see | |
2756 | .BR cpuset (7)). | |
2757 | .TP | |
2758 | .IR Mems_allowed | |
2759 | Mask of memory nodes allowed to this process | |
2760 | (since Linux 2.6.24, see | |
2761 | .BR cpuset (7)). | |
2762 | .TP | |
2763 | .IR Mems_allowed_list | |
2764 | Same as previous, but in "list format" | |
2765 | (since Linux 2.6.26, see | |
2766 | .BR cpuset (7)). | |
2767 | .TP | |
2768 | .IR voluntary_ctxt_switches ", " nonvoluntary_ctxt_switches | |
2769 | Number of voluntary and involuntary context switches (since Linux 2.6.23). | |
2770 | .RE | |
2771 | .TP | |
2772 | .IR /proc/[pid]/syscall " (since Linux 2.6.27)" | |
2773 | .\" commit ebcb67341fee34061430f3367f2e507e52ee051b | |
2774 | This file exposes the system call number and argument registers for the | |
2775 | system call currently being executed by the process, | |
2776 | followed by the values of the stack pointer and program counter registers. | |
2777 | The values of all six argument registers are exposed, | |
2778 | although most system calls use fewer registers. | |
2779 | .IP | |
2780 | If the process is blocked, but not in a system call, | |
2781 | then the file displays \-1 in place of the system call number, | |
2782 | followed by just the values of the stack pointer and program counter. | |
2783 | If process is not blocked, then the file contains just the string "running". | |
2784 | .IP | |
2785 | This file is present only if the kernel was configured with | |
2786 | .BR CONFIG_HAVE_ARCH_TRACEHOOK . | |
2787 | .IP | |
2788 | Permission to access this file is governed by a ptrace access mode | |
2789 | .B PTRACE_MODE_ATTACH_FSCREDS | |
2790 | check; see | |
2791 | .BR ptrace (2). | |
2792 | .TP | |
2793 | .IR /proc/[pid]/task " (since Linux 2.6.0)" | |
2794 | .\" Precisely: Linux 2.6.0-test6 | |
2795 | This is a directory that contains one subdirectory | |
2796 | for each thread in the process. | |
2797 | The name of each subdirectory is the numerical thread ID | |
2798 | .RI ( [tid] ) | |
2799 | of the thread (see | |
2800 | .BR gettid (2)). | |
2801 | .IP | |
2802 | Within each of these subdirectories, there is a set of | |
2803 | files with the same names and contents as under the | |
2804 | .I /proc/[pid] | |
2805 | directories. | |
2806 | For attributes that are shared by all threads, the contents for | |
2807 | each of the files under the | |
2808 | .I task/[tid] | |
2809 | subdirectories will be the same as in the corresponding | |
2810 | file in the parent | |
2811 | .I /proc/[pid] | |
2812 | directory | |
2813 | (e.g., in a multithreaded process, all of the | |
2814 | .I task/[tid]/cwd | |
2815 | files will have the same value as the | |
2816 | .I /proc/[pid]/cwd | |
2817 | file in the parent directory, since all of the threads in a process | |
2818 | share a working directory). | |
2819 | For attributes that are distinct for each thread, | |
2820 | the corresponding files under | |
2821 | .I task/[tid] | |
2822 | may have different values (e.g., various fields in each of the | |
2823 | .I task/[tid]/status | |
2824 | files may be different for each thread), | |
2825 | .\" in particular: "children" :/ | |
2826 | or they might not exist in | |
2827 | .I /proc/[pid] | |
2828 | at all. | |
2829 | .IP | |
2830 | .\" The following was still true as at kernel 2.6.13 | |
2831 | In a multithreaded process, the contents of the | |
2832 | .I /proc/[pid]/task | |
2833 | directory are not available if the main thread has already terminated | |
2834 | (typically by calling | |
2835 | .BR pthread_exit (3)). | |
2836 | .TP | |
2837 | .IR /proc/[pid]/task/[tid]/children " (since Linux 3.5)" | |
2838 | .\" commit 818411616baf46ceba0cff6f05af3a9b294734f7 | |
2839 | A space-separated list of child tasks of this task. | |
2840 | Each child task is represented by its TID. | |
2841 | .IP | |
2842 | .\" see comments in get_children_pid() in fs/proc/array.c | |
2843 | This option is intended for use by the checkpoint-restore (CRIU) system, | |
2844 | and reliably provides a list of children only if all of the child processes | |
2845 | are stopped or frozen. | |
2846 | It does not work properly if children of the target task exit while | |
2847 | the file is being read! | |
2848 | Exiting children may cause non-exiting children to be omitted from the list. | |
2849 | This makes this interface even more unreliable than classic PID-based | |
2850 | approaches if the inspected task and its children aren't frozen, | |
2851 | and most code should probably not use this interface. | |
2852 | .IP | |
2853 | Until Linux 4.2, the presence of this file was governed by the | |
2854 | .B CONFIG_CHECKPOINT_RESTORE | |
2855 | kernel configuration option. | |
2856 | Since Linux 4.2, | |
2857 | .\" commit 2e13ba54a2682eea24918b87ad3edf70c2cf085b | |
2858 | it is governed by the | |
2859 | .B CONFIG_PROC_CHILDREN | |
2860 | option. | |
2861 | .TP | |
2862 | .IR /proc/[pid]/timers " (since Linux 3.10)" | |
2863 | .\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5 | |
2864 | .\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0 | |
2865 | A list of the POSIX timers for this process. | |
2866 | Each timer is listed with a line that starts with the string "ID:". | |
2867 | For example: | |
2868 | .IP | |
2869 | .in +4n | |
2870 | .EX | |
2871 | ID: 1 | |
2872 | signal: 60/00007fff86e452a8 | |
2873 | notify: signal/pid.2634 | |
2874 | ClockID: 0 | |
2875 | ID: 0 | |
2876 | signal: 60/00007fff86e452a8 | |
2877 | notify: signal/pid.2634 | |
2878 | ClockID: 1 | |
2879 | .EE | |
2880 | .in | |
2881 | .IP | |
2882 | The lines shown for each timer have the following meanings: | |
2883 | .RS | |
2884 | .TP | |
2885 | .I ID | |
2886 | The ID for this timer. | |
2887 | This is not the same as the timer ID returned by | |
2888 | .BR timer_create (2); | |
2889 | rather, it is the same kernel-internal ID that is available via the | |
2890 | .I si_timerid | |
2891 | field of the | |
2892 | .IR siginfo_t | |
2893 | structure (see | |
2894 | .BR sigaction (2)). | |
2895 | .TP | |
2896 | .I signal | |
2897 | This is the signal number that this timer uses to deliver notifications | |
2898 | followed by a slash, and then the | |
2899 | .I sigev_value | |
2900 | value supplied to the signal handler. | |
2901 | Valid only for timers that notify via a signal. | |
2902 | .TP | |
2903 | .I notify | |
2904 | The part before the slash specifies the mechanism | |
2905 | that this timer uses to deliver notifications, | |
2906 | and is one of "thread", "signal", or "none". | |
2907 | Immediately following the slash is either the string "tid" for timers | |
2908 | with | |
2909 | .B SIGEV_THREAD_ID | |
2910 | notification, or "pid" for timers that notify by other mechanisms. | |
2911 | Following the "." is the PID of the process | |
2912 | (or the kernel thread ID of the thread) that will be delivered | |
2913 | a signal if the timer delivers notifications via a signal. | |
2914 | .TP | |
2915 | .I ClockID | |
2916 | This field identifies the clock that the timer uses for measuring time. | |
2917 | For most clocks, this is a number that matches one of the user-space | |
2918 | .BR CLOCK_* | |
2919 | constants exposed via | |
2920 | .IR <time.h> . | |
2921 | .B CLOCK_PROCESS_CPUTIME_ID | |
2922 | timers display with a value of \-6 | |
2923 | in this field. | |
2924 | .B CLOCK_THREAD_CPUTIME_ID | |
2925 | timers display with a value of \-2 | |
2926 | in this field. | |
2927 | .RE | |
2928 | .IP | |
2929 | This file is available only when the kernel was configured with | |
2930 | .BR CONFIG_CHECKPOINT_RESTORE . | |
2931 | .TP | |
2932 | .IR /proc/[pid]/timerslack_ns " (since Linux 4.6)" | |
2933 | .\" commit da8b44d5a9f8bf26da637b7336508ca534d6b319 | |
2934 | .\" commit 5de23d435e88996b1efe0e2cebe242074ce67c9e | |
2935 | This file exposes the process's "current" timer slack value, | |
2936 | expressed in nanoseconds. | |
2937 | The file is writable, | |
2938 | allowing the process's timer slack value to be changed. | |
2939 | Writing 0 to this file resets the "current" timer slack to the | |
2940 | "default" timer slack value. | |
2941 | For further details, see the discussion of | |
2942 | .BR PR_SET_TIMERSLACK | |
2943 | in | |
2944 | .BR prctl (2). | |
2945 | .IP | |
2946 | Initially, | |
2947 | permission to access this file was governed by a ptrace access mode | |
2948 | .B PTRACE_MODE_ATTACH_FSCREDS | |
2949 | check (see | |
2950 | .BR ptrace (2)). | |
2951 | However, this was subsequently deemed too strict a requirement | |
2952 | (and had the side effect that requiring a process to have the | |
2953 | .B CAP_SYS_PTRACE | |
2954 | capability would also allow it to view and change any process's memory). | |
2955 | Therefore, since Linux 4.9, | |
2956 | .\" commit 7abbaf94049914f074306d960b0f968ffe52e59f | |
2957 | only the (weaker) | |
2958 | .B CAP_SYS_NICE | |
2959 | capability is required to access this file. | |
2960 | .TP | |
2961 | .IR /proc/[pid]/uid_map " (since Linux 3.5)" | |
2962 | See | |
2963 | .BR user_namespaces (7). | |
2964 | .TP | |
2965 | .IR /proc/[pid]/wchan " (since Linux 2.6.0)" | |
2966 | The symbolic name corresponding to the location | |
2967 | in the kernel where the process is sleeping. | |
2968 | .IP | |
2969 | Permission to access this file is governed by a ptrace access mode | |
2970 | .B PTRACE_MODE_READ_FSCREDS | |
2971 | check; see | |
2972 | .BR ptrace (2). | |
2973 | .TP | |
2974 | .IR /proc/[tid] | |
2975 | There is a numerical subdirectory for each running thread | |
2976 | that is not a thread group leader | |
2977 | (i.e., a thread whose thread ID is not the same as its process ID); | |
2978 | the subdirectory is named by the thread ID. | |
2979 | Each one of these subdirectories contains files and subdirectories | |
2980 | exposing information about the thread with the thread ID | |
2981 | .IR tid . | |
2982 | The contents of these directories are the same as the corresponding | |
2983 | .IR /proc/[pid]/task/[tid] | |
2984 | directories. | |
2985 | .IP | |
2986 | The | |
2987 | .I /proc/[tid] | |
2988 | subdirectories are | |
2989 | .I not | |
2990 | visible when iterating through | |
2991 | .I /proc | |
2992 | with | |
2993 | .BR getdents (2) | |
2994 | (and thus are | |
2995 | .I not | |
2996 | visible when one uses | |
2997 | .BR ls (1) | |
2998 | to view the contents of | |
2999 | .IR /proc ). | |
3000 | However, the pathnames of these directories are visible to | |
3001 | (i.e., usable as arguments in) | |
3002 | system calls that operate on pathnames. | |
3003 | .TP | |
3004 | .I /proc/apm | |
3005 | Advanced power management version and battery information when | |
3006 | .B CONFIG_APM | |
3007 | is defined at kernel compilation time. | |
3008 | .TP | |
3009 | .I /proc/buddyinfo | |
3010 | This file contains information which is used for diagnosing memory | |
3011 | fragmentation issues. | |
3012 | Each line starts with the identification of the node and the name | |
3013 | of the zone which together identify a memory region. | |
3014 | This is then | |
3015 | followed by the count of available chunks of a certain order in | |
3016 | which these zones are split. | |
3017 | The size in bytes of a certain order is given by the formula: | |
3018 | .IP | |
3019 | (2^order)\ *\ PAGE_SIZE | |
3020 | .IP | |
3021 | The binary buddy allocator algorithm inside the kernel will split | |
3022 | one chunk into two chunks of a smaller order (thus with half the | |
3023 | size) or combine two contiguous chunks into one larger chunk of | |
3024 | a higher order (thus with double the size) to satisfy allocation | |
3025 | requests and to counter memory fragmentation. | |
3026 | The order matches the column number, when starting to count at zero. | |
3027 | .IP | |
3028 | For example on an x86-64 system: | |
3029 | .RS -12 | |
3030 | .EX | |
3031 | Node 0, zone DMA 1 1 1 0 2 1 1 0 1 1 3 | |
3032 | Node 0, zone DMA32 65 47 4 81 52 28 13 10 5 1 404 | |
3033 | Node 0, zone Normal 216 55 189 101 84 38 37 27 5 3 587 | |
3034 | .EE | |
3035 | .RE | |
3036 | .IP | |
3037 | In this example, there is one node containing three zones and there | |
3038 | are 11 different chunk sizes. | |
3039 | If the page size is 4 kilobytes, then the first zone called | |
3040 | .I DMA | |
3041 | (on x86 the first 16 megabyte of memory) has 1 chunk of 4 kilobytes | |
3042 | (order 0) available and has 3 chunks of 4 megabytes (order 10) available. | |
3043 | .IP | |
3044 | If the memory is heavily fragmented, the counters for higher | |
3045 | order chunks will be zero and allocation of large contiguous areas | |
3046 | will fail. | |
3047 | .IP | |
3048 | Further information about the zones can be found in | |
3049 | .IR /proc/zoneinfo . | |
3050 | .TP | |
3051 | .I /proc/bus | |
3052 | Contains subdirectories for installed buses. | |
3053 | .TP | |
3054 | .I /proc/bus/pccard | |
3055 | Subdirectory for PCMCIA devices when | |
3056 | .B CONFIG_PCMCIA | |
3057 | is set at kernel compilation time. | |
3058 | .TP | |
3059 | .I /proc/bus/pccard/drivers | |
3060 | .TP | |
3061 | .I /proc/bus/pci | |
3062 | Contains various bus subdirectories and pseudo-files containing | |
3063 | information about PCI buses, installed devices, and device | |
3064 | drivers. | |
3065 | Some of these files are not ASCII. | |
3066 | .TP | |
3067 | .I /proc/bus/pci/devices | |
3068 | Information about PCI devices. | |
3069 | They may be accessed through | |
3070 | .BR lspci (8) | |
3071 | and | |
3072 | .BR setpci (8). | |
3073 | .TP | |
3074 | .IR /proc/cgroups " (since Linux 2.6.24)" | |
3075 | See | |
3076 | .BR cgroups (7). | |
3077 | .TP | |
3078 | .I /proc/cmdline | |
3079 | Arguments passed to the Linux kernel at boot time. | |
3080 | Often done via a boot manager such as | |
3081 | .BR lilo (8) | |
3082 | or | |
3083 | .BR grub (8). | |
3084 | .TP | |
3085 | .IR /proc/config.gz " (since Linux 2.6)" | |
3086 | This file exposes the configuration options that were used | |
3087 | to build the currently running kernel, | |
3088 | in the same format as they would be shown in the | |
3089 | .I .config | |
3090 | file that resulted when configuring the kernel (using | |
3091 | .IR "make xconfig" , | |
3092 | .IR "make config" , | |
3093 | or similar). | |
3094 | The file contents are compressed; view or search them using | |
3095 | .BR zcat (1) | |
3096 | and | |
3097 | .BR zgrep (1). | |
3098 | As long as no changes have been made to the following file, | |
3099 | the contents of | |
3100 | .I /proc/config.gz | |
3101 | are the same as those provided by: | |
3102 | .IP | |
3103 | .in +4n | |
3104 | .EX | |
3105 | cat /lib/modules/$(uname \-r)/build/.config | |
3106 | .EE | |
3107 | .in | |
3108 | .IP | |
3109 | .I /proc/config.gz | |
3110 | is provided only if the kernel is configured with | |
3111 | .BR CONFIG_IKCONFIG_PROC . | |
3112 | .TP | |
3113 | .I /proc/crypto | |
3114 | A list of the ciphers provided by the kernel crypto API. | |
3115 | For details, see the kernel | |
3116 | .I "Linux Kernel Crypto API" | |
3117 | documentation available under the kernel source directory | |
3118 | .I Documentation/crypto/ | |
3119 | .\" commit 3b72c814a8e8cd638e1ba0da4dfce501e9dff5af | |
3120 | (or | |
3121 | .I Documentation/DocBook | |
3122 | before 4.10; | |
3123 | the documentation can be built using a command such as | |
3124 | .IR "make htmldocs" | |
3125 | in the root directory of the kernel source tree). | |
3126 | .TP | |
3127 | .I /proc/cpuinfo | |
3128 | This is a collection of CPU and system architecture dependent items, | |
3129 | for each supported architecture a different list. | |
3130 | Two common entries are \fIprocessor\fP which gives CPU number and | |
3131 | \fIbogomips\fP; a system constant that is calculated | |
3132 | during kernel initialization. | |
3133 | SMP machines have information for | |
3134 | each CPU. | |
3135 | The | |
3136 | .BR lscpu (1) | |
3137 | command gathers its information from this file. | |
3138 | .TP | |
3139 | .I /proc/devices | |
3140 | Text listing of major numbers and device groups. | |
3141 | This can be used by MAKEDEV scripts for consistency with the kernel. | |
3142 | .TP | |
3143 | .IR /proc/diskstats " (since Linux 2.5.69)" | |
3144 | This file contains disk I/O statistics for each disk device. | |
3145 | See the Linux kernel source file | |
3146 | .I ./Documentation/admin\-guide/iostats.rst | |
3147 | (or | |
3148 | .I Documentation/iostats.txt | |
3149 | before Linux 5.3) | |
3150 | for further information. | |
3151 | .TP | |
3152 | .I /proc/dma | |
3153 | This is a list of the registered \fIISA\fP DMA (direct memory access) | |
3154 | channels in use. | |
3155 | .TP | |
3156 | .I /proc/driver | |
3157 | Empty subdirectory. | |
3158 | .TP | |
3159 | .I /proc/execdomains | |
3160 | List of the execution domains (ABI personalities). | |
3161 | .TP | |
3162 | .I /proc/fb | |
3163 | Frame buffer information when | |
3164 | .B CONFIG_FB | |
3165 | is defined during kernel compilation. | |
3166 | .TP | |
3167 | .I /proc/filesystems | |
3168 | A text listing of the filesystems which are supported by the kernel, | |
3169 | namely filesystems which were compiled into the kernel or whose kernel | |
3170 | modules are currently loaded. | |
3171 | (See also | |
3172 | .BR filesystems (5).) | |
3173 | If a filesystem is marked with "nodev", | |
3174 | this means that it does not require a block device to be mounted | |
3175 | (e.g., virtual filesystem, network filesystem). | |
3176 | .IP | |
3177 | Incidentally, this file may be used by | |
3178 | .BR mount (8) | |
3179 | when no filesystem is specified and it didn't manage to determine the | |
3180 | filesystem type. | |
3181 | Then filesystems contained in this file are tried | |
3182 | (excepted those that are marked with "nodev"). | |
3183 | .TP | |
3184 | .I /proc/fs | |
3185 | .\" FIXME Much more needs to be said about /proc/fs | |
3186 | .\" | |
3187 | Contains subdirectories that in turn contain files | |
3188 | with information about (certain) mounted filesystems. | |
3189 | .TP | |
3190 | .I /proc/ide | |
3191 | This directory | |
3192 | exists on systems with the IDE bus. | |
3193 | There are directories for each IDE channel and attached device. | |
3194 | Files include: | |
3195 | .IP | |
3196 | .in +4n | |
3197 | .EX | |
3198 | cache buffer size in KB | |
3199 | capacity number of sectors | |
3200 | driver driver version | |
3201 | geometry physical and logical geometry | |
3202 | identify in hexadecimal | |
3203 | media media type | |
3204 | model manufacturer\(aqs model number | |
3205 | settings drive settings | |
3206 | smart_thresholds IDE disk management thresholds (in hex) | |
3207 | smart_values IDE disk management values (in hex) | |
3208 | .EE | |
3209 | .in | |
3210 | .IP | |
3211 | The | |
3212 | .BR hdparm (8) | |
3213 | utility provides access to this information in a friendly format. | |
3214 | .TP | |
3215 | .I /proc/interrupts | |
3216 | This is used to record the number of interrupts per CPU per IO device. | |
3217 | Since Linux 2.6.24, | |
3218 | for the i386 and x86-64 architectures, at least, this also includes | |
3219 | interrupts internal to the system (that is, not associated with a device | |
3220 | as such), such as NMI (nonmaskable interrupt), LOC (local timer interrupt), | |
3221 | and for SMP systems, TLB (TLB flush interrupt), RES (rescheduling | |
3222 | interrupt), CAL (remote function call interrupt), and possibly others. | |
3223 | Very easy to read formatting, done in ASCII. | |
3224 | .TP | |
3225 | .I /proc/iomem | |
3226 | I/O memory map in Linux 2.4. | |
3227 | .TP | |
3228 | .I /proc/ioports | |
3229 | This is a list of currently registered Input-Output port regions that | |
3230 | are in use. | |
3231 | .TP | |
3232 | .IR /proc/kallsyms " (since Linux 2.5.71)" | |
3233 | This holds the kernel exported symbol definitions used by the | |
3234 | .BR modules (X) | |
3235 | tools to dynamically link and bind loadable modules. | |
3236 | In Linux 2.5.47 and earlier, a similar file with slightly different syntax | |
3237 | was named | |
3238 | .IR ksyms . | |
3239 | .TP | |
3240 | .I /proc/kcore | |
3241 | This file represents the physical memory of the system and is stored | |
3242 | in the ELF core file format. | |
3243 | With this pseudo-file, and an unstripped | |
3244 | kernel | |
3245 | .RI ( /usr/src/linux/vmlinux ) | |
3246 | binary, GDB can be used to | |
3247 | examine the current state of any kernel data structures. | |
3248 | .IP | |
3249 | The total length of the file is the size of physical memory (RAM) plus | |
3250 | 4\ KiB. | |
3251 | .TP | |
3252 | .IR /proc/keys " (since Linux 2.6.10)" | |
3253 | See | |
3254 | .BR keyrings (7). | |
3255 | .TP | |
3256 | .IR /proc/key\-users " (since Linux 2.6.10)" | |
3257 | See | |
3258 | .BR keyrings (7). | |
3259 | .TP | |
3260 | .I /proc/kmsg | |
3261 | This file can be used instead of the | |
3262 | .BR syslog (2) | |
3263 | system call to read kernel messages. | |
3264 | A process must have superuser | |
3265 | privileges to read this file, and only one process should read this | |
3266 | file. | |
3267 | This file should not be read if a syslog process is running | |
3268 | which uses the | |
3269 | .BR syslog (2) | |
3270 | system call facility to log kernel messages. | |
3271 | .IP | |
3272 | Information in this file is retrieved with the | |
3273 | .BR dmesg (1) | |
3274 | program. | |
3275 | .TP | |
3276 | .IR /proc/kpagecgroup " (since Linux 4.3)" | |
3277 | .\" commit 80ae2fdceba8313b0433f899bdd9c6c463291a17 | |
3278 | This file contains a 64-bit inode number of | |
3279 | the memory cgroup each page is charged to, | |
3280 | indexed by page frame number (see the discussion of | |
3281 | .IR /proc/[pid]/pagemap ). | |
3282 | .IP | |
3283 | The | |
3284 | .IR /proc/kpagecgroup | |
3285 | file is present only if the | |
3286 | .B CONFIG_MEMCG | |
3287 | kernel configuration option is enabled. | |
3288 | .TP | |
3289 | .IR /proc/kpagecount " (since Linux 2.6.25)" | |
3290 | This file contains a 64-bit count of the number of | |
3291 | times each physical page frame is mapped, | |
3292 | indexed by page frame number (see the discussion of | |
3293 | .IR /proc/[pid]/pagemap ). | |
3294 | .IP | |
3295 | The | |
3296 | .IR /proc/kpagecount | |
3297 | file is present only if the | |
3298 | .B CONFIG_PROC_PAGE_MONITOR | |
3299 | kernel configuration option is enabled. | |
3300 | .TP | |
3301 | .IR /proc/kpageflags " (since Linux 2.6.25)" | |
3302 | This file contains 64-bit masks corresponding to each physical page frame; | |
3303 | it is indexed by page frame number (see the discussion of | |
3304 | .IR /proc/[pid]/pagemap ). | |
3305 | The bits are as follows: | |
3306 | .IP | |
3307 | 0 - KPF_LOCKED | |
3308 | 1 - KPF_ERROR | |
3309 | 2 - KPF_REFERENCED | |
3310 | 3 - KPF_UPTODATE | |
3311 | 4 - KPF_DIRTY | |
3312 | 5 - KPF_LRU | |
3313 | 6 - KPF_ACTIVE | |
3314 | 7 - KPF_SLAB | |
3315 | 8 - KPF_WRITEBACK | |
3316 | 9 - KPF_RECLAIM | |
3317 | 10 - KPF_BUDDY | |
3318 | 11 - KPF_MMAP (since Linux 2.6.31) | |
3319 | 12 - KPF_ANON (since Linux 2.6.31) | |
3320 | 13 - KPF_SWAPCACHE (since Linux 2.6.31) | |
3321 | 14 - KPF_SWAPBACKED (since Linux 2.6.31) | |
3322 | 15 - KPF_COMPOUND_HEAD (since Linux 2.6.31) | |
3323 | 16 - KPF_COMPOUND_TAIL (since Linux 2.6.31) | |
3324 | 17 - KPF_HUGE (since Linux 2.6.31) | |
3325 | 18 - KPF_UNEVICTABLE (since Linux 2.6.31) | |
3326 | 19 - KPF_HWPOISON (since Linux 2.6.31) | |
3327 | 20 - KPF_NOPAGE (since Linux 2.6.31) | |
3328 | 21 - KPF_KSM (since Linux 2.6.32) | |
3329 | 22 - KPF_THP (since Linux 3.4) | |
3330 | 23 - KPF_BALLOON (since Linux 3.18) | |
3331 | .\" KPF_BALLOON: commit 09316c09dde33aae14f34489d9e3d243ec0d5938 | |
3332 | 24 - KPF_ZERO_PAGE (since Linux 4.0) | |
3333 | .\" KPF_ZERO_PAGE: commit 56873f43abdcd574b25105867a990f067747b2f4 | |
3334 | 25 - KPF_IDLE (since Linux 4.3) | |
3335 | .\" KPF_IDLE: commit f074a8f49eb87cde95ac9d040ad5e7ea4f029738 | |
3336 | .IP | |
3337 | For further details on the meanings of these bits, | |
3338 | see the kernel source file | |
3339 | .IR Documentation/admin\-guide/mm/pagemap.rst . | |
3340 | Before kernel 2.6.29, | |
3341 | .\" commit ad3bdefe877afb47480418fdb05ecd42842de65e | |
3342 | .\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110 | |
3343 | .BR KPF_WRITEBACK , | |
3344 | .BR KPF_RECLAIM , | |
3345 | .BR KPF_BUDDY , | |
3346 | and | |
3347 | .BR KPF_LOCKED | |
3348 | did not report correctly. | |
3349 | .IP | |
3350 | The | |
3351 | .IR /proc/kpageflags | |
3352 | file is present only if the | |
3353 | .B CONFIG_PROC_PAGE_MONITOR | |
3354 | kernel configuration option is enabled. | |
3355 | .TP | |
3356 | .IR /proc/ksyms " (Linux 1.1.23\(en2.5.47)" | |
3357 | See | |
3358 | .IR /proc/kallsyms . | |
3359 | .TP | |
3360 | .I /proc/loadavg | |
3361 | The first three fields in this file are load average figures | |
3362 | giving the number of jobs in the run queue (state R) | |
3363 | or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes. | |
3364 | They are the same as the load average numbers given by | |
3365 | .BR uptime (1) | |
3366 | and other programs. | |
3367 | The fourth field consists of two numbers separated by a slash (/). | |
3368 | The first of these is the number of currently runnable kernel | |
3369 | scheduling entities (processes, threads). | |
3370 | The value after the slash is the number of kernel scheduling entities | |
3371 | that currently exist on the system. | |
3372 | The fifth field is the PID of the process that was most | |
3373 | recently created on the system. | |
3374 | .TP | |
3375 | .I /proc/locks | |
3376 | This file shows current file locks | |
3377 | .RB ( flock "(2) and " fcntl (2)) | |
3378 | and leases | |
3379 | .RB ( fcntl (2)). | |
3380 | .IP | |
3381 | An example of the content shown in this file is the following: | |
3382 | .IP | |
3383 | .in +4n | |
3384 | .EX | |
3385 | 1: POSIX ADVISORY READ 5433 08:01:7864448 128 128 | |
3386 | 2: FLOCK ADVISORY WRITE 2001 08:01:7864554 0 EOF | |
3387 | 3: FLOCK ADVISORY WRITE 1568 00:2f:32388 0 EOF | |
3388 | 4: POSIX ADVISORY WRITE 699 00:16:28457 0 EOF | |
3389 | 5: POSIX ADVISORY WRITE 764 00:16:21448 0 0 | |
3390 | 6: POSIX ADVISORY READ 3548 08:01:7867240 1 1 | |
3391 | 7: POSIX ADVISORY READ 3548 08:01:7865567 1826 2335 | |
3392 | 8: OFDLCK ADVISORY WRITE \-1 08:01:8713209 128 191 | |
3393 | .EE | |
3394 | .in | |
3395 | .IP | |
3396 | The fields shown in each line are as follows: | |
3397 | .RS | |
3398 | .IP (1) 4 | |
3399 | The ordinal position of the lock in the list. | |
3400 | .IP (2) | |
3401 | The lock type. | |
3402 | Values that may appear here include: | |
3403 | .RS | |
3404 | .TP | |
3405 | .B FLOCK | |
3406 | This is a BSD file lock created using | |
3407 | .BR flock (2). | |
3408 | .TP | |
3409 | .B OFDLCK | |
3410 | This is an open file description (OFD) lock created using | |
3411 | .BR fcntl (2). | |
3412 | .TP | |
3413 | .B POSIX | |
3414 | This is a POSIX byte-range lock created using | |
3415 | .BR fcntl (2). | |
3416 | .RE | |
3417 | .IP (3) | |
3418 | Among the strings that can appear here are the following: | |
3419 | .RS | |
3420 | .TP | |
3421 | .B ADVISORY | |
3422 | This is an advisory lock. | |
3423 | .TP | |
3424 | .B MANDATORY | |
3425 | This is a mandatory lock. | |
3426 | .RE | |
3427 | .IP (4) | |
3428 | The type of lock. | |
3429 | Values that can appear here are: | |
3430 | .RS | |
3431 | .TP | |
3432 | .B READ | |
3433 | This is a POSIX or OFD read lock, or a BSD shared lock. | |
3434 | .TP | |
3435 | .B WRITE | |
3436 | This is a POSIX or OFD write lock, or a BSD exclusive lock. | |
3437 | .RE | |
3438 | .IP (5) | |
3439 | The PID of the process that owns the lock. | |
3440 | .IP | |
3441 | Because OFD locks are not owned by a single process | |
3442 | (since multiple processes may have file descriptors that | |
3443 | refer to the same open file description), | |
3444 | the value \-1 is displayed in this field for OFD locks. | |
3445 | (Before kernel 4.14, | |
3446 | .\" commit 9d5b86ac13c573795525ecac6ed2db39ab23e2a8 | |
3447 | a bug meant that the PID of the process that | |
3448 | initially acquired the lock was displayed instead of the value \-1.) | |
3449 | .IP (6) | |
3450 | Three colon-separated subfields that identify the major and minor device | |
3451 | ID of the device containing the filesystem where the locked file resides, | |
3452 | followed by the inode number of the locked file. | |
3453 | .IP (7) | |
3454 | The byte offset of the first byte of the lock. | |
3455 | For BSD locks, this value is always 0. | |
3456 | .IP (8) | |
3457 | The byte offset of the last byte of the lock. | |
3458 | .B EOF | |
3459 | in this field means that the lock extends to the end of the file. | |
3460 | For BSD locks, the value shown is always | |
3461 | .IR EOF . | |
3462 | .RE | |
3463 | .IP | |
3464 | Since Linux 4.9, | |
3465 | .\" commit d67fd44f697dff293d7cdc29af929241b669affe | |
3466 | the list of locks shown in | |
3467 | .I /proc/locks | |
3468 | is filtered to show just the locks for the processes in the PID | |
3469 | namespace (see | |
3470 | .BR pid_namespaces (7)) | |
3471 | for which the | |
3472 | .I /proc | |
3473 | filesystem was mounted. | |
3474 | (In the initial PID namespace, | |
3475 | there is no filtering of the records shown in this file.) | |
3476 | .IP | |
3477 | The | |
3478 | .BR lslocks (8) | |
3479 | command provides a bit more information about each lock. | |
3480 | .TP | |
3481 | .IR /proc/malloc " (only up to and including Linux 2.2)" | |
3482 | .\" It looks like this only ever did something back in 1.0 days | |
3483 | This file is present only if | |
3484 | .B CONFIG_DEBUG_MALLOC | |
3485 | was defined during compilation. | |
3486 | .TP | |
3487 | .I /proc/meminfo | |
3488 | This file reports statistics about memory usage on the system. | |
3489 | It is used by | |
3490 | .BR free (1) | |
3491 | to report the amount of free and used memory (both physical and swap) | |
3492 | on the system as well as the shared memory and buffers used by the | |
3493 | kernel. | |
3494 | Each line of the file consists of a parameter name, followed by a colon, | |
3495 | the value of the parameter, and an option unit of measurement (e.g., "kB"). | |
3496 | The list below describes the parameter names and | |
3497 | the format specifier required to read the field value. | |
3498 | Except as noted below, | |
3499 | all of the fields have been present since at least Linux 2.6.0. | |
3500 | Some fields are displayed only if the kernel was configured | |
3501 | with various options; those dependencies are noted in the list. | |
3502 | .RS | |
3503 | .TP | |
3504 | .IR MemTotal " %lu" | |
3505 | Total usable RAM (i.e., physical RAM minus a few reserved | |
3506 | bits and the kernel binary code). | |
3507 | .TP | |
3508 | .IR MemFree " %lu" | |
3509 | The sum of | |
3510 | .IR LowFree + HighFree . | |
3511 | .TP | |
3512 | .IR MemAvailable " %lu (since Linux 3.14)" | |
3513 | An estimate of how much memory is available for starting new | |
3514 | applications, without swapping. | |
3515 | .TP | |
3516 | .IR Buffers " %lu" | |
3517 | Relatively temporary storage for raw disk blocks that | |
3518 | shouldn't get tremendously large (20 MB or so). | |
3519 | .TP | |
3520 | .IR Cached " %lu" | |
3521 | In-memory cache for files read from the disk (the page cache). | |
3522 | Doesn't include | |
3523 | .IR SwapCached . | |
3524 | .TP | |
3525 | .IR SwapCached " %lu" | |
3526 | Memory that once was swapped out, is swapped back in but | |
3527 | still also is in the swap file. | |
3528 | (If memory pressure is high, these pages | |
3529 | don't need to be swapped out again because they are already | |
3530 | in the swap file. | |
3531 | This saves I/O.) | |
3532 | .TP | |
3533 | .IR Active " %lu" | |
3534 | Memory that has been used more recently and usually not | |
3535 | reclaimed unless absolutely necessary. | |
3536 | .TP | |
3537 | .IR Inactive " %lu" | |
3538 | Memory which has been less recently used. | |
3539 | It is more eligible to be reclaimed for other purposes. | |
3540 | .TP | |
3541 | .IR Active(anon) " %lu (since Linux 2.6.28)" | |
3542 | [To be documented.] | |
3543 | .TP | |
3544 | .IR Inactive(anon) " %lu (since Linux 2.6.28)" | |
3545 | [To be documented.] | |
3546 | .TP | |
3547 | .IR Active(file) " %lu (since Linux 2.6.28)" | |
3548 | [To be documented.] | |
3549 | .TP | |
3550 | .IR Inactive(file) " %lu (since Linux 2.6.28)" | |
3551 | [To be documented.] | |
3552 | .TP | |
3553 | .IR Unevictable " %lu (since Linux 2.6.28)" | |
3554 | (From Linux 2.6.28 to 2.6.30, | |
3555 | \fBCONFIG_UNEVICTABLE_LRU\fP was required.) | |
3556 | [To be documented.] | |
3557 | .TP | |
3558 | .IR Mlocked " %lu (since Linux 2.6.28)" | |
3559 | (From Linux 2.6.28 to 2.6.30, | |
3560 | \fBCONFIG_UNEVICTABLE_LRU\fP was required.) | |
3561 | [To be documented.] | |
3562 | .TP | |
3563 | .IR HighTotal " %lu" | |
3564 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
3565 | Total amount of highmem. | |
3566 | Highmem is all memory above \(ti860 MB of physical memory. | |
3567 | Highmem areas are for use by user-space programs, | |
3568 | or for the page cache. | |
3569 | The kernel must use tricks to access | |
3570 | this memory, making it slower to access than lowmem. | |
3571 | .TP | |
3572 | .IR HighFree " %lu" | |
3573 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
3574 | Amount of free highmem. | |
3575 | .TP | |
3576 | .IR LowTotal " %lu" | |
3577 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
3578 | Total amount of lowmem. | |
3579 | Lowmem is memory which can be used for everything that | |
3580 | highmem can be used for, but it is also available for the | |
3581 | kernel's use for its own data structures. | |
3582 | Among many other things, | |
3583 | it is where everything from | |
3584 | .I Slab | |
3585 | is allocated. | |
3586 | Bad things happen when you're out of lowmem. | |
3587 | .TP | |
3588 | .IR LowFree " %lu" | |
3589 | (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.) | |
3590 | Amount of free lowmem. | |
3591 | .TP | |
3592 | .IR MmapCopy " %lu (since Linux 2.6.29)" | |
3593 | .RB ( CONFIG_MMU | |
3594 | is required.) | |
3595 | [To be documented.] | |
3596 | .TP | |
3597 | .IR SwapTotal " %lu" | |
3598 | Total amount of swap space available. | |
3599 | .TP | |
3600 | .IR SwapFree " %lu" | |
3601 | Amount of swap space that is currently unused. | |
3602 | .TP | |
3603 | .IR Dirty " %lu" | |
3604 | Memory which is waiting to get written back to the disk. | |
3605 | .TP | |
3606 | .IR Writeback " %lu" | |
3607 | Memory which is actively being written back to the disk. | |
3608 | .TP | |
3609 | .IR AnonPages " %lu (since Linux 2.6.18)" | |
3610 | Non-file backed pages mapped into user-space page tables. | |
3611 | .TP | |
3612 | .IR Mapped " %lu" | |
3613 | Files which have been mapped into memory (with | |
3614 | .BR mmap (2)), | |
3615 | such as libraries. | |
3616 | .TP | |
3617 | .IR Shmem " %lu (since Linux 2.6.32)" | |
3618 | Amount of memory consumed in | |
3619 | .BR tmpfs (5) | |
3620 | filesystems. | |
3621 | .TP | |
3622 | .IR KReclaimable " %lu (since Linux 4.20)" | |
3623 | Kernel allocations that the kernel will attempt to reclaim | |
3624 | under memory pressure. | |
3625 | Includes | |
3626 | .I SReclaimable | |
3627 | (below), and other direct allocations with a shrinker. | |
3628 | .TP | |
3629 | .IR Slab " %lu" | |
3630 | In-kernel data structures cache. | |
3631 | (See | |
3632 | .BR slabinfo (5).) | |
3633 | .TP | |
3634 | .IR SReclaimable " %lu (since Linux 2.6.19)" | |
3635 | Part of | |
3636 | .IR Slab , | |
3637 | that might be reclaimed, such as caches. | |
3638 | .TP | |
3639 | .IR SUnreclaim " %lu (since Linux 2.6.19)" | |
3640 | Part of | |
3641 | .IR Slab , | |
3642 | that cannot be reclaimed on memory pressure. | |
3643 | .TP | |
3644 | .IR KernelStack " %lu (since Linux 2.6.32)" | |
3645 | Amount of memory allocated to kernel stacks. | |
3646 | .TP | |
3647 | .IR PageTables " %lu (since Linux 2.6.18)" | |
3648 | Amount of memory dedicated to the lowest level of page tables. | |
3649 | .TP | |
3650 | .IR Quicklists " %lu (since Linux 2.6.27)" | |
3651 | (\fBCONFIG_QUICKLIST\fP is required.) | |
3652 | [To be documented.] | |
3653 | .TP | |
3654 | .IR NFS_Unstable " %lu (since Linux 2.6.18)" | |
3655 | NFS pages sent to the server, but not yet committed to stable storage. | |
3656 | .TP | |
3657 | .IR Bounce " %lu (since Linux 2.6.18)" | |
3658 | Memory used for block device "bounce buffers". | |
3659 | .TP | |
3660 | .IR WritebackTmp " %lu (since Linux 2.6.26)" | |
3661 | Memory used by FUSE for temporary writeback buffers. | |
3662 | .TP | |
3663 | .IR CommitLimit " %lu (since Linux 2.6.10)" | |
3664 | This is the total amount of memory currently available to | |
3665 | be allocated on the system, expressed in kilobytes. | |
3666 | This limit is adhered to | |
3667 | only if strict overcommit accounting is enabled (mode 2 in | |
3668 | .IR /proc/sys/vm/overcommit_memory ). | |
3669 | The limit is calculated according to the formula described under | |
3670 | .IR /proc/sys/vm/overcommit_memory . | |
3671 | For further details, see the kernel source file | |
3672 | .IR Documentation/vm/overcommit\-accounting.rst . | |
3673 | .TP | |
3674 | .IR Committed_AS " %lu" | |
3675 | The amount of memory presently allocated on the system. | |
3676 | The committed memory is a sum of all of the memory which | |
3677 | has been allocated by processes, even if it has not been | |
3678 | "used" by them as of yet. | |
3679 | A process which allocates 1 GB of memory (using | |
3680 | .BR malloc (3) | |
3681 | or similar), but touches only 300 MB of that memory will show up | |
3682 | as using only 300 MB of memory even if it has the address space | |
3683 | allocated for the entire 1 GB. | |
3684 | .IP | |
3685 | This 1 GB is memory which has been "committed" to by the VM | |
3686 | and can be used at any time by the allocating application. | |
3687 | With strict overcommit enabled on the system (mode 2 in | |
3688 | .IR /proc/sys/vm/overcommit_memory ), | |
3689 | allocations which would exceed the | |
3690 | .I CommitLimit | |
3691 | will not be permitted. | |
3692 | This is useful if one needs to guarantee that processes will not | |
3693 | fail due to lack of memory once that memory has been successfully allocated. | |
3694 | .TP | |
3695 | .IR VmallocTotal " %lu" | |
3696 | Total size of vmalloc memory area. | |
3697 | .TP | |
3698 | .IR VmallocUsed " %lu" | |
3699 | Amount of vmalloc area which is used. | |
3700 | Since Linux 4.4, | |
3701 | .\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0 | |
3702 | this field is no longer calculated, and is hard coded as 0. | |
3703 | See | |
3704 | .IR /proc/vmallocinfo . | |
3705 | .TP | |
3706 | .IR VmallocChunk " %lu" | |
3707 | Largest contiguous block of vmalloc area which is free. | |
3708 | Since Linux 4.4, | |
3709 | .\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0 | |
3710 | this field is no longer calculated and is hard coded as 0. | |
3711 | See | |
3712 | .IR /proc/vmallocinfo . | |
3713 | .TP | |
3714 | .IR HardwareCorrupted " %lu (since Linux 2.6.32)" | |
3715 | (\fBCONFIG_MEMORY_FAILURE\fP is required.) | |
3716 | [To be documented.] | |
3717 | .TP | |
3718 | .IR LazyFree " %lu (since Linux 4.12)" | |
3719 | Shows the amount of memory marked by | |
3720 | .BR madvise (2) | |
3721 | .BR MADV_FREE . | |
3722 | .TP | |
3723 | .IR AnonHugePages " %lu (since Linux 2.6.38)" | |
3724 | (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.) | |
3725 | Non-file backed huge pages mapped into user-space page tables. | |
3726 | .TP | |
3727 | .IR ShmemHugePages " %lu (since Linux 4.8)" | |
3728 | (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.) | |
3729 | Memory used by shared memory (shmem) and | |
3730 | .BR tmpfs (5) | |
3731 | allocated with huge pages. | |
3732 | .TP | |
3733 | .IR ShmemPmdMapped " %lu (since Linux 4.8)" | |
3734 | (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.) | |
3735 | Shared memory mapped into user space with huge pages. | |
3736 | .TP | |
3737 | .IR CmaTotal " %lu (since Linux 3.1)" | |
3738 | Total CMA (Contiguous Memory Allocator) pages. | |
3739 | (\fBCONFIG_CMA\fP is required.) | |
3740 | .TP | |
3741 | .IR CmaFree " %lu (since Linux 3.1)" | |
3742 | Free CMA (Contiguous Memory Allocator) pages. | |
3743 | (\fBCONFIG_CMA\fP is required.) | |
3744 | .TP | |
3745 | .IR HugePages_Total " %lu" | |
3746 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
3747 | The size of the pool of huge pages. | |
3748 | .TP | |
3749 | .IR HugePages_Free " %lu" | |
3750 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
3751 | The number of huge pages in the pool that are not yet allocated. | |
3752 | .TP | |
3753 | .IR HugePages_Rsvd " %lu (since Linux 2.6.17)" | |
3754 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
3755 | This is the number of huge pages for | |
3756 | which a commitment to allocate from the pool has been made, | |
3757 | but no allocation has yet been made. | |
3758 | These reserved huge pages | |
3759 | guarantee that an application will be able to allocate a | |
3760 | huge page from the pool of huge pages at fault time. | |
3761 | .TP | |
3762 | .IR HugePages_Surp " %lu (since Linux 2.6.24)" | |
3763 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
3764 | This is the number of huge pages in | |
3765 | the pool above the value in | |
3766 | .IR /proc/sys/vm/nr_hugepages . | |
3767 | The maximum number of surplus huge pages is controlled by | |
3768 | .IR /proc/sys/vm/nr_overcommit_hugepages . | |
3769 | .TP | |
3770 | .IR Hugepagesize " %lu" | |
3771 | (\fBCONFIG_HUGETLB_PAGE\fP is required.) | |
3772 | The size of huge pages. | |
3773 | .TP | |
3774 | .IR DirectMap4k " %lu (since Linux 2.6.27)" | |
3775 | Number of bytes of RAM linearly mapped by kernel in 4 kB pages. | |
3776 | (x86.) | |
3777 | .TP | |
3778 | .IR DirectMap4M " %lu (since Linux 2.6.27)" | |
3779 | Number of bytes of RAM linearly mapped by kernel in 4 MB pages. | |
3780 | (x86 with | |
3781 | .BR CONFIG_X86_64 | |
3782 | or | |
3783 | .BR CONFIG_X86_PAE | |
3784 | enabled.) | |
3785 | .TP | |
3786 | .IR DirectMap2M " %lu (since Linux 2.6.27)" | |
3787 | Number of bytes of RAM linearly mapped by kernel in 2 MB pages. | |
3788 | (x86 with neither | |
3789 | .BR CONFIG_X86_64 | |
3790 | nor | |
3791 | .BR CONFIG_X86_PAE | |
3792 | enabled.) | |
3793 | .TP | |
3794 | .IR DirectMap1G " %lu (since Linux 2.6.27)" | |
3795 | (x86 with | |
3796 | .BR CONFIG_X86_64 | |
3797 | and | |
3798 | .B CONFIG_X86_DIRECT_GBPAGES | |
3799 | enabled.) | |
3800 | .RE | |
3801 | .TP | |
3802 | .I /proc/modules | |
3803 | A text list of the modules that have been loaded by the system. | |
3804 | See also | |
3805 | .BR lsmod (8). | |
3806 | .TP | |
3807 | .I /proc/mounts | |
3808 | Before kernel 2.4.19, this file was a list | |
3809 | of all the filesystems currently mounted on the system. | |
3810 | With the introduction of per-process mount namespaces in Linux 2.4.19 (see | |
3811 | .BR mount_namespaces (7)), | |
3812 | this file became a link to | |
3813 | .IR /proc/self/mounts , | |
3814 | which lists the mounts of the process's own mount namespace. | |
3815 | The format of this file is documented in | |
3816 | .BR fstab (5). | |
3817 | .TP | |
3818 | .I /proc/mtrr | |
3819 | Memory Type Range Registers. | |
3820 | See the Linux kernel source file | |
3821 | .I Documentation/x86/mtrr.rst | |
3822 | (or | |
3823 | .I Documentation/x86/mtrr.txt | |
3824 | .\" commit 7225e75144b9718cbbe1820d9c011c809d5773fd | |
3825 | before Linux 5.2, or | |
3826 | .I Documentation/mtrr.txt | |
3827 | before Linux 2.6.28) | |
3828 | for details. | |
3829 | .TP | |
3830 | .I /proc/net | |
3831 | This directory contains various files and subdirectories containing | |
3832 | information about the networking layer. | |
3833 | The files contain ASCII structures and are, | |
3834 | therefore, readable with | |
3835 | .BR cat (1). | |
3836 | However, the standard | |
3837 | .BR netstat (8) | |
3838 | suite provides much cleaner access to these files. | |
3839 | .IP | |
3840 | With the advent of network namespaces, | |
3841 | various information relating to the network stack is virtualized (see | |
3842 | .BR network_namespaces (7)). | |
3843 | Thus, since Linux 2.6.25, | |
3844 | .\" commit e9720acd728a46cb40daa52c99a979f7c4ff195c | |
3845 | .IR /proc/net | |
3846 | is a symbolic link to the directory | |
3847 | .IR /proc/self/net , | |
3848 | which contains the same files and directories as listed below. | |
3849 | However, these files and directories now expose information | |
3850 | for the network namespace of which the process is a member. | |
3851 | .TP | |
3852 | .I /proc/net/arp | |
3853 | This holds an ASCII readable dump of the kernel ARP table used for | |
3854 | address resolutions. | |
3855 | It will show both dynamically learned and preprogrammed ARP entries. | |
3856 | The format is: | |
3857 | .IP | |
3858 | .in +4n | |
3859 | .EX | |
3860 | IP address HW type Flags HW address Mask Device | |
3861 | 192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0 | |
3862 | 192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0 | |
3863 | .EE | |
3864 | .in | |
3865 | .IP | |
3866 | Here "IP address" is the IPv4 address of the machine and the "HW type" | |
3867 | is the hardware type of the address from RFC\ 826. | |
3868 | The flags are the internal | |
3869 | flags of the ARP structure (as defined in | |
3870 | .IR /usr/include/linux/if_arp.h ) | |
3871 | and | |
3872 | the "HW address" is the data link layer mapping for that IP address if | |
3873 | it is known. | |
3874 | .TP | |
3875 | .I /proc/net/dev | |
3876 | The dev pseudo-file contains network device status information. | |
3877 | This gives | |
3878 | the number of received and sent packets, the number of errors and | |
3879 | collisions | |
3880 | and other basic statistics. | |
3881 | These are used by the | |
3882 | .BR ifconfig (8) | |
3883 | program to report device status. | |
3884 | The format is: | |
3885 | .IP | |
3886 | .EX | |
3887 | Inter\-| Receive | Transmit | |
3888 | face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed | |
3889 | lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0 | |
3890 | eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0 | |
3891 | ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0 | |
3892 | tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0 | |
3893 | .EE | |
3894 | .\" .TP | |
3895 | .\" .I /proc/net/ipx | |
3896 | .\" No information. | |
3897 | .\" .TP | |
3898 | .\" .I /proc/net/ipx_route | |
3899 | .\" No information. | |
3900 | .TP | |
3901 | .I /proc/net/dev_mcast | |
3902 | Defined in | |
3903 | .IR /usr/src/linux/net/core/dev_mcast.c : | |
3904 | .IP | |
3905 | .in +4n | |
3906 | .EX | |
3907 | indx interface_name dmi_u dmi_g dmi_address | |
3908 | 2 eth0 1 0 01005e000001 | |
3909 | 3 eth1 1 0 01005e000001 | |
3910 | 4 eth2 1 0 01005e000001 | |
3911 | .EE | |
3912 | .in | |
3913 | .TP | |
3914 | .I /proc/net/igmp | |
3915 | Internet Group Management Protocol. | |
3916 | Defined in | |
3917 | .IR /usr/src/linux/net/core/igmp.c . | |
3918 | .TP | |
3919 | .I /proc/net/rarp | |
3920 | This file uses the same format as the | |
3921 | .I arp | |
3922 | file and contains the current reverse mapping database used to provide | |
3923 | .BR rarp (8) | |
3924 | reverse address lookup services. | |
3925 | If RARP is not configured into the | |
3926 | kernel, | |
3927 | this file will not be present. | |
3928 | .TP | |
3929 | .I /proc/net/raw | |
3930 | Holds a dump of the RAW socket table. | |
3931 | Much of the information is not of | |
3932 | use | |
3933 | apart from debugging. | |
3934 | The "sl" value is the kernel hash slot for the | |
3935 | socket, | |
3936 | the "local_address" is the local address and protocol number pair. | |
3937 | \&"St" is | |
3938 | the internal status of the socket. | |
3939 | The "tx_queue" and "rx_queue" are the | |
3940 | outgoing and incoming data queue in terms of kernel memory usage. | |
3941 | The "tr", "tm\->when", and "rexmits" fields are not used by RAW. | |
3942 | The "uid" | |
3943 | field holds the effective UID of the creator of the socket. | |
3944 | .\" .TP | |
3945 | .\" .I /proc/net/route | |
3946 | .\" No information, but looks similar to | |
3947 | .\" .BR route (8). | |
3948 | .TP | |
3949 | .I /proc/net/snmp | |
3950 | This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP | |
3951 | management | |
3952 | information bases for an SNMP agent. | |
3953 | .TP | |
3954 | .I /proc/net/tcp | |
3955 | Holds a dump of the TCP socket table. | |
3956 | Much of the information is not | |
3957 | of use apart from debugging. | |
3958 | The "sl" value is the kernel hash slot | |
3959 | for the socket, the "local_address" is the local address and port number pair. | |
3960 | The "rem_address" is the remote address and port number pair | |
3961 | (if connected). | |
3962 | \&"St" is the internal status of the socket. | |
3963 | The "tx_queue" and "rx_queue" are the | |
3964 | outgoing and incoming data queue in terms of kernel memory usage. | |
3965 | The "tr", "tm\->when", and "rexmits" fields hold internal information of | |
3966 | the kernel socket state and are useful only for debugging. | |
3967 | The "uid" | |
3968 | field holds the effective UID of the creator of the socket. | |
3969 | .TP | |
3970 | .I /proc/net/udp | |
3971 | Holds a dump of the UDP socket table. | |
3972 | Much of the information is not of | |
3973 | use apart from debugging. | |
3974 | The "sl" value is the kernel hash slot for the | |
3975 | socket, the "local_address" is the local address and port number pair. | |
3976 | The "rem_address" is the remote address and port number pair | |
3977 | (if connected). | |
3978 | "St" is the internal status of the socket. | |
3979 | The "tx_queue" and "rx_queue" are the outgoing and incoming data queue | |
3980 | in terms of kernel memory usage. | |
3981 | The "tr", "tm\->when", and "rexmits" fields | |
3982 | are not used by UDP. | |
3983 | The "uid" | |
3984 | field holds the effective UID of the creator of the socket. | |
3985 | The format is: | |
3986 | .IP | |
3987 | .EX | |
3988 | sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid | |
3989 | 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0 | |
3990 | 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0 | |
3991 | 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 | |
3992 | .EE | |
3993 | .TP | |
3994 | .I /proc/net/unix | |
3995 | Lists the UNIX domain sockets present within the system and their | |
3996 | status. | |
3997 | The format is: | |
3998 | .IP | |
3999 | .EX | |
4000 | Num RefCount Protocol Flags Type St Inode Path | |
4001 | 0: 00000002 00000000 00000000 0001 03 42 | |
4002 | 1: 00000001 00000000 00010000 0001 01 1948 /dev/printer | |
4003 | .EE | |
4004 | .IP | |
4005 | The fields are as follows: | |
4006 | .RS | |
4007 | .TP 10 | |
4008 | .IR Num : | |
4009 | the kernel table slot number. | |
4010 | .TP | |
4011 | .IR RefCount : | |
4012 | the number of users of the socket. | |
4013 | .TP | |
4014 | .IR Protocol : | |
4015 | currently always 0. | |
4016 | .TP | |
4017 | .IR Flags : | |
4018 | the internal kernel flags holding the status of the socket. | |
4019 | .TP | |
4020 | .IR Type : | |
4021 | the socket type. | |
4022 | For | |
4023 | .BR SOCK_STREAM | |
4024 | sockets, this is 0001; for | |
4025 | .BR SOCK_DGRAM | |
4026 | sockets, it is 0002; and for | |
4027 | .BR SOCK_SEQPACKET | |
4028 | sockets, it is 0005. | |
4029 | .TP | |
4030 | .IR St : | |
4031 | the internal state of the socket. | |
4032 | .TP | |
4033 | .IR Inode : | |
4034 | the inode number of the socket. | |
4035 | .TP | |
4036 | .IR Path : | |
4037 | the bound pathname (if any) of the socket. | |
4038 | Sockets in the abstract namespace are included in the list, | |
4039 | and are shown with a | |
4040 | .I Path | |
4041 | that commences with the character '@'. | |
4042 | .RE | |
4043 | .TP | |
4044 | .I /proc/net/netfilter/nfnetlink_queue | |
4045 | This file contains information about netfilter user-space queueing, if used. | |
4046 | Each line represents a queue. | |
4047 | Queues that have not been subscribed to | |
4048 | by user space are not shown. | |
4049 | .IP | |
4050 | .in +4n | |
4051 | .EX | |
4052 | 1 4207 0 2 65535 0 0 0 1 | |
4053 | (1) (2) (3)(4) (5) (6) (7) (8) | |
4054 | .EE | |
4055 | .in | |
4056 | .IP | |
4057 | The fields in each line are: | |
4058 | .RS 7 | |
4059 | .TP 5 | |
4060 | (1) | |
4061 | The ID of the queue. | |
4062 | This matches what is specified in the | |
4063 | .B \-\-queue\-num | |
4064 | or | |
4065 | .B \-\-queue\-balance | |
4066 | options to the | |
4067 | .BR iptables (8) | |
4068 | NFQUEUE target. | |
4069 | See | |
4070 | .BR iptables\-extensions (8) | |
4071 | for more information. | |
4072 | .TP | |
4073 | (2) | |
4074 | The netlink port ID subscribed to the queue. | |
4075 | .TP | |
4076 | (3) | |
4077 | The number of packets currently queued and waiting to be processed by | |
4078 | the application. | |
4079 | .TP | |
4080 | (4) | |
4081 | The copy mode of the queue. | |
4082 | It is either 1 (metadata only) or 2 | |
4083 | (also copy payload data to user space). | |
4084 | .TP | |
4085 | (5) | |
4086 | Copy range; that is, how many bytes of packet payload should be copied to | |
4087 | user space at most. | |
4088 | .TP | |
4089 | (6) | |
4090 | queue dropped. | |
4091 | Number of packets that had to be dropped by the kernel because | |
4092 | too many packets are already waiting for user space to send back the mandatory | |
4093 | accept/drop verdicts. | |
4094 | .TP | |
4095 | (7) | |
4096 | queue user dropped. | |
4097 | Number of packets that were dropped within the netlink | |
4098 | subsystem. | |
4099 | Such drops usually happen when the corresponding socket buffer is | |
4100 | full; that is, user space is not able to read messages fast enough. | |
4101 | .TP | |
4102 | (8) | |
4103 | sequence number. | |
4104 | Every queued packet is associated with a (32-bit) | |
4105 | monotonically increasing sequence number. | |
4106 | This shows the ID of the most recent packet queued. | |
4107 | .RE | |
4108 | .IP | |
4109 | The last number exists only for compatibility reasons and is always 1. | |
4110 | .TP | |
4111 | .I /proc/partitions | |
4112 | Contains the major and minor numbers of each partition as well as the number | |
4113 | of 1024-byte blocks and the partition name. | |
4114 | .TP | |
4115 | .I /proc/pci | |
4116 | This is a listing of all PCI devices found during kernel initialization | |
4117 | and their configuration. | |
4118 | .IP | |
4119 | This file has been deprecated in favor of a new | |
4120 | .I /proc | |
4121 | interface for PCI | |
4122 | .RI ( /proc/bus/pci ). | |
4123 | It became optional in Linux 2.2 (available with | |
4124 | .B CONFIG_PCI_OLD_PROC | |
4125 | set at kernel compilation). | |
4126 | It became once more nonoptionally enabled in Linux 2.4. | |
4127 | Next, it was deprecated in Linux 2.6 (still available with | |
4128 | .B CONFIG_PCI_LEGACY_PROC | |
4129 | set), and finally removed altogether since Linux 2.6.17. | |
4130 | .\" FIXME Document /proc/sched_debug (since Linux 2.6.23) | |
4131 | .\" See also /proc/[pid]/sched | |
4132 | .TP | |
4133 | .IR /proc/profile " (since Linux 2.4)" | |
4134 | This file is present only if the kernel was booted with the | |
4135 | .I profile=1 | |
4136 | command-line option. | |
4137 | It exposes kernel profiling information in a binary format for use by | |
4138 | .BR readprofile (1). | |
4139 | Writing (e.g., an empty string) to this file resets the profiling counters; | |
4140 | on some architectures, | |
4141 | writing a binary integer "profiling multiplier" of size | |
4142 | .IR sizeof(int) | |
4143 | sets the profiling interrupt frequency. | |
4144 | .TP | |
4145 | .I /proc/scsi | |
4146 | A directory with the | |
4147 | .I scsi | |
4148 | mid-level pseudo-file and various SCSI low-level | |
4149 | driver directories, | |
4150 | which contain a file for each SCSI host in this system, all of | |
4151 | which give the status of some part of the SCSI IO subsystem. | |
4152 | These files contain ASCII structures and are, therefore, readable with | |
4153 | .BR cat (1). | |
4154 | .IP | |
4155 | You can also write to some of the files to reconfigure the subsystem or | |
4156 | switch certain features on or off. | |
4157 | .TP | |
4158 | .I /proc/scsi/scsi | |
4159 | This is a listing of all SCSI devices known to the kernel. | |
4160 | The listing is similar to the one seen during bootup. | |
4161 | scsi currently supports only the \fIadd\-single\-device\fP command which | |
4162 | allows root to add a hotplugged device to the list of known devices. | |
4163 | .IP | |
4164 | The command | |
4165 | .IP | |
4166 | .in +4n | |
4167 | .EX | |
4168 | echo \(aqscsi add\-single\-device 1 0 5 0\(aq > /proc/scsi/scsi | |
4169 | .EE | |
4170 | .in | |
4171 | .IP | |
4172 | will cause | |
4173 | host scsi1 to scan on SCSI channel 0 for a device on ID 5 LUN 0. | |
4174 | If there | |
4175 | is already a device known on this address or the address is invalid, an | |
4176 | error will be returned. | |
4177 | .TP | |
4178 | .I /proc/scsi/[drivername] | |
4179 | \fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740, | |
4180 | aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic, | |
4181 | scsi_debug, seagate, t128, u15\-24f, ultrastore, or wd7000. | |
4182 | These directories show up for all drivers that registered at least one | |
4183 | SCSI HBA. | |
4184 | Every directory contains one file per registered host. | |
4185 | Every host-file is named after the number the host was assigned during | |
4186 | initialization. | |
4187 | .IP | |
4188 | Reading these files will usually show driver and host configuration, | |
4189 | statistics, and so on. | |
4190 | .IP | |
4191 | Writing to these files allows different things on different hosts. | |
4192 | For example, with the \fIlatency\fP and \fInolatency\fP commands, | |
4193 | root can switch on and off command latency measurement code in the | |
4194 | eata_dma driver. | |
4195 | With the \fIlockup\fP and \fIunlock\fP commands, | |
4196 | root can control bus lockups simulated by the scsi_debug driver. | |
4197 | .TP | |
4198 | .I /proc/self | |
4199 | This directory refers to the process accessing the | |
4200 | .I /proc | |
4201 | filesystem, | |
4202 | and is identical to the | |
4203 | .I /proc | |
4204 | directory named by the process ID of the same process. | |
4205 | .TP | |
4206 | .I /proc/slabinfo | |
4207 | Information about kernel caches. | |
4208 | See | |
4209 | .BR slabinfo (5) | |
4210 | for details. | |
4211 | .TP | |
4212 | .I /proc/stat | |
4213 | kernel/system statistics. | |
4214 | Varies with architecture. | |
4215 | Common | |
4216 | entries include: | |
4217 | .RS | |
4218 | .TP | |
4219 | .I cpu 10132153 290696 3084719 46828483 16683 0 25195 0 175628 0 | |
4220 | .TQ | |
4221 | .I cpu0 1393280 32966 572056 13343292 6130 0 17875 0 23933 0 | |
4222 | The amount of time, measured in units of | |
4223 | USER_HZ (1/100ths of a second on most architectures, use | |
4224 | .IR sysconf(_SC_CLK_TCK) | |
4225 | to obtain the right value), | |
4226 | .\" 1024 on Alpha and ia64 | |
4227 | that the system ("cpu" line) or the specific CPU ("cpu\fIN\fR" line) | |
4228 | spent in various states: | |
4229 | .RS | |
4230 | .TP | |
4231 | .I user | |
4232 | (1) Time spent in user mode. | |
4233 | .TP | |
4234 | .I nice | |
4235 | (2) Time spent in user mode with low priority (nice). | |
4236 | .TP | |
4237 | .I system | |
4238 | (3) Time spent in system mode. | |
4239 | .TP | |
4240 | .I idle | |
4241 | (4) Time spent in the idle task. | |
4242 | .\" FIXME . Actually, the following info about the /proc/stat 'cpu' field | |
4243 | .\" does not seem to be quite right (at least in 2.6.12 or 3.6): | |
4244 | .\" the idle time in /proc/uptime does not quite match this value | |
4245 | This value should be USER_HZ times the | |
4246 | second entry in the | |
4247 | .I /proc/uptime | |
4248 | pseudo-file. | |
4249 | .TP | |
4250 | .IR iowait " (since Linux 2.5.41)" | |
4251 | (5) Time waiting for I/O to complete. | |
4252 | This value is not reliable, for the following reasons: | |
4253 | .\" See kernel commit 9c240d757658a3ae9968dd309e674c61f07c7f48 | |
4254 | .RS | |
4255 | .IP 1. 3 | |
4256 | The CPU will not wait for I/O to complete; | |
4257 | iowait is the time that a task is waiting for I/O to complete. | |
4258 | When a CPU goes into idle state for outstanding task I/O, | |
4259 | another task will be scheduled on this CPU. | |
4260 | .IP 2. | |
4261 | On a multi-core CPU, | |
4262 | the task waiting for I/O to complete is not running on any CPU, | |
4263 | so the iowait of each CPU is difficult to calculate. | |
4264 | .IP 3. | |
4265 | The value in this field may | |
4266 | .I decrease | |
4267 | in certain conditions. | |
4268 | .RE | |
4269 | .TP | |
4270 | .IR irq " (since Linux 2.6.0)" | |
4271 | .\" Precisely: Linux 2.6.0-test4 | |
4272 | (6) Time servicing interrupts. | |
4273 | .TP | |
4274 | .IR softirq " (since Linux 2.6.0)" | |
4275 | .\" Precisely: Linux 2.6.0-test4 | |
4276 | (7) Time servicing softirqs. | |
4277 | .TP | |
4278 | .IR steal " (since Linux 2.6.11)" | |
4279 | (8) Stolen time, which is the time spent in other operating systems when | |
4280 | running in a virtualized environment | |
4281 | .TP | |
4282 | .IR guest " (since Linux 2.6.24)" | |
4283 | (9) Time spent running a virtual CPU for guest | |
4284 | operating systems under the control of the Linux kernel. | |
4285 | .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de | |
4286 | .TP | |
4287 | .IR guest_nice " (since Linux 2.6.33)" | |
4288 | .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797 | |
4289 | (10) Time spent running a niced guest (virtual CPU for guest | |
4290 | operating systems under the control of the Linux kernel). | |
4291 | .RE | |
4292 | .TP | |
4293 | \fIpage 5741 1808\fP | |
4294 | The number of pages the system paged in and the number that were paged | |
4295 | out (from disk). | |
4296 | .TP | |
4297 | \fIswap 1 0\fP | |
4298 | The number of swap pages that have been brought in and out. | |
4299 | .TP | |
4300 | .\" FIXME . The following is not the full picture for the 'intr' of | |
4301 | .\" /proc/stat on 2.6: | |
4302 | \fIintr 1462898\fP | |
4303 | This line shows counts of interrupts serviced since boot time, | |
4304 | for each of the possible system interrupts. | |
4305 | The first column is the total of all interrupts serviced | |
4306 | including unnumbered architecture specific interrupts; | |
4307 | each subsequent column is the total for that particular numbered interrupt. | |
4308 | Unnumbered interrupts are not shown, only summed into the total. | |
4309 | .TP | |
4310 | \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP... | |
4311 | (major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written) | |
4312 | .br | |
4313 | (Linux 2.4 only) | |
4314 | .TP | |
4315 | \fIctxt 115315\fP | |
4316 | The number of context switches that the system underwent. | |
4317 | .TP | |
4318 | \fIbtime 769041601\fP | |
4319 | boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). | |
4320 | .TP | |
4321 | \fIprocesses 86031\fP | |
4322 | Number of forks since boot. | |
4323 | .TP | |
4324 | \fIprocs_running 6\fP | |
4325 | Number of processes in runnable state. | |
4326 | (Linux 2.5.45 onward.) | |
4327 | .TP | |
4328 | \fIprocs_blocked 2\fP | |
4329 | Number of processes blocked waiting for I/O to complete. | |
4330 | (Linux 2.5.45 onward.) | |
4331 | .TP | |
4332 | .I softirq 229245889 94 60001584 13619 5175704 2471304 28 51212741 59130143 0 51240672 | |
4333 | .\" commit d3d64df21d3d0de675a0d3ffa7c10514f3644b30 | |
4334 | This line shows the number of softirq for all CPUs. | |
4335 | The first column is the total of all softirqs and | |
4336 | each subsequent column is the total for particular softirq. | |
4337 | (Linux 2.6.31 onward.) | |
4338 | .RE | |
4339 | .TP | |
4340 | .I /proc/swaps | |
4341 | Swap areas in use. | |
4342 | See also | |
4343 | .BR swapon (8). | |
4344 | .TP | |
4345 | .I /proc/sys | |
4346 | This directory (present since 1.3.57) contains a number of files | |
4347 | and subdirectories corresponding to kernel variables. | |
4348 | These variables can be read and in some cases modified using | |
4349 | the \fI/proc\fP filesystem, and the (deprecated) | |
4350 | .BR sysctl (2) | |
4351 | system call. | |
4352 | .IP | |
4353 | String values may be terminated by either \(aq\e0\(aq or \(aq\en\(aq. | |
4354 | .IP | |
4355 | Integer and long values may be written either in decimal or in | |
4356 | hexadecimal notation (e.g., 0x3FFF). | |
4357 | When writing multiple integer or long values, these may be separated | |
4358 | by any of the following whitespace characters: | |
4359 | \(aq\ \(aq, \(aq\et\(aq, or \(aq\en\(aq. | |
4360 | Using other separators leads to the error | |
4361 | .BR EINVAL . | |
4362 | .TP | |
4363 | .IR /proc/sys/abi " (since Linux 2.4.10)" | |
4364 | This directory may contain files with application binary information. | |
4365 | .\" On some systems, it is not present. | |
4366 | See the Linux kernel source file | |
4367 | .I Documentation/sysctl/abi.rst | |
4368 | (or | |
4369 | .I Documentation/sysctl/abi.txt | |
4370 | before Linux 5.3) | |
4371 | for more information. | |
4372 | .TP | |
4373 | .I /proc/sys/debug | |
4374 | This directory may be empty. | |
4375 | .TP | |
4376 | .I /proc/sys/dev | |
4377 | This directory contains device-specific information (e.g., | |
4378 | .IR dev/cdrom/info ). | |
4379 | On | |
4380 | some systems, it may be empty. | |
4381 | .TP | |
4382 | .I /proc/sys/fs | |
4383 | This directory contains the files and subdirectories for kernel variables | |
4384 | related to filesystems. | |
4385 | .TP | |
4386 | .IR /proc/sys/fs/aio\-max\-nr " and " /proc/sys/fs/aio\-nr " (since Linux 2.6.4)" | |
4387 | .I aio\-nr | |
4388 | is the running total of the number of events specified by | |
4389 | .BR io_setup (2) | |
4390 | calls for all currently active AIO contexts. | |
4391 | If | |
4392 | .I aio\-nr | |
4393 | reaches | |
4394 | .IR aio\-max\-nr , | |
4395 | then | |
4396 | .BR io_setup (2) | |
4397 | will fail with the error | |
4398 | .BR EAGAIN . | |
4399 | Raising | |
4400 | .I aio\-max\-nr | |
4401 | does not result in the preallocation or resizing | |
4402 | of any kernel data structures. | |
4403 | .TP | |
4404 | .I /proc/sys/fs/binfmt_misc | |
4405 | Documentation for files in this directory can be found | |
4406 | in the Linux kernel source in the file | |
4407 | .IR Documentation/admin\-guide/binfmt\-misc.rst | |
4408 | (or in | |
4409 | .IR Documentation/binfmt_misc.txt | |
4410 | on older kernels). | |
4411 | .TP | |
4412 | .IR /proc/sys/fs/dentry\-state " (since Linux 2.2)" | |
4413 | This file contains information about the status of the | |
4414 | directory cache (dcache). | |
4415 | The file contains six numbers, | |
4416 | .IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds)," | |
4417 | .I want_pages | |
4418 | (pages requested by system) and two dummy values. | |
4419 | .RS | |
4420 | .IP * 2 | |
4421 | .I nr_dentry | |
4422 | is the number of allocated dentries (dcache entries). | |
4423 | This field is unused in Linux 2.2. | |
4424 | .IP * | |
4425 | .I nr_unused | |
4426 | is the number of unused dentries. | |
4427 | .IP * | |
4428 | .I age_limit | |
4429 | .\" looks like this is unused in kernels 2.2 to 2.6 | |
4430 | is the age in seconds after which dcache entries | |
4431 | can be reclaimed when memory is short. | |
4432 | .IP * | |
4433 | .I want_pages | |
4434 | .\" looks like this is unused in kernels 2.2 to 2.6 | |
4435 | is nonzero when the kernel has called shrink_dcache_pages() and the | |
4436 | dcache isn't pruned yet. | |
4437 | .RE | |
4438 | .TP | |
4439 | .I /proc/sys/fs/dir\-notify\-enable | |
4440 | This file can be used to disable or enable the | |
4441 | .I dnotify | |
4442 | interface described in | |
4443 | .BR fcntl (2) | |
4444 | on a system-wide basis. | |
4445 | A value of 0 in this file disables the interface, | |
4446 | and a value of 1 enables it. | |
4447 | .TP | |
4448 | .I /proc/sys/fs/dquot\-max | |
4449 | This file shows the maximum number of cached disk quota entries. | |
4450 | On some (2.4) systems, it is not present. | |
4451 | If the number of free cached disk quota entries is very low and | |
4452 | you have some awesome number of simultaneous system users, | |
4453 | you might want to raise the limit. | |
4454 | .TP | |
4455 | .I /proc/sys/fs/dquot\-nr | |
4456 | This file shows the number of allocated disk quota | |
4457 | entries and the number of free disk quota entries. | |
4458 | .TP | |
4459 | .IR /proc/sys/fs/epoll " (since Linux 2.6.28)" | |
4460 | This directory contains the file | |
4461 | .IR max_user_watches , | |
4462 | which can be used to limit the amount of kernel memory consumed by the | |
4463 | .I epoll | |
4464 | interface. | |
4465 | For further details, see | |
4466 | .BR epoll (7). | |
4467 | .TP | |
4468 | .I /proc/sys/fs/file\-max | |
4469 | This file defines | |
4470 | a system-wide limit on the number of open files for all processes. | |
4471 | System calls that fail when encountering this limit fail with the error | |
4472 | .BR ENFILE . | |
4473 | (See also | |
4474 | .BR setrlimit (2), | |
4475 | which can be used by a process to set the per-process limit, | |
4476 | .BR RLIMIT_NOFILE , | |
4477 | on the number of files it may open.) | |
4478 | If you get lots | |
4479 | of error messages in the kernel log about running out of file handles | |
4480 | (open file descriptions) | |
4481 | (look for "VFS: file\-max limit <number> reached"), | |
4482 | try increasing this value: | |
4483 | .IP | |
4484 | .in +4n | |
4485 | .EX | |
4486 | echo 100000 > /proc/sys/fs/file\-max | |
4487 | .EE | |
4488 | .in | |
4489 | .IP | |
4490 | Privileged processes | |
4491 | .RB ( CAP_SYS_ADMIN ) | |
4492 | can override the | |
4493 | .I file\-max | |
4494 | limit. | |
4495 | .TP | |
4496 | .I /proc/sys/fs/file\-nr | |
4497 | This (read-only) file contains three numbers: | |
4498 | the number of allocated file handles | |
4499 | (i.e., the number of open file descriptions; see | |
4500 | .BR open (2)); | |
4501 | the number of free file handles; | |
4502 | and the maximum number of file handles (i.e., the same value as | |
4503 | .IR /proc/sys/fs/file\-max ). | |
4504 | If the number of allocated file handles is close to the | |
4505 | maximum, you should consider increasing the maximum. | |
4506 | Before Linux 2.6, | |
4507 | the kernel allocated file handles dynamically, | |
4508 | but it didn't free them again. | |
4509 | Instead the free file handles were kept in a list for reallocation; | |
4510 | the "free file handles" value indicates the size of that list. | |
4511 | A large number of free file handles indicates that there was | |
4512 | a past peak in the usage of open file handles. | |
4513 | Since Linux 2.6, the kernel does deallocate freed file handles, | |
4514 | and the "free file handles" value is always zero. | |
4515 | .TP | |
4516 | .IR /proc/sys/fs/inode\-max " (only present until Linux 2.2)" | |
4517 | This file contains the maximum number of in-memory inodes. | |
4518 | This value should be 3\(en4 times larger | |
4519 | than the value in | |
4520 | .IR file\-max , | |
4521 | since \fIstdin\fP, \fIstdout\fP | |
4522 | and network sockets also need an inode to handle them. | |
4523 | When you regularly run out of inodes, you need to increase this value. | |
4524 | .IP | |
4525 | Starting with Linux 2.4, | |
4526 | there is no longer a static limit on the number of inodes, | |
4527 | and this file is removed. | |
4528 | .TP | |
4529 | .I /proc/sys/fs/inode\-nr | |
4530 | This file contains the first two values from | |
4531 | .IR inode\-state . | |
4532 | .TP | |
4533 | .I /proc/sys/fs/inode\-state | |
4534 | This file | |
4535 | contains seven numbers: | |
4536 | .IR nr_inodes , | |
4537 | .IR nr_free_inodes , | |
4538 | .IR preshrink , | |
4539 | and four dummy values (always zero). | |
4540 | .IP | |
4541 | .I nr_inodes | |
4542 | is the number of inodes the system has allocated. | |
4543 | .\" This can be slightly more than | |
4544 | .\" .I inode\-max | |
4545 | .\" because Linux allocates them one page full at a time. | |
4546 | .I nr_free_inodes | |
4547 | represents the number of free inodes. | |
4548 | .IP | |
4549 | .I preshrink | |
4550 | is nonzero when the | |
4551 | .I nr_inodes | |
4552 | > | |
4553 | .I inode\-max | |
4554 | and the system needs to prune the inode list instead of allocating more; | |
4555 | since Linux 2.4, this field is a dummy value (always zero). | |
4556 | .TP | |
4557 | .IR /proc/sys/fs/inotify " (since Linux 2.6.13)" | |
4558 | This directory contains files | |
4559 | .IR max_queued_events ", " max_user_instances ", and " max_user_watches , | |
4560 | that can be used to limit the amount of kernel memory consumed by the | |
4561 | .I inotify | |
4562 | interface. | |
4563 | For further details, see | |
4564 | .BR inotify (7). | |
4565 | .TP | |
4566 | .I /proc/sys/fs/lease\-break\-time | |
4567 | This file specifies the grace period that the kernel grants to a process | |
4568 | holding a file lease | |
4569 | .RB ( fcntl (2)) | |
4570 | after it has sent a signal to that process notifying it | |
4571 | that another process is waiting to open the file. | |
4572 | If the lease holder does not remove or downgrade the lease within | |
4573 | this grace period, the kernel forcibly breaks the lease. | |
4574 | .TP | |
4575 | .I /proc/sys/fs/leases\-enable | |
4576 | This file can be used to enable or disable file leases | |
4577 | .RB ( fcntl (2)) | |
4578 | on a system-wide basis. | |
4579 | If this file contains the value 0, leases are disabled. | |
4580 | A nonzero value enables leases. | |
4581 | .TP | |
4582 | .IR /proc/sys/fs/mount\-max " (since Linux 4.9)" | |
4583 | .\" commit d29216842a85c7970c536108e093963f02714498 | |
4584 | The value in this file specifies the maximum number of mounts that may exist | |
4585 | in a mount namespace. | |
4586 | The default value in this file is 100,000. | |
4587 | .TP | |
4588 | .IR /proc/sys/fs/mqueue " (since Linux 2.6.6)" | |
4589 | This directory contains files | |
4590 | .IR msg_max ", " msgsize_max ", and " queues_max , | |
4591 | controlling the resources used by POSIX message queues. | |
4592 | See | |
4593 | .BR mq_overview (7) | |
4594 | for details. | |
4595 | .TP | |
4596 | .IR /proc/sys/fs/nr_open " (since Linux 2.6.25)" | |
4597 | .\" commit 9cfe015aa424b3c003baba3841a60dd9b5ad319b | |
4598 | This file imposes a ceiling on the value to which the | |
4599 | .BR RLIMIT_NOFILE | |
4600 | resource limit can be raised (see | |
4601 | .BR getrlimit (2)). | |
4602 | This ceiling is enforced for both unprivileged and privileged process. | |
4603 | The default value in this file is 1048576. | |
4604 | (Before Linux 2.6.25, the ceiling for | |
4605 | .BR RLIMIT_NOFILE | |
4606 | was hard-coded to the same value.) | |
4607 | .TP | |
4608 | .IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid | |
4609 | These files | |
4610 | allow you to change the value of the fixed UID and GID. | |
4611 | The default is 65534. | |
4612 | Some filesystems support only 16-bit UIDs and GIDs, although in Linux | |
4613 | UIDs and GIDs are 32 bits. | |
4614 | When one of these filesystems is mounted | |
4615 | with writes enabled, any UID or GID that would exceed 65535 is translated | |
4616 | to the overflow value before being written to disk. | |
4617 | .TP | |
4618 | .IR /proc/sys/fs/pipe\-max\-size " (since Linux 2.6.35)" | |
4619 | See | |
4620 | .BR pipe (7). | |
4621 | .TP | |
4622 | .IR /proc/sys/fs/pipe\-user\-pages\-hard " (since Linux 4.5)" | |
4623 | See | |
4624 | .BR pipe (7). | |
4625 | .TP | |
4626 | .IR /proc/sys/fs/pipe\-user\-pages\-soft " (since Linux 4.5)" | |
4627 | See | |
4628 | .BR pipe (7). | |
4629 | .TP | |
4630 | .IR /proc/sys/fs/protected_fifos " (since Linux 4.19)" | |
4631 | The value in this file is/can be set to one of the following: | |
4632 | .RS | |
4633 | .TP 4 | |
4634 | 0 | |
4635 | Writing to FIFOs is unrestricted. | |
4636 | .TP | |
4637 | 1 | |
4638 | Don't allow | |
4639 | .B O_CREAT | |
4640 | .BR open (2) | |
4641 | on FIFOs that the caller doesn't own in world-writable sticky directories, | |
4642 | unless the FIFO is owned by the owner of the directory. | |
4643 | .TP | |
4644 | 2 | |
4645 | As for the value 1, | |
4646 | but the restriction also applies to group-writable sticky directories. | |
4647 | .RE | |
4648 | .IP | |
4649 | The intent of the above protections is to avoid unintentional writes to an | |
4650 | attacker-controlled FIFO when a program expected to create a regular file. | |
4651 | .TP | |
4652 | .IR /proc/sys/fs/protected_hardlinks " (since Linux 3.6)" | |
4653 | .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7 | |
4654 | When the value in this file is 0, | |
4655 | no restrictions are placed on the creation of hard links | |
4656 | (i.e., this is the historical behavior before Linux 3.6). | |
4657 | When the value in this file is 1, | |
4658 | a hard link can be created to a target file | |
4659 | only if one of the following conditions is true: | |
4660 | .RS | |
4661 | .IP * 3 | |
4662 | The calling process has the | |
4663 | .BR CAP_FOWNER | |
4664 | capability in its user namespace | |
4665 | and the file UID has a mapping in the namespace. | |
4666 | .IP * | |
4667 | The filesystem UID of the process creating the link matches | |
4668 | the owner (UID) of the target file | |
4669 | (as described in | |
4670 | .BR credentials (7), | |
4671 | a process's filesystem UID is normally the same as its effective UID). | |
4672 | .IP * | |
4673 | All of the following conditions are true: | |
4674 | .RS 4 | |
4675 | .IP \(bu 3 | |
4676 | the target is a regular file; | |
4677 | .IP \(bu | |
4678 | the target file does not have its set-user-ID mode bit enabled; | |
4679 | .IP \(bu | |
4680 | the target file does not have both its set-group-ID and | |
4681 | group-executable mode bits enabled; and | |
4682 | .IP \(bu | |
4683 | the caller has permission to read and write the target file | |
4684 | (either via the file's permissions mask or because it has | |
4685 | suitable capabilities). | |
4686 | .RE | |
4687 | .RE | |
4688 | .IP | |
4689 | The default value in this file is 0. | |
4690 | Setting the value to 1 | |
4691 | prevents a longstanding class of security issues caused by | |
4692 | hard-link-based time-of-check, time-of-use races, | |
4693 | most commonly seen in world-writable directories such as | |
4694 | .IR /tmp . | |
4695 | The common method of exploiting this flaw | |
4696 | is to cross privilege boundaries when following a given hard link | |
4697 | (i.e., a root process follows a hard link created by another user). | |
4698 | Additionally, on systems without separated partitions, | |
4699 | this stops unauthorized users from "pinning" vulnerable set-user-ID and | |
4700 | set-group-ID files against being upgraded by | |
4701 | the administrator, or linking to special files. | |
4702 | .TP | |
4703 | .IR /proc/sys/fs/protected_regular " (since Linux 4.19)" | |
4704 | The value in this file is/can be set to one of the following: | |
4705 | .RS | |
4706 | .TP 4 | |
4707 | 0 | |
4708 | Writing to regular files is unrestricted. | |
4709 | .TP | |
4710 | 1 | |
4711 | Don't allow | |
4712 | .B O_CREAT | |
4713 | .BR open (2) | |
4714 | on regular files that the caller doesn't own in | |
4715 | world-writable sticky directories, | |
4716 | unless the regular file is owned by the owner of the directory. | |
4717 | .TP | |
4718 | 2 | |
4719 | As for the value 1, | |
4720 | but the restriction also applies to group-writable sticky directories. | |
4721 | .RE | |
4722 | .IP | |
4723 | The intent of the above protections is similar to | |
4724 | .IR protected_fifos , | |
4725 | but allows an application to | |
4726 | avoid writes to an attacker-controlled regular file, | |
4727 | where the application expected to create one. | |
4728 | .TP | |
4729 | .IR /proc/sys/fs/protected_symlinks " (since Linux 3.6)" | |
4730 | .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7 | |
4731 | When the value in this file is 0, | |
4732 | no restrictions are placed on following symbolic links | |
4733 | (i.e., this is the historical behavior before Linux 3.6). | |
4734 | When the value in this file is 1, symbolic links are followed only | |
4735 | in the following circumstances: | |
4736 | .RS | |
4737 | .IP * 3 | |
4738 | the filesystem UID of the process following the link matches | |
4739 | the owner (UID) of the symbolic link | |
4740 | (as described in | |
4741 | .BR credentials (7), | |
4742 | a process's filesystem UID is normally the same as its effective UID); | |
4743 | .IP * | |
4744 | the link is not in a sticky world-writable directory; or | |
4745 | .IP * | |
4746 | the symbolic link and its parent directory have the same owner (UID) | |
4747 | .RE | |
4748 | .IP | |
4749 | A system call that fails to follow a symbolic link | |
4750 | because of the above restrictions returns the error | |
4751 | .BR EACCES | |
4752 | in | |
4753 | .IR errno . | |
4754 | .IP | |
4755 | The default value in this file is 0. | |
4756 | Setting the value to 1 avoids a longstanding class of security issues | |
4757 | based on time-of-check, time-of-use races when accessing symbolic links. | |
4758 | .TP | |
4759 | .IR /proc/sys/fs/suid_dumpable " (since Linux 2.6.13)" | |
4760 | .\" The following is based on text from Documentation/sysctl/kernel.txt | |
4761 | The value in this file is assigned to a process's "dumpable" flag | |
4762 | in the circumstances described in | |
4763 | .BR prctl (2). | |
4764 | In effect, | |
4765 | the value in this file determines whether core dump files are | |
4766 | produced for set-user-ID or otherwise protected/tainted binaries. | |
4767 | The "dumpable" setting also affects the ownership of files in a process's | |
4768 | .IR /proc/[pid] | |
4769 | directory, as described above. | |
4770 | .IP | |
4771 | Three different integer values can be specified: | |
4772 | .RS | |
4773 | .TP | |
4774 | \fI0\ (default)\fP | |
4775 | .\" In kernel source: SUID_DUMP_DISABLE | |
4776 | This provides the traditional (pre-Linux 2.6.13) behavior. | |
4777 | A core dump will not be produced for a process which has | |
4778 | changed credentials (by calling | |
4779 | .BR seteuid (2), | |
4780 | .BR setgid (2), | |
4781 | or similar, or by executing a set-user-ID or set-group-ID program) | |
4782 | or whose binary does not have read permission enabled. | |
4783 | .TP | |
4784 | \fI1\ ("debug")\fP | |
4785 | .\" In kernel source: SUID_DUMP_USER | |
4786 | All processes dump core when possible. | |
4787 | (Reasons why a process might nevertheless not dump core are described in | |
4788 | .BR core (5).) | |
4789 | The core dump is owned by the filesystem user ID of the dumping process | |
4790 | and no security is applied. | |
4791 | This is intended for system debugging situations only: | |
4792 | this mode is insecure because it allows unprivileged users to | |
4793 | examine the memory contents of privileged processes. | |
4794 | .TP | |
4795 | \fI2\ ("suidsafe")\fP | |
4796 | .\" In kernel source: SUID_DUMP_ROOT | |
4797 | Any binary which normally would not be dumped (see "0" above) | |
4798 | is dumped readable by root only. | |
4799 | This allows the user to remove the core dump file but not to read it. | |
4800 | For security reasons core dumps in this mode will not overwrite one | |
4801 | another or other files. | |
4802 | This mode is appropriate when administrators are | |
4803 | attempting to debug problems in a normal environment. | |
4804 | .IP | |
4805 | Additionally, since Linux 3.6, | |
4806 | .\" 9520628e8ceb69fa9a4aee6b57f22675d9e1b709 | |
4807 | .I /proc/sys/kernel/core_pattern | |
4808 | must either be an absolute pathname | |
4809 | or a pipe command, as detailed in | |
4810 | .BR core (5). | |
4811 | Warnings will be written to the kernel log if | |
4812 | .I core_pattern | |
4813 | does not follow these rules, and no core dump will be produced. | |
4814 | .\" 54b501992dd2a839e94e76aa392c392b55080ce8 | |
4815 | .RE | |
4816 | .IP | |
4817 | For details of the effect of a process's "dumpable" setting | |
4818 | on ptrace access mode checking, see | |
4819 | .BR ptrace (2). | |
4820 | .TP | |
4821 | .I /proc/sys/fs/super\-max | |
4822 | This file | |
4823 | controls the maximum number of superblocks, and | |
4824 | thus the maximum number of mounted filesystems the kernel | |
4825 | can have. | |
4826 | You need increase only | |
4827 | .I super\-max | |
4828 | if you need to mount more filesystems than the current value in | |
4829 | .I super\-max | |
4830 | allows you to. | |
4831 | .TP | |
4832 | .I /proc/sys/fs/super\-nr | |
4833 | This file | |
4834 | contains the number of filesystems currently mounted. | |
4835 | .TP | |
4836 | .I /proc/sys/kernel | |
4837 | This directory contains files controlling a range of kernel parameters, | |
4838 | as described below. | |
4839 | .TP | |
4840 | .I /proc/sys/kernel/acct | |
4841 | This file | |
4842 | contains three numbers: | |
4843 | .IR highwater , | |
4844 | .IR lowwater , | |
4845 | and | |
4846 | .IR frequency . | |
4847 | If BSD-style process accounting is enabled, these values control | |
4848 | its behavior. | |
4849 | If free space on filesystem where the log lives goes below | |
4850 | .I lowwater | |
4851 | percent, accounting suspends. | |
4852 | If free space gets above | |
4853 | .I highwater | |
4854 | percent, accounting resumes. | |
4855 | .I frequency | |
4856 | determines | |
4857 | how often the kernel checks the amount of free space (value is in | |
4858 | seconds). | |
4859 | Default values are 4, 2, and 30. | |
4860 | That is, suspend accounting if 2% or less space is free; resume it | |
4861 | if 4% or more space is free; consider information about amount of free space | |
4862 | valid for 30 seconds. | |
4863 | .TP | |
4864 | .IR /proc/sys/kernel/auto_msgmni " (Linux 2.6.27 to 3.18)" | |
4865 | .\" commit 9eefe520c814f6f62c5d36a2ddcd3fb99dfdb30e (introduces feature) | |
4866 | .\" commit 0050ee059f7fc86b1df2527aaa14ed5dc72f9973 (rendered redundant) | |
4867 | From Linux 2.6.27 to 3.18, | |
4868 | this file was used to control recomputing of the value in | |
4869 | .IR /proc/sys/kernel/msgmni | |
4870 | upon the addition or removal of memory or upon IPC namespace creation/removal. | |
4871 | Echoing "1" into this file enabled | |
4872 | .I msgmni | |
4873 | automatic recomputing (and triggered a recomputation of | |
4874 | .I msgmni | |
4875 | based on the current amount of available memory and number of IPC namespaces). | |
4876 | Echoing "0" disabled automatic recomputing. | |
4877 | (Automatic recomputing was also disabled if a value was explicitly assigned to | |
4878 | .IR /proc/sys/kernel/msgmni .) | |
4879 | The default value in | |
4880 | .I auto_msgmni | |
4881 | was 1. | |
4882 | .IP | |
4883 | Since Linux 3.19, the content of this file has no effect (because | |
4884 | .IR msgmni | |
4885 | .\" FIXME Must document the 3.19 'msgmni' changes. | |
4886 | defaults to near the maximum value possible), | |
4887 | and reads from this file always return the value "0". | |
4888 | .TP | |
4889 | .IR /proc/sys/kernel/cap_last_cap " (since Linux 3.2)" | |
4890 | See | |
4891 | .BR capabilities (7). | |
4892 | .TP | |
4893 | .IR /proc/sys/kernel/cap\-bound " (from Linux 2.2 to 2.6.24)" | |
4894 | This file holds the value of the kernel | |
4895 | .I "capability bounding set" | |
4896 | (expressed as a signed decimal number). | |
4897 | This set is ANDed against the capabilities permitted to a process | |
4898 | during | |
4899 | .BR execve (2). | |
4900 | Starting with Linux 2.6.25, | |
4901 | the system-wide capability bounding set disappeared, | |
4902 | and was replaced by a per-thread bounding set; see | |
4903 | .BR capabilities (7). | |
4904 | .TP | |
4905 | .I /proc/sys/kernel/core_pattern | |
4906 | See | |
4907 | .BR core (5). | |
4908 | .TP | |
4909 | .I /proc/sys/kernel/core_pipe_limit | |
4910 | See | |
4911 | .BR core (5). | |
4912 | .TP | |
4913 | .I /proc/sys/kernel/core_uses_pid | |
4914 | See | |
4915 | .BR core (5). | |
4916 | .TP | |
4917 | .I /proc/sys/kernel/ctrl\-alt\-del | |
4918 | This file | |
4919 | controls the handling of Ctrl-Alt-Del from the keyboard. | |
4920 | When the value in this file is 0, Ctrl-Alt-Del is trapped and | |
4921 | sent to the | |
4922 | .BR init (1) | |
4923 | program to handle a graceful restart. | |
4924 | When the value is greater than zero, Linux's reaction to a Vulcan | |
4925 | Nerve Pinch (tm) will be an immediate reboot, without even | |
4926 | syncing its dirty buffers. | |
4927 | Note: when a program (like dosemu) has the keyboard in "raw" | |
4928 | mode, the ctrl-alt-del is intercepted by the program before it | |
4929 | ever reaches the kernel tty layer, and it's up to the program | |
4930 | to decide what to do with it. | |
4931 | .TP | |
4932 | .IR /proc/sys/kernel/dmesg_restrict " (since Linux 2.6.37)" | |
4933 | The value in this file determines who can see kernel syslog contents. | |
4934 | A value of 0 in this file imposes no restrictions. | |
4935 | If the value is 1, only privileged users can read the kernel syslog. | |
4936 | (See | |
4937 | .BR syslog (2) | |
4938 | for more details.) | |
4939 | Since Linux 3.4, | |
4940 | .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8 | |
4941 | only users with the | |
4942 | .BR CAP_SYS_ADMIN | |
4943 | capability may change the value in this file. | |
4944 | .TP | |
4945 | .IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname | |
4946 | can be used to set the NIS/YP domainname and the | |
4947 | hostname of your box in exactly the same way as the commands | |
4948 | .BR domainname (1) | |
4949 | and | |
4950 | .BR hostname (1), | |
4951 | that is: | |
4952 | .IP | |
4953 | .in +4n | |
4954 | .EX | |
4955 | .RB "#" " echo \(aqdarkstar\(aq > /proc/sys/kernel/hostname" | |
4956 | .RB "#" " echo \(aqmydomain\(aq > /proc/sys/kernel/domainname" | |
4957 | .EE | |
4958 | .in | |
4959 | .IP | |
4960 | has the same effect as | |
4961 | .IP | |
4962 | .in +4n | |
4963 | .EX | |
4964 | .RB "#" " hostname \(aqdarkstar\(aq" | |
4965 | .RB "#" " domainname \(aqmydomain\(aq" | |
4966 | .EE | |
4967 | .in | |
4968 | .IP | |
4969 | Note, however, that the classic darkstar.frop.org has the | |
4970 | hostname "darkstar" and DNS (Internet Domain Name Server) | |
4971 | domainname "frop.org", not to be confused with the NIS (Network | |
4972 | Information Service) or YP (Yellow Pages) domainname. | |
4973 | These two | |
4974 | domain names are in general different. | |
4975 | For a detailed discussion | |
4976 | see the | |
4977 | .BR hostname (1) | |
4978 | man page. | |
4979 | .TP | |
4980 | .I /proc/sys/kernel/hotplug | |
4981 | This file | |
4982 | contains the pathname for the hotplug policy agent. | |
4983 | The default value in this file is | |
4984 | .IR /sbin/hotplug . | |
4985 | .TP | |
4986 | .\" Removed in commit 87f504e5c78b910b0c1d6ffb89bc95e492322c84 (tglx/history.git) | |
4987 | .IR /proc/sys/kernel/htab\-reclaim " (before Linux 2.4.9.2)" | |
4988 | (PowerPC only) If this file is set to a nonzero value, | |
4989 | the PowerPC htab | |
4990 | .\" removed in commit 1b483a6a7b2998e9c98ad985d7494b9b725bd228, before 2.6.28 | |
4991 | (see kernel file | |
4992 | .IR Documentation/powerpc/ppc_htab.txt ) | |
4993 | is pruned | |
4994 | each time the system hits the idle loop. | |
4995 | .TP | |
4996 | .IR /proc/sys/kernel/keys/* | |
4997 | This directory contains various files that define parameters and limits | |
4998 | for the key-management facility. | |
4999 | These files are described in | |
5000 | .BR keyrings (7). | |
5001 | .TP | |
5002 | .IR /proc/sys/kernel/kptr_restrict " (since Linux 2.6.38)" | |
5003 | .\" 455cd5ab305c90ffc422dd2e0fb634730942b257 | |
5004 | The value in this file determines whether kernel addresses are exposed via | |
5005 | .I /proc | |
5006 | files and other interfaces. | |
5007 | A value of 0 in this file imposes no restrictions. | |
5008 | If the value is 1, kernel pointers printed using the | |
5009 | .I %pK | |
5010 | format specifier will be replaced with zeros unless the user has the | |
5011 | .BR CAP_SYSLOG | |
5012 | capability. | |
5013 | If the value is 2, kernel pointers printed using the | |
5014 | .I %pK | |
5015 | format specifier will be replaced with zeros regardless | |
5016 | of the user's capabilities. | |
5017 | The initial default value for this file was 1, | |
5018 | but the default was changed | |
5019 | .\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9 | |
5020 | to 0 in Linux 2.6.39. | |
5021 | Since Linux 3.4, | |
5022 | .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8 | |
5023 | only users with the | |
5024 | .BR CAP_SYS_ADMIN | |
5025 | capability can change the value in this file. | |
5026 | .TP | |
5027 | .I /proc/sys/kernel/l2cr | |
5028 | (PowerPC only) This file | |
5029 | contains a flag that controls the L2 cache of G3 processor | |
5030 | boards. | |
5031 | If 0, the cache is disabled. | |
5032 | Enabled if nonzero. | |
5033 | .TP | |
5034 | .I /proc/sys/kernel/modprobe | |
5035 | This file contains the pathname for the kernel module loader. | |
5036 | The default value is | |
5037 | .IR /sbin/modprobe . | |
5038 | The file is present only if the kernel is built with the | |
5039 | .B CONFIG_MODULES | |
5040 | .RB ( CONFIG_KMOD | |
5041 | in Linux 2.6.26 and earlier) | |
5042 | option enabled. | |
5043 | It is described by the Linux kernel source file | |
5044 | .I Documentation/kmod.txt | |
5045 | (present only in kernel 2.4 and earlier). | |
5046 | .TP | |
5047 | .IR /proc/sys/kernel/modules_disabled " (since Linux 2.6.31)" | |
5048 | .\" 3d43321b7015387cfebbe26436d0e9d299162ea1 | |
5049 | .\" From Documentation/sysctl/kernel.txt | |
5050 | A toggle value indicating if modules are allowed to be loaded | |
5051 | in an otherwise modular kernel. | |
5052 | This toggle defaults to off (0), but can be set true (1). | |
5053 | Once true, modules can be neither loaded nor unloaded, | |
5054 | and the toggle cannot be set back to false. | |
5055 | The file is present only if the kernel is built with the | |
5056 | .B CONFIG_MODULES | |
5057 | option enabled. | |
5058 | .TP | |
5059 | .IR /proc/sys/kernel/msgmax " (since Linux 2.2)" | |
5060 | This file defines | |
5061 | a system-wide limit specifying the maximum number of bytes in | |
5062 | a single message written on a System V message queue. | |
5063 | .TP | |
5064 | .IR /proc/sys/kernel/msgmni " (since Linux 2.4)" | |
5065 | This file defines the system-wide limit on the number of | |
5066 | message queue identifiers. | |
5067 | See also | |
5068 | .IR /proc/sys/kernel/auto_msgmni . | |
5069 | .TP | |
5070 | .IR /proc/sys/kernel/msgmnb " (since Linux 2.2)" | |
5071 | This file defines a system-wide parameter used to initialize the | |
5072 | .I msg_qbytes | |
5073 | setting for subsequently created message queues. | |
5074 | The | |
5075 | .I msg_qbytes | |
5076 | setting specifies the maximum number of bytes that may be written to the | |
5077 | message queue. | |
5078 | .TP | |
5079 | .IR /proc/sys/kernel/ngroups_max " (since Linux 2.6.4)" | |
5080 | This is a read-only file that displays the upper limit on the | |
5081 | number of a process's group memberships. | |
5082 | .TP | |
5083 | .IR /proc/sys/kernel/ns_last_pid " (since Linux 3.3)" | |
5084 | See | |
5085 | .BR pid_namespaces (7). | |
5086 | .TP | |
5087 | .IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease | |
5088 | These files | |
5089 | give substrings of | |
5090 | .IR /proc/version . | |
5091 | .TP | |
5092 | .IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid | |
5093 | These files duplicate the files | |
5094 | .I /proc/sys/fs/overflowgid | |
5095 | and | |
5096 | .IR /proc/sys/fs/overflowuid . | |
5097 | .TP | |
5098 | .I /proc/sys/kernel/panic | |
5099 | This file gives read/write access to the kernel variable | |
5100 | .IR panic_timeout . | |
5101 | If this is zero, the kernel will loop on a panic; if nonzero, | |
5102 | it indicates that the kernel should autoreboot after this number | |
5103 | of seconds. | |
5104 | When you use the | |
5105 | software watchdog device driver, the recommended setting is 60. | |
5106 | .TP | |
5107 | .IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)" | |
5108 | This file controls the kernel's behavior when an oops | |
5109 | or BUG is encountered. | |
5110 | If this file contains 0, then the system | |
5111 | tries to continue operation. | |
5112 | If it contains 1, then the system | |
5113 | delays a few seconds (to give klogd time to record the oops output) | |
5114 | and then panics. | |
5115 | If the | |
5116 | .I /proc/sys/kernel/panic | |
5117 | file is also nonzero, then the machine will be rebooted. | |
5118 | .TP | |
5119 | .IR /proc/sys/kernel/pid_max " (since Linux 2.5.34)" | |
5120 | This file specifies the value at which PIDs wrap around | |
5121 | (i.e., the value in this file is one greater than the maximum PID). | |
5122 | PIDs greater than this value are not allocated; | |
5123 | thus, the value in this file also acts as a system-wide limit | |
5124 | on the total number of processes and threads. | |
5125 | The default value for this file, 32768, | |
5126 | results in the same range of PIDs as on earlier kernels. | |
5127 | On 32-bit platforms, 32768 is the maximum value for | |
5128 | .IR pid_max . | |
5129 | On 64-bit systems, | |
5130 | .I pid_max | |
5131 | can be set to any value up to 2^22 | |
5132 | .RB ( PID_MAX_LIMIT , | |
5133 | approximately 4 million). | |
5134 | .\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit | |
5135 | .\" platforms, but this broke /proc/[pid] | |
5136 | .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2 | |
5137 | .TP | |
5138 | .IR /proc/sys/kernel/powersave\-nap " (PowerPC only)" | |
5139 | This file contains a flag. | |
5140 | If set, Linux-PPC will use the "nap" mode of | |
5141 | powersaving, | |
5142 | otherwise the "doze" mode will be used. | |
5143 | .TP | |
5144 | .I /proc/sys/kernel/printk | |
5145 | See | |
5146 | .BR syslog (2). | |
5147 | .TP | |
5148 | .IR /proc/sys/kernel/pty " (since Linux 2.6.4)" | |
5149 | This directory contains two files relating to the number of UNIX 98 | |
5150 | pseudoterminals (see | |
5151 | .BR pts (4)) | |
5152 | on the system. | |
5153 | .TP | |
5154 | .I /proc/sys/kernel/pty/max | |
5155 | This file defines the maximum number of pseudoterminals. | |
5156 | .\" FIXME Document /proc/sys/kernel/pty/reserve | |
5157 | .\" New in Linux 3.3 | |
5158 | .\" commit e9aba5158a80098447ff207a452a3418ae7ee386 | |
5159 | .TP | |
5160 | .I /proc/sys/kernel/pty/nr | |
5161 | This read-only file | |
5162 | indicates how many pseudoterminals are currently in use. | |
5163 | .TP | |
5164 | .I /proc/sys/kernel/random | |
5165 | This directory | |
5166 | contains various parameters controlling the operation of the file | |
5167 | .IR /dev/random . | |
5168 | See | |
5169 | .BR random (4) | |
5170 | for further information. | |
5171 | .TP | |
5172 | .IR /proc/sys/kernel/random/uuid " (since Linux 2.4)" | |
5173 | Each read from this read-only file returns a randomly generated 128-bit UUID, | |
5174 | as a string in the standard UUID format. | |
5175 | .TP | |
5176 | .IR /proc/sys/kernel/randomize_va_space " (since Linux 2.6.12)" | |
5177 | .\" Some further details can be found in Documentation/sysctl/kernel.txt | |
5178 | Select the address space layout randomization (ASLR) policy for the system | |
5179 | (on architectures that support ASLR). | |
5180 | Three values are supported for this file: | |
5181 | .RS | |
5182 | .IP 0 3 | |
5183 | Turn ASLR off. | |
5184 | This is the default for architectures that don't support ASLR, | |
5185 | and when the kernel is booted with the | |
5186 | .I norandmaps | |
5187 | parameter. | |
5188 | .IP 1 | |
5189 | Make the addresses of | |
5190 | .BR mmap (2) | |
5191 | allocations, the stack, and the VDSO page randomized. | |
5192 | Among other things, this means that shared libraries will be | |
5193 | loaded at randomized addresses. | |
5194 | The text segment of PIE-linked binaries will also be loaded | |
5195 | at a randomized address. | |
5196 | This value is the default if the kernel was configured with | |
5197 | .BR CONFIG_COMPAT_BRK . | |
5198 | .IP 2 | |
5199 | (Since Linux 2.6.25) | |
5200 | .\" commit c1d171a002942ea2d93b4fbd0c9583c56fce0772 | |
5201 | Also support heap randomization. | |
5202 | This value is the default if the kernel was not configured with | |
5203 | .BR CONFIG_COMPAT_BRK . | |
5204 | .RE | |
5205 | .TP | |
5206 | .I /proc/sys/kernel/real\-root\-dev | |
5207 | This file is documented in the Linux kernel source file | |
5208 | .I Documentation/admin\-guide/initrd.rst | |
5209 | .\" commit 9d85025b0418163fae079c9ba8f8445212de8568 | |
5210 | (or | |
5211 | .I Documentation/initrd.txt | |
5212 | before Linux 4.10). | |
5213 | .TP | |
5214 | .IR /proc/sys/kernel/reboot\-cmd " (Sparc only)" | |
5215 | This file seems to be a way to give an argument to the SPARC | |
5216 | ROM/Flash boot loader. | |
5217 | Maybe to tell it what to do after | |
5218 | rebooting? | |
5219 | .TP | |
5220 | .I /proc/sys/kernel/rtsig\-max | |
5221 | (Only in kernels up to and including 2.6.7; see | |
5222 | .BR setrlimit (2)) | |
5223 | This file can be used to tune the maximum number | |
5224 | of POSIX real-time (queued) signals that can be outstanding | |
5225 | in the system. | |
5226 | .TP | |
5227 | .I /proc/sys/kernel/rtsig\-nr | |
5228 | (Only in kernels up to and including 2.6.7.) | |
5229 | This file shows the number of POSIX real-time signals currently queued. | |
5230 | .TP | |
5231 | .IR /proc/[pid]/sched_autogroup_enabled " (since Linux 2.6.38)" | |
5232 | .\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a | |
5233 | See | |
5234 | .BR sched (7). | |
5235 | .TP | |
5236 | .IR /proc/sys/kernel/sched_child_runs_first " (since Linux 2.6.23)" | |
5237 | If this file contains the value zero, then, after a | |
5238 | .BR fork (2), | |
5239 | the parent is first scheduled on the CPU. | |
5240 | If the file contains a nonzero value, | |
5241 | then the child is scheduled first on the CPU. | |
5242 | (Of course, on a multiprocessor system, | |
5243 | the parent and the child might both immediately be scheduled on a CPU.) | |
5244 | .TP | |
5245 | .IR /proc/sys/kernel/sched_rr_timeslice_ms " (since Linux 3.9)" | |
5246 | See | |
5247 | .BR sched_rr_get_interval (2). | |
5248 | .TP | |
5249 | .IR /proc/sys/kernel/sched_rt_period_us " (since Linux 2.6.25)" | |
5250 | See | |
5251 | .BR sched (7). | |
5252 | .TP | |
5253 | .IR /proc/sys/kernel/sched_rt_runtime_us " (since Linux 2.6.25)" | |
5254 | See | |
5255 | .BR sched (7). | |
5256 | .TP | |
5257 | .IR /proc/sys/kernel/seccomp " (since Linux 4.14)" | |
5258 | .\" commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af | |
5259 | This directory provides additional seccomp information and | |
5260 | configuration. | |
5261 | See | |
5262 | .BR seccomp (2) | |
5263 | for further details. | |
5264 | .TP | |
5265 | .IR /proc/sys/kernel/sem " (since Linux 2.4)" | |
5266 | This file contains 4 numbers defining limits for System V IPC semaphores. | |
5267 | These fields are, in order: | |
5268 | .RS | |
5269 | .IP SEMMSL 8 | |
5270 | The maximum semaphores per semaphore set. | |
5271 | .IP SEMMNS 8 | |
5272 | A system-wide limit on the number of semaphores in all semaphore sets. | |
5273 | .IP SEMOPM 8 | |
5274 | The maximum number of operations that may be specified in a | |
5275 | .BR semop (2) | |
5276 | call. | |
5277 | .IP SEMMNI 8 | |
5278 | A system-wide limit on the maximum number of semaphore identifiers. | |
5279 | .RE | |
5280 | .TP | |
5281 | .I /proc/sys/kernel/sg\-big\-buff | |
5282 | This file | |
5283 | shows the size of the generic SCSI device (sg) buffer. | |
5284 | You can't tune it just yet, but you could change it at | |
5285 | compile time by editing | |
5286 | .I include/scsi/sg.h | |
5287 | and changing | |
5288 | the value of | |
5289 | .BR SG_BIG_BUFF . | |
5290 | However, there shouldn't be any reason to change this value. | |
5291 | .TP | |
5292 | .IR /proc/sys/kernel/shm_rmid_forced " (since Linux 3.1)" | |
5293 | .\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53 | |
5294 | .\" See also Documentation/sysctl/kernel.txt | |
5295 | If this file is set to 1, all System V shared memory segments will | |
5296 | be marked for destruction as soon as the number of attached processes | |
5297 | falls to zero; | |
5298 | in other words, it is no longer possible to create shared memory segments | |
5299 | that exist independently of any attached process. | |
5300 | .IP | |
5301 | The effect is as though a | |
5302 | .BR shmctl (2) | |
5303 | .B IPC_RMID | |
5304 | is performed on all existing segments as well as all segments | |
5305 | created in the future (until this file is reset to 0). | |
5306 | Note that existing segments that are attached to no process will be | |
5307 | immediately destroyed when this file is set to 1. | |
5308 | Setting this option will also destroy segments that were created, | |
5309 | but never attached, | |
5310 | upon termination of the process that created the segment with | |
5311 | .BR shmget (2). | |
5312 | .IP | |
5313 | Setting this file to 1 provides a way of ensuring that | |
5314 | all System V shared memory segments are counted against the | |
5315 | resource usage and resource limits (see the description of | |
5316 | .B RLIMIT_AS | |
5317 | in | |
5318 | .BR getrlimit (2)) | |
5319 | of at least one process. | |
5320 | .IP | |
5321 | Because setting this file to 1 produces behavior that is nonstandard | |
5322 | and could also break existing applications, | |
5323 | the default value in this file is 0. | |
5324 | Set this file to 1 only if you have a good understanding | |
5325 | of the semantics of the applications using | |
5326 | System V shared memory on your system. | |
5327 | .TP | |
5328 | .IR /proc/sys/kernel/shmall " (since Linux 2.2)" | |
5329 | This file | |
5330 | contains the system-wide limit on the total number of pages of | |
5331 | System V shared memory. | |
5332 | .TP | |
5333 | .IR /proc/sys/kernel/shmmax " (since Linux 2.2)" | |
5334 | This file | |
5335 | can be used to query and set the run-time limit | |
5336 | on the maximum (System V IPC) shared memory segment size that can be | |
5337 | created. | |
5338 | Shared memory segments up to 1 GB are now supported in the | |
5339 | kernel. | |
5340 | This value defaults to | |
5341 | .BR SHMMAX . | |
5342 | .TP | |
5343 | .IR /proc/sys/kernel/shmmni " (since Linux 2.4)" | |
5344 | This file | |
5345 | specifies the system-wide maximum number of System V shared memory | |
5346 | segments that can be created. | |
5347 | .TP | |
5348 | .IR /proc/sys/kernel/sysctl_writes_strict " (since Linux 3.16)" | |
5349 | .\" commit f88083005ab319abba5d0b2e4e997558245493c8 | |
5350 | .\" commit 2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92 | |
5351 | .\" commit f4aacea2f5d1a5f7e3154e967d70cf3f711bcd61 | |
5352 | .\" commit 24fe831c17ab8149413874f2fd4e5c8a41fcd294 | |
5353 | The value in this file determines how the file offset affects | |
5354 | the behavior of updating entries in files under | |
5355 | .IR /proc/sys . | |
5356 | The file has three possible values: | |
5357 | .RS | |
5358 | .TP 4 | |
5359 | \-1 | |
5360 | This provides legacy handling, with no printk warnings. | |
5361 | Each | |
5362 | .BR write (2) | |
5363 | must fully contain the value to be written, | |
5364 | and multiple writes on the same file descriptor | |
5365 | will overwrite the entire value, regardless of the file position. | |
5366 | .TP | |
5367 | 0 | |
5368 | (default) This provides the same behavior as for \-1, | |
5369 | but printk warnings are written for processes that | |
5370 | perform writes when the file offset is not 0. | |
5371 | .TP | |
5372 | 1 | |
5373 | Respect the file offset when writing strings into | |
5374 | .I /proc/sys | |
5375 | files. | |
5376 | Multiple writes will | |
5377 | .I append | |
5378 | to the value buffer. | |
5379 | Anything written beyond the maximum length | |
5380 | of the value buffer will be ignored. | |
5381 | Writes to numeric | |
5382 | .I /proc/sys | |
5383 | entries must always be at file offset 0 and the value must be | |
5384 | fully contained in the buffer provided to | |
5385 | .BR write (2). | |
5386 | .\" FIXME . | |
5387 | .\" With /proc/sys/kernel/sysctl_writes_strict==1, writes at an | |
5388 | .\" offset other than 0 do not generate an error. Instead, the | |
5389 | .\" write() succeeds, but the file is left unmodified. | |
5390 | .\" This is surprising. The behavior may change in the future. | |
5391 | .\" See thread.gmane.org/gmane.linux.man/9197 | |
5392 | .\" From: Michael Kerrisk (man-pages <mtk.manpages@...> | |
5393 | .\" Subject: sysctl_writes_strict documentation + an oddity? | |
5394 | .\" Newsgroups: gmane.linux.man, gmane.linux.kernel | |
5395 | .\" Date: 2015-05-09 08:54:11 GMT | |
5396 | .RE | |
5397 | .TP | |
5398 | .I /proc/sys/kernel/sysrq | |
5399 | This file controls the functions allowed to be invoked by the SysRq key. | |
5400 | By default, | |
5401 | the file contains 1 meaning that every possible SysRq request is allowed | |
5402 | (in older kernel versions, SysRq was disabled by default, | |
5403 | and you were required to specifically enable it at run-time, | |
5404 | but this is not the case any more). | |
5405 | Possible values in this file are: | |
5406 | .RS | |
5407 | .TP 5 | |
5408 | 0 | |
5409 | Disable sysrq completely | |
5410 | .TP | |
5411 | 1 | |
5412 | Enable all functions of sysrq | |
5413 | .TP | |
5414 | > 1 | |
5415 | Bit mask of allowed sysrq functions, as follows: | |
5416 | .PD 0 | |
5417 | .RS | |
5418 | .TP 5 | |
5419 | \ \ 2 | |
5420 | Enable control of console logging level | |
5421 | .TP | |
5422 | \ \ 4 | |
5423 | Enable control of keyboard (SAK, unraw) | |
5424 | .TP | |
5425 | \ \ 8 | |
5426 | Enable debugging dumps of processes etc. | |
5427 | .TP | |
5428 | \ 16 | |
5429 | Enable sync command | |
5430 | .TP | |
5431 | \ 32 | |
5432 | Enable remount read-only | |
5433 | .TP | |
5434 | \ 64 | |
5435 | Enable signaling of processes (term, kill, oom-kill) | |
5436 | .TP | |
5437 | 128 | |
5438 | Allow reboot/poweroff | |
5439 | .TP | |
5440 | 256 | |
5441 | Allow nicing of all real-time tasks | |
5442 | .RE | |
5443 | .PD | |
5444 | .RE | |
5445 | .IP | |
5446 | This file is present only if the | |
5447 | .B CONFIG_MAGIC_SYSRQ | |
5448 | kernel configuration option is enabled. | |
5449 | For further details see the Linux kernel source file | |
5450 | .I Documentation/admin\-guide/sysrq.rst | |
5451 | .\" commit 9d85025b0418163fae079c9ba8f8445212de8568 | |
5452 | (or | |
5453 | .I Documentation/sysrq.txt | |
5454 | before Linux 4.10). | |
5455 | .TP | |
5456 | .I /proc/sys/kernel/version | |
5457 | This file contains a string such as: | |
5458 | .IP | |
5459 | #5 Wed Feb 25 21:49:24 MET 1998 | |
5460 | .IP | |
5461 | The "#5" means that | |
5462 | this is the fifth kernel built from this source base and the | |
5463 | date following it indicates the time the kernel was built. | |
5464 | .TP | |
5465 | .IR /proc/sys/kernel/threads\-max " (since Linux 2.3.11)" | |
5466 | .\" The following is based on Documentation/sysctl/kernel.txt | |
5467 | This file specifies the system-wide limit on the number of | |
5468 | threads (tasks) that can be created on the system. | |
5469 | .IP | |
5470 | Since Linux 4.1, | |
5471 | .\" commit 230633d109e35b0a24277498e773edeb79b4a331 | |
5472 | the value that can be written to | |
5473 | .I threads\-max | |
5474 | is bounded. | |
5475 | The minimum value that can be written is 20. | |
5476 | The maximum value that can be written is given by the | |
5477 | constant | |
5478 | .B FUTEX_TID_MASK | |
5479 | (0x3fffffff). | |
5480 | If a value outside of this range is written to | |
5481 | .IR threads\-max , | |
5482 | the error | |
5483 | .B EINVAL | |
5484 | occurs. | |
5485 | .IP | |
5486 | The value written is checked against the available RAM pages. | |
5487 | If the thread structures would occupy too much (more than 1/8th) | |
5488 | of the available RAM pages, | |
5489 | .I threads\-max | |
5490 | is reduced accordingly. | |
5491 | .TP | |
5492 | .IR /proc/sys/kernel/yama/ptrace_scope " (since Linux 3.5)" | |
5493 | See | |
5494 | .BR ptrace (2). | |
5495 | .TP | |
5496 | .IR /proc/sys/kernel/zero\-paged " (PowerPC only)" | |
5497 | This file | |
5498 | contains a flag. | |
5499 | When enabled (nonzero), Linux-PPC will pre-zero pages in | |
5500 | the idle loop, possibly speeding up get_free_pages. | |
5501 | .TP | |
5502 | .I /proc/sys/net | |
5503 | This directory contains networking stuff. | |
5504 | Explanations for some of the files under this directory can be found in | |
5505 | .BR tcp (7) | |
5506 | and | |
5507 | .BR ip (7). | |
5508 | .TP | |
5509 | .I /proc/sys/net/core/bpf_jit_enable | |
5510 | See | |
5511 | .BR bpf (2). | |
5512 | .TP | |
5513 | .I /proc/sys/net/core/somaxconn | |
5514 | This file defines a ceiling value for the | |
5515 | .I backlog | |
5516 | argument of | |
5517 | .BR listen (2); | |
5518 | see the | |
5519 | .BR listen (2) | |
5520 | manual page for details. | |
5521 | .TP | |
5522 | .I /proc/sys/proc | |
5523 | This directory may be empty. | |
5524 | .TP | |
5525 | .I /proc/sys/sunrpc | |
5526 | This directory supports Sun remote procedure call for network filesystem | |
5527 | (NFS). | |
5528 | On some systems, it is not present. | |
5529 | .TP | |
5530 | .IR /proc/sys/user " (since Linux 4.9)" | |
5531 | See | |
5532 | .BR namespaces (7). | |
5533 | .TP | |
5534 | .I /proc/sys/vm | |
5535 | This directory contains files for memory management tuning, buffer, and | |
5536 | cache management. | |
5537 | .TP | |
5538 | .IR /proc/sys/vm/admin_reserve_kbytes " (since Linux 3.10)" | |
5539 | .\" commit 4eeab4f5580d11bffedc697684b91b0bca0d5009 | |
5540 | This file defines the amount of free memory (in KiB) on the system that | |
5541 | should be reserved for users with the capability | |
5542 | .BR CAP_SYS_ADMIN . | |
5543 | .IP | |
5544 | The default value in this file is the minimum of [3% of free pages, 8MiB] | |
5545 | expressed as KiB. | |
5546 | The default is intended to provide enough for the superuser | |
5547 | to log in and kill a process, if necessary, | |
5548 | under the default overcommit 'guess' mode (i.e., 0 in | |
5549 | .IR /proc/sys/vm/overcommit_memory ). | |
5550 | .IP | |
5551 | Systems running in "overcommit never" mode (i.e., 2 in | |
5552 | .IR /proc/sys/vm/overcommit_memory ) | |
5553 | should increase the value in this file to account | |
5554 | for the full virtual memory size of the programs used to recover (e.g., | |
5555 | .BR login (1) | |
5556 | .BR ssh (1), | |
5557 | and | |
5558 | .BR top (1)) | |
5559 | Otherwise, the superuser may not be able to log in to recover the system. | |
5560 | For example, on x86-64 a suitable value is 131072 (128MiB reserved). | |
5561 | .IP | |
5562 | Changing the value in this file takes effect whenever | |
5563 | an application requests memory. | |
5564 | .TP | |
5565 | .IR /proc/sys/vm/compact_memory " (since Linux 2.6.35)" | |
5566 | When 1 is written to this file, all zones are compacted such that free | |
5567 | memory is available in contiguous blocks where possible. | |
5568 | The effect of this action can be seen by examining | |
5569 | .IR /proc/buddyinfo . | |
5570 | .IP | |
5571 | Present only if the kernel was configured with | |
5572 | .BR CONFIG_COMPACTION . | |
5573 | .TP | |
5574 | .IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)" | |
5575 | Writing to this file causes the kernel to drop clean caches, dentries, and | |
5576 | inodes from memory, causing that memory to become free. | |
5577 | This can be useful for memory management testing and | |
5578 | performing reproducible filesystem benchmarks. | |
5579 | Because writing to this file causes the benefits of caching to be lost, | |
5580 | it can degrade overall system performance. | |
5581 | .IP | |
5582 | To free pagecache, use: | |
5583 | .IP | |
5584 | echo 1 > /proc/sys/vm/drop_caches | |
5585 | .IP | |
5586 | To free dentries and inodes, use: | |
5587 | .IP | |
5588 | echo 2 > /proc/sys/vm/drop_caches | |
5589 | .IP | |
5590 | To free pagecache, dentries, and inodes, use: | |
5591 | .IP | |
5592 | echo 3 > /proc/sys/vm/drop_caches | |
5593 | .IP | |
5594 | Because writing to this file is a nondestructive operation and dirty objects | |
5595 | are not freeable, the | |
5596 | user should run | |
5597 | .BR sync (1) | |
5598 | first. | |
5599 | .TP | |
5600 | .IR /proc/sys/vm/sysctl_hugetlb_shm_group " (since Linux 2.6.7)" | |
5601 | This writable file contains a group ID that is allowed | |
5602 | to allocate memory using huge pages. | |
5603 | If a process has a filesystem group ID or any supplementary group ID that | |
5604 | matches this group ID, | |
5605 | then it can make huge-page allocations without holding the | |
5606 | .BR CAP_IPC_LOCK | |
5607 | capability; see | |
5608 | .BR memfd_create (2), | |
5609 | .BR mmap (2), | |
5610 | and | |
5611 | .BR shmget (2). | |
5612 | .TP | |
5613 | .IR /proc/sys/vm/legacy_va_layout " (since Linux 2.6.9)" | |
5614 | .\" The following is from Documentation/filesystems/proc.txt | |
5615 | If nonzero, this disables the new 32-bit memory-mapping layout; | |
5616 | the kernel will use the legacy (2.4) layout for all processes. | |
5617 | .TP | |
5618 | .IR /proc/sys/vm/memory_failure_early_kill " (since Linux 2.6.32)" | |
5619 | .\" The following is based on the text in Documentation/sysctl/vm.txt | |
5620 | Control how to kill processes when an uncorrected memory error | |
5621 | (typically a 2-bit error in a memory module) | |
5622 | that cannot be handled by the kernel | |
5623 | is detected in the background by hardware. | |
5624 | In some cases (like the page still having a valid copy on disk), | |
5625 | the kernel will handle the failure | |
5626 | transparently without affecting any applications. | |
5627 | But if there is no other up-to-date copy of the data, | |
5628 | it will kill processes to prevent any data corruptions from propagating. | |
5629 | .IP | |
5630 | The file has one of the following values: | |
5631 | .RS | |
5632 | .IP 1: 4 | |
5633 | Kill all processes that have the corrupted-and-not-reloadable page mapped | |
5634 | as soon as the corruption is detected. | |
5635 | Note that this is not supported for a few types of pages, | |
5636 | such as kernel internally | |
5637 | allocated data or the swap cache, but works for the majority of user pages. | |
5638 | .IP 0: 4 | |
5639 | Unmap the corrupted page from all processes and kill a process | |
5640 | only if it tries to access the page. | |
5641 | .RE | |
5642 | .IP | |
5643 | The kill is performed using a | |
5644 | .B SIGBUS | |
5645 | signal with | |
5646 | .I si_code | |
5647 | set to | |
5648 | .BR BUS_MCEERR_AO . | |
5649 | Processes can handle this if they want to; see | |
5650 | .BR sigaction (2) | |
5651 | for more details. | |
5652 | .IP | |
5653 | This feature is active only on architectures/platforms with advanced machine | |
5654 | check handling and depends on the hardware capabilities. | |
5655 | .IP | |
5656 | Applications can override the | |
5657 | .I memory_failure_early_kill | |
5658 | setting individually with the | |
5659 | .BR prctl (2) | |
5660 | .B PR_MCE_KILL | |
5661 | operation. | |
5662 | .IP | |
5663 | Present only if the kernel was configured with | |
5664 | .BR CONFIG_MEMORY_FAILURE . | |
5665 | .TP | |
5666 | .IR /proc/sys/vm/memory_failure_recovery " (since Linux 2.6.32)" | |
5667 | .\" The following is based on the text in Documentation/sysctl/vm.txt | |
5668 | Enable memory failure recovery (when supported by the platform). | |
5669 | .RS | |
5670 | .IP 1: 4 | |
5671 | Attempt recovery. | |
5672 | .IP 0: 4 | |
5673 | Always panic on a memory failure. | |
5674 | .RE | |
5675 | .IP | |
5676 | Present only if the kernel was configured with | |
5677 | .BR CONFIG_MEMORY_FAILURE . | |
5678 | .TP | |
5679 | .IR /proc/sys/vm/oom_dump_tasks " (since Linux 2.6.25)" | |
5680 | .\" The following is from Documentation/sysctl/vm.txt | |
5681 | Enables a system-wide task dump (excluding kernel threads) to be | |
5682 | produced when the kernel performs an OOM-killing. | |
5683 | The dump includes the following information | |
5684 | for each task (thread, process): | |
5685 | thread ID, real user ID, thread group ID (process ID), | |
5686 | virtual memory size, resident set size, | |
5687 | the CPU that the task is scheduled on, | |
5688 | oom_adj score (see the description of | |
5689 | .IR /proc/[pid]/oom_adj ), | |
5690 | and command name. | |
5691 | This is helpful to determine why the OOM-killer was invoked | |
5692 | and to identify the rogue task that caused it. | |
5693 | .IP | |
5694 | If this contains the value zero, this information is suppressed. | |
5695 | On very large systems with thousands of tasks, | |
5696 | it may not be feasible to dump the memory state information for each one. | |
5697 | Such systems should not be forced to incur a performance penalty in | |
5698 | OOM situations when the information may not be desired. | |
5699 | .IP | |
5700 | If this is set to nonzero, this information is shown whenever the | |
5701 | OOM-killer actually kills a memory-hogging task. | |
5702 | .IP | |
5703 | The default value is 0. | |
5704 | .TP | |
5705 | .IR /proc/sys/vm/oom_kill_allocating_task " (since Linux 2.6.24)" | |
5706 | .\" The following is from Documentation/sysctl/vm.txt | |
5707 | This enables or disables killing the OOM-triggering task in | |
5708 | out-of-memory situations. | |
5709 | .IP | |
5710 | If this is set to zero, the OOM-killer will scan through the entire | |
5711 | tasklist and select a task based on heuristics to kill. | |
5712 | This normally selects a rogue memory-hogging task that | |
5713 | frees up a large amount of memory when killed. | |
5714 | .IP | |
5715 | If this is set to nonzero, the OOM-killer simply kills the task that | |
5716 | triggered the out-of-memory condition. | |
5717 | This avoids a possibly expensive tasklist scan. | |
5718 | .IP | |
5719 | If | |
5720 | .I /proc/sys/vm/panic_on_oom | |
5721 | is nonzero, it takes precedence over whatever value is used in | |
5722 | .IR /proc/sys/vm/oom_kill_allocating_task . | |
5723 | .IP | |
5724 | The default value is 0. | |
5725 | .TP | |
5726 | .IR /proc/sys/vm/overcommit_kbytes " (since Linux 3.14)" | |
5727 | .\" commit 49f0ce5f92321cdcf741e35f385669a421013cb7 | |
5728 | This writable file provides an alternative to | |
5729 | .IR /proc/sys/vm/overcommit_ratio | |
5730 | for controlling the | |
5731 | .I CommitLimit | |
5732 | when | |
5733 | .IR /proc/sys/vm/overcommit_memory | |
5734 | has the value 2. | |
5735 | It allows the amount of memory overcommitting to be specified as | |
5736 | an absolute value (in kB), | |
5737 | rather than as a percentage, as is done with | |
5738 | .IR overcommit_ratio . | |
5739 | This allows for finer-grained control of | |
5740 | .IR CommitLimit | |
5741 | on systems with extremely large memory sizes. | |
5742 | .IP | |
5743 | Only one of | |
5744 | .IR overcommit_kbytes | |
5745 | or | |
5746 | .IR overcommit_ratio | |
5747 | can have an effect: | |
5748 | if | |
5749 | .IR overcommit_kbytes | |
5750 | has a nonzero value, then it is used to calculate | |
5751 | .IR CommitLimit , | |
5752 | otherwise | |
5753 | .IR overcommit_ratio | |
5754 | is used. | |
5755 | Writing a value to either of these files causes the | |
5756 | value in the other file to be set to zero. | |
5757 | .TP | |
5758 | .I /proc/sys/vm/overcommit_memory | |
5759 | This file contains the kernel virtual memory accounting mode. | |
5760 | Values are: | |
5761 | .RS | |
5762 | .IP | |
5763 | 0: heuristic overcommit (this is the default) | |
5764 | .br | |
5765 | 1: always overcommit, never check | |
5766 | .br | |
5767 | 2: always check, never overcommit | |
5768 | .RE | |
5769 | .IP | |
5770 | In mode 0, calls of | |
5771 | .BR mmap (2) | |
5772 | with | |
5773 | .B MAP_NORESERVE | |
5774 | are not checked, and the default check is very weak, | |
5775 | leading to the risk of getting a process "OOM-killed". | |
5776 | .IP | |
5777 | In mode 1, the kernel pretends there is always enough memory, | |
5778 | until memory actually runs out. | |
5779 | One use case for this mode is scientific computing applications | |
5780 | that employ large sparse arrays. | |
5781 | In Linux kernel versions before 2.6.0, any nonzero value implies mode 1. | |
5782 | .IP | |
5783 | In mode 2 (available since Linux 2.6), the total virtual address space | |
5784 | that can be allocated | |
5785 | .RI ( CommitLimit | |
5786 | in | |
5787 | .IR /proc/meminfo ) | |
5788 | is calculated as | |
5789 | .IP | |
5790 | CommitLimit = (total_RAM \- total_huge_TLB) * | |
5791 | overcommit_ratio / 100 + total_swap | |
5792 | .IP | |
5793 | where: | |
5794 | .RS 12 | |
5795 | .IP * 3 | |
5796 | .I total_RAM | |
5797 | is the total amount of RAM on the system; | |
5798 | .IP * | |
5799 | .I total_huge_TLB | |
5800 | is the amount of memory set aside for huge pages; | |
5801 | .IP * | |
5802 | .I overcommit_ratio | |
5803 | is the value in | |
5804 | .IR /proc/sys/vm/overcommit_ratio ; | |
5805 | and | |
5806 | .IP * | |
5807 | .I total_swap | |
5808 | is the amount of swap space. | |
5809 | .RE | |
5810 | .IP | |
5811 | For example, on a system with 16 GB of physical RAM, 16 GB | |
5812 | of swap, no space dedicated to huge pages, and an | |
5813 | .I overcommit_ratio | |
5814 | of 50, this formula yields a | |
5815 | .I CommitLimit | |
5816 | of 24 GB. | |
5817 | .IP | |
5818 | Since Linux 3.14, if the value in | |
5819 | .I /proc/sys/vm/overcommit_kbytes | |
5820 | is nonzero, then | |
5821 | .I CommitLimit | |
5822 | is instead calculated as: | |
5823 | .IP | |
5824 | CommitLimit = overcommit_kbytes + total_swap | |
5825 | .IP | |
5826 | See also the description of | |
5827 | .IR /proc/sys/vm/admin_reserve_kbytes | |
5828 | and | |
5829 | .IR /proc/sys/vm/user_reserve_kbytes . | |
5830 | .TP | |
5831 | .IR /proc/sys/vm/overcommit_ratio " (since Linux 2.6.0)" | |
5832 | This writable file defines a percentage by which memory | |
5833 | can be overcommitted. | |
5834 | The default value in the file is 50. | |
5835 | See the description of | |
5836 | .IR /proc/sys/vm/overcommit_memory . | |
5837 | .TP | |
5838 | .IR /proc/sys/vm/panic_on_oom " (since Linux 2.6.18)" | |
5839 | .\" The following is adapted from Documentation/sysctl/vm.txt | |
5840 | This enables or disables a kernel panic in | |
5841 | an out-of-memory situation. | |
5842 | .IP | |
5843 | If this file is set to the value 0, | |
5844 | the kernel's OOM-killer will kill some rogue process. | |
5845 | Usually, the OOM-killer is able to kill a rogue process and the | |
5846 | system will survive. | |
5847 | .IP | |
5848 | If this file is set to the value 1, | |
5849 | then the kernel normally panics when out-of-memory happens. | |
5850 | However, if a process limits allocations to certain nodes | |
5851 | using memory policies | |
5852 | .RB ( mbind (2) | |
5853 | .BR MPOL_BIND ) | |
5854 | or cpusets | |
5855 | .RB ( cpuset (7)) | |
5856 | and those nodes reach memory exhaustion status, | |
5857 | one process may be killed by the OOM-killer. | |
5858 | No panic occurs in this case: | |
5859 | because other nodes' memory may be free, | |
5860 | this means the system as a whole may not have reached | |
5861 | an out-of-memory situation yet. | |
5862 | .IP | |
5863 | If this file is set to the value 2, | |
5864 | the kernel always panics when an out-of-memory condition occurs. | |
5865 | .IP | |
5866 | The default value is 0. | |
5867 | 1 and 2 are for failover of clustering. | |
5868 | Select either according to your policy of failover. | |
5869 | .TP | |
5870 | .IR /proc/sys/vm/swappiness | |
5871 | .\" The following is from Documentation/sysctl/vm.txt | |
5872 | The value in this file controls how aggressively the kernel will swap | |
5873 | memory pages. | |
5874 | Higher values increase aggressiveness, lower values | |
5875 | decrease aggressiveness. | |
5876 | The default value is 60. | |
5877 | .TP | |
5878 | .IR /proc/sys/vm/user_reserve_kbytes " (since Linux 3.10)" | |
5879 | .\" commit c9b1d0981fcce3d9976d7b7a56e4e0503bc610dd | |
5880 | Specifies an amount of memory (in KiB) to reserve for user processes. | |
5881 | This is intended to prevent a user from starting a single memory hogging | |
5882 | process, such that they cannot recover (kill the hog). | |
5883 | The value in this file has an effect only when | |
5884 | .IR /proc/sys/vm/overcommit_memory | |
5885 | is set to 2 ("overcommit never" mode). | |
5886 | In this case, the system reserves an amount of memory that is the minimum | |
5887 | of [3% of current process size, | |
5888 | .IR user_reserve_kbytes ]. | |
5889 | .IP | |
5890 | The default value in this file is the minimum of [3% of free pages, 128MiB] | |
5891 | expressed as KiB. | |
5892 | .IP | |
5893 | If the value in this file is set to zero, | |
5894 | then a user will be allowed to allocate all free memory with a single process | |
5895 | (minus the amount reserved by | |
5896 | .IR /proc/sys/vm/admin_reserve_kbytes ). | |
5897 | Any subsequent attempts to execute a command will result in | |
5898 | "fork: Cannot allocate memory". | |
5899 | .IP | |
5900 | Changing the value in this file takes effect whenever | |
5901 | an application requests memory. | |
5902 | .TP | |
5903 | .IR /proc/sys/vm/unprivileged_userfaultfd " (since Linux 5.2)" | |
5904 | .\" cefdca0a86be517bc390fc4541e3674b8e7803b0 | |
5905 | This (writable) file exposes a flag that controls whether | |
5906 | unprivileged processes are allowed to employ | |
5907 | .BR userfaultfd (2). | |
5908 | If this file has the value 1, then unprivileged processes may use | |
5909 | .BR userfaultfd (2). | |
5910 | If this file has the value 0, then only processes that have the | |
5911 | .B CAP_SYS_PTRACE | |
5912 | capability may employ | |
5913 | .BR userfaultfd (2). | |
5914 | The default value in this file is 1. | |
5915 | .TP | |
5916 | .IR /proc/sysrq\-trigger " (since Linux 2.4.21)" | |
5917 | Writing a character to this file triggers the same SysRq function as | |
5918 | typing ALT-SysRq-<character> (see the description of | |
5919 | .IR /proc/sys/kernel/sysrq ). | |
5920 | This file is normally writable only by | |
5921 | .IR root . | |
5922 | For further details see the Linux kernel source file | |
5923 | .I Documentation/admin\-guide/sysrq.rst | |
5924 | .\" commit 9d85025b0418163fae079c9ba8f8445212de8568 | |
5925 | (or | |
5926 | .I Documentation/sysrq.txt | |
5927 | before Linux 4.10). | |
5928 | .TP | |
5929 | .I /proc/sysvipc | |
5930 | Subdirectory containing the pseudo-files | |
5931 | .IR msg ", " sem " and " shm "." | |
5932 | These files list the System V Interprocess Communication (IPC) objects | |
5933 | (respectively: message queues, semaphores, and shared memory) | |
5934 | that currently exist on the system, | |
5935 | providing similar information to that available via | |
5936 | .BR ipcs (1). | |
5937 | These files have headers and are formatted (one IPC object per line) | |
5938 | for easy understanding. | |
5939 | .BR sysvipc (7) | |
5940 | provides further background on the information shown by these files. | |
5941 | .TP | |
5942 | .IR /proc/thread\-self " (since Linux 3.17)" | |
5943 | .\" commit 0097875bd41528922fb3bb5f348c53f17e00e2fd | |
5944 | This directory refers to the thread accessing the | |
5945 | .I /proc | |
5946 | filesystem, | |
5947 | and is identical to the | |
5948 | .I /proc/self/task/[tid] | |
5949 | directory named by the process thread ID | |
5950 | .RI ( [tid] ) | |
5951 | of the same thread. | |
5952 | .TP | |
5953 | .IR /proc/timer_list " (since Linux 2.6.21)" | |
5954 | .\" commit 289f480af87e45f7a6de6ba9b4c061c2e259fe98 | |
5955 | This read-only file exposes a list of all currently pending | |
5956 | (high-resolution) timers, | |
5957 | all clock-event sources, and their parameters in a human-readable form. | |
5958 | .TP | |
5959 | .IR /proc/timer_stats " (from Linux 2.6.21 until Linux 4.10)" | |
5960 | .\" commit 82f67cd9fca8c8762c15ba7ed0d5747588c1e221 | |
5961 | .\" Date: Fri Feb 16 01:28:13 2007 -0800 | |
5962 | .\" Text largely derived from Documentation/timers/timer_stats.txt | |
5963 | .\" removed in commit dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | |
5964 | .\" Date: Wed Feb 8 11:26:59 2017 -0800 | |
5965 | This is a debugging facility to make timer (ab)use in a Linux | |
5966 | system visible to kernel and user-space developers. | |
5967 | It can be used by kernel and user-space developers to verify that | |
5968 | their code does not make undue use of timers. | |
5969 | The goal is to avoid unnecessary wakeups, | |
5970 | thereby optimizing power consumption. | |
5971 | .IP | |
5972 | If enabled in the kernel | |
5973 | .RB ( CONFIG_TIMER_STATS ), | |
5974 | but not used, | |
5975 | it has almost zero run-time overhead and a relatively small | |
5976 | data-structure overhead. | |
5977 | Even if collection is enabled at run time, overhead is low: | |
5978 | all the locking is per-CPU and lookup is hashed. | |
5979 | .IP | |
5980 | The | |
5981 | .I /proc/timer_stats | |
5982 | file is used both to control sampling facility and to read out the | |
5983 | sampled information. | |
5984 | .IP | |
5985 | The | |
5986 | .I timer_stats | |
5987 | functionality is inactive on bootup. | |
5988 | A sampling period can be started using the following command: | |
5989 | .IP | |
5990 | .in +4n | |
5991 | .EX | |
5992 | # echo 1 > /proc/timer_stats | |
5993 | .EE | |
5994 | .in | |
5995 | .IP | |
5996 | The following command stops a sampling period: | |
5997 | .IP | |
5998 | .in +4n | |
5999 | .EX | |
6000 | # echo 0 > /proc/timer_stats | |
6001 | .EE | |
6002 | .in | |
6003 | .IP | |
6004 | The statistics can be retrieved by: | |
6005 | .IP | |
6006 | .in +4n | |
6007 | .EX | |
6008 | $ cat /proc/timer_stats | |
6009 | .EE | |
6010 | .in | |
6011 | .IP | |
6012 | While sampling is enabled, each readout from | |
6013 | .I /proc/timer_stats | |
6014 | will see | |
6015 | newly updated statistics. | |
6016 | Once sampling is disabled, the sampled information | |
6017 | is kept until a new sample period is started. | |
6018 | This allows multiple readouts. | |
6019 | .IP | |
6020 | Sample output from | |
6021 | .IR /proc/timer_stats : | |
6022 | .IP | |
6023 | .in +4n | |
6024 | .EX | |
6025 | .RB $ " cat /proc/timer_stats" | |
6026 | Timer Stats Version: v0.3 | |
6027 | Sample period: 1.764 s | |
6028 | Collection: active | |
6029 | 255, 0 swapper/3 hrtimer_start_range_ns (tick_sched_timer) | |
6030 | 71, 0 swapper/1 hrtimer_start_range_ns (tick_sched_timer) | |
6031 | 58, 0 swapper/0 hrtimer_start_range_ns (tick_sched_timer) | |
6032 | 4, 1694 gnome\-shell mod_delayed_work_on (delayed_work_timer_fn) | |
6033 | 17, 7 rcu_sched rcu_gp_kthread (process_timeout) | |
6034 | \&... | |
6035 | 1, 4911 kworker/u16:0 mod_delayed_work_on (delayed_work_timer_fn) | |
6036 | 1D, 2522 kworker/0:0 queue_delayed_work_on (delayed_work_timer_fn) | |
6037 | 1029 total events, 583.333 events/sec | |
6038 | .EE | |
6039 | .in | |
6040 | .IP | |
6041 | The output columns are: | |
6042 | .RS | |
6043 | .IP * 3 | |
6044 | a count of the number of events, | |
6045 | optionally (since Linux 2.6.23) followed by the letter \(aqD\(aq | |
6046 | .\" commit c5c061b8f9726bc2c25e19dec227933a13d1e6b7 deferrable timers | |
6047 | if this is a deferrable timer; | |
6048 | .IP * | |
6049 | the PID of the process that initialized the timer; | |
6050 | .IP * | |
6051 | the name of the process that initialized the timer; | |
6052 | .IP * | |
6053 | the function where the timer was initialized; and | |
6054 | .IP * | |
6055 | (in parentheses) | |
6056 | the callback function that is associated with the timer. | |
6057 | .RE | |
6058 | .IP | |
6059 | During the Linux 4.11 development cycle, | |
6060 | this file was removed because of security concerns, | |
6061 | as it exposes information across namespaces. | |
6062 | Furthermore, it is possible to obtain | |
6063 | the same information via in-kernel tracing facilities such as ftrace. | |
6064 | .TP | |
6065 | .I /proc/tty | |
6066 | Subdirectory containing the pseudo-files and subdirectories for | |
6067 | tty drivers and line disciplines. | |
6068 | .TP | |
6069 | .I /proc/uptime | |
6070 | This file contains two numbers (values in seconds): the uptime of the | |
6071 | system (including time spent in suspend) and the amount of time spent | |
6072 | in the idle process. | |
6073 | .TP | |
6074 | .I /proc/version | |
6075 | This string identifies the kernel version that is currently running. | |
6076 | It includes the contents of | |
6077 | .IR /proc/sys/kernel/ostype , | |
6078 | .IR /proc/sys/kernel/osrelease , | |
6079 | and | |
6080 | .IR /proc/sys/kernel/version . | |
6081 | For example: | |
6082 | .IP | |
6083 | .in +4n | |
6084 | .EX | |
6085 | Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994 | |
6086 | .EE | |
6087 | .in | |
6088 | .\" FIXME 2.6.13 seems to have /proc/vmcore implemented; document this | |
6089 | .\" See Documentation/kdump/kdump.txt | |
6090 | .\" commit 666bfddbe8b8fd4fd44617d6c55193d5ac7edb29 | |
6091 | .\" Needs CONFIG_VMCORE | |
6092 | .\" | |
6093 | .TP | |
6094 | .IR /proc/vmstat " (since Linux 2.6.0)" | |
6095 | This file displays various virtual memory statistics. | |
6096 | Each line of this file contains a single name-value pair, | |
6097 | delimited by white space. | |
6098 | Some lines are present only if the kernel was configured with | |
6099 | suitable options. | |
6100 | (In some cases, the options required for particular files have changed | |
6101 | across kernel versions, so they are not listed here. | |
6102 | Details can be found by consulting the kernel source code.) | |
6103 | The following fields may be present: | |
6104 | .\" FIXME We need explanations for each of the following fields... | |
6105 | .RS | |
6106 | .TP | |
6107 | .IR nr_free_pages " (since Linux 2.6.31)" | |
6108 | .\" commit d23ad42324cc4378132e51f2fc5c9ba6cbe75182 | |
6109 | .TP | |
6110 | .IR nr_alloc_batch " (since Linux 3.12)" | |
6111 | .\" commit 81c0a2bb515fd4daae8cab64352877480792b515 | |
6112 | .TP | |
6113 | .IR nr_inactive_anon " (since Linux 2.6.28)" | |
6114 | .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db | |
6115 | .TP | |
6116 | .IR nr_active_anon " (since Linux 2.6.28)" | |
6117 | .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db | |
6118 | .TP | |
6119 | .IR nr_inactive_file " (since Linux 2.6.28)" | |
6120 | .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db | |
6121 | .TP | |
6122 | .IR nr_active_file " (since Linux 2.6.28)" | |
6123 | .\" commit 4f98a2fee8acdb4ac84545df98cccecfd130f8db | |
6124 | .TP | |
6125 | .IR nr_unevictable " (since Linux 2.6.28)" | |
6126 | .\" commit 7b854121eb3e5ba0241882ff939e2c485228c9c5 | |
6127 | .TP | |
6128 | .IR nr_mlock " (since Linux 2.6.28)" | |
6129 | .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820 | |
6130 | .TP | |
6131 | .IR nr_anon_pages " (since Linux 2.6.18)" | |
6132 | .\" commit f3dbd34460ff54962d3e3244b6bcb7f5295356e6 | |
6133 | .TP | |
6134 | .IR nr_mapped " (since Linux 2.6.0)" | |
6135 | .TP | |
6136 | .IR nr_file_pages " (since Linux 2.6.18)" | |
6137 | .\" commit 347ce434d57da80fd5809c0c836f206a50999c26 | |
6138 | .TP | |
6139 | .IR nr_dirty " (since Linux 2.6.0)" | |
6140 | .TP | |
6141 | .IR nr_writeback " (since Linux 2.6.0)" | |
6142 | .TP | |
6143 | .IR nr_slab_reclaimable " (since Linux 2.6.19)" | |
6144 | .\" commit 972d1a7b140569084439a81265a0f15b74e924e0 | |
6145 | .\" Linux 2.6.0 had nr_slab | |
6146 | .TP | |
6147 | .IR nr_slab_unreclaimable " (since Linux 2.6.19)" | |
6148 | .\" commit 972d1a7b140569084439a81265a0f15b74e924e0 | |
6149 | .TP | |
6150 | .IR nr_page_table_pages " (since Linux 2.6.0)" | |
6151 | .TP | |
6152 | .IR nr_kernel_stack " (since Linux 2.6.32)" | |
6153 | .\" commit c6a7f5728a1db45d30df55a01adc130b4ab0327c | |
6154 | Amount of memory allocated to kernel stacks. | |
6155 | .TP | |
6156 | .IR nr_unstable " (since Linux 2.6.0)" | |
6157 | .TP | |
6158 | .IR nr_bounce " (since Linux 2.6.12)" | |
6159 | .\" commit edfbe2b0038723e5699ab22695ccd62b5542a5c1 | |
6160 | .TP | |
6161 | .IR nr_vmscan_write " (since Linux 2.6.19)" | |
6162 | .\" commit e129b5c23c2b471d47f1c5d2b8b193fc2034af43 | |
6163 | .TP | |
6164 | .IR nr_vmscan_immediate_reclaim " (since Linux 3.2)" | |
6165 | .\" commit 49ea7eb65e7c5060807fb9312b1ad4c3eab82e2c | |
6166 | .TP | |
6167 | .IR nr_writeback_temp " (since Linux 2.6.26)" | |
6168 | .\" commit fc3ba692a4d19019387c5acaea63131f9eab05dd | |
6169 | .TP | |
6170 | .IR nr_isolated_anon " (since Linux 2.6.32)" | |
6171 | .\" commit a731286de62294b63d8ceb3c5914ac52cc17e690 | |
6172 | .TP | |
6173 | .IR nr_isolated_file " (since Linux 2.6.32)" | |
6174 | .\" commit a731286de62294b63d8ceb3c5914ac52cc17e690 | |
6175 | .TP | |
6176 | .IR nr_shmem " (since Linux 2.6.32)" | |
6177 | .\" commit 4b02108ac1b3354a22b0d83c684797692efdc395 | |
6178 | Pages used by shmem and | |
6179 | .BR tmpfs (5). | |
6180 | .TP | |
6181 | .IR nr_dirtied " (since Linux 2.6.37)" | |
6182 | .\" commit ea941f0e2a8c02ae876cd73deb4e1557248f258c | |
6183 | .TP | |
6184 | .IR nr_written " (since Linux 2.6.37)" | |
6185 | .\" commit ea941f0e2a8c02ae876cd73deb4e1557248f258c | |
6186 | .TP | |
6187 | .IR nr_pages_scanned " (since Linux 3.17)" | |
6188 | .\" commit 0d5d823ab4e608ec7b52ac4410de4cb74bbe0edd | |
6189 | .TP | |
6190 | .IR numa_hit " (since Linux 2.6.18)" | |
6191 | .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5 | |
6192 | .\" Present only if the kernel was configured with | |
6193 | .\" .BR CONFIG_NUMA . | |
6194 | .TP | |
6195 | .IR numa_miss " (since Linux 2.6.18)" | |
6196 | .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5 | |
6197 | .\" Present only if the kernel was configured with | |
6198 | .\" .BR CONFIG_NUMA . | |
6199 | .TP | |
6200 | .IR numa_foreign " (since Linux 2.6.18)" | |
6201 | .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5 | |
6202 | .\" Present only if the kernel was configured with | |
6203 | .\" .BR CONFIG_NUMA . | |
6204 | .TP | |
6205 | .IR numa_interleave " (since Linux 2.6.18)" | |
6206 | .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5 | |
6207 | .\" Present only if the kernel was configured with | |
6208 | .\" .BR CONFIG_NUMA . | |
6209 | .TP | |
6210 | .IR numa_local " (since Linux 2.6.18)" | |
6211 | .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5 | |
6212 | .\" Present only if the kernel was configured with | |
6213 | .\" .BR CONFIG_NUMA . | |
6214 | .TP | |
6215 | .IR numa_other " (since Linux 2.6.18)" | |
6216 | .\" commit ca889e6c45e0b112cb2ca9d35afc66297519b5d5 | |
6217 | .\" Present only if the kernel was configured with | |
6218 | .\" .BR CONFIG_NUMA . | |
6219 | .TP | |
6220 | .IR workingset_refault " (since Linux 3.15)" | |
6221 | .\" commit a528910e12ec7ee203095eb1711468a66b9b60b0 | |
6222 | .\" Present only if the kernel was configured with | |
6223 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6224 | .TP | |
6225 | .IR workingset_activate " (since Linux 3.15)" | |
6226 | .\" commit a528910e12ec7ee203095eb1711468a66b9b60b0 | |
6227 | .\" Present only if the kernel was configured with | |
6228 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6229 | .TP | |
6230 | .IR workingset_nodereclaim " (since Linux 3.15)" | |
6231 | .\" commit 449dd6984d0e47643c04c807f609dd56d48d5bcc | |
6232 | .\" Present only if the kernel was configured with | |
6233 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6234 | .TP | |
6235 | .IR nr_anon_transparent_hugepages " (since Linux 2.6.38)" | |
6236 | .\" Present only if the kernel was configured with | |
6237 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6238 | .TP | |
6239 | .IR nr_free_cma " (since Linux 3.7)" | |
6240 | .\" commit d1ce749a0db12202b711d1aba1d29e823034648d | |
6241 | Number of free CMA (Contiguous Memory Allocator) pages. | |
6242 | .\" Present only if the kernel was configured with | |
6243 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6244 | .TP | |
6245 | .IR nr_dirty_threshold " (since Linux 2.6.37)" | |
6246 | .\" commit 79da826aee6a10902ef411bc65864bd02102fa83 | |
6247 | .\" Present only if the kernel was configured with | |
6248 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6249 | .TP | |
6250 | .IR nr_dirty_background_threshold " (since Linux 2.6.37)" | |
6251 | .\" commit 79da826aee6a10902ef411bc65864bd02102fa83 | |
6252 | .\" Present only if the kernel was configured with | |
6253 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6254 | .TP | |
6255 | .IR pgpgin " (since Linux 2.6.0)" | |
6256 | .\" Present only if the kernel was configured with | |
6257 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6258 | .TP | |
6259 | .IR pgpgout " (since Linux 2.6.0)" | |
6260 | .\" Present only if the kernel was configured with | |
6261 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6262 | .TP | |
6263 | .IR pswpin " (since Linux 2.6.0)" | |
6264 | .\" Present only if the kernel was configured with | |
6265 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6266 | .TP | |
6267 | .IR pswpout " (since Linux 2.6.0)" | |
6268 | .\" Present only if the kernel was configured with | |
6269 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6270 | .TP | |
6271 | .IR pgalloc_dma " (since Linux 2.6.5)" | |
6272 | .\" Linux 2.6.0 had pgalloc | |
6273 | .\" Present only if the kernel was configured with | |
6274 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6275 | .TP | |
6276 | .IR pgalloc_dma32 " (since Linux 2.6.16)" | |
6277 | .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e | |
6278 | .\" Present only if the kernel was configured with | |
6279 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6280 | .TP | |
6281 | .IR pgalloc_normal " (since Linux 2.6.5)" | |
6282 | .\" Present only if the kernel was configured with | |
6283 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6284 | .TP | |
6285 | .IR pgalloc_high " (since Linux 2.6.5)" | |
6286 | .\" Present only if the kernel was configured with | |
6287 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6288 | .\" and | |
6289 | .\" .BR CONFIG_HIGHMEM . | |
6290 | .TP | |
6291 | .IR pgalloc_movable " (since Linux 2.6.23)" | |
6292 | .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf | |
6293 | .\" Present only if the kernel was configured with | |
6294 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6295 | .TP | |
6296 | .IR pgfree " (since Linux 2.6.0)" | |
6297 | .\" Present only if the kernel was configured with | |
6298 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6299 | .TP | |
6300 | .IR pgactivate " (since Linux 2.6.0)" | |
6301 | .\" Present only if the kernel was configured with | |
6302 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6303 | .TP | |
6304 | .IR pgdeactivate " (since Linux 2.6.0)" | |
6305 | .\" Present only if the kernel was configured with | |
6306 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6307 | .TP | |
6308 | .IR pgfault " (since Linux 2.6.0)" | |
6309 | .\" Present only if the kernel was configured with | |
6310 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6311 | .TP | |
6312 | .IR pgmajfault " (since Linux 2.6.0)" | |
6313 | .\" Present only if the kernel was configured with | |
6314 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6315 | .TP | |
6316 | .IR pgrefill_dma " (since Linux 2.6.5)" | |
6317 | .\" Linux 2.6.0 had pgrefill | |
6318 | .\" Present only if the kernel was configured with | |
6319 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6320 | .TP | |
6321 | .IR pgrefill_dma32 " (since Linux 2.6.16)" | |
6322 | .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e | |
6323 | .\" Present only if the kernel was configured with | |
6324 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6325 | .TP | |
6326 | .IR pgrefill_normal " (since Linux 2.6.5)" | |
6327 | .\" Present only if the kernel was configured with | |
6328 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6329 | .TP | |
6330 | .IR pgrefill_high " (since Linux 2.6.5)" | |
6331 | .\" Present only if the kernel was configured with | |
6332 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6333 | .\" and | |
6334 | .\" .BR CONFIG_HIGHMEM . | |
6335 | .TP | |
6336 | .IR pgrefill_movable " (since Linux 2.6.23)" | |
6337 | .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf | |
6338 | .\" Present only if the kernel was configured with | |
6339 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6340 | .\" Formerly there were | |
6341 | .\" pgsteal_high | |
6342 | .\" pgsteal_normal | |
6343 | .\" pgsteal_dma32 | |
6344 | .\" pgsteal_dma | |
6345 | .\" These were split out into pgsteal_kswapd* and pgsteal_direct* | |
6346 | .\" in commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6347 | .TP | |
6348 | .IR pgsteal_kswapd_dma " (since Linux 3.4)" | |
6349 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6350 | .\" Linux 2.6.0 had pgsteal | |
6351 | .\" Present only if the kernel was configured with | |
6352 | .\" .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6353 | .TP | |
6354 | .IR pgsteal_kswapd_dma32 " (since Linux 3.4)" | |
6355 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6356 | .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e | |
6357 | .\" Present only if the kernel was configured with | |
6358 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6359 | .TP | |
6360 | .IR pgsteal_kswapd_normal " (since Linux 3.4)" | |
6361 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6362 | .\" Present only if the kernel was configured with | |
6363 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6364 | .TP | |
6365 | .IR pgsteal_kswapd_high " (since Linux 3.4)" | |
6366 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6367 | .\" Present only if the kernel was configured with | |
6368 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6369 | .\" and | |
6370 | .\" .BR CONFIG_HIGHMEM . | |
6371 | .TP | |
6372 | .IR pgsteal_kswapd_movable " (since Linux 3.4)" | |
6373 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6374 | .\" Present only if the kernel was configured with | |
6375 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6376 | .TP | |
6377 | .IR pgsteal_direct_dma | |
6378 | .\" Present only if the kernel was configured with | |
6379 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6380 | .TP | |
6381 | .IR pgsteal_direct_dma32 " (since Linux 3.4)" | |
6382 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6383 | .\" Present only if the kernel was configured with | |
6384 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6385 | .TP | |
6386 | .IR pgsteal_direct_normal " (since Linux 3.4)" | |
6387 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6388 | .\" Present only if the kernel was configured with | |
6389 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6390 | .TP | |
6391 | .IR pgsteal_direct_high " (since Linux 3.4)" | |
6392 | .\" commit 904249aa68010c8e223263c922fcbb840a3f42e4 | |
6393 | .\" Present only if the kernel was configured with | |
6394 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6395 | .\" and | |
6396 | .\" .BR CONFIG_HIGHMEM . | |
6397 | .TP | |
6398 | .IR pgsteal_direct_movable " (since Linux 2.6.23)" | |
6399 | .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf | |
6400 | .\" Present only if the kernel was configured with | |
6401 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6402 | .TP | |
6403 | .IR pgscan_kswapd_dma | |
6404 | .\" Linux 2.6.0 had pgscan | |
6405 | .\" Present only if the kernel was configured with | |
6406 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6407 | .TP | |
6408 | .IR pgscan_kswapd_dma32 " (since Linux 2.6.16)" | |
6409 | .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e | |
6410 | .\" Present only if the kernel was configured with | |
6411 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6412 | .TP | |
6413 | .IR pgscan_kswapd_normal " (since Linux 2.6.5)" | |
6414 | .\" Present only if the kernel was configured with | |
6415 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6416 | .TP | |
6417 | .IR pgscan_kswapd_high | |
6418 | .\" Present only if the kernel was configured with | |
6419 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6420 | .\" and | |
6421 | .\" .BR CONFIG_HIGHMEM . | |
6422 | .TP | |
6423 | .IR pgscan_kswapd_movable " (since Linux 2.6.23)" | |
6424 | .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf | |
6425 | .\" Present only if the kernel was configured with | |
6426 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6427 | .TP | |
6428 | .IR pgscan_direct_dma | |
6429 | .\" Present only if the kernel was configured with | |
6430 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6431 | .TP | |
6432 | .IR pgscan_direct_dma32 " (since Linux 2.6.16)" | |
6433 | .\" commit 9328b8faae922e52073785ed6c1eaa8565648a0e | |
6434 | .\" Present only if the kernel was configured with | |
6435 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6436 | .TP | |
6437 | .IR pgscan_direct_normal | |
6438 | .\" Present only if the kernel was configured with | |
6439 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6440 | .TP | |
6441 | .IR pgscan_direct_high | |
6442 | .\" Present only if the kernel was configured with | |
6443 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6444 | .\" and | |
6445 | .\" .BR CONFIG_HIGHMEM . | |
6446 | .TP | |
6447 | .IR pgscan_direct_movable " (since Linux 2.6.23)" | |
6448 | .\" commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf | |
6449 | .\" Present only if the kernel was configured with | |
6450 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6451 | .TP | |
6452 | .IR pgscan_direct_throttle " (since Linux 3.6)" | |
6453 | .\" commit 68243e76ee343d63c6cf76978588a885951e2818 | |
6454 | .\" Present only if the kernel was configured with | |
6455 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6456 | .TP | |
6457 | .IR zone_reclaim_failed " (since linux 2.6.31)" | |
6458 | .\" commit 24cf72518c79cdcda486ed26074ff8151291cf65 | |
6459 | .\" Present only if the kernel was configured with | |
6460 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6461 | .\" and | |
6462 | .\" .BR CONFIG_NUMA . | |
6463 | .TP | |
6464 | .IR pginodesteal " (since linux 2.6.0)" | |
6465 | .\" Present only if the kernel was configured with | |
6466 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6467 | .TP | |
6468 | .IR slabs_scanned " (since linux 2.6.5)" | |
6469 | .\" Present only if the kernel was configured with | |
6470 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6471 | .TP | |
6472 | .IR kswapd_inodesteal " (since linux 2.6.0)" | |
6473 | .\" Present only if the kernel was configured with | |
6474 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6475 | .TP | |
6476 | .IR kswapd_low_wmark_hit_quickly " (since 2.6.33)" | |
6477 | .\" commit bb3ab596832b920c703d1aea1ce76d69c0f71fb7 | |
6478 | .\" Present only if the kernel was configured with | |
6479 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6480 | .TP | |
6481 | .IR kswapd_high_wmark_hit_quickly " (since 2.6.33)" | |
6482 | .\" commit bb3ab596832b920c703d1aea1ce76d69c0f71fb7 | |
6483 | .\" Present only if the kernel was configured with | |
6484 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6485 | .TP | |
6486 | .IR pageoutrun " (since Linux 2.6.0)" | |
6487 | .\" Present only if the kernel was configured with | |
6488 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6489 | .TP | |
6490 | .IR allocstall " (since Linux 2.6.0)" | |
6491 | .\" Present only if the kernel was configured with | |
6492 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6493 | .TP | |
6494 | .IR pgrotated " (since Linux 2.6.0)" | |
6495 | .\" Present only if the kernel was configured with | |
6496 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6497 | .TP | |
6498 | .IR drop_pagecache " (since Linux 3.15)" | |
6499 | .\" commit 5509a5d27b971a90b940e148ca9ca53312e4fa7a | |
6500 | .\" Present only if the kernel was configured with | |
6501 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6502 | .TP | |
6503 | .IR drop_slab " (since Linux 3.15)" | |
6504 | .\" commit 5509a5d27b971a90b940e148ca9ca53312e4fa7a | |
6505 | .\" Present only if the kernel was configured with | |
6506 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6507 | .TP | |
6508 | .IR numa_pte_updates " (since Linux 3.8)" | |
6509 | .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f | |
6510 | .\" Present only if the kernel was configured with | |
6511 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6512 | .\" and | |
6513 | .\" .BR CONFIG_NUMA_BALANCING . | |
6514 | .TP | |
6515 | .IR numa_huge_pte_updates " (since Linux 3.13)" | |
6516 | .\" commit 72403b4a0fbdf433c1fe0127e49864658f6f6468 | |
6517 | .\" Present only if the kernel was configured with | |
6518 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6519 | .\" and | |
6520 | .\" .BR CONFIG_NUMA_BALANCING . | |
6521 | .TP | |
6522 | .IR numa_hint_faults " (since Linux 3.8)" | |
6523 | .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f | |
6524 | .\" Present only if the kernel was configured with | |
6525 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6526 | .\" and | |
6527 | .\" .BR CONFIG_NUMA_BALANCING . | |
6528 | .TP | |
6529 | .IR numa_hint_faults_local " (since Linux 3.8)" | |
6530 | .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f | |
6531 | .\" Present only if the kernel was configured with | |
6532 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6533 | .\" and | |
6534 | .\" .BR CONFIG_NUMA_BALANCING . | |
6535 | .TP | |
6536 | .IR numa_pages_migrated " (since Linux 3.8)" | |
6537 | .\" commit 03c5a6e16322c997bf8f264851bfa3f532ad515f | |
6538 | .\" Present only if the kernel was configured with | |
6539 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6540 | .\" and | |
6541 | .\" .BR CONFIG_NUMA_BALANCING | |
6542 | .\" and | |
6543 | .\" .BR CONFIG_NUMA_BALANCING . | |
6544 | .TP | |
6545 | .IR pgmigrate_success " (since Linux 3.8)" | |
6546 | .\" commit 5647bc293ab15f66a7b1cda850c5e9d162a6c7c2 | |
6547 | .\" Present only if the kernel was configured with | |
6548 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6549 | .\" and | |
6550 | .\" .BR CONFIG_MIGRATION . | |
6551 | .TP | |
6552 | .IR pgmigrate_fail " (since Linux 3.8)" | |
6553 | .\" commit 5647bc293ab15f66a7b1cda850c5e9d162a6c7c2 | |
6554 | .\" Present only if the kernel was configured with | |
6555 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6556 | .\" and | |
6557 | .\" .BR CONFIG_MIGRATION . | |
6558 | .TP | |
6559 | .IR compact_migrate_scanned " (since Linux 3.8)" | |
6560 | .\" commit 397487db696cae0b026a474a5cd66f4e372995e6 | |
6561 | .\" Linux 3.8 dropped compact_blocks_moved, compact_pages_moved, and | |
6562 | .\" compact_pagemigrate_failed | |
6563 | .\" Present only if the kernel was configured with | |
6564 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6565 | .\" and | |
6566 | .\" .BR CONFIG_COMPACTION . | |
6567 | .TP | |
6568 | .IR compact_free_scanned " (since Linux 3.8)" | |
6569 | .\" commit 397487db696cae0b026a474a5cd66f4e372995e6 | |
6570 | .\" Present only if the kernel was configured with | |
6571 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6572 | .\" and | |
6573 | .\" .BR CONFIG_COMPACTION . | |
6574 | .TP | |
6575 | .IR compact_isolated " (since Linux 3.8)" | |
6576 | .\" commit 397487db696cae0b026a474a5cd66f4e372995e6 | |
6577 | .\" Present only if the kernel was configured with | |
6578 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6579 | .\" and | |
6580 | .\" .BR CONFIG_COMPACTION . | |
6581 | .TP | |
6582 | .IR compact_stall " (since Linux 2.6.35)" | |
6583 | .\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f | |
6584 | See the kernel source file | |
6585 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6586 | .\" Present only if the kernel was configured with | |
6587 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6588 | .\" and | |
6589 | .\" .BR CONFIG_COMPACTION . | |
6590 | .TP | |
6591 | .IR compact_fail " (since Linux 2.6.35)" | |
6592 | .\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f | |
6593 | See the kernel source file | |
6594 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6595 | .\" Present only if the kernel was configured with | |
6596 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6597 | .\" and | |
6598 | .\" .BR CONFIG_COMPACTION . | |
6599 | .TP | |
6600 | .IR compact_success " (since Linux 2.6.35)" | |
6601 | .\" commit 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f | |
6602 | See the kernel source file | |
6603 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6604 | .\" Present only if the kernel was configured with | |
6605 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6606 | .\" and | |
6607 | .\" .BR CONFIG_COMPACTION . | |
6608 | .TP | |
6609 | .IR htlb_buddy_alloc_success " (since Linux 2.6.26)" | |
6610 | .\" commit 3b1163006332302117b1b2acf226d4014ff46525 | |
6611 | .\" Present only if the kernel was configured with | |
6612 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6613 | .\" and | |
6614 | .\" .BR CONFIG_HUGETLB_PAGE . | |
6615 | .TP | |
6616 | .IR htlb_buddy_alloc_fail " (since Linux 2.6.26)" | |
6617 | .\" commit 3b1163006332302117b1b2acf226d4014ff46525 | |
6618 | .\" Present only if the kernel was configured with | |
6619 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6620 | .\" and | |
6621 | .\" .BR CONFIG_HUGETLB_PAGE . | |
6622 | .TP | |
6623 | .IR unevictable_pgs_culled " (since Linux 2.6.28)" | |
6624 | .\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa | |
6625 | .\" Present only if the kernel was configured with | |
6626 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6627 | .TP | |
6628 | .IR unevictable_pgs_scanned " (since Linux 2.6.28)" | |
6629 | .\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa | |
6630 | .\" Present only if the kernel was configured with | |
6631 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6632 | .TP | |
6633 | .IR unevictable_pgs_rescued " (since Linux 2.6.28)" | |
6634 | .\" commit bbfd28eee9fbd73e780b19beb3dc562befbb94fa | |
6635 | .\" Present only if the kernel was configured with | |
6636 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6637 | .TP | |
6638 | .IR unevictable_pgs_mlocked " (since Linux 2.6.28)" | |
6639 | .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820 | |
6640 | .\" Present only if the kernel was configured with | |
6641 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6642 | .TP | |
6643 | .IR unevictable_pgs_munlocked " (since Linux 2.6.28)" | |
6644 | .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820 | |
6645 | .\" Present only if the kernel was configured with | |
6646 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6647 | .TP | |
6648 | .IR unevictable_pgs_cleared " (since Linux 2.6.28)" | |
6649 | .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820 | |
6650 | .\" Present only if the kernel was configured with | |
6651 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6652 | .TP | |
6653 | .IR unevictable_pgs_stranded " (since Linux 2.6.28)" | |
6654 | .\" commit 5344b7e648980cc2ca613ec03a56a8222ff48820 | |
6655 | .\" Present only if the kernel was configured with | |
6656 | .\" .BR CONFIG_VM_EVENT_COUNTERS . | |
6657 | .\" Linux 3.7 removed unevictable_pgs_mlockfreed | |
6658 | .TP | |
6659 | .IR thp_fault_alloc " (since Linux 2.6.39)" | |
6660 | .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145 | |
6661 | See the kernel source file | |
6662 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6663 | .\" Present only if the kernel was configured with | |
6664 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6665 | .\" and | |
6666 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6667 | .TP | |
6668 | .IR thp_fault_fallback " (since Linux 2.6.39)" | |
6669 | .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145 | |
6670 | See the kernel source file | |
6671 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6672 | .\" Present only if the kernel was configured with | |
6673 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6674 | .\" and | |
6675 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6676 | .TP | |
6677 | .IR thp_collapse_alloc " (since Linux 2.6.39)" | |
6678 | .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145 | |
6679 | See the kernel source file | |
6680 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6681 | .\" Present only if the kernel was configured with | |
6682 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6683 | .\" and | |
6684 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6685 | .TP | |
6686 | .IR thp_collapse_alloc_failed " (since Linux 2.6.39)" | |
6687 | .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145 | |
6688 | See the kernel source file | |
6689 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6690 | .\" Present only if the kernel was configured with | |
6691 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6692 | .\" and | |
6693 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6694 | .TP | |
6695 | .IR thp_split " (since Linux 2.6.39)" | |
6696 | .\" commit 81ab4201fb7d91d6b0cd9ad5b4b16776e4bed145 | |
6697 | See the kernel source file | |
6698 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6699 | .\" Present only if the kernel was configured with | |
6700 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6701 | .\" and | |
6702 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6703 | .TP | |
6704 | .IR thp_zero_page_alloc " (since Linux 3.8)" | |
6705 | .\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76 | |
6706 | See the kernel source file | |
6707 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6708 | .\" Present only if the kernel was configured with | |
6709 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6710 | .\" and | |
6711 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6712 | .TP | |
6713 | .IR thp_zero_page_alloc_failed " (since Linux 3.8)" | |
6714 | .\" commit d8a8e1f0da3d29d7268b3300c96a059d63901b76 | |
6715 | See the kernel source file | |
6716 | .IR Documentation/admin\-guide/mm/transhuge.rst . | |
6717 | .\" Present only if the kernel was configured with | |
6718 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6719 | .\" and | |
6720 | .\" .BR CONFIG_TRANSPARENT_HUGEPAGE . | |
6721 | .TP | |
6722 | .IR balloon_inflate " (since Linux 3.18)" | |
6723 | .\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938 | |
6724 | .\" Present only if the kernel was configured with | |
6725 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6726 | .\" and | |
6727 | .\" .BR CONFIG_MEMORY_BALLOON . | |
6728 | .TP | |
6729 | .IR balloon_deflate " (since Linux 3.18)" | |
6730 | .\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938 | |
6731 | .\" Present only if the kernel was configured with | |
6732 | .\" .BR CONFIG_VM_EVENT_COUNTERS | |
6733 | .\" and | |
6734 | .\" .BR CONFIG_MEMORY_BALLOON . | |
6735 | .TP | |
6736 | .IR balloon_migrate " (since Linux 3.18)" | |
6737 | .\" commit 09316c09dde33aae14f34489d9e3d243ec0d5938 | |
6738 | .\" Present only if the kernel was configured with | |
6739 | .\" .BR CONFIG_VM_EVENT_COUNTERS , | |
6740 | .\" .BR CONFIG_MEMORY_BALLOON , | |
6741 | .\" and | |
6742 | .\" .BR CONFIG_BALLOON_COMPACTION . | |
6743 | .TP | |
6744 | .IR nr_tlb_remote_flush " (since Linux 3.12)" | |
6745 | .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211 | |
6746 | .\" Present only if the kernel was configured with | |
6747 | .\" .BR CONFIG_DEBUG_TLBFLUSH | |
6748 | .\" and | |
6749 | .\" .BR CONFIG_SMP . | |
6750 | .TP | |
6751 | .IR nr_tlb_remote_flush_received " (since Linux 3.12)" | |
6752 | .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211 | |
6753 | .\" Present only if the kernel was configured with | |
6754 | .\" .BR CONFIG_DEBUG_TLBFLUSH | |
6755 | .\" and | |
6756 | .\" .BR CONFIG_SMP . | |
6757 | .TP | |
6758 | .IR nr_tlb_local_flush_all " (since Linux 3.12)" | |
6759 | .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211 | |
6760 | .\" Present only if the kernel was configured with | |
6761 | .\" .BR CONFIG_DEBUG_TLBFLUSH . | |
6762 | .TP | |
6763 | .IR nr_tlb_local_flush_one " (since Linux 3.12)" | |
6764 | .\" commit 9824cf9753ecbe8f5b47aa9b2f218207defea211 | |
6765 | .\" Present only if the kernel was configured with | |
6766 | .\" .BR CONFIG_DEBUG_TLBFLUSH . | |
6767 | .TP | |
6768 | .IR vmacache_find_calls " (since Linux 3.16)" | |
6769 | .\" commit 4f115147ff802267d0aa41e361c5aa5bd933d896 | |
6770 | .\" Present only if the kernel was configured with | |
6771 | .\" .BR CONFIG_DEBUG_VM_VMACACHE . | |
6772 | .TP | |
6773 | .IR vmacache_find_hits " (since Linux 3.16)" | |
6774 | .\" commit 4f115147ff802267d0aa41e361c5aa5bd933d896 | |
6775 | .\" Present only if the kernel was configured with | |
6776 | .\" .BR CONFIG_DEBUG_VM_VMACACHE . | |
6777 | .TP | |
6778 | .IR vmacache_full_flushes " (since Linux 3.19)" | |
6779 | .\" commit f5f302e21257ebb0c074bbafc37606c26d28cc3d | |
6780 | .\" Present only if the kernel was configured with | |
6781 | .\" .BR CONFIG_DEBUG_VM_VMACACHE . | |
6782 | .RE | |
6783 | .TP | |
6784 | .IR /proc/zoneinfo " (since Linux 2.6.13)" | |
6785 | This file displays information about memory zones. | |
6786 | This is useful for analyzing virtual memory behavior. | |
6787 | .\" FIXME more should be said about /proc/zoneinfo | |
6788 | .SH NOTES | |
6789 | Many files contain strings (e.g., the environment and command line) | |
6790 | that are in the internal format, | |
6791 | with subfields terminated by null bytes (\(aq\e0\(aq). | |
6792 | When inspecting such files, you may find that the results are more readable | |
6793 | if you use a command of the following form to display them: | |
6794 | .PP | |
6795 | .in +4n | |
6796 | .EX | |
6797 | .RB "$" " cat \fIfile\fP | tr \(aq\e000\(aq \(aq\en\(aq" | |
6798 | .EE | |
6799 | .in | |
6800 | .PP | |
6801 | This manual page is incomplete, possibly inaccurate, and is the kind | |
6802 | of thing that needs to be updated very often. | |
6803 | .\" .SH ACKNOWLEDGEMENTS | |
6804 | .\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on | |
6805 | .\" kernel source documentation files written by Rik van Riel. | |
6806 | .SH SEE ALSO | |
6807 | .BR cat (1), | |
6808 | .BR dmesg (1), | |
6809 | .BR find (1), | |
6810 | .BR free (1), | |
6811 | .BR htop (1), | |
6812 | .BR init (1), | |
6813 | .BR ps (1), | |
6814 | .BR pstree (1), | |
6815 | .BR tr (1), | |
6816 | .BR uptime (1), | |
6817 | .BR chroot (2), | |
6818 | .BR mmap (2), | |
6819 | .BR readlink (2), | |
6820 | .BR syslog (2), | |
6821 | .BR slabinfo (5), | |
6822 | .BR sysfs (5), | |
6823 | .BR hier (7), | |
6824 | .BR namespaces (7), | |
6825 | .BR time (7), | |
6826 | .BR arp (8), | |
6827 | .BR hdparm (8), | |
6828 | .BR ifconfig (8), | |
6829 | .BR lsmod (8), | |
6830 | .BR lspci (8), | |
6831 | .BR mount (8), | |
6832 | .BR netstat (8), | |
6833 | .BR procinfo (8), | |
6834 | .BR route (8), | |
6835 | .BR sysctl (8) | |
6836 | .PP | |
6837 | The Linux kernel source files: | |
6838 | .IR Documentation/filesystems/proc.rst , | |
6839 | .IR Documentation/admin\-guide/sysctl/fs.rst , | |
6840 | .IR Documentation/admin\-guide/sysctl/kernel.rst , | |
6841 | .IR Documentation/admin\-guide/sysctl/net.rst , | |
6842 | and | |
6843 | .IR Documentation/admin\-guide/sysctl/vm.rst . |