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