1 .\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
2 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" Copyright (C) , Andries Brouwer <aeb@cwi.nl>
4 .\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
6 .\" SPDX-License-Identifier: GPL-3.0-or-later
8 .TH proc_sys_kernel 5 (date) "Linux man-pages (unreleased)"
10 /proc/sys/kernel/ \- control a range of kernel parameters
14 This directory contains files controlling a range of kernel parameters,
17 .I /proc/sys/kernel/acct
19 contains three numbers:
24 If BSD-style process accounting is enabled, these values control
26 If free space on filesystem where the log lives goes below
28 percent, accounting suspends.
29 If free space gets above
31 percent, accounting resumes.
34 how often the kernel checks the amount of free space (value is in
36 Default values are 4, 2, and 30.
37 That is, suspend accounting if 2% or less space is free; resume it
38 if 4% or more space is free; consider information about amount of free space
41 .IR /proc/sys/kernel/auto_msgmni " (Linux 2.6.27 to Linux 3.18)"
42 .\" commit 9eefe520c814f6f62c5d36a2ddcd3fb99dfdb30e (introduces feature)
43 .\" commit 0050ee059f7fc86b1df2527aaa14ed5dc72f9973 (rendered redundant)
44 From Linux 2.6.27 to Linux 3.18,
45 this file was used to control recomputing of the value in
46 .I /proc/sys/kernel/msgmni
47 upon the addition or removal of memory or upon IPC namespace creation/removal.
48 Echoing "1" into this file enabled
50 automatic recomputing (and triggered a recomputation of
52 based on the current amount of available memory and number of IPC namespaces).
53 Echoing "0" disabled automatic recomputing.
54 (Automatic recomputing was also disabled if a value was explicitly assigned to
55 .IR /proc/sys/kernel/msgmni .)
60 Since Linux 3.19, the content of this file has no effect (because
62 .\" FIXME Must document the 3.19 'msgmni' changes.
63 defaults to near the maximum value possible),
64 and reads from this file always return the value "0".
66 .IR /proc/sys/kernel/cap_last_cap " (since Linux 3.2)"
70 .IR /proc/sys/kernel/cap\-bound " (from Linux 2.2 to Linux 2.6.24)"
71 This file holds the value of the kernel
72 .I "capability bounding set"
73 (expressed as a signed decimal number).
74 This set is ANDed against the capabilities permitted to a process
77 Starting with Linux 2.6.25,
78 the system-wide capability bounding set disappeared,
79 and was replaced by a per-thread bounding set; see
82 .I /proc/sys/kernel/core_pattern
86 .I /proc/sys/kernel/core_pipe_limit
90 .I /proc/sys/kernel/core_uses_pid
94 .I /proc/sys/kernel/ctrl\-alt\-del
96 controls the handling of Ctrl-Alt-Del from the keyboard.
97 When the value in this file is 0, Ctrl-Alt-Del is trapped and
100 program to handle a graceful restart.
101 When the value is greater than zero, Linux's reaction to a Vulcan
102 Nerve Pinch (tm) will be an immediate reboot, without even
103 syncing its dirty buffers.
104 Note: when a program (like dosemu) has the keyboard in "raw"
105 mode, the Ctrl-Alt-Del is intercepted by the program before it
106 ever reaches the kernel tty layer, and it's up to the program
107 to decide what to do with it.
109 .IR /proc/sys/kernel/dmesg_restrict " (since Linux 2.6.37)"
110 The value in this file determines who can see kernel syslog contents.
111 A value of 0 in this file imposes no restrictions.
112 If the value is 1, only privileged users can read the kernel syslog.
117 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
120 capability may change the value in this file.
122 .IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname
123 can be used to set the NIS/YP domainname and the
124 hostname of your box in exactly the same way as the commands
132 .RB "#" " echo \[aq]darkstar\[aq] > /proc/sys/kernel/hostname"
133 .RB "#" " echo \[aq]mydomain\[aq] > /proc/sys/kernel/domainname"
137 has the same effect as
141 .RB "#" " hostname \[aq]darkstar\[aq]"
142 .RB "#" " domainname \[aq]mydomain\[aq]"
146 Note, however, that the classic darkstar.frop.org has the
147 hostname "darkstar" and DNS (Internet Domain Name Server)
148 domainname "frop.org", not to be confused with the NIS (Network
149 Information Service) or YP (Yellow Pages) domainname.
151 domain names are in general different.
152 For a detailed discussion
157 .I /proc/sys/kernel/hotplug
159 contains the pathname for the hotplug policy agent.
160 The default value in this file is
163 .\" Removed in commit 87f504e5c78b910b0c1d6ffb89bc95e492322c84 (tglx/history.git)
164 .IR /proc/sys/kernel/htab\-reclaim " (before Linux 2.4.9.2)"
165 (PowerPC only) If this file is set to a nonzero value,
167 .\" removed in commit 1b483a6a7b2998e9c98ad985d7494b9b725bd228, before Linux 2.6.28
169 .IR Documentation/powerpc/ppc_htab.txt )
171 each time the system hits the idle loop.
173 .I /proc/sys/kernel/keys/
174 This directory contains various files that define parameters and limits
175 for the key-management facility.
176 These files are described in
179 .IR /proc/sys/kernel/kptr_restrict " (since Linux 2.6.38)"
180 .\" 455cd5ab305c90ffc422dd2e0fb634730942b257
181 The value in this file determines whether kernel addresses are exposed via
183 files and other interfaces.
184 A value of 0 in this file imposes no restrictions.
185 If the value is 1, kernel pointers printed using the
187 format specifier will be replaced with zeros unless the user has the
190 If the value is 2, kernel pointers printed using the
192 format specifier will be replaced with zeros regardless
193 of the user's capabilities.
194 The initial default value for this file was 1,
195 but the default was changed
196 .\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9
197 to 0 in Linux 2.6.39.
199 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
202 capability can change the value in this file.
204 .I /proc/sys/kernel/l2cr
205 (PowerPC only) This file
206 contains a flag that controls the L2 cache of G3 processor
208 If 0, the cache is disabled.
211 .I /proc/sys/kernel/modprobe
212 This file contains the pathname for the kernel module loader.
215 The file is present only if the kernel is built with the
218 in Linux 2.6.26 and earlier)
220 It is described by the Linux kernel source file
221 .I Documentation/kmod.txt
222 (present only in Linux 2.4 and earlier).
224 .IR /proc/sys/kernel/modules_disabled " (since Linux 2.6.31)"
225 .\" 3d43321b7015387cfebbe26436d0e9d299162ea1
226 .\" From Documentation/sysctl/kernel.txt
227 A toggle value indicating if modules are allowed to be loaded
228 in an otherwise modular kernel.
229 This toggle defaults to off (0), but can be set true (1).
230 Once true, modules can be neither loaded nor unloaded,
231 and the toggle cannot be set back to false.
232 The file is present only if the kernel is built with the
236 .IR /proc/sys/kernel/msgmax " (since Linux 2.2)"
238 a system-wide limit specifying the maximum number of bytes in
239 a single message written on a System V message queue.
241 .IR /proc/sys/kernel/msgmni " (since Linux 2.4)"
242 This file defines the system-wide limit on the number of
243 message queue identifiers.
245 .IR /proc/sys/kernel/auto_msgmni .
247 .IR /proc/sys/kernel/msgmnb " (since Linux 2.2)"
248 This file defines a system-wide parameter used to initialize the
250 setting for subsequently created message queues.
253 setting specifies the maximum number of bytes that may be written to the
256 .IR /proc/sys/kernel/ngroups_max " (since Linux 2.6.4)"
257 This is a read-only file that displays the upper limit on the
258 number of a process's group memberships.
260 .IR /proc/sys/kernel/ns_last_pid " (since Linux 3.3)"
262 .BR pid_namespaces (7).
264 .IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease
269 .IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid
270 These files duplicate the files
271 .I /proc/sys/fs/overflowgid
273 .IR /proc/sys/fs/overflowuid .
275 .I /proc/sys/kernel/panic
276 This file gives read/write access to the kernel variable
278 If this is zero, the kernel will loop on a panic; if nonzero,
279 it indicates that the kernel should autoreboot after this number
282 software watchdog device driver, the recommended setting is 60.
284 .IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)"
285 This file controls the kernel's behavior when an oops
286 or BUG is encountered.
287 If this file contains 0, then the system
288 tries to continue operation.
289 If it contains 1, then the system
290 delays a few seconds (to give klogd time to record the oops output)
293 .I /proc/sys/kernel/panic
294 file is also nonzero, then the machine will be rebooted.
296 .IR /proc/sys/kernel/pid_max " (since Linux 2.5.34)"
297 This file specifies the value at which PIDs wrap around
298 (i.e., the value in this file is one greater than the maximum PID).
299 PIDs greater than this value are not allocated;
300 thus, the value in this file also acts as a system-wide limit
301 on the total number of processes and threads.
302 The default value for this file, 32768,
303 results in the same range of PIDs as on earlier kernels.
304 On 32-bit platforms, 32768 is the maximum value for
308 can be set to any value up to 2\[ha]22
309 .RB ( PID_MAX_LIMIT ,
310 approximately 4 million).
311 .\" Prior to Linux 2.6.10, pid_max could also be raised above 32768 on 32-bit
312 .\" platforms, but this broke /proc/[pid]
313 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
315 .IR /proc/sys/kernel/powersave\-nap " (PowerPC only)"
316 This file contains a flag.
317 If set, Linux-PPC will use the "nap" mode of
319 otherwise the "doze" mode will be used.
321 .I /proc/sys/kernel/printk
325 .IR /proc/sys/kernel/pty " (since Linux 2.6.4)"
326 This directory contains two files relating to the number of UNIX 98
331 .I /proc/sys/kernel/pty/max
332 This file defines the maximum number of pseudoterminals.
333 .\" FIXME Document /proc/sys/kernel/pty/reserve
335 .\" commit e9aba5158a80098447ff207a452a3418ae7ee386
337 .I /proc/sys/kernel/pty/nr
339 indicates how many pseudoterminals are currently in use.
341 .I /proc/sys/kernel/random/
343 contains various parameters controlling the operation of the file
347 for further information.
349 .IR /proc/sys/kernel/random/uuid " (since Linux 2.4)"
350 Each read from this read-only file returns a randomly generated 128-bit UUID,
351 as a string in the standard UUID format.
353 .IR /proc/sys/kernel/randomize_va_space " (since Linux 2.6.12)"
354 .\" Some further details can be found in Documentation/sysctl/kernel.txt
355 Select the address space layout randomization (ASLR) policy for the system
356 (on architectures that support ASLR).
357 Three values are supported for this file:
362 This is the default for architectures that don't support ASLR,
363 and when the kernel is booted with the
368 Make the addresses of
370 allocations, the stack, and the VDSO page randomized.
371 Among other things, this means that shared libraries will be
372 loaded at randomized addresses.
373 The text segment of PIE-linked binaries will also be loaded
374 at a randomized address.
375 This value is the default if the kernel was configured with
376 .BR CONFIG_COMPAT_BRK .
380 .\" commit c1d171a002942ea2d93b4fbd0c9583c56fce0772
381 Also support heap randomization.
382 This value is the default if the kernel was not configured with
383 .BR CONFIG_COMPAT_BRK .
386 .I /proc/sys/kernel/real\-root\-dev
387 This file is documented in the Linux kernel source file
388 .I Documentation/admin\-guide/initrd.rst
389 .\" commit 9d85025b0418163fae079c9ba8f8445212de8568
391 .I Documentation/initrd.txt
394 .IR /proc/sys/kernel/reboot\-cmd " (Sparc only)"
395 This file seems to be a way to give an argument to the SPARC
396 ROM/Flash boot loader.
397 Maybe to tell it what to do after
400 .I /proc/sys/kernel/rtsig\-max
401 (Up to and including Linux 2.6.7; see
403 This file can be used to tune the maximum number
404 of POSIX real-time (queued) signals that can be outstanding
407 .I /proc/sys/kernel/rtsig\-nr
408 (Up to and including Linux 2.6.7.)
409 This file shows the number of POSIX real-time signals currently queued.
411 .IR /proc/ pid /sched_autogroup_enabled " (since Linux 2.6.38)"
412 .\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a
416 .IR /proc/sys/kernel/sched_child_runs_first " (since Linux 2.6.23)"
417 If this file contains the value zero, then, after a
419 the parent is first scheduled on the CPU.
420 If the file contains a nonzero value,
421 then the child is scheduled first on the CPU.
422 (Of course, on a multiprocessor system,
423 the parent and the child might both immediately be scheduled on a CPU.)
425 .IR /proc/sys/kernel/sched_rr_timeslice_ms " (since Linux 3.9)"
427 .BR sched_rr_get_interval (2).
429 .IR /proc/sys/kernel/sched_rt_period_us " (since Linux 2.6.25)"
433 .IR /proc/sys/kernel/sched_rt_runtime_us " (since Linux 2.6.25)"
437 .IR /proc/sys/kernel/seccomp/ " (since Linux 4.14)"
438 .\" commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af
439 This directory provides additional seccomp information and
445 .IR /proc/sys/kernel/sem " (since Linux 2.4)"
446 This file contains 4 numbers defining limits for System V IPC semaphores.
447 These fields are, in order:
451 The maximum semaphores per semaphore set.
454 A system-wide limit on the number of semaphores in all semaphore sets.
457 The maximum number of operations that may be specified in a
462 A system-wide limit on the maximum number of semaphore identifiers.
465 .I /proc/sys/kernel/sg\-big\-buff
467 shows the size of the generic SCSI device (sg) buffer.
468 You can't tune it just yet, but you could change it at
469 compile time by editing
474 However, there shouldn't be any reason to change this value.
476 .IR /proc/sys/kernel/shm_rmid_forced " (since Linux 3.1)"
477 .\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53
478 .\" See also Documentation/sysctl/kernel.txt
479 If this file is set to 1, all System V shared memory segments will
480 be marked for destruction as soon as the number of attached processes
482 in other words, it is no longer possible to create shared memory segments
483 that exist independently of any attached process.
485 The effect is as though a
488 is performed on all existing segments as well as all segments
489 created in the future (until this file is reset to 0).
490 Note that existing segments that are attached to no process will be
491 immediately destroyed when this file is set to 1.
492 Setting this option will also destroy segments that were created,
494 upon termination of the process that created the segment with
497 Setting this file to 1 provides a way of ensuring that
498 all System V shared memory segments are counted against the
499 resource usage and resource limits (see the description of
503 of at least one process.
505 Because setting this file to 1 produces behavior that is nonstandard
506 and could also break existing applications,
507 the default value in this file is 0.
508 Set this file to 1 only if you have a good understanding
509 of the semantics of the applications using
510 System V shared memory on your system.
512 .IR /proc/sys/kernel/shmall " (since Linux 2.2)"
514 contains the system-wide limit on the total number of pages of
515 System V shared memory.
517 .IR /proc/sys/kernel/shmmax " (since Linux 2.2)"
519 can be used to query and set the run-time limit
520 on the maximum (System V IPC) shared memory segment size that can be
522 Shared memory segments up to 1 GB are now supported in the
524 This value defaults to
527 .IR /proc/sys/kernel/shmmni " (since Linux 2.4)"
529 specifies the system-wide maximum number of System V shared memory
530 segments that can be created.
532 .IR /proc/sys/kernel/sysctl_writes_strict " (since Linux 3.16)"
533 .\" commit f88083005ab319abba5d0b2e4e997558245493c8
534 .\" commit 2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92
535 .\" commit f4aacea2f5d1a5f7e3154e967d70cf3f711bcd61
536 .\" commit 24fe831c17ab8149413874f2fd4e5c8a41fcd294
537 The value in this file determines how the file offset affects
538 the behavior of updating entries in files under
540 The file has three possible values:
544 This provides legacy handling, with no printk warnings.
547 must fully contain the value to be written,
548 and multiple writes on the same file descriptor
549 will overwrite the entire value, regardless of the file position.
552 (default) This provides the same behavior as for \-1,
553 but printk warnings are written for processes that
554 perform writes when the file offset is not 0.
557 Respect the file offset when writing strings into
563 Anything written beyond the maximum length
564 of the value buffer will be ignored.
567 entries must always be at file offset 0 and the value must be
568 fully contained in the buffer provided to
571 .\" With /proc/sys/kernel/sysctl_writes_strict==1, writes at an
572 .\" offset other than 0 do not generate an error. Instead, the
573 .\" write() succeeds, but the file is left unmodified.
574 .\" This is surprising. The behavior may change in the future.
575 .\" See thread.gmane.org/gmane.linux.man/9197
576 .\" From: Michael Kerrisk (man-pages <mtk.manpages@...>
577 .\" Subject: sysctl_writes_strict documentation + an oddity?
578 .\" Newsgroups: gmane.linux.man, gmane.linux.kernel
579 .\" Date: 2015-05-09 08:54:11 GMT
582 .I /proc/sys/kernel/sysrq
583 This file controls the functions allowed to be invoked by the SysRq key.
585 the file contains 1 meaning that every possible SysRq request is allowed
586 (in older kernel versions, SysRq was disabled by default,
587 and you were required to specifically enable it at run-time,
588 but this is not the case any more).
589 Possible values in this file are:
593 Disable sysrq completely
596 Enable all functions of sysrq
599 Bit mask of allowed sysrq functions, as follows:
604 Enable control of console logging level
607 Enable control of keyboard (SAK, unraw)
610 Enable debugging dumps of processes etc.
616 Enable remount read-only
619 Enable signaling of processes (term, kill, oom-kill)
622 Allow reboot/poweroff
625 Allow nicing of all real-time tasks
630 This file is present only if the
631 .B CONFIG_MAGIC_SYSRQ
632 kernel configuration option is enabled.
633 For further details see the Linux kernel source file
634 .I Documentation/admin\-guide/sysrq.rst
635 .\" commit 9d85025b0418163fae079c9ba8f8445212de8568
637 .I Documentation/sysrq.txt
640 .I /proc/sys/kernel/version
641 This file contains a string such as:
645 #5 Wed Feb 25 21:49:24 MET 1998
650 this is the fifth kernel built from this source base and the
651 date following it indicates the time the kernel was built.
653 .IR /proc/sys/kernel/threads\-max " (since Linux 2.3.11)"
654 .\" The following is based on Documentation/sysctl/kernel.txt
655 This file specifies the system-wide limit on the number of
656 threads (tasks) that can be created on the system.
659 .\" commit 230633d109e35b0a24277498e773edeb79b4a331
660 the value that can be written to
663 The minimum value that can be written is 20.
664 The maximum value that can be written is given by the
668 If a value outside of this range is written to
674 The value written is checked against the available RAM pages.
675 If the thread structures would occupy too much (more than 1/8th)
676 of the available RAM pages,
678 is reduced accordingly.
680 .IR /proc/sys/kernel/yama/ptrace_scope " (since Linux 3.5)"
684 .IR /proc/sys/kernel/zero\-paged " (PowerPC only)"
687 When enabled (nonzero), Linux-PPC will pre-zero pages in
688 the idle loop, possibly speeding up get_free_pages.