kernel.txt 19 KB

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