kernel.txt 18 KB

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