kernel.txt 15 KB

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