kernel.txt 13 KB

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