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