| 1 |
.\" Copyright 1994-1995, Daniel Quinlan <[email protected]> |
| 2 |
.\" Copyright 2002-2017, Michael Kerrisk <[email protected]> |
| 3 |
.\" Copyright, Andries E. Brouwer <[email protected]> |
| 4 |
.\" Copyright, the authors of the Linux man-pages project |
| 5 |
.\" |
| 6 |
.\" SPDX-License-Identifier: GPL-3.0-or-later |
| 7 |
.\" |
| 8 |
.TH proc_sys_kernel 5 2026-02-08 "Linux man-pages 6.18" |
| 9 |
.SH NAME |
| 10 |
/proc/sys/kernel/ \- control a range of kernel parameters |
| 11 |
.SH DESCRIPTION |
| 12 |
.TP |
| 13 |
.I /proc/sys/kernel/ |
| 14 |
This directory contains files controlling a range of kernel parameters, |
| 15 |
as described below. |
| 16 |
.TP |
| 17 |
.I /proc/sys/kernel/acct |
| 18 |
This file |
| 19 |
contains three numbers: |
| 20 |
.IR highwater , |
| 21 |
.IR lowwater , |
| 22 |
and |
| 23 |
.IR frequency . |
| 24 |
If BSD-style process accounting is enabled, these values control |
| 25 |
its behavior. |
| 26 |
If free space on filesystem where the log lives goes below |
| 27 |
.I lowwater |
| 28 |
percent, accounting suspends. |
| 29 |
If free space gets above |
| 30 |
.I highwater |
| 31 |
percent, accounting resumes. |
| 32 |
.I frequency |
| 33 |
determines |
| 34 |
how often the kernel checks the amount of free space (value is in |
| 35 |
seconds). |
| 36 |
Default values are 4, 2, and 30. |
| 37 |
That is, |
| 38 |
suspend accounting if 2% or less space is free; |
| 39 |
resume it if 4% or more space is free; |
| 40 |
consider information about amount of free space |
| 41 |
valid for 30 seconds. |
| 42 |
.TP |
| 43 |
.IR /proc/sys/kernel/auto_msgmni " (Linux 2.6.27 to Linux 3.18)" |
| 44 |
.\" commit 9eefe520c814f6f62c5d36a2ddcd3fb99dfdb30e (introduces feature) |
| 45 |
.\" commit 0050ee059f7fc86b1df2527aaa14ed5dc72f9973 (rendered redundant) |
| 46 |
From Linux 2.6.27 to Linux 3.18, |
| 47 |
this file was used to control recomputing of the value in |
| 48 |
.I /proc/sys/kernel/msgmni |
| 49 |
upon the addition or removal of memory or upon IPC namespace creation/removal. |
| 50 |
Echoing "1" into this file enabled |
| 51 |
.I msgmni |
| 52 |
automatic recomputing (and triggered a recomputation of |
| 53 |
.I msgmni |
| 54 |
based on the current amount of available memory and number of IPC namespaces). |
| 55 |
Echoing "0" disabled automatic recomputing. |
| 56 |
(Automatic recomputing was also disabled if a value was explicitly assigned to |
| 57 |
.IR /proc/sys/kernel/msgmni .) |
| 58 |
The default value in |
| 59 |
.I auto_msgmni |
| 60 |
was 1. |
| 61 |
.IP |
| 62 |
Since Linux 3.19, the content of this file has no effect (because |
| 63 |
.I msgmni |
| 64 |
.\" FIXME Must document the 3.19 'msgmni' changes. |
| 65 |
defaults to near the maximum value possible), |
| 66 |
and reads from this file always return the value "0". |
| 67 |
.TP |
| 68 |
.IR /proc/sys/kernel/cap_last_cap " (since Linux 3.2)" |
| 69 |
See |
| 70 |
.BR capabilities (7). |
| 71 |
.TP |
| 72 |
.IR /proc/sys/kernel/cap\-bound " (from Linux 2.2 to Linux 2.6.24)" |
| 73 |
This file holds the value of the kernel |
| 74 |
.I "capability bounding set" |
| 75 |
(expressed as a signed decimal number). |
| 76 |
This set is ANDed against the capabilities permitted to a process |
| 77 |
during |
| 78 |
.BR execve (2). |
| 79 |
Starting with Linux 2.6.25, |
| 80 |
the system-wide capability bounding set disappeared, |
| 81 |
and was replaced by a per-thread bounding set; |
| 82 |
see |
| 83 |
.BR capabilities (7). |
| 84 |
.TP |
| 85 |
.I /proc/sys/kernel/core_pattern |
| 86 |
See |
| 87 |
.BR core (5). |
| 88 |
.TP |
| 89 |
.I /proc/sys/kernel/core_pipe_limit |
| 90 |
See |
| 91 |
.BR core (5). |
| 92 |
.TP |
| 93 |
.I /proc/sys/kernel/core_uses_pid |
| 94 |
See |
| 95 |
.BR core (5). |
| 96 |
.TP |
| 97 |
.I /proc/sys/kernel/ctrl\-alt\-del |
| 98 |
This file |
| 99 |
controls the handling of Ctrl-Alt-Del from the keyboard. |
| 100 |
When the value in this file is 0, Ctrl-Alt-Del is trapped and |
| 101 |
sent to the |
| 102 |
.BR init (1) |
| 103 |
program to handle a graceful restart. |
| 104 |
When the value is greater than zero, Linux's reaction to a Vulcan |
| 105 |
Nerve Pinch (tm) will be an immediate reboot, without even |
| 106 |
syncing its dirty buffers. |
| 107 |
Note: when a program (like dosemu) has the keyboard in "raw" |
| 108 |
mode, the Ctrl-Alt-Del is intercepted by the program before it |
| 109 |
ever reaches the kernel tty layer, and it's up to the program |
| 110 |
to decide what to do with it. |
| 111 |
.TP |
| 112 |
.IR /proc/sys/kernel/dmesg_restrict " (since Linux 2.6.37)" |
| 113 |
The value in this file determines who can see kernel syslog contents. |
| 114 |
A value of 0 in this file imposes no restrictions. |
| 115 |
If the value is 1, only privileged users can read the kernel syslog. |
| 116 |
(See |
| 117 |
.BR syslog (2) |
| 118 |
for more details.) |
| 119 |
Since Linux 3.4, |
| 120 |
.\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8 |
| 121 |
only users with the |
| 122 |
.B CAP_SYS_ADMIN |
| 123 |
capability may change the value in this file. |
| 124 |
.TP |
| 125 |
.I /proc/sys/kernel/domainname |
| 126 |
.TQ |
| 127 |
.I /proc/sys/kernel/hostname |
| 128 |
can be used to set the NIS/YP domainname and the |
| 129 |
hostname of your box in exactly the same way as the commands |
| 130 |
.BR domainname (1) |
| 131 |
and |
| 132 |
.BR hostname (1), |
| 133 |
that is: |
| 134 |
.IP |
| 135 |
.in +4n |
| 136 |
.EX |
| 137 |
.RB "#" " echo \[aq]darkstar\[aq] > /proc/sys/kernel/hostname" |
| 138 |
.RB "#" " echo \[aq]mydomain\[aq] > /proc/sys/kernel/domainname" |
| 139 |
.EE |
| 140 |
.in |
| 141 |
.IP |
| 142 |
has the same effect as |
| 143 |
.IP |
| 144 |
.in +4n |
| 145 |
.EX |
| 146 |
.RB "#" " hostname \[aq]darkstar\[aq]" |
| 147 |
.RB "#" " domainname \[aq]mydomain\[aq]" |
| 148 |
.EE |
| 149 |
.in |
| 150 |
.IP |
| 151 |
Note, however, that the classic darkstar.frop.org has the |
| 152 |
hostname "darkstar" and DNS (Internet Domain Name Server) |
| 153 |
domainname "frop.org", not to be confused with the NIS (Network |
| 154 |
Information Service) or YP (Yellow Pages) domainname. |
| 155 |
These two |
| 156 |
domain names are in general different. |
| 157 |
For a detailed discussion |
| 158 |
see the |
| 159 |
.BR hostname (1) |
| 160 |
man page. |
| 161 |
.TP |
| 162 |
.I /proc/sys/kernel/hotplug |
| 163 |
This file |
| 164 |
contains the pathname for the hotplug policy agent. |
| 165 |
The default value in this file is |
| 166 |
.IR /sbin/hotplug . |
| 167 |
.TP |
| 168 |
.\" Removed in commit 87f504e5c78b910b0c1d6ffb89bc95e492322c84 (tglx/history.git) |
| 169 |
.IR /proc/sys/kernel/htab\-reclaim " (before Linux 2.4.9.2)" |
| 170 |
(PowerPC only) If this file is set to a nonzero value, |
| 171 |
the PowerPC htab |
| 172 |
.\" removed in commit 1b483a6a7b2998e9c98ad985d7494b9b725bd228, before Linux 2.6.28 |
| 173 |
(see kernel file |
| 174 |
.IR Documentation/powerpc/ppc_htab.txt ) |
| 175 |
is pruned |
| 176 |
each time the system hits the idle loop. |
| 177 |
.TP |
| 178 |
.I /proc/sys/kernel/keys/ |
| 179 |
This directory contains various files that define parameters and limits |
| 180 |
for the key-management facility. |
| 181 |
These files are described in |
| 182 |
.BR keyrings (7). |
| 183 |
.TP |
| 184 |
.IR /proc/sys/kernel/kptr_restrict " (since Linux 2.6.38)" |
| 185 |
.\" 455cd5ab305c90ffc422dd2e0fb634730942b257 |
| 186 |
The value in this file determines whether kernel addresses are exposed via |
| 187 |
.I /proc |
| 188 |
files and other interfaces. |
| 189 |
A value of 0 in this file imposes no restrictions. |
| 190 |
If the value is 1, kernel pointers printed using the |
| 191 |
.I %pK |
| 192 |
format specifier will be replaced with zeros unless the user has the |
| 193 |
.B CAP_SYSLOG |
| 194 |
capability. |
| 195 |
If the value is 2, kernel pointers printed using the |
| 196 |
.I %pK |
| 197 |
format specifier will be replaced with zeros regardless |
| 198 |
of the user's capabilities. |
| 199 |
The initial default value for this file was 1, |
| 200 |
but the default was changed |
| 201 |
.\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9 |
| 202 |
to 0 in Linux 2.6.39. |
| 203 |
Since Linux 3.4, |
| 204 |
.\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8 |
| 205 |
only users with the |
| 206 |
.B CAP_SYS_ADMIN |
| 207 |
capability can change the value in this file. |
| 208 |
.TP |
| 209 |
.I /proc/sys/kernel/l2cr |
| 210 |
(PowerPC only) This file |
| 211 |
contains a flag that controls the L2 cache of G3 processor |
| 212 |
boards. |
| 213 |
If 0, the cache is disabled. |
| 214 |
Enabled if nonzero. |
| 215 |
.TP |
| 216 |
.I /proc/sys/kernel/modprobe |
| 217 |
This file contains the pathname for the kernel module loader. |
| 218 |
The default value is |
| 219 |
.IR /sbin/modprobe . |
| 220 |
The file is present only if the kernel is built with the |
| 221 |
.B CONFIG_MODULES |
| 222 |
.RB ( CONFIG_KMOD |
| 223 |
in Linux 2.6.26 and earlier) |
| 224 |
option enabled. |
| 225 |
It is described by the Linux kernel source file |
| 226 |
.I Documentation/kmod.txt |
| 227 |
(present only in Linux 2.4 and earlier). |
| 228 |
.TP |
| 229 |
.IR /proc/sys/kernel/modules_disabled " (since Linux 2.6.31)" |
| 230 |
.\" 3d43321b7015387cfebbe26436d0e9d299162ea1 |
| 231 |
A toggle value indicating if modules are allowed to be loaded |
| 232 |
in an otherwise modular kernel. |
| 233 |
This toggle defaults to off (0), but can be set true (1). |
| 234 |
Once true, modules can be neither loaded nor unloaded, |
| 235 |
and the toggle cannot be set back to false. |
| 236 |
The file is present only if the kernel is built with the |
| 237 |
.B CONFIG_MODULES |
| 238 |
option enabled. |
| 239 |
.TP |
| 240 |
.IR /proc/sys/kernel/msgmax " (since Linux 2.2)" |
| 241 |
This file defines |
| 242 |
a system-wide limit specifying the maximum number of bytes in |
| 243 |
a single message written on a System V message queue. |
| 244 |
.TP |
| 245 |
.IR /proc/sys/kernel/msgmni " (since Linux 2.4)" |
| 246 |
This file defines the system-wide limit on the number of |
| 247 |
message queue identifiers. |
| 248 |
See also |
| 249 |
.IR /proc/sys/kernel/auto_msgmni . |
| 250 |
.TP |
| 251 |
.IR /proc/sys/kernel/msgmnb " (since Linux 2.2)" |
| 252 |
This file defines a system-wide parameter used to initialize the |
| 253 |
.I msg_qbytes |
| 254 |
setting for subsequently created message queues. |
| 255 |
The |
| 256 |
.I msg_qbytes |
| 257 |
setting specifies the maximum number of bytes that may be written to the |
| 258 |
message queue. |
| 259 |
.TP |
| 260 |
.IR /proc/sys/kernel/ngroups_max " (since Linux 2.6.4)" |
| 261 |
This is a read-only file that displays the upper limit on the |
| 262 |
number of a process's group memberships. |
| 263 |
.TP |
| 264 |
.IR /proc/sys/kernel/ns_last_pid " (since Linux 3.3)" |
| 265 |
See |
| 266 |
.BR pid_namespaces (7). |
| 267 |
.TP |
| 268 |
.I /proc/sys/kernel/ostype |
| 269 |
.TQ |
| 270 |
.I /proc/sys/kernel/osrelease |
| 271 |
These files |
| 272 |
give substrings of |
| 273 |
.IR /proc/version . |
| 274 |
.TP |
| 275 |
.I /proc/sys/kernel/overflowgid |
| 276 |
.TQ |
| 277 |
.I /proc/sys/kernel/overflowuid |
| 278 |
These files duplicate the files |
| 279 |
.I /proc/sys/fs/overflowgid |
| 280 |
and |
| 281 |
.IR /proc/sys/fs/overflowuid . |
| 282 |
.TP |
| 283 |
.I /proc/sys/kernel/panic |
| 284 |
This file gives read/write access to the kernel variable |
| 285 |
.IR panic_timeout . |
| 286 |
If this is zero, |
| 287 |
the kernel will loop on a panic; |
| 288 |
if nonzero, |
| 289 |
it indicates that the kernel should autoreboot after this number of seconds. |
| 290 |
When you use the software watchdog device driver, |
| 291 |
the recommended setting is 60. |
| 292 |
.TP |
| 293 |
.IR /proc/sys/kernel/panic_on_oops " (since Linux 2.5.68)" |
| 294 |
This file controls the kernel's behavior when an oops |
| 295 |
or BUG is encountered. |
| 296 |
If this file contains 0, then the system |
| 297 |
tries to continue operation. |
| 298 |
If it contains 1, then the system |
| 299 |
delays a few seconds (to give klogd time to record the oops output) |
| 300 |
and then panics. |
| 301 |
If the |
| 302 |
.I /proc/sys/kernel/panic |
| 303 |
file is also nonzero, then the machine will be rebooted. |
| 304 |
.TP |
| 305 |
.IR /proc/sys/kernel/pid_max " (since Linux 2.5.34)" |
| 306 |
This file specifies the value at which PIDs wrap around |
| 307 |
(i.e., the value in this file is one greater than the maximum PID). |
| 308 |
PIDs greater than this value are not allocated; |
| 309 |
thus, the value in this file also acts as a system-wide limit |
| 310 |
on the total number of processes and threads. |
| 311 |
The default value for this file, 32768, |
| 312 |
results in the same range of PIDs as on earlier kernels. |
| 313 |
On 32-bit platforms, 32768 is the maximum value for |
| 314 |
.IR pid_max . |
| 315 |
On 64-bit systems, |
| 316 |
.I pid_max |
| 317 |
can be set to any value up to 2\[ha]22 |
| 318 |
.RB ( PID_MAX_LIMIT , |
| 319 |
approximately 4 million). |
| 320 |
.\" Prior to Linux 2.6.10, pid_max could also be raised above 32768 on 32-bit |
| 321 |
.\" platforms, but this broke /proc/[pid] |
| 322 |
.\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2 |
| 323 |
.TP |
| 324 |
.IR /proc/sys/kernel/powersave\-nap " (PowerPC only)" |
| 325 |
This file contains a flag. |
| 326 |
If set, Linux-PPC will use the "nap" mode of |
| 327 |
powersaving, |
| 328 |
otherwise the "doze" mode will be used. |
| 329 |
.TP |
| 330 |
.I /proc/sys/kernel/printk |
| 331 |
See |
| 332 |
.BR syslog (2). |
| 333 |
.TP |
| 334 |
.IR /proc/sys/kernel/pty " (since Linux 2.6.4)" |
| 335 |
This directory contains two files relating to the number of UNIX 98 |
| 336 |
pseudoterminals (see |
| 337 |
.BR pts (4)) |
| 338 |
on the system. |
| 339 |
.TP |
| 340 |
.I /proc/sys/kernel/pty/max |
| 341 |
This file defines the maximum number of pseudoterminals. |
| 342 |
.\" FIXME Document /proc/sys/kernel/pty/reserve |
| 343 |
.\" New in Linux 3.3 |
| 344 |
.\" commit e9aba5158a80098447ff207a452a3418ae7ee386 |
| 345 |
.TP |
| 346 |
.I /proc/sys/kernel/pty/nr |
| 347 |
This read-only file |
| 348 |
indicates how many pseudoterminals are currently in use. |
| 349 |
.TP |
| 350 |
.I /proc/sys/kernel/random/ |
| 351 |
This directory |
| 352 |
contains various parameters controlling the operation of the file |
| 353 |
.IR /dev/random . |
| 354 |
See |
| 355 |
.BR random (4) |
| 356 |
for further information. |
| 357 |
.TP |
| 358 |
.IR /proc/sys/kernel/random/uuid " (since Linux 2.4)" |
| 359 |
Each read from this read-only file returns a randomly generated 128-bit UUID, |
| 360 |
as a string in the standard UUID format. |
| 361 |
.TP |
| 362 |
.IR /proc/sys/kernel/randomize_va_space " (since Linux 2.6.12)" |
| 363 |
.\" Some further details can be found in Documentation/sysctl/kernel.rst |
| 364 |
Select the address space layout randomization (ASLR) policy for the system |
| 365 |
(on architectures that support ASLR). |
| 366 |
Three values are supported for this file: |
| 367 |
.RS |
| 368 |
.TP |
| 369 |
.B 0 |
| 370 |
Turn ASLR off. |
| 371 |
This is the default for architectures that don't support ASLR, |
| 372 |
and when the kernel is booted with the |
| 373 |
.I norandmaps |
| 374 |
parameter. |
| 375 |
.TP |
| 376 |
.B 1 |
| 377 |
Make the addresses of |
| 378 |
.BR mmap (2) |
| 379 |
allocations, the stack, and the VDSO page randomized. |
| 380 |
Among other things, this means that shared libraries will be |
| 381 |
loaded at randomized addresses. |
| 382 |
The text segment of PIE-linked binaries will also be loaded |
| 383 |
at a randomized address. |
| 384 |
This value is the default if the kernel was configured with |
| 385 |
.BR CONFIG_COMPAT_BRK . |
| 386 |
.TP |
| 387 |
.B 2 |
| 388 |
(Since Linux 2.6.25) |
| 389 |
.\" commit c1d171a002942ea2d93b4fbd0c9583c56fce0772 |
| 390 |
Also support heap randomization. |
| 391 |
This value is the default if the kernel was not configured with |
| 392 |
.BR CONFIG_COMPAT_BRK . |
| 393 |
.RE |
| 394 |
.TP |
| 395 |
.I /proc/sys/kernel/real\-root\-dev |
| 396 |
This file is documented in the Linux kernel source file |
| 397 |
.IR Documentation/admin\-guide/initrd.rst . |
| 398 |
.TP |
| 399 |
.IR /proc/sys/kernel/reboot\-cmd " (Sparc only)" |
| 400 |
This file seems to be a way to give an argument to the SPARC |
| 401 |
ROM/Flash boot loader. |
| 402 |
Maybe to tell it what to do after |
| 403 |
rebooting? |
| 404 |
.TP |
| 405 |
.I /proc/sys/kernel/rtsig\-max |
| 406 |
(Up to and including Linux 2.6.7; |
| 407 |
see |
| 408 |
.BR setrlimit (2)) |
| 409 |
This file can be used to tune |
| 410 |
the maximum number of POSIX real-time (queued) signals |
| 411 |
that can be outstanding in the system. |
| 412 |
.TP |
| 413 |
.I /proc/sys/kernel/rtsig\-nr |
| 414 |
(Up to and including Linux 2.6.7.) |
| 415 |
This file shows the number of POSIX real-time signals currently queued. |
| 416 |
.TP |
| 417 |
.IR /proc/ pid /sched_autogroup_enabled " (since Linux 2.6.38)" |
| 418 |
.\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a |
| 419 |
See |
| 420 |
.BR sched (7). |
| 421 |
.TP |
| 422 |
.IR /proc/sys/kernel/sched_child_runs_first " (since Linux 2.6.23)" |
| 423 |
If this file contains the value zero, then, after a |
| 424 |
.BR fork (2), |
| 425 |
the parent is first scheduled on the CPU. |
| 426 |
If the file contains a nonzero value, |
| 427 |
then the child is scheduled first on the CPU. |
| 428 |
(Of course, on a multiprocessor system, |
| 429 |
the parent and the child might both immediately be scheduled on a CPU.) |
| 430 |
.TP |
| 431 |
.IR /proc/sys/kernel/sched_rr_timeslice_ms " (since Linux 3.9)" |
| 432 |
See |
| 433 |
.BR sched_rr_get_interval (2). |
| 434 |
.TP |
| 435 |
.IR /proc/sys/kernel/sched_rt_period_us " (since Linux 2.6.25)" |
| 436 |
See |
| 437 |
.BR sched (7). |
| 438 |
.TP |
| 439 |
.IR /proc/sys/kernel/sched_rt_runtime_us " (since Linux 2.6.25)" |
| 440 |
See |
| 441 |
.BR sched (7). |
| 442 |
.TP |
| 443 |
.IR /proc/sys/kernel/seccomp/ " (since Linux 4.14)" |
| 444 |
.\" commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af |
| 445 |
This directory provides additional seccomp information and |
| 446 |
configuration. |
| 447 |
See |
| 448 |
.BR seccomp (2) |
| 449 |
for further details. |
| 450 |
.TP |
| 451 |
.IR /proc/sys/kernel/sem " (since Linux 2.4)" |
| 452 |
This file contains 4 numbers defining limits for System V IPC semaphores. |
| 453 |
These fields are, in order: |
| 454 |
.RS |
| 455 |
.TP |
| 456 |
SEMMSL |
| 457 |
The maximum semaphores per semaphore set. |
| 458 |
.TP |
| 459 |
SEMMNS |
| 460 |
A system-wide limit on the number of semaphores in all semaphore sets. |
| 461 |
.TP |
| 462 |
SEMOPM |
| 463 |
The maximum number of operations that may be specified in a |
| 464 |
.BR semop (2) |
| 465 |
call. |
| 466 |
.TP |
| 467 |
SEMMNI |
| 468 |
A system-wide limit on the maximum number of semaphore identifiers. |
| 469 |
.RE |
| 470 |
.TP |
| 471 |
.I /proc/sys/kernel/sg\-big\-buff |
| 472 |
This file |
| 473 |
shows the size of the generic SCSI device (sg) buffer. |
| 474 |
You can't tune it just yet, but you could change it at |
| 475 |
compile time by editing |
| 476 |
.I include/scsi/sg.h |
| 477 |
and changing |
| 478 |
the value of |
| 479 |
.BR SG_BIG_BUFF . |
| 480 |
However, there shouldn't be any reason to change this value. |
| 481 |
.TP |
| 482 |
.IR /proc/sys/kernel/shm_rmid_forced " (since Linux 3.1)" |
| 483 |
.\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53 |
| 484 |
.\" See also Documentation/sysctl/kernel.rst |
| 485 |
If this file is set to 1, all System V shared memory segments will |
| 486 |
be marked for destruction as soon as the number of attached processes |
| 487 |
falls to zero; |
| 488 |
in other words, it is no longer possible to create shared memory segments |
| 489 |
that exist independently of any attached process. |
| 490 |
.IP |
| 491 |
The effect is as though a |
| 492 |
.BR shmctl (2) |
| 493 |
.B IPC_RMID |
| 494 |
is performed on all existing segments as well as all segments |
| 495 |
created in the future (until this file is reset to 0). |
| 496 |
Note that existing segments that are attached to no process will be |
| 497 |
immediately destroyed when this file is set to 1. |
| 498 |
Setting this option will also destroy segments that were created, |
| 499 |
but never attached, |
| 500 |
upon termination of the process that created the segment with |
| 501 |
.BR shmget (2). |
| 502 |
.IP |
| 503 |
Setting this file to 1 provides a way of ensuring that |
| 504 |
all System V shared memory segments are counted against the |
| 505 |
resource usage and resource limits (see the description of |
| 506 |
.B RLIMIT_AS |
| 507 |
in |
| 508 |
.BR getrlimit (2)) |
| 509 |
of at least one process. |
| 510 |
.IP |
| 511 |
Because setting this file to 1 produces behavior that is nonstandard |
| 512 |
and could also break existing applications, |
| 513 |
the default value in this file is 0. |
| 514 |
Set this file to 1 only if you have a good understanding |
| 515 |
of the semantics of the applications using |
| 516 |
System V shared memory on your system. |
| 517 |
.TP |
| 518 |
.IR /proc/sys/kernel/shmall " (since Linux 2.2)" |
| 519 |
This file |
| 520 |
contains the system-wide limit on the total number of pages of |
| 521 |
System V shared memory. |
| 522 |
.TP |
| 523 |
.IR /proc/sys/kernel/shmmax " (since Linux 2.2)" |
| 524 |
This file |
| 525 |
can be used to query and set the run-time limit |
| 526 |
on the maximum (System V IPC) shared memory segment size that can be |
| 527 |
created. |
| 528 |
Shared memory segments up to 1 GB are now supported in the |
| 529 |
kernel. |
| 530 |
This value defaults to |
| 531 |
.BR SHMMAX . |
| 532 |
.TP |
| 533 |
.IR /proc/sys/kernel/shmmni " (since Linux 2.4)" |
| 534 |
This file |
| 535 |
specifies the system-wide maximum number of System V shared memory |
| 536 |
segments that can be created. |
| 537 |
.TP |
| 538 |
.IR /proc/sys/kernel/sysctl_writes_strict " (since Linux 3.16)" |
| 539 |
.\" commit f88083005ab319abba5d0b2e4e997558245493c8 |
| 540 |
.\" commit 2ca9bb456ada8bcbdc8f77f8fc78207653bbaa92 |
| 541 |
.\" commit f4aacea2f5d1a5f7e3154e967d70cf3f711bcd61 |
| 542 |
.\" commit 24fe831c17ab8149413874f2fd4e5c8a41fcd294 |
| 543 |
The value in this file determines how the file offset affects |
| 544 |
the behavior of updating entries in files under |
| 545 |
.IR /proc/sys . |
| 546 |
The file has three possible values: |
| 547 |
.RS |
| 548 |
.TP 4 |
| 549 |
\-1 |
| 550 |
This provides legacy handling, with no printk warnings. |
| 551 |
Each |
| 552 |
.BR write (2) |
| 553 |
must fully contain the value to be written, |
| 554 |
and multiple writes on the same file descriptor |
| 555 |
will overwrite the entire value, regardless of the file position. |
| 556 |
.TP |
| 557 |
0 |
| 558 |
(default) This provides the same behavior as for \-1, |
| 559 |
but printk warnings are written for processes that |
| 560 |
perform writes when the file offset is not 0. |
| 561 |
.TP |
| 562 |
1 |
| 563 |
Respect the file offset when writing strings into |
| 564 |
.I /proc/sys |
| 565 |
files. |
| 566 |
Multiple writes will |
| 567 |
.I append |
| 568 |
to the value buffer. |
| 569 |
Anything written beyond the maximum length |
| 570 |
of the value buffer will be ignored. |
| 571 |
Writes to numeric |
| 572 |
.I /proc/sys |
| 573 |
entries must always be at file offset 0 and the value must be |
| 574 |
fully contained in the buffer provided to |
| 575 |
.BR write (2). |
| 576 |
.\" FIXME . |
| 577 |
.\" With /proc/sys/kernel/sysctl_writes_strict==1, writes at an |
| 578 |
.\" offset other than 0 do not generate an error. Instead, the |
| 579 |
.\" write() succeeds, but the file is left unmodified. |
| 580 |
.\" This is surprising. The behavior may change in the future. |
| 581 |
.\" See thread.gmane.org/gmane.linux.man/9197 |
| 582 |
.\" From: Michael Kerrisk (man-pages <mtk.manpages@...> |
| 583 |
.\" Subject: sysctl_writes_strict documentation + an oddity? |
| 584 |
.\" Newsgroups: gmane.linux.man, gmane.linux.kernel |
| 585 |
.\" Date: 2015-05-09 08:54:11 GMT |
| 586 |
.RE |
| 587 |
.TP |
| 588 |
.I /proc/sys/kernel/sysrq |
| 589 |
This file controls the functions allowed to be invoked by the SysRq key. |
| 590 |
By default, |
| 591 |
the file contains 1 meaning that every possible SysRq request is allowed |
| 592 |
(in older kernel versions, SysRq was disabled by default, |
| 593 |
and you were required to specifically enable it at run-time, |
| 594 |
but this is not the case any more). |
| 595 |
Possible values in this file are: |
| 596 |
.RS |
| 597 |
.TP 5 |
| 598 |
0 |
| 599 |
Disable sysrq completely |
| 600 |
.TP |
| 601 |
1 |
| 602 |
Enable all functions of sysrq |
| 603 |
.TP |
| 604 |
> 1 |
| 605 |
Bit mask of allowed sysrq functions, as follows: |
| 606 |
.PD 0 |
| 607 |
.RS |
| 608 |
.TP 5 |
| 609 |
\ \ 2 |
| 610 |
Enable control of console logging level |
| 611 |
.TP |
| 612 |
\ \ 4 |
| 613 |
Enable control of keyboard (SAK, unraw) |
| 614 |
.TP |
| 615 |
\ \ 8 |
| 616 |
Enable debugging dumps of processes etc. |
| 617 |
.TP |
| 618 |
\ 16 |
| 619 |
Enable sync command |
| 620 |
.TP |
| 621 |
\ 32 |
| 622 |
Enable remount read-only |
| 623 |
.TP |
| 624 |
\ 64 |
| 625 |
Enable signaling of processes (term, kill, oom-kill) |
| 626 |
.TP |
| 627 |
128 |
| 628 |
Allow reboot/poweroff |
| 629 |
.TP |
| 630 |
256 |
| 631 |
Allow nicing of all real-time tasks |
| 632 |
.RE |
| 633 |
.PD |
| 634 |
.RE |
| 635 |
.IP |
| 636 |
This file is present only if the |
| 637 |
.B CONFIG_MAGIC_SYSRQ |
| 638 |
kernel configuration option is enabled. |
| 639 |
For further details see the Linux kernel source file |
| 640 |
.IR Documentation/admin\-guide/sysrq.rst . |
| 641 |
.TP |
| 642 |
.I /proc/sys/kernel/version |
| 643 |
This file contains a string such as: |
| 644 |
.IP |
| 645 |
.in +4n |
| 646 |
.EX |
| 647 |
#5 Wed Feb 25 21:49:24 MET 1998 |
| 648 |
.EE |
| 649 |
.in |
| 650 |
.IP |
| 651 |
The "#5" means that |
| 652 |
this is the fifth kernel built from this source base and the |
| 653 |
date following it indicates the time the kernel was built. |
| 654 |
.TP |
| 655 |
.IR /proc/sys/kernel/threads\-max " (since Linux 2.3.11)" |
| 656 |
This file specifies the system-wide limit on the number of |
| 657 |
threads (tasks) that can be created on the system. |
| 658 |
.IP |
| 659 |
Since Linux 4.1, |
| 660 |
.\" commit 230633d109e35b0a24277498e773edeb79b4a331 |
| 661 |
the value that can be written to |
| 662 |
.I threads\-max |
| 663 |
is bounded. |
| 664 |
The minimum value that can be written is 20. |
| 665 |
The maximum value that can be written is given by the |
| 666 |
constant |
| 667 |
.B FUTEX_TID_MASK |
| 668 |
(0x3fffffff). |
| 669 |
If a value outside of this range is written to |
| 670 |
.IR threads\-max , |
| 671 |
the error |
| 672 |
.B EINVAL |
| 673 |
occurs. |
| 674 |
.IP |
| 675 |
The value written is checked against the available RAM pages. |
| 676 |
If the thread structures would occupy too much (more than 1/8th) |
| 677 |
of the available RAM pages, |
| 678 |
.I threads\-max |
| 679 |
is reduced accordingly. |
| 680 |
.TP |
| 681 |
.IR /proc/sys/kernel/yama/ptrace_scope " (since Linux 3.5)" |
| 682 |
See |
| 683 |
.BR ptrace (2). |
| 684 |
.TP |
| 685 |
.IR /proc/sys/kernel/zero\-paged " (PowerPC only)" |
| 686 |
This file |
| 687 |
contains a flag. |
| 688 |
When enabled (nonzero), Linux-PPC will pre-zero pages in |
| 689 |
the idle loop, possibly speeding up get_free_pages. |
| 690 |
.SH SEE ALSO |
| 691 |
.BR proc (5), |
| 692 |
.BR proc_sys (5) |