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