kernel.txt 11 KB

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