kernel.txt 16 KB

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