kernel.txt 12 KB

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