kernel.txt 10 KB

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