blob: 209e1584c3dc25e8e1af61a3061c779a28f5d11e [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 Pichtc1147282009-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
Dan Rosenbergeaf06b22010-11-11 14:05:18 -080031- dmesg_restrict
Linus Torvalds1da177e2005-04-16 15:20:36 -070032- domainname
33- hostname
34- hotplug
35- java-appletviewer [ binfmt_java, obsolete ]
36- java-interpreter [ binfmt_java, obsolete ]
Chuck Ebbert0741f4d2006-12-07 02:14:11 +010037- kstack_depth_to_print [ X86 only ]
Linus Torvalds1da177e2005-04-16 15:20:36 -070038- l2cr [ PPC only ]
Michael Opdenackerac76cff2008-02-13 15:03:32 -080039- modprobe ==> Documentation/debugging-modules.txt
Kees Cook3d433212009-04-02 15:49:29 -070040- modules_disabled
Linus Torvalds1da177e2005-04-16 15:20:36 -070041- msgmax
42- msgmnb
43- msgmni
Shen Feng760df932009-04-02 16:57:20 -070044- nmi_watchdog
Linus Torvalds1da177e2005-04-16 15:20:36 -070045- osrelease
46- ostype
47- overflowgid
48- overflowuid
49- panic
50- pid_max
51- powersave-nap [ PPC only ]
Shen Feng760df932009-04-02 16:57:20 -070052- panic_on_unrecovered_nmi
Linus Torvalds1da177e2005-04-16 15:20:36 -070053- printk
Jiri Kosina1ec7fd52008-02-09 23:24:08 +010054- randomize_va_space
Linus Torvalds1da177e2005-04-16 15:20:36 -070055- 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
Shen Feng760df932009-04-02 16:57:20 -070068- unknown_nmi_panic
Linus Torvalds1da177e2005-04-16 15:20:36 -070069- version
70
71==============================================================
72
Pavel Machekc255d842006-02-20 18:27:58 -080073acpi_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
Linus Torvalds1da177e2005-04-16 15:20:36 -070082acct:
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
H. Peter Anvind75757a2009-12-11 14:23:44 -080099bootloader_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
Hans-Joachim Pichtc1147282009-09-11 10:28:47 +0200128callhome:
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
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143core_pattern:
144
145core_pattern is used to specify a core dumpfile pattern name.
Matthias Urlichscd081042006-10-11 01:21:57 -0700146. max length 128 characters; default value is "core"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700147. 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
Matthias Urlichscd081042006-10-11 01:21:57 -0700165. 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.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700168
169==============================================================
170
Neil Hormana2939802009-09-23 15:56:56 -0700171core_pipe_limit:
172
173This sysctl is only applicable when core_pattern is configured to pipe core
Randy Dunlap7beeec82009-10-04 19:23:13 -0700174files to a user space helper (when the first character of core_pattern is a '|',
Neil Hormana2939802009-09-23 15:56:56 -0700175see above). When collecting cores via a pipe to an application, it is
Randy Dunlap7beeec82009-10-04 19:23:13 -0700176occasionally useful for the collecting application to gather data about the
Neil Hormana2939802009-09-23 15:56:56 -0700177crashing 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
Randy Dunlap7beeec82009-10-04 19:23:13 -0700187process is not guaranteed access to /proc/<crashing pid>/). This value defaults
Neil Hormana2939802009-09-23 15:56:56 -0700188to 0.
189
190==============================================================
191
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192core_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
Dan Rosenbergeaf06b22010-11-11 14:05:18 -0800217dmesg_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
Linus Torvalds1da177e2005-04-16 15:20:36 -0700230domainname & 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
Chuck Ebbert0741f4d2006-12-07 02:14:11 +0100264kstack_depth_to_print: (X86 only)
265
266Controls the number of words to print when dumping the raw
267kernel stack.
268
269==============================================================
270
Kees Cook3d433212009-04-02 15:49:29 -0700271modules_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
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281osrelease, 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
Matt LaPlantea982ac02007-05-09 07:35:06 +02003241: panic immediately. If the `panic' sysctl is also non-zero then the
Maxime Bizon8b23d042006-08-05 12:14:32 -0700325 machine will be rebooted.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700326
327==============================================================
328
329pid_max:
330
Robert P. J. Daybeb7dd82007-05-09 07:14:03 +0200331PID allocation wrap value. When the kernel's next PID value
Linus Torvalds1da177e2005-04-16 15:20:36 -0700332reaches 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
Dave Youngaf913222009-09-22 16:43:33 -0700383printk_delay:
384
385Delay each printk message in printk_delay milliseconds
386
387Value from 0 - 10000 is allowed.
388
389==============================================================
390
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100391randomize-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
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +02003970 - 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.
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100400
4011 - Make the addresses of mmap base, stack and VDSO page randomized.
402 This, among other things, implies that shared libraries will be
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +0200403 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.
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100406
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +02004072 - 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
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100411 versions of libc.so.5 from 1996) that assume that brk area starts
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +0200412 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
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100414 non-legacy applications that would be broken this way, so for most
Horst Schirmeierb7f5ab62009-07-03 14:20:17 +0200415 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.
Jiri Kosina1ec7fd52008-02-09 23:24:08 +0100420
421==============================================================
422
Linus Torvalds1da177e2005-04-16 15:20:36 -0700423reboot-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
Ravikiran G Thirumalaic4f3b632007-10-16 23:26:09 -0700463softlockup_thresh:
464
Andrew Mortonb4d19cc2008-09-22 13:57:51 -0700465This 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.
Ravikiran G Thirumalaic4f3b632007-10-16 23:26:09 -0700469
470==============================================================
471
Linus Torvalds1da177e2005-04-16 15:20:36 -0700472tainted:
473
474Non-zero if the kernel has been tainted. Numeric values, which
475can be ORed together:
476
Greg Kroah-Hartmanbb206982008-10-17 15:01:07 -0700477 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.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700494
Shen Feng760df932009-04-02 16:57:20 -0700495==============================================================
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