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