kernel.txt 17 KB

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