Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | Documentation for /proc/sys/kernel/* kernel version 2.2.10 |
| 2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> |
Shen Feng | 760df93 | 2009-04-02 16:57:20 -0700 | [diff] [blame] | 3 | (c) 2009, Shen Feng<shen@cn.fujitsu.com> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
| 5 | For general info and legal blurb, please look in README. |
| 6 | |
| 7 | ============================================================== |
| 8 | |
| 9 | This file contains documentation for the sysctl files in |
| 10 | /proc/sys/kernel/ and is valid for Linux kernel version 2.2. |
| 11 | |
| 12 | The files in this directory can be used to tune and monitor |
| 13 | miscellaneous and general things in the operation of the Linux |
| 14 | kernel. Since some of the files _can_ be used to screw up your |
| 15 | system, it is advisable to read both documentation and source |
| 16 | before actually making adjustments. |
| 17 | |
| 18 | Currently, these files might (depending on your configuration) |
| 19 | show up in /proc/sys/kernel: |
Pavel Machek | c255d84 | 2006-02-20 18:27:58 -0800 | [diff] [blame] | 20 | - acpi_video_flags |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | - acct |
Hans-Joachim Picht | c114728a | 2009-09-11 10:28:47 +0200 | [diff] [blame] | 22 | - callhome [ S390 only ] |
Shen Feng | 760df93 | 2009-04-02 16:57:20 -0700 | [diff] [blame] | 23 | - auto_msgmni |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | - core_pattern |
| 25 | - core_uses_pid |
| 26 | - ctrl-alt-del |
| 27 | - dentry-state |
| 28 | - domainname |
| 29 | - hostname |
| 30 | - hotplug |
| 31 | - java-appletviewer [ binfmt_java, obsolete ] |
| 32 | - java-interpreter [ binfmt_java, obsolete ] |
Chuck Ebbert | 0741f4d | 2006-12-07 02:14:11 +0100 | [diff] [blame] | 33 | - kstack_depth_to_print [ X86 only ] |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | - l2cr [ PPC only ] |
Michael Opdenacker | ac76cff | 2008-02-13 15:03:32 -0800 | [diff] [blame] | 35 | - modprobe ==> Documentation/debugging-modules.txt |
Kees Cook | 3d43321 | 2009-04-02 15:49:29 -0700 | [diff] [blame] | 36 | - modules_disabled |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | - msgmax |
| 38 | - msgmnb |
| 39 | - msgmni |
Shen Feng | 760df93 | 2009-04-02 16:57:20 -0700 | [diff] [blame] | 40 | - nmi_watchdog |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | - osrelease |
| 42 | - ostype |
| 43 | - overflowgid |
| 44 | - overflowuid |
| 45 | - panic |
| 46 | - pid_max |
| 47 | - powersave-nap [ PPC only ] |
Shen Feng | 760df93 | 2009-04-02 16:57:20 -0700 | [diff] [blame] | 48 | - panic_on_unrecovered_nmi |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | - printk |
Jiri Kosina | 1ec7fd5 | 2008-02-09 23:24:08 +0100 | [diff] [blame] | 50 | - randomize_va_space |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | - real-root-dev ==> Documentation/initrd.txt |
| 52 | - reboot-cmd [ SPARC only ] |
| 53 | - rtsig-max |
| 54 | - rtsig-nr |
| 55 | - sem |
| 56 | - sg-big-buff [ generic SCSI device (sg) ] |
| 57 | - shmall |
| 58 | - shmmax [ sysv ipc ] |
| 59 | - shmmni |
| 60 | - stop-a [ SPARC only ] |
| 61 | - sysrq ==> Documentation/sysrq.txt |
| 62 | - tainted |
| 63 | - threads-max |
Shen Feng | 760df93 | 2009-04-02 16:57:20 -0700 | [diff] [blame] | 64 | - unknown_nmi_panic |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | - version |
| 66 | |
| 67 | ============================================================== |
| 68 | |
Pavel Machek | c255d84 | 2006-02-20 18:27:58 -0800 | [diff] [blame] | 69 | acpi_video_flags: |
| 70 | |
| 71 | flags |
| 72 | |
| 73 | See Doc*/kernel/power/video.txt, it allows mode of video boot to be |
| 74 | set during run time. |
| 75 | |
| 76 | ============================================================== |
| 77 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | acct: |
| 79 | |
| 80 | highwater lowwater frequency |
| 81 | |
| 82 | If BSD-style process accounting is enabled these values control |
| 83 | its behaviour. If free space on filesystem where the log lives |
| 84 | goes below <lowwater>% accounting suspends. If free space gets |
| 85 | above <highwater>% accounting resumes. <Frequency> determines |
| 86 | how often do we check the amount of free space (value is in |
| 87 | seconds). Default: |
| 88 | 4 2 30 |
| 89 | That is, suspend accounting if there left <= 2% free; resume it |
| 90 | if we got >=4%; consider information about amount of free space |
| 91 | valid for 30 seconds. |
| 92 | |
| 93 | ============================================================== |
| 94 | |
Hans-Joachim Picht | c114728a | 2009-09-11 10:28:47 +0200 | [diff] [blame] | 95 | callhome: |
| 96 | |
| 97 | Controls the kernel's callhome behavior in case of a kernel panic. |
| 98 | |
| 99 | The s390 hardware allows an operating system to send a notification |
| 100 | to a service organization (callhome) in case of an operating system panic. |
| 101 | |
| 102 | When the value in this file is 0 (which is the default behavior) |
| 103 | nothing happens in case of a kernel panic. If this value is set to "1" |
| 104 | the complete kernel oops message is send to the IBM customer service |
| 105 | organization in case the mainframe the Linux operating system is running |
| 106 | on has a service contract with IBM. |
| 107 | |
| 108 | ============================================================== |
| 109 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | core_pattern: |
| 111 | |
| 112 | core_pattern is used to specify a core dumpfile pattern name. |
Matthias Urlichs | cd08104 | 2006-10-11 01:21:57 -0700 | [diff] [blame] | 113 | . max length 128 characters; default value is "core" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | . core_pattern is used as a pattern template for the output filename; |
| 115 | certain string patterns (beginning with '%') are substituted with |
| 116 | their actual values. |
| 117 | . backward compatibility with core_uses_pid: |
| 118 | If core_pattern does not include "%p" (default does not) |
| 119 | and core_uses_pid is set, then .PID will be appended to |
| 120 | the filename. |
| 121 | . corename format specifiers: |
| 122 | %<NUL> '%' is dropped |
| 123 | %% output one '%' |
| 124 | %p pid |
| 125 | %u uid |
| 126 | %g gid |
| 127 | %s signal number |
| 128 | %t UNIX time of dump |
| 129 | %h hostname |
| 130 | %e executable filename |
| 131 | %<OTHER> both are dropped |
Matthias Urlichs | cd08104 | 2006-10-11 01:21:57 -0700 | [diff] [blame] | 132 | . If the first character of the pattern is a '|', the kernel will treat |
| 133 | the rest of the pattern as a command to run. The core dump will be |
| 134 | written to the standard input of that program instead of to a file. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | |
| 136 | ============================================================== |
| 137 | |
| 138 | core_uses_pid: |
| 139 | |
| 140 | The default coredump filename is "core". By setting |
| 141 | core_uses_pid to 1, the coredump filename becomes core.PID. |
| 142 | If core_pattern does not include "%p" (default does not) |
| 143 | and core_uses_pid is set, then .PID will be appended to |
| 144 | the filename. |
| 145 | |
| 146 | ============================================================== |
| 147 | |
| 148 | ctrl-alt-del: |
| 149 | |
| 150 | When the value in this file is 0, ctrl-alt-del is trapped and |
| 151 | sent to the init(1) program to handle a graceful restart. |
| 152 | When, however, the value is > 0, Linux's reaction to a Vulcan |
| 153 | Nerve Pinch (tm) will be an immediate reboot, without even |
| 154 | syncing its dirty buffers. |
| 155 | |
| 156 | Note: when a program (like dosemu) has the keyboard in 'raw' |
| 157 | mode, the ctrl-alt-del is intercepted by the program before it |
| 158 | ever reaches the kernel tty layer, and it's up to the program |
| 159 | to decide what to do with it. |
| 160 | |
| 161 | ============================================================== |
| 162 | |
| 163 | domainname & hostname: |
| 164 | |
| 165 | These files can be used to set the NIS/YP domainname and the |
| 166 | hostname of your box in exactly the same way as the commands |
| 167 | domainname and hostname, i.e.: |
| 168 | # echo "darkstar" > /proc/sys/kernel/hostname |
| 169 | # echo "mydomain" > /proc/sys/kernel/domainname |
| 170 | has the same effect as |
| 171 | # hostname "darkstar" |
| 172 | # domainname "mydomain" |
| 173 | |
| 174 | Note, however, that the classic darkstar.frop.org has the |
| 175 | hostname "darkstar" and DNS (Internet Domain Name Server) |
| 176 | domainname "frop.org", not to be confused with the NIS (Network |
| 177 | Information Service) or YP (Yellow Pages) domainname. These two |
| 178 | domain names are in general different. For a detailed discussion |
| 179 | see the hostname(1) man page. |
| 180 | |
| 181 | ============================================================== |
| 182 | |
| 183 | hotplug: |
| 184 | |
| 185 | Path for the hotplug policy agent. |
| 186 | Default value is "/sbin/hotplug". |
| 187 | |
| 188 | ============================================================== |
| 189 | |
| 190 | l2cr: (PPC only) |
| 191 | |
| 192 | This flag controls the L2 cache of G3 processor boards. If |
| 193 | 0, the cache is disabled. Enabled if nonzero. |
| 194 | |
| 195 | ============================================================== |
| 196 | |
Chuck Ebbert | 0741f4d | 2006-12-07 02:14:11 +0100 | [diff] [blame] | 197 | kstack_depth_to_print: (X86 only) |
| 198 | |
| 199 | Controls the number of words to print when dumping the raw |
| 200 | kernel stack. |
| 201 | |
| 202 | ============================================================== |
| 203 | |
Kees Cook | 3d43321 | 2009-04-02 15:49:29 -0700 | [diff] [blame] | 204 | modules_disabled: |
| 205 | |
| 206 | A toggle value indicating if modules are allowed to be loaded |
| 207 | in an otherwise modular kernel. This toggle defaults to off |
| 208 | (0), but can be set true (1). Once true, modules can be |
| 209 | neither loaded nor unloaded, and the toggle cannot be set back |
| 210 | to false. |
| 211 | |
| 212 | ============================================================== |
| 213 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | osrelease, ostype & version: |
| 215 | |
| 216 | # cat osrelease |
| 217 | 2.1.88 |
| 218 | # cat ostype |
| 219 | Linux |
| 220 | # cat version |
| 221 | #5 Wed Feb 25 21:49:24 MET 1998 |
| 222 | |
| 223 | The files osrelease and ostype should be clear enough. Version |
| 224 | needs a little more clarification however. The '#5' means that |
| 225 | this is the fifth kernel built from this source base and the |
| 226 | date behind it indicates the time the kernel was built. |
| 227 | The only way to tune these values is to rebuild the kernel :-) |
| 228 | |
| 229 | ============================================================== |
| 230 | |
| 231 | overflowgid & overflowuid: |
| 232 | |
| 233 | if your architecture did not always support 32-bit UIDs (i.e. arm, i386, |
| 234 | m68k, sh, and sparc32), a fixed UID and GID will be returned to |
| 235 | applications that use the old 16-bit UID/GID system calls, if the actual |
| 236 | UID or GID would exceed 65535. |
| 237 | |
| 238 | These sysctls allow you to change the value of the fixed UID and GID. |
| 239 | The default is 65534. |
| 240 | |
| 241 | ============================================================== |
| 242 | |
| 243 | panic: |
| 244 | |
| 245 | The value in this file represents the number of seconds the |
| 246 | kernel waits before rebooting on a panic. When you use the |
| 247 | software watchdog, the recommended setting is 60. |
| 248 | |
| 249 | ============================================================== |
| 250 | |
| 251 | panic_on_oops: |
| 252 | |
| 253 | Controls the kernel's behaviour when an oops or BUG is encountered. |
| 254 | |
| 255 | 0: try to continue operation |
| 256 | |
Matt LaPlante | a982ac0 | 2007-05-09 07:35:06 +0200 | [diff] [blame] | 257 | 1: panic immediately. If the `panic' sysctl is also non-zero then the |
Maxime Bizon | 8b23d04d | 2006-08-05 12:14:32 -0700 | [diff] [blame] | 258 | machine will be rebooted. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 259 | |
| 260 | ============================================================== |
| 261 | |
| 262 | pid_max: |
| 263 | |
Robert P. J. Day | beb7dd8 | 2007-05-09 07:14:03 +0200 | [diff] [blame] | 264 | PID allocation wrap value. When the kernel's next PID value |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 265 | reaches this value, it wraps back to a minimum PID value. |
| 266 | PIDs of value pid_max or larger are not allocated. |
| 267 | |
| 268 | ============================================================== |
| 269 | |
| 270 | powersave-nap: (PPC only) |
| 271 | |
| 272 | If set, Linux-PPC will use the 'nap' mode of powersaving, |
| 273 | otherwise the 'doze' mode will be used. |
| 274 | |
| 275 | ============================================================== |
| 276 | |
| 277 | printk: |
| 278 | |
| 279 | The four values in printk denote: console_loglevel, |
| 280 | default_message_loglevel, minimum_console_loglevel and |
| 281 | default_console_loglevel respectively. |
| 282 | |
| 283 | These values influence printk() behavior when printing or |
| 284 | logging error messages. See 'man 2 syslog' for more info on |
| 285 | the different loglevels. |
| 286 | |
| 287 | - console_loglevel: messages with a higher priority than |
| 288 | this will be printed to the console |
| 289 | - default_message_level: messages without an explicit priority |
| 290 | will be printed with this priority |
| 291 | - minimum_console_loglevel: minimum (highest) value to which |
| 292 | console_loglevel can be set |
| 293 | - default_console_loglevel: default value for console_loglevel |
| 294 | |
| 295 | ============================================================== |
| 296 | |
| 297 | printk_ratelimit: |
| 298 | |
| 299 | Some warning messages are rate limited. printk_ratelimit specifies |
| 300 | the minimum length of time between these messages (in jiffies), by |
| 301 | default we allow one every 5 seconds. |
| 302 | |
| 303 | A value of 0 will disable rate limiting. |
| 304 | |
| 305 | ============================================================== |
| 306 | |
| 307 | printk_ratelimit_burst: |
| 308 | |
| 309 | While long term we enforce one message per printk_ratelimit |
| 310 | seconds, we do allow a burst of messages to pass through. |
| 311 | printk_ratelimit_burst specifies the number of messages we can |
| 312 | send before ratelimiting kicks in. |
| 313 | |
| 314 | ============================================================== |
| 315 | |
Jiri Kosina | 1ec7fd5 | 2008-02-09 23:24:08 +0100 | [diff] [blame] | 316 | randomize-va-space: |
| 317 | |
| 318 | This option can be used to select the type of process address |
| 319 | space randomization that is used in the system, for architectures |
| 320 | that support this feature. |
| 321 | |
| 322 | 0 - Turn the process address space randomization off by default. |
| 323 | |
| 324 | 1 - Make the addresses of mmap base, stack and VDSO page randomized. |
| 325 | This, among other things, implies that shared libraries will be |
| 326 | loaded to random addresses. Also for PIE-linked binaries, the location |
| 327 | of code start is randomized. |
| 328 | |
| 329 | With heap randomization, the situation is a little bit more |
| 330 | complicated. |
| 331 | There a few legacy applications out there (such as some ancient |
| 332 | versions of libc.so.5 from 1996) that assume that brk area starts |
| 333 | just after the end of the code+bss. These applications break when |
| 334 | start of the brk area is randomized. There are however no known |
| 335 | non-legacy applications that would be broken this way, so for most |
| 336 | systems it is safe to choose full randomization. However there is |
| 337 | a CONFIG_COMPAT_BRK option for systems with ancient and/or broken |
| 338 | binaries, that makes heap non-randomized, but keeps all other |
| 339 | parts of process address space randomized if randomize_va_space |
| 340 | sysctl is turned on. |
| 341 | |
| 342 | ============================================================== |
| 343 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | reboot-cmd: (Sparc only) |
| 345 | |
| 346 | ??? This seems to be a way to give an argument to the Sparc |
| 347 | ROM/Flash boot loader. Maybe to tell it what to do after |
| 348 | rebooting. ??? |
| 349 | |
| 350 | ============================================================== |
| 351 | |
| 352 | rtsig-max & rtsig-nr: |
| 353 | |
| 354 | The file rtsig-max can be used to tune the maximum number |
| 355 | of POSIX realtime (queued) signals that can be outstanding |
| 356 | in the system. |
| 357 | |
| 358 | rtsig-nr shows the number of RT signals currently queued. |
| 359 | |
| 360 | ============================================================== |
| 361 | |
| 362 | sg-big-buff: |
| 363 | |
| 364 | This file shows the size of the generic SCSI (sg) buffer. |
| 365 | You can't tune it just yet, but you could change it on |
| 366 | compile time by editing include/scsi/sg.h and changing |
| 367 | the value of SG_BIG_BUFF. |
| 368 | |
| 369 | There shouldn't be any reason to change this value. If |
| 370 | you can come up with one, you probably know what you |
| 371 | are doing anyway :) |
| 372 | |
| 373 | ============================================================== |
| 374 | |
| 375 | shmmax: |
| 376 | |
| 377 | This value can be used to query and set the run time limit |
| 378 | on the maximum shared memory segment size that can be created. |
| 379 | Shared memory segments up to 1Gb are now supported in the |
| 380 | kernel. This value defaults to SHMMAX. |
| 381 | |
| 382 | ============================================================== |
| 383 | |
Ravikiran G Thirumalai | c4f3b63 | 2007-10-16 23:26:09 -0700 | [diff] [blame] | 384 | softlockup_thresh: |
| 385 | |
Andrew Morton | b4d19cc | 2008-09-22 13:57:51 -0700 | [diff] [blame] | 386 | This value can be used to lower the softlockup tolerance threshold. The |
| 387 | default threshold is 60 seconds. If a cpu is locked up for 60 seconds, |
| 388 | the kernel complains. Valid values are 1-60 seconds. Setting this |
| 389 | tunable to zero will disable the softlockup detection altogether. |
Ravikiran G Thirumalai | c4f3b63 | 2007-10-16 23:26:09 -0700 | [diff] [blame] | 390 | |
| 391 | ============================================================== |
| 392 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 393 | tainted: |
| 394 | |
| 395 | Non-zero if the kernel has been tainted. Numeric values, which |
| 396 | can be ORed together: |
| 397 | |
Greg Kroah-Hartman | bb20698 | 2008-10-17 15:01:07 -0700 | [diff] [blame] | 398 | 1 - A module with a non-GPL license has been loaded, this |
| 399 | includes modules with no license. |
| 400 | Set by modutils >= 2.4.9 and module-init-tools. |
| 401 | 2 - A module was force loaded by insmod -f. |
| 402 | Set by modutils >= 2.4.9 and module-init-tools. |
| 403 | 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP. |
| 404 | 8 - A module was forcibly unloaded from the system by rmmod -f. |
| 405 | 16 - A hardware machine check error occurred on the system. |
| 406 | 32 - A bad page was discovered on the system. |
| 407 | 64 - The user has asked that the system be marked "tainted". This |
| 408 | could be because they are running software that directly modifies |
| 409 | the hardware, or for other reasons. |
| 410 | 128 - The system has died. |
| 411 | 256 - The ACPI DSDT has been overridden with one supplied by the user |
| 412 | instead of using the one provided by the hardware. |
| 413 | 512 - A kernel warning has occurred. |
| 414 | 1024 - A module from drivers/staging was loaded. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 415 | |
Shen Feng | 760df93 | 2009-04-02 16:57:20 -0700 | [diff] [blame] | 416 | ============================================================== |
| 417 | |
| 418 | auto_msgmni: |
| 419 | |
| 420 | Enables/Disables automatic recomputing of msgmni upon memory add/remove or |
| 421 | upon ipc namespace creation/removal (see the msgmni description above). |
| 422 | Echoing "1" into this file enables msgmni automatic recomputing. |
| 423 | Echoing "0" turns it off. |
| 424 | auto_msgmni default value is 1. |
| 425 | |
| 426 | ============================================================== |
| 427 | |
| 428 | nmi_watchdog: |
| 429 | |
| 430 | Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero |
| 431 | the NMI watchdog is enabled and will continuously test all online cpus to |
| 432 | determine whether or not they are still functioning properly. Currently, |
| 433 | passing "nmi_watchdog=" parameter at boot time is required for this function |
| 434 | to work. |
| 435 | |
| 436 | If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel parameter), the |
| 437 | NMI watchdog shares registers with oprofile. By disabling the NMI watchdog, |
| 438 | oprofile may have more registers to utilize. |
| 439 | |
| 440 | ============================================================== |
| 441 | |
| 442 | unknown_nmi_panic: |
| 443 | |
| 444 | The value in this file affects behavior of handling NMI. When the value is |
| 445 | non-zero, unknown NMI is trapped and then panic occurs. At that time, kernel |
| 446 | debugging information is displayed on console. |
| 447 | |
| 448 | NMI switch that most IA32 servers have fires unknown NMI up, for example. |
| 449 | If a system hangs up, try pressing the NMI switch. |
| 450 | |
| 451 | ============================================================== |
| 452 | |
| 453 | panic_on_unrecovered_nmi: |
| 454 | |
| 455 | The default Linux behaviour on an NMI of either memory or unknown is to continue |
| 456 | operation. For many environments such as scientific computing it is preferable |
| 457 | that the box is taken out and the error dealt with than an uncorrected |
| 458 | parity/ECC error get propogated. |
| 459 | |
| 460 | A small number of systems do generate NMI's for bizarre random reasons such as |
| 461 | power management so the default is off. That sysctl works like the existing |
| 462 | panic controls already in that directory. |
| 463 | |