blob: 8f7a0e73ef44a2d48c6d0ae6755fde7d5479535e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001Documentation for /proc/sys/kernel/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
Shen Feng760df932009-04-02 16:57:20 -07003 (c) 2009, Shen Feng<shen@cn.fujitsu.com>
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
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:
Pavel Machekc255d842006-02-20 18:27:58 -080020- acpi_video_flags
Linus Torvalds1da177e2005-04-16 15:20:36 -070021- acct
Hans-Joachim Pichtc114728a2009-09-11 10:28:47 +020022- callhome [ S390 only ]
Shen Feng760df932009-04-02 16:57:20 -070023- auto_msgmni
Linus Torvalds1da177e2005-04-16 15:20:36 -070024- core_pattern
Neil Hormana2939802009-09-23 15:56:56 -070025- core_pipe_limit
Linus Torvalds1da177e2005-04-16 15:20:36 -070026- core_uses_pid
27- ctrl-alt-del
28- dentry-state
29- domainname
30- hostname
31- hotplug
32- java-appletviewer [ binfmt_java, obsolete ]
33- java-interpreter [ binfmt_java, obsolete ]
Chuck Ebbert0741f4d2006-12-07 02:14:11 +010034- kstack_depth_to_print [ X86 only ]
Linus Torvalds1da177e2005-04-16 15:20:36 -070035- l2cr [ PPC only ]
Michael Opdenackerac76cff2008-02-13 15:03:32 -080036- modprobe ==> Documentation/debugging-modules.txt
Kees Cook3d433212009-04-02 15:49:29 -070037- modules_disabled
Linus Torvalds1da177e2005-04-16 15:20:36 -070038- msgmax
39- msgmnb
40- msgmni
Shen Feng760df932009-04-02 16:57:20 -070041- nmi_watchdog
Linus Torvalds1da177e2005-04-16 15:20:36 -070042- osrelease
43- ostype
44- overflowgid
45- overflowuid
46- panic
47- pid_max
48- powersave-nap [ PPC only ]
Shen Feng760df932009-04-02 16:57:20 -070049- panic_on_unrecovered_nmi
Linus Torvalds1da177e2005-04-16 15:20:36 -070050- printk
Jiri Kosina1ec7fd52008-02-09 23:24:08 +010051- randomize_va_space
Linus Torvalds1da177e2005-04-16 15:20:36 -070052- real-root-dev ==> Documentation/initrd.txt
53- reboot-cmd [ SPARC only ]
54- rtsig-max
55- rtsig-nr
56- sem
57- sg-big-buff [ generic SCSI device (sg) ]
58- shmall
59- shmmax [ sysv ipc ]
60- shmmni
61- stop-a [ SPARC only ]
62- sysrq ==> Documentation/sysrq.txt
63- tainted
64- threads-max
Shen Feng760df932009-04-02 16:57:20 -070065- unknown_nmi_panic
Linus Torvalds1da177e2005-04-16 15:20:36 -070066- version
67
68==============================================================
69
Pavel Machekc255d842006-02-20 18:27:58 -080070acpi_video_flags:
71
72flags
73
74See Doc*/kernel/power/video.txt, it allows mode of video boot to be
75set during run time.
76
77==============================================================
78
Linus Torvalds1da177e2005-04-16 15:20:36 -070079acct:
80
81highwater lowwater frequency
82
83If BSD-style process accounting is enabled these values control
84its behaviour. If free space on filesystem where the log lives
85goes below <lowwater>% accounting suspends. If free space gets
86above <highwater>% accounting resumes. <Frequency> determines
87how often do we check the amount of free space (value is in
88seconds). Default:
894 2 30
90That is, suspend accounting if there left <= 2% free; resume it
91if we got >=4%; consider information about amount of free space
92valid for 30 seconds.
93
94==============================================================
95
Hans-Joachim Pichtc114728a2009-09-11 10:28:47 +020096callhome:
97
98Controls the kernel's callhome behavior in case of a kernel panic.
99
100The s390 hardware allows an operating system to send a notification
101to a service organization (callhome) in case of an operating system panic.
102
103When the value in this file is 0 (which is the default behavior)
104nothing happens in case of a kernel panic. If this value is set to "1"
105the complete kernel oops message is send to the IBM customer service
106organization in case the mainframe the Linux operating system is running
107on has a service contract with IBM.
108
109==============================================================
110
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111core_pattern:
112
113core_pattern is used to specify a core dumpfile pattern name.
Matthias Urlichscd081042006-10-11 01:21:57 -0700114. max length 128 characters; default value is "core"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700115. core_pattern is used as a pattern template for the output filename;
116 certain string patterns (beginning with '%') are substituted with
117 their actual values.
118. backward compatibility with core_uses_pid:
119 If core_pattern does not include "%p" (default does not)
120 and core_uses_pid is set, then .PID will be appended to
121 the filename.
122. corename format specifiers:
123 %<NUL> '%' is dropped
124 %% output one '%'
125 %p pid
126 %u uid
127 %g gid
128 %s signal number
129 %t UNIX time of dump
130 %h hostname
131 %e executable filename
132 %<OTHER> both are dropped
Matthias Urlichscd081042006-10-11 01:21:57 -0700133. If the first character of the pattern is a '|', the kernel will treat
134 the rest of the pattern as a command to run. The core dump will be
135 written to the standard input of that program instead of to a file.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136
137==============================================================
138
Neil Hormana2939802009-09-23 15:56:56 -0700139core_pipe_limit:
140
141This sysctl is only applicable when core_pattern is configured to pipe core
Randy Dunlap7beeec82009-10-04 19:23:13 -0700142files to a user space helper (when the first character of core_pattern is a '|',
Neil Hormana2939802009-09-23 15:56:56 -0700143see above). When collecting cores via a pipe to an application, it is
Randy Dunlap7beeec82009-10-04 19:23:13 -0700144occasionally useful for the collecting application to gather data about the
Neil Hormana2939802009-09-23 15:56:56 -0700145crashing process from its /proc/pid directory. In order to do this safely, the
146kernel must wait for the collecting process to exit, so as not to remove the
147crashing processes proc files prematurely. This in turn creates the possibility
148that a misbehaving userspace collecting process can block the reaping of a
149crashed process simply by never exiting. This sysctl defends against that. It
150defines how many concurrent crashing processes may be piped to user space
151applications in parallel. If this value is exceeded, then those crashing
152processes above that value are noted via the kernel log and their cores are
153skipped. 0 is a special value, indicating that unlimited processes may be
154captured in parallel, but that no waiting will take place (i.e. the collecting
Randy Dunlap7beeec82009-10-04 19:23:13 -0700155process is not guaranteed access to /proc/<crashing pid>/). This value defaults
Neil Hormana2939802009-09-23 15:56:56 -0700156to 0.
157
158==============================================================
159
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160core_uses_pid:
161
162The default coredump filename is "core". By setting
163core_uses_pid to 1, the coredump filename becomes core.PID.
164If core_pattern does not include "%p" (default does not)
165and core_uses_pid is set, then .PID will be appended to
166the filename.
167
168==============================================================
169
170ctrl-alt-del:
171
172When the value in this file is 0, ctrl-alt-del is trapped and
173sent to the init(1) program to handle a graceful restart.
174When, however, the value is > 0, Linux's reaction to a Vulcan
175Nerve Pinch (tm) will be an immediate reboot, without even
176syncing its dirty buffers.
177
178Note: when a program (like dosemu) has the keyboard in 'raw'
179mode, the ctrl-alt-del is intercepted by the program before it
180ever reaches the kernel tty layer, and it's up to the program
181to decide what to do with it.
182
183==============================================================
184
185domainname & hostname:
186
187These files can be used to set the NIS/YP domainname and the
188hostname of your box in exactly the same way as the commands
189domainname and hostname, i.e.:
190# echo "darkstar" > /proc/sys/kernel/hostname
191# echo "mydomain" > /proc/sys/kernel/domainname
192has the same effect as
193# hostname "darkstar"
194# domainname "mydomain"
195
196Note, however, that the classic darkstar.frop.org has the
197hostname "darkstar" and DNS (Internet Domain Name Server)
198domainname "frop.org", not to be confused with the NIS (Network
199Information Service) or YP (Yellow Pages) domainname. These two
200domain names are in general different. For a detailed discussion
201see the hostname(1) man page.
202
203==============================================================
204
205hotplug:
206
207Path for the hotplug policy agent.
208Default value is "/sbin/hotplug".
209
210==============================================================
211
212l2cr: (PPC only)
213
214This flag controls the L2 cache of G3 processor boards. If
2150, the cache is disabled. Enabled if nonzero.
216
217==============================================================
218
Chuck Ebbert0741f4d2006-12-07 02:14:11 +0100219kstack_depth_to_print: (X86 only)
220
221Controls the number of words to print when dumping the raw
222kernel stack.
223
224==============================================================
225
Kees Cook3d433212009-04-02 15:49:29 -0700226modules_disabled:
227
228A toggle value indicating if modules are allowed to be loaded
229in an otherwise modular kernel. This toggle defaults to off
230(0), but can be set true (1). Once true, modules can be
231neither loaded nor unloaded, and the toggle cannot be set back
232to false.
233
234==============================================================
235
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236osrelease, ostype & version:
237
238# cat osrelease
2392.1.88
240# cat ostype
241Linux
242# cat version
243#5 Wed Feb 25 21:49:24 MET 1998
244
245The files osrelease and ostype should be clear enough. Version
246needs a little more clarification however. The '#5' means that
247this is the fifth kernel built from this source base and the
248date behind it indicates the time the kernel was built.
249The only way to tune these values is to rebuild the kernel :-)
250
251==============================================================
252
253overflowgid & overflowuid:
254
255if your architecture did not always support 32-bit UIDs (i.e. arm, i386,
256m68k, sh, and sparc32), a fixed UID and GID will be returned to
257applications that use the old 16-bit UID/GID system calls, if the actual
258UID or GID would exceed 65535.
259
260These sysctls allow you to change the value of the fixed UID and GID.
261The default is 65534.
262
263==============================================================
264
265panic:
266
267The value in this file represents the number of seconds the
268kernel waits before rebooting on a panic. When you use the
269software watchdog, the recommended setting is 60.
270
271==============================================================
272
273panic_on_oops:
274
275Controls the kernel's behaviour when an oops or BUG is encountered.
276
2770: try to continue operation
278
Matt LaPlantea982ac02007-05-09 07:35:06 +02002791: panic immediately. If the `panic' sysctl is also non-zero then the
Maxime Bizon8b23d04d2006-08-05 12:14:32 -0700280 machine will be rebooted.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281
282==============================================================
283
284pid_max:
285
Robert P. J. Daybeb7dd82007-05-09 07:14:03 +0200286PID allocation wrap value. When the kernel's next PID value
Linus Torvalds1da177e2005-04-16 15:20:36 -0700287reaches this value, it wraps back to a minimum PID value.
288PIDs of value pid_max or larger are not allocated.
289
290==============================================================
291
292powersave-nap: (PPC only)
293
294If set, Linux-PPC will use the 'nap' mode of powersaving,
295otherwise the 'doze' mode will be used.
296
297==============================================================
298
299printk:
300
301The four values in printk denote: console_loglevel,
302default_message_loglevel, minimum_console_loglevel and
303default_console_loglevel respectively.
304
305These values influence printk() behavior when printing or
306logging error messages. See 'man 2 syslog' for more info on
307the different loglevels.
308
309- console_loglevel: messages with a higher priority than
310 this will be printed to the console
311- default_message_level: messages without an explicit priority
312 will be printed with this priority
313- minimum_console_loglevel: minimum (highest) value to which
314 console_loglevel can be set
315- default_console_loglevel: default value for console_loglevel
316
317==============================================================
318
319printk_ratelimit:
320
321Some warning messages are rate limited. printk_ratelimit specifies
322the minimum length of time between these messages (in jiffies), by
323default we allow one every 5 seconds.
324
325A value of 0 will disable rate limiting.
326
327==============================================================
328
329printk_ratelimit_burst:
330
331While long term we enforce one message per printk_ratelimit
332seconds, we do allow a burst of messages to pass through.
333printk_ratelimit_burst specifies the number of messages we can
334send before ratelimiting kicks in.
335
336==============================================================
337
Dave Youngaf913222009-09-22 16:43:33 -0700338printk_delay:
339
340Delay each printk message in printk_delay milliseconds
341
342Value from 0 - 10000 is allowed.
343
344==============================================================
345
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100346randomize-va-space:
347
348This option can be used to select the type of process address
349space randomization that is used in the system, for architectures
350that support this feature.
351
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +02003520 - Turn the process address space randomization off. This is the
353 default for architectures that do not support this feature anyways,
354 and kernels that are booted with the "norandmaps" parameter.
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100355
3561 - Make the addresses of mmap base, stack and VDSO page randomized.
357 This, among other things, implies that shared libraries will be
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +0200358 loaded to random addresses. Also for PIE-linked binaries, the
359 location of code start is randomized. This is the default if the
360 CONFIG_COMPAT_BRK option is enabled.
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100361
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +02003622 - Additionally enable heap randomization. This is the default if
363 CONFIG_COMPAT_BRK is disabled.
364
365 There are a few legacy applications out there (such as some ancient
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100366 versions of libc.so.5 from 1996) that assume that brk area starts
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +0200367 just after the end of the code+bss. These applications break when
368 start of the brk area is randomized. There are however no known
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100369 non-legacy applications that would be broken this way, so for most
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +0200370 systems it is safe to choose full randomization.
371
372 Systems with ancient and/or broken binaries should be configured
373 with CONFIG_COMPAT_BRK enabled, which excludes the heap from process
374 address space randomization.
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100375
376==============================================================
377
Linus Torvalds1da177e2005-04-16 15:20:36 -0700378reboot-cmd: (Sparc only)
379
380??? This seems to be a way to give an argument to the Sparc
381ROM/Flash boot loader. Maybe to tell it what to do after
382rebooting. ???
383
384==============================================================
385
386rtsig-max & rtsig-nr:
387
388The file rtsig-max can be used to tune the maximum number
389of POSIX realtime (queued) signals that can be outstanding
390in the system.
391
392rtsig-nr shows the number of RT signals currently queued.
393
394==============================================================
395
396sg-big-buff:
397
398This file shows the size of the generic SCSI (sg) buffer.
399You can't tune it just yet, but you could change it on
400compile time by editing include/scsi/sg.h and changing
401the value of SG_BIG_BUFF.
402
403There shouldn't be any reason to change this value. If
404you can come up with one, you probably know what you
405are doing anyway :)
406
407==============================================================
408
409shmmax:
410
411This value can be used to query and set the run time limit
412on the maximum shared memory segment size that can be created.
413Shared memory segments up to 1Gb are now supported in the
414kernel. This value defaults to SHMMAX.
415
416==============================================================
417
Ravikiran G Thirumalaic4f3b632007-10-16 23:26:09 -0700418softlockup_thresh:
419
Andrew Mortonb4d19cc2008-09-22 13:57:51 -0700420This value can be used to lower the softlockup tolerance threshold. The
421default threshold is 60 seconds. If a cpu is locked up for 60 seconds,
422the kernel complains. Valid values are 1-60 seconds. Setting this
423tunable to zero will disable the softlockup detection altogether.
Ravikiran G Thirumalaic4f3b632007-10-16 23:26:09 -0700424
425==============================================================
426
Linus Torvalds1da177e2005-04-16 15:20:36 -0700427tainted:
428
429Non-zero if the kernel has been tainted. Numeric values, which
430can be ORed together:
431
Greg Kroah-Hartmanbb206982008-10-17 15:01:07 -0700432 1 - A module with a non-GPL license has been loaded, this
433 includes modules with no license.
434 Set by modutils >= 2.4.9 and module-init-tools.
435 2 - A module was force loaded by insmod -f.
436 Set by modutils >= 2.4.9 and module-init-tools.
437 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
438 8 - A module was forcibly unloaded from the system by rmmod -f.
439 16 - A hardware machine check error occurred on the system.
440 32 - A bad page was discovered on the system.
441 64 - The user has asked that the system be marked "tainted". This
442 could be because they are running software that directly modifies
443 the hardware, or for other reasons.
444 128 - The system has died.
445 256 - The ACPI DSDT has been overridden with one supplied by the user
446 instead of using the one provided by the hardware.
447 512 - A kernel warning has occurred.
4481024 - A module from drivers/staging was loaded.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449
Shen Feng760df932009-04-02 16:57:20 -0700450==============================================================
451
452auto_msgmni:
453
454Enables/Disables automatic recomputing of msgmni upon memory add/remove or
455upon ipc namespace creation/removal (see the msgmni description above).
456Echoing "1" into this file enables msgmni automatic recomputing.
457Echoing "0" turns it off.
458auto_msgmni default value is 1.
459
460==============================================================
461
462nmi_watchdog:
463
464Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero
465the NMI watchdog is enabled and will continuously test all online cpus to
466determine whether or not they are still functioning properly. Currently,
467passing "nmi_watchdog=" parameter at boot time is required for this function
468to work.
469
470If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel parameter), the
471NMI watchdog shares registers with oprofile. By disabling the NMI watchdog,
472oprofile may have more registers to utilize.
473
474==============================================================
475
476unknown_nmi_panic:
477
478The value in this file affects behavior of handling NMI. When the value is
479non-zero, unknown NMI is trapped and then panic occurs. At that time, kernel
480debugging information is displayed on console.
481
482NMI switch that most IA32 servers have fires unknown NMI up, for example.
483If a system hangs up, try pressing the NMI switch.
484
485==============================================================
486
487panic_on_unrecovered_nmi:
488
489The default Linux behaviour on an NMI of either memory or unknown is to continue
490operation. For many environments such as scientific computing it is preferable
491that the box is taken out and the error dealt with than an uncorrected
492parity/ECC error get propogated.
493
494A small number of systems do generate NMI's for bizarre random reasons such as
495power management so the default is off. That sysctl works like the existing
496panic controls already in that directory.
497