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