kernel.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. Documentation for /proc/sys/kernel/* kernel version 2.2.10
  2. (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
  3. For general info and legal blurb, please look in README.
  4. ==============================================================
  5. This file contains documentation for the sysctl files in
  6. /proc/sys/kernel/ and is valid for Linux kernel version 2.2.
  7. The files in this directory can be used to tune and monitor
  8. miscellaneous and general things in the operation of the Linux
  9. kernel. Since some of the files _can_ be used to screw up your
  10. system, it is advisable to read both documentation and source
  11. before actually making adjustments.
  12. Currently, these files might (depending on your configuration)
  13. show up in /proc/sys/kernel:
  14. - acpi_video_flags
  15. - acct
  16. - core_pattern
  17. - core_uses_pid
  18. - ctrl-alt-del
  19. - dentry-state
  20. - domainname
  21. - hostname
  22. - hotplug
  23. - java-appletviewer [ binfmt_java, obsolete ]
  24. - java-interpreter [ binfmt_java, obsolete ]
  25. - kstack_depth_to_print [ X86 only ]
  26. - l2cr [ PPC only ]
  27. - modprobe ==> Documentation/kmod.txt
  28. - msgmax
  29. - msgmnb
  30. - msgmni
  31. - osrelease
  32. - ostype
  33. - overflowgid
  34. - overflowuid
  35. - panic
  36. - pid_max
  37. - powersave-nap [ PPC only ]
  38. - printk
  39. - real-root-dev ==> Documentation/initrd.txt
  40. - reboot-cmd [ SPARC only ]
  41. - rtsig-max
  42. - rtsig-nr
  43. - sem
  44. - sg-big-buff [ generic SCSI device (sg) ]
  45. - shmall
  46. - shmmax [ sysv ipc ]
  47. - shmmni
  48. - stop-a [ SPARC only ]
  49. - sysrq ==> Documentation/sysrq.txt
  50. - tainted
  51. - threads-max
  52. - version
  53. ==============================================================
  54. acpi_video_flags:
  55. flags
  56. See Doc*/kernel/power/video.txt, it allows mode of video boot to be
  57. set during run time.
  58. ==============================================================
  59. acct:
  60. highwater lowwater frequency
  61. If BSD-style process accounting is enabled these values control
  62. its behaviour. If free space on filesystem where the log lives
  63. goes below <lowwater>% accounting suspends. If free space gets
  64. above <highwater>% accounting resumes. <Frequency> determines
  65. how often do we check the amount of free space (value is in
  66. seconds). Default:
  67. 4 2 30
  68. That is, suspend accounting if there left <= 2% free; resume it
  69. if we got >=4%; consider information about amount of free space
  70. valid for 30 seconds.
  71. ==============================================================
  72. core_pattern:
  73. core_pattern is used to specify a core dumpfile pattern name.
  74. . max length 128 characters; default value is "core"
  75. . core_pattern is used as a pattern template for the output filename;
  76. certain string patterns (beginning with '%') are substituted with
  77. their actual values.
  78. . backward compatibility with core_uses_pid:
  79. If core_pattern does not include "%p" (default does not)
  80. and core_uses_pid is set, then .PID will be appended to
  81. the filename.
  82. . corename format specifiers:
  83. %<NUL> '%' is dropped
  84. %% output one '%'
  85. %p pid
  86. %u uid
  87. %g gid
  88. %s signal number
  89. %t UNIX time of dump
  90. %h hostname
  91. %e executable filename
  92. %<OTHER> both are dropped
  93. . If the first character of the pattern is a '|', the kernel will treat
  94. the rest of the pattern as a command to run. The core dump will be
  95. written to the standard input of that program instead of to a file.
  96. ==============================================================
  97. core_uses_pid:
  98. The default coredump filename is "core". By setting
  99. core_uses_pid to 1, the coredump filename becomes core.PID.
  100. If core_pattern does not include "%p" (default does not)
  101. and core_uses_pid is set, then .PID will be appended to
  102. the filename.
  103. ==============================================================
  104. ctrl-alt-del:
  105. When the value in this file is 0, ctrl-alt-del is trapped and
  106. sent to the init(1) program to handle a graceful restart.
  107. When, however, the value is > 0, Linux's reaction to a Vulcan
  108. Nerve Pinch (tm) will be an immediate reboot, without even
  109. syncing its dirty buffers.
  110. Note: when a program (like dosemu) has the keyboard in 'raw'
  111. mode, the ctrl-alt-del is intercepted by the program before it
  112. ever reaches the kernel tty layer, and it's up to the program
  113. to decide what to do with it.
  114. ==============================================================
  115. domainname & hostname:
  116. These files can be used to set the NIS/YP domainname and the
  117. hostname of your box in exactly the same way as the commands
  118. domainname and hostname, i.e.:
  119. # echo "darkstar" > /proc/sys/kernel/hostname
  120. # echo "mydomain" > /proc/sys/kernel/domainname
  121. has the same effect as
  122. # hostname "darkstar"
  123. # domainname "mydomain"
  124. Note, however, that the classic darkstar.frop.org has the
  125. hostname "darkstar" and DNS (Internet Domain Name Server)
  126. domainname "frop.org", not to be confused with the NIS (Network
  127. Information Service) or YP (Yellow Pages) domainname. These two
  128. domain names are in general different. For a detailed discussion
  129. see the hostname(1) man page.
  130. ==============================================================
  131. hotplug:
  132. Path for the hotplug policy agent.
  133. Default value is "/sbin/hotplug".
  134. ==============================================================
  135. l2cr: (PPC only)
  136. This flag controls the L2 cache of G3 processor boards. If
  137. 0, the cache is disabled. Enabled if nonzero.
  138. ==============================================================
  139. kstack_depth_to_print: (X86 only)
  140. Controls the number of words to print when dumping the raw
  141. kernel stack.
  142. ==============================================================
  143. osrelease, ostype & version:
  144. # cat osrelease
  145. 2.1.88
  146. # cat ostype
  147. Linux
  148. # cat version
  149. #5 Wed Feb 25 21:49:24 MET 1998
  150. The files osrelease and ostype should be clear enough. Version
  151. needs a little more clarification however. The '#5' means that
  152. this is the fifth kernel built from this source base and the
  153. date behind it indicates the time the kernel was built.
  154. The only way to tune these values is to rebuild the kernel :-)
  155. ==============================================================
  156. overflowgid & overflowuid:
  157. if your architecture did not always support 32-bit UIDs (i.e. arm, i386,
  158. m68k, sh, and sparc32), a fixed UID and GID will be returned to
  159. applications that use the old 16-bit UID/GID system calls, if the actual
  160. UID or GID would exceed 65535.
  161. These sysctls allow you to change the value of the fixed UID and GID.
  162. The default is 65534.
  163. ==============================================================
  164. panic:
  165. The value in this file represents the number of seconds the
  166. kernel waits before rebooting on a panic. When you use the
  167. software watchdog, the recommended setting is 60.
  168. ==============================================================
  169. panic_on_oops:
  170. Controls the kernel's behaviour when an oops or BUG is encountered.
  171. 0: try to continue operation
  172. 1: panic immediately. If the `panic' sysctl is also non-zero then the
  173. machine will be rebooted.
  174. ==============================================================
  175. pid_max:
  176. PID allocation wrap value. When the kernel's next PID value
  177. reaches this value, it wraps back to a minimum PID value.
  178. PIDs of value pid_max or larger are not allocated.
  179. ==============================================================
  180. powersave-nap: (PPC only)
  181. If set, Linux-PPC will use the 'nap' mode of powersaving,
  182. otherwise the 'doze' mode will be used.
  183. ==============================================================
  184. printk:
  185. The four values in printk denote: console_loglevel,
  186. default_message_loglevel, minimum_console_loglevel and
  187. default_console_loglevel respectively.
  188. These values influence printk() behavior when printing or
  189. logging error messages. See 'man 2 syslog' for more info on
  190. the different loglevels.
  191. - console_loglevel: messages with a higher priority than
  192. this will be printed to the console
  193. - default_message_level: messages without an explicit priority
  194. will be printed with this priority
  195. - minimum_console_loglevel: minimum (highest) value to which
  196. console_loglevel can be set
  197. - default_console_loglevel: default value for console_loglevel
  198. ==============================================================
  199. printk_ratelimit:
  200. Some warning messages are rate limited. printk_ratelimit specifies
  201. the minimum length of time between these messages (in jiffies), by
  202. default we allow one every 5 seconds.
  203. A value of 0 will disable rate limiting.
  204. ==============================================================
  205. printk_ratelimit_burst:
  206. While long term we enforce one message per printk_ratelimit
  207. seconds, we do allow a burst of messages to pass through.
  208. printk_ratelimit_burst specifies the number of messages we can
  209. send before ratelimiting kicks in.
  210. ==============================================================
  211. reboot-cmd: (Sparc only)
  212. ??? This seems to be a way to give an argument to the Sparc
  213. ROM/Flash boot loader. Maybe to tell it what to do after
  214. rebooting. ???
  215. ==============================================================
  216. rtsig-max & rtsig-nr:
  217. The file rtsig-max can be used to tune the maximum number
  218. of POSIX realtime (queued) signals that can be outstanding
  219. in the system.
  220. rtsig-nr shows the number of RT signals currently queued.
  221. ==============================================================
  222. sg-big-buff:
  223. This file shows the size of the generic SCSI (sg) buffer.
  224. You can't tune it just yet, but you could change it on
  225. compile time by editing include/scsi/sg.h and changing
  226. the value of SG_BIG_BUFF.
  227. There shouldn't be any reason to change this value. If
  228. you can come up with one, you probably know what you
  229. are doing anyway :)
  230. ==============================================================
  231. shmmax:
  232. This value can be used to query and set the run time limit
  233. on the maximum shared memory segment size that can be created.
  234. Shared memory segments up to 1Gb are now supported in the
  235. kernel. This value defaults to SHMMAX.
  236. ==============================================================
  237. softlockup_thresh:
  238. This value can be used to lower the softlockup tolerance
  239. threshold. The default threshold is 10s. If a cpu is locked up
  240. for 10s, the kernel complains. Valid values are 1-60s.
  241. ==============================================================
  242. tainted:
  243. Non-zero if the kernel has been tainted. Numeric values, which
  244. can be ORed together:
  245. 1 - A module with a non-GPL license has been loaded, this
  246. includes modules with no license.
  247. Set by modutils >= 2.4.9 and module-init-tools.
  248. 2 - A module was force loaded by insmod -f.
  249. Set by modutils >= 2.4.9 and module-init-tools.
  250. 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.