Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | Documentation for /proc/sys/kernel/* kernel version 2.2.10 |
2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | |
760df93e | 3 | (c) 2009, Shen Feng<shen@cn.fujitsu.com> |
1da177e4 LT |
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: | |
c255d844 | 20 | - acpi_video_flags |
1da177e4 | 21 | - acct |
760df93e | 22 | - auto_msgmni |
1da177e4 LT |
23 | - core_pattern |
24 | - core_uses_pid | |
25 | - ctrl-alt-del | |
26 | - dentry-state | |
27 | - domainname | |
28 | - hostname | |
29 | - hotplug | |
30 | - java-appletviewer [ binfmt_java, obsolete ] | |
31 | - java-interpreter [ binfmt_java, obsolete ] | |
0741f4d2 | 32 | - kstack_depth_to_print [ X86 only ] |
1da177e4 | 33 | - l2cr [ PPC only ] |
ac76cff2 | 34 | - modprobe ==> Documentation/debugging-modules.txt |
1da177e4 LT |
35 | - msgmax |
36 | - msgmnb | |
37 | - msgmni | |
760df93e | 38 | - nmi_watchdog |
1da177e4 LT |
39 | - osrelease |
40 | - ostype | |
41 | - overflowgid | |
42 | - overflowuid | |
43 | - panic | |
44 | - pid_max | |
45 | - powersave-nap [ PPC only ] | |
760df93e | 46 | - panic_on_unrecovered_nmi |
1da177e4 | 47 | - printk |
1ec7fd50 | 48 | - randomize_va_space |
1da177e4 LT |
49 | - real-root-dev ==> Documentation/initrd.txt |
50 | - reboot-cmd [ SPARC only ] | |
51 | - rtsig-max | |
52 | - rtsig-nr | |
53 | - sem | |
54 | - sg-big-buff [ generic SCSI device (sg) ] | |
55 | - shmall | |
56 | - shmmax [ sysv ipc ] | |
57 | - shmmni | |
58 | - stop-a [ SPARC only ] | |
59 | - sysrq ==> Documentation/sysrq.txt | |
60 | - tainted | |
61 | - threads-max | |
760df93e | 62 | - unknown_nmi_panic |
1da177e4 LT |
63 | - version |
64 | ||
65 | ============================================================== | |
66 | ||
c255d844 PM |
67 | acpi_video_flags: |
68 | ||
69 | flags | |
70 | ||
71 | See Doc*/kernel/power/video.txt, it allows mode of video boot to be | |
72 | set during run time. | |
73 | ||
74 | ============================================================== | |
75 | ||
1da177e4 LT |
76 | acct: |
77 | ||
78 | highwater lowwater frequency | |
79 | ||
80 | If BSD-style process accounting is enabled these values control | |
81 | its behaviour. If free space on filesystem where the log lives | |
82 | goes below <lowwater>% accounting suspends. If free space gets | |
83 | above <highwater>% accounting resumes. <Frequency> determines | |
84 | how often do we check the amount of free space (value is in | |
85 | seconds). Default: | |
86 | 4 2 30 | |
87 | That is, suspend accounting if there left <= 2% free; resume it | |
88 | if we got >=4%; consider information about amount of free space | |
89 | valid for 30 seconds. | |
90 | ||
91 | ============================================================== | |
92 | ||
93 | core_pattern: | |
94 | ||
95 | core_pattern is used to specify a core dumpfile pattern name. | |
cd081041 | 96 | . max length 128 characters; default value is "core" |
1da177e4 LT |
97 | . core_pattern is used as a pattern template for the output filename; |
98 | certain string patterns (beginning with '%') are substituted with | |
99 | their actual values. | |
100 | . backward compatibility with core_uses_pid: | |
101 | If core_pattern does not include "%p" (default does not) | |
102 | and core_uses_pid is set, then .PID will be appended to | |
103 | the filename. | |
104 | . corename format specifiers: | |
105 | %<NUL> '%' is dropped | |
106 | %% output one '%' | |
107 | %p pid | |
108 | %u uid | |
109 | %g gid | |
110 | %s signal number | |
111 | %t UNIX time of dump | |
112 | %h hostname | |
113 | %e executable filename | |
114 | %<OTHER> both are dropped | |
cd081041 MU |
115 | . If the first character of the pattern is a '|', the kernel will treat |
116 | the rest of the pattern as a command to run. The core dump will be | |
117 | written to the standard input of that program instead of to a file. | |
1da177e4 LT |
118 | |
119 | ============================================================== | |
120 | ||
121 | core_uses_pid: | |
122 | ||
123 | The default coredump filename is "core". By setting | |
124 | core_uses_pid to 1, the coredump filename becomes core.PID. | |
125 | If core_pattern does not include "%p" (default does not) | |
126 | and core_uses_pid is set, then .PID will be appended to | |
127 | the filename. | |
128 | ||
129 | ============================================================== | |
130 | ||
131 | ctrl-alt-del: | |
132 | ||
133 | When the value in this file is 0, ctrl-alt-del is trapped and | |
134 | sent to the init(1) program to handle a graceful restart. | |
135 | When, however, the value is > 0, Linux's reaction to a Vulcan | |
136 | Nerve Pinch (tm) will be an immediate reboot, without even | |
137 | syncing its dirty buffers. | |
138 | ||
139 | Note: when a program (like dosemu) has the keyboard in 'raw' | |
140 | mode, the ctrl-alt-del is intercepted by the program before it | |
141 | ever reaches the kernel tty layer, and it's up to the program | |
142 | to decide what to do with it. | |
143 | ||
144 | ============================================================== | |
145 | ||
146 | domainname & hostname: | |
147 | ||
148 | These files can be used to set the NIS/YP domainname and the | |
149 | hostname of your box in exactly the same way as the commands | |
150 | domainname and hostname, i.e.: | |
151 | # echo "darkstar" > /proc/sys/kernel/hostname | |
152 | # echo "mydomain" > /proc/sys/kernel/domainname | |
153 | has the same effect as | |
154 | # hostname "darkstar" | |
155 | # domainname "mydomain" | |
156 | ||
157 | Note, however, that the classic darkstar.frop.org has the | |
158 | hostname "darkstar" and DNS (Internet Domain Name Server) | |
159 | domainname "frop.org", not to be confused with the NIS (Network | |
160 | Information Service) or YP (Yellow Pages) domainname. These two | |
161 | domain names are in general different. For a detailed discussion | |
162 | see the hostname(1) man page. | |
163 | ||
164 | ============================================================== | |
165 | ||
166 | hotplug: | |
167 | ||
168 | Path for the hotplug policy agent. | |
169 | Default value is "/sbin/hotplug". | |
170 | ||
171 | ============================================================== | |
172 | ||
173 | l2cr: (PPC only) | |
174 | ||
175 | This flag controls the L2 cache of G3 processor boards. If | |
176 | 0, the cache is disabled. Enabled if nonzero. | |
177 | ||
178 | ============================================================== | |
179 | ||
0741f4d2 CE |
180 | kstack_depth_to_print: (X86 only) |
181 | ||
182 | Controls the number of words to print when dumping the raw | |
183 | kernel stack. | |
184 | ||
185 | ============================================================== | |
186 | ||
1da177e4 LT |
187 | osrelease, ostype & version: |
188 | ||
189 | # cat osrelease | |
190 | 2.1.88 | |
191 | # cat ostype | |
192 | Linux | |
193 | # cat version | |
194 | #5 Wed Feb 25 21:49:24 MET 1998 | |
195 | ||
196 | The files osrelease and ostype should be clear enough. Version | |
197 | needs a little more clarification however. The '#5' means that | |
198 | this is the fifth kernel built from this source base and the | |
199 | date behind it indicates the time the kernel was built. | |
200 | The only way to tune these values is to rebuild the kernel :-) | |
201 | ||
202 | ============================================================== | |
203 | ||
204 | overflowgid & overflowuid: | |
205 | ||
206 | if your architecture did not always support 32-bit UIDs (i.e. arm, i386, | |
207 | m68k, sh, and sparc32), a fixed UID and GID will be returned to | |
208 | applications that use the old 16-bit UID/GID system calls, if the actual | |
209 | UID or GID would exceed 65535. | |
210 | ||
211 | These sysctls allow you to change the value of the fixed UID and GID. | |
212 | The default is 65534. | |
213 | ||
214 | ============================================================== | |
215 | ||
216 | panic: | |
217 | ||
218 | The value in this file represents the number of seconds the | |
219 | kernel waits before rebooting on a panic. When you use the | |
220 | software watchdog, the recommended setting is 60. | |
221 | ||
222 | ============================================================== | |
223 | ||
224 | panic_on_oops: | |
225 | ||
226 | Controls the kernel's behaviour when an oops or BUG is encountered. | |
227 | ||
228 | 0: try to continue operation | |
229 | ||
a982ac06 | 230 | 1: panic immediately. If the `panic' sysctl is also non-zero then the |
8b23d04d | 231 | machine will be rebooted. |
1da177e4 LT |
232 | |
233 | ============================================================== | |
234 | ||
235 | pid_max: | |
236 | ||
beb7dd86 | 237 | PID allocation wrap value. When the kernel's next PID value |
1da177e4 LT |
238 | reaches this value, it wraps back to a minimum PID value. |
239 | PIDs of value pid_max or larger are not allocated. | |
240 | ||
241 | ============================================================== | |
242 | ||
243 | powersave-nap: (PPC only) | |
244 | ||
245 | If set, Linux-PPC will use the 'nap' mode of powersaving, | |
246 | otherwise the 'doze' mode will be used. | |
247 | ||
248 | ============================================================== | |
249 | ||
250 | printk: | |
251 | ||
252 | The four values in printk denote: console_loglevel, | |
253 | default_message_loglevel, minimum_console_loglevel and | |
254 | default_console_loglevel respectively. | |
255 | ||
256 | These values influence printk() behavior when printing or | |
257 | logging error messages. See 'man 2 syslog' for more info on | |
258 | the different loglevels. | |
259 | ||
260 | - console_loglevel: messages with a higher priority than | |
261 | this will be printed to the console | |
262 | - default_message_level: messages without an explicit priority | |
263 | will be printed with this priority | |
264 | - minimum_console_loglevel: minimum (highest) value to which | |
265 | console_loglevel can be set | |
266 | - default_console_loglevel: default value for console_loglevel | |
267 | ||
268 | ============================================================== | |
269 | ||
270 | printk_ratelimit: | |
271 | ||
272 | Some warning messages are rate limited. printk_ratelimit specifies | |
273 | the minimum length of time between these messages (in jiffies), by | |
274 | default we allow one every 5 seconds. | |
275 | ||
276 | A value of 0 will disable rate limiting. | |
277 | ||
278 | ============================================================== | |
279 | ||
280 | printk_ratelimit_burst: | |
281 | ||
282 | While long term we enforce one message per printk_ratelimit | |
283 | seconds, we do allow a burst of messages to pass through. | |
284 | printk_ratelimit_burst specifies the number of messages we can | |
285 | send before ratelimiting kicks in. | |
286 | ||
287 | ============================================================== | |
288 | ||
1ec7fd50 JK |
289 | randomize-va-space: |
290 | ||
291 | This option can be used to select the type of process address | |
292 | space randomization that is used in the system, for architectures | |
293 | that support this feature. | |
294 | ||
295 | 0 - Turn the process address space randomization off by default. | |
296 | ||
297 | 1 - Make the addresses of mmap base, stack and VDSO page randomized. | |
298 | This, among other things, implies that shared libraries will be | |
299 | loaded to random addresses. Also for PIE-linked binaries, the location | |
300 | of code start is randomized. | |
301 | ||
302 | With heap randomization, the situation is a little bit more | |
303 | complicated. | |
304 | There a few legacy applications out there (such as some ancient | |
305 | versions of libc.so.5 from 1996) that assume that brk area starts | |
306 | just after the end of the code+bss. These applications break when | |
307 | start of the brk area is randomized. There are however no known | |
308 | non-legacy applications that would be broken this way, so for most | |
309 | systems it is safe to choose full randomization. However there is | |
310 | a CONFIG_COMPAT_BRK option for systems with ancient and/or broken | |
311 | binaries, that makes heap non-randomized, but keeps all other | |
312 | parts of process address space randomized if randomize_va_space | |
313 | sysctl is turned on. | |
314 | ||
315 | ============================================================== | |
316 | ||
1da177e4 LT |
317 | reboot-cmd: (Sparc only) |
318 | ||
319 | ??? This seems to be a way to give an argument to the Sparc | |
320 | ROM/Flash boot loader. Maybe to tell it what to do after | |
321 | rebooting. ??? | |
322 | ||
323 | ============================================================== | |
324 | ||
325 | rtsig-max & rtsig-nr: | |
326 | ||
327 | The file rtsig-max can be used to tune the maximum number | |
328 | of POSIX realtime (queued) signals that can be outstanding | |
329 | in the system. | |
330 | ||
331 | rtsig-nr shows the number of RT signals currently queued. | |
332 | ||
333 | ============================================================== | |
334 | ||
335 | sg-big-buff: | |
336 | ||
337 | This file shows the size of the generic SCSI (sg) buffer. | |
338 | You can't tune it just yet, but you could change it on | |
339 | compile time by editing include/scsi/sg.h and changing | |
340 | the value of SG_BIG_BUFF. | |
341 | ||
342 | There shouldn't be any reason to change this value. If | |
343 | you can come up with one, you probably know what you | |
344 | are doing anyway :) | |
345 | ||
346 | ============================================================== | |
347 | ||
348 | shmmax: | |
349 | ||
350 | This value can be used to query and set the run time limit | |
351 | on the maximum shared memory segment size that can be created. | |
352 | Shared memory segments up to 1Gb are now supported in the | |
353 | kernel. This value defaults to SHMMAX. | |
354 | ||
355 | ============================================================== | |
356 | ||
c4f3b63f RT |
357 | softlockup_thresh: |
358 | ||
b4d19cc8 AM |
359 | This value can be used to lower the softlockup tolerance threshold. The |
360 | default threshold is 60 seconds. If a cpu is locked up for 60 seconds, | |
361 | the kernel complains. Valid values are 1-60 seconds. Setting this | |
362 | tunable to zero will disable the softlockup detection altogether. | |
c4f3b63f RT |
363 | |
364 | ============================================================== | |
365 | ||
1da177e4 LT |
366 | tainted: |
367 | ||
368 | Non-zero if the kernel has been tainted. Numeric values, which | |
369 | can be ORed together: | |
370 | ||
bb20698d GKH |
371 | 1 - A module with a non-GPL license has been loaded, this |
372 | includes modules with no license. | |
373 | Set by modutils >= 2.4.9 and module-init-tools. | |
374 | 2 - A module was force loaded by insmod -f. | |
375 | Set by modutils >= 2.4.9 and module-init-tools. | |
376 | 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP. | |
377 | 8 - A module was forcibly unloaded from the system by rmmod -f. | |
378 | 16 - A hardware machine check error occurred on the system. | |
379 | 32 - A bad page was discovered on the system. | |
380 | 64 - The user has asked that the system be marked "tainted". This | |
381 | could be because they are running software that directly modifies | |
382 | the hardware, or for other reasons. | |
383 | 128 - The system has died. | |
384 | 256 - The ACPI DSDT has been overridden with one supplied by the user | |
385 | instead of using the one provided by the hardware. | |
386 | 512 - A kernel warning has occurred. | |
387 | 1024 - A module from drivers/staging was loaded. | |
1da177e4 | 388 | |
760df93e SF |
389 | ============================================================== |
390 | ||
391 | auto_msgmni: | |
392 | ||
393 | Enables/Disables automatic recomputing of msgmni upon memory add/remove or | |
394 | upon ipc namespace creation/removal (see the msgmni description above). | |
395 | Echoing "1" into this file enables msgmni automatic recomputing. | |
396 | Echoing "0" turns it off. | |
397 | auto_msgmni default value is 1. | |
398 | ||
399 | ============================================================== | |
400 | ||
401 | nmi_watchdog: | |
402 | ||
403 | Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero | |
404 | the NMI watchdog is enabled and will continuously test all online cpus to | |
405 | determine whether or not they are still functioning properly. Currently, | |
406 | passing "nmi_watchdog=" parameter at boot time is required for this function | |
407 | to work. | |
408 | ||
409 | If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel parameter), the | |
410 | NMI watchdog shares registers with oprofile. By disabling the NMI watchdog, | |
411 | oprofile may have more registers to utilize. | |
412 | ||
413 | ============================================================== | |
414 | ||
415 | unknown_nmi_panic: | |
416 | ||
417 | The value in this file affects behavior of handling NMI. When the value is | |
418 | non-zero, unknown NMI is trapped and then panic occurs. At that time, kernel | |
419 | debugging information is displayed on console. | |
420 | ||
421 | NMI switch that most IA32 servers have fires unknown NMI up, for example. | |
422 | If a system hangs up, try pressing the NMI switch. | |
423 | ||
424 | ============================================================== | |
425 | ||
426 | panic_on_unrecovered_nmi: | |
427 | ||
428 | The default Linux behaviour on an NMI of either memory or unknown is to continue | |
429 | operation. For many environments such as scientific computing it is preferable | |
430 | that the box is taken out and the error dealt with than an uncorrected | |
431 | parity/ECC error get propogated. | |
432 | ||
433 | A small number of systems do generate NMI's for bizarre random reasons such as | |
434 | power management so the default is off. That sysctl works like the existing | |
435 | panic controls already in that directory. | |
436 |