kernel.rst 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529
  1. ===================================
  2. Documentation for /proc/sys/kernel/
  3. ===================================
  4. .. See scripts/check-sysctl-docs to keep this up to date
  5. Copyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
  6. Copyright (c) 2009, Shen Feng<shen@cn.fujitsu.com>
  7. For general info and legal blurb, please look in :doc:`index`.
  8. ------------------------------------------------------------------------------
  9. This file contains documentation for the sysctl files in
  10. ``/proc/sys/kernel/`` and is valid for Linux kernel version 2.2.
  11. The files in this directory can be used to tune and monitor
  12. miscellaneous and general things in the operation of the Linux
  13. kernel. Since some of the files *can* be used to screw up your
  14. system, it is advisable to read both documentation and source
  15. before actually making adjustments.
  16. Currently, these files might (depending on your configuration)
  17. show up in ``/proc/sys/kernel``:
  18. .. contents:: :local:
  19. acct
  20. ====
  21. ::
  22. highwater lowwater frequency
  23. If BSD-style process accounting is enabled these values control
  24. its behaviour. If free space on filesystem where the log lives
  25. goes below ``lowwater``% accounting suspends. If free space gets
  26. above ``highwater``% accounting resumes. ``frequency`` determines
  27. how often do we check the amount of free space (value is in
  28. seconds). Default:
  29. ::
  30. 4 2 30
  31. That is, suspend accounting if free space drops below 2%; resume it
  32. if it increases to at least 4%; consider information about amount of
  33. free space valid for 30 seconds.
  34. acpi_video_flags
  35. ================
  36. See :doc:`/power/video`. This allows the video resume mode to be set,
  37. in a similar fashion to the ``acpi_sleep`` kernel parameter, by
  38. combining the following values:
  39. = =======
  40. 1 s3_bios
  41. 2 s3_mode
  42. 4 s3_beep
  43. = =======
  44. auto_msgmni
  45. ===========
  46. This variable has no effect and may be removed in future kernel
  47. releases. Reading it always returns 0.
  48. Up to Linux 3.17, it enabled/disabled automatic recomputing of
  49. `msgmni`_
  50. upon memory add/remove or upon IPC namespace creation/removal.
  51. Echoing "1" into this file enabled msgmni automatic recomputing.
  52. Echoing "0" turned it off. The default value was 1.
  53. bootloader_type (x86 only)
  54. ==========================
  55. This gives the bootloader type number as indicated by the bootloader,
  56. shifted left by 4, and OR'd with the low four bits of the bootloader
  57. version. The reason for this encoding is that this used to match the
  58. ``type_of_loader`` field in the kernel header; the encoding is kept for
  59. backwards compatibility. That is, if the full bootloader type number
  60. is 0x15 and the full version number is 0x234, this file will contain
  61. the value 340 = 0x154.
  62. See the ``type_of_loader`` and ``ext_loader_type`` fields in
  63. :doc:`/x86/boot` for additional information.
  64. bootloader_version (x86 only)
  65. =============================
  66. The complete bootloader version number. In the example above, this
  67. file will contain the value 564 = 0x234.
  68. See the ``type_of_loader`` and ``ext_loader_ver`` fields in
  69. :doc:`/x86/boot` for additional information.
  70. bpf_stats_enabled
  71. =================
  72. Controls whether the kernel should collect statistics on BPF programs
  73. (total time spent running, number of times run...). Enabling
  74. statistics causes a slight reduction in performance on each program
  75. run. The statistics can be seen using ``bpftool``.
  76. = ===================================
  77. 0 Don't collect statistics (default).
  78. 1 Collect statistics.
  79. = ===================================
  80. cad_pid
  81. =======
  82. This is the pid which will be signalled on reboot (notably, by
  83. Ctrl-Alt-Delete). Writing a value to this file which doesn't
  84. correspond to a running process will result in ``-ESRCH``.
  85. See also `ctrl-alt-del`_.
  86. cap_last_cap
  87. ============
  88. Highest valid capability of the running kernel. Exports
  89. ``CAP_LAST_CAP`` from the kernel.
  90. core_pattern
  91. ============
  92. ``core_pattern`` is used to specify a core dumpfile pattern name.
  93. * max length 127 characters; default value is "core"
  94. * ``core_pattern`` is used as a pattern template for the output
  95. filename; certain string patterns (beginning with '%') are
  96. substituted with their actual values.
  97. * backward compatibility with ``core_uses_pid``:
  98. If ``core_pattern`` does not include "%p" (default does not)
  99. and ``core_uses_pid`` is set, then .PID will be appended to
  100. the filename.
  101. * corename format specifiers
  102. ======== ==========================================
  103. %<NUL> '%' is dropped
  104. %% output one '%'
  105. %p pid
  106. %P global pid (init PID namespace)
  107. %i tid
  108. %I global tid (init PID namespace)
  109. %u uid (in initial user namespace)
  110. %g gid (in initial user namespace)
  111. %d dump mode, matches ``PR_SET_DUMPABLE`` and
  112. ``/proc/sys/fs/suid_dumpable``
  113. %s signal number
  114. %t UNIX time of dump
  115. %h hostname
  116. %e executable filename (may be shortened, could be changed by prctl etc)
  117. %f executable filename
  118. %E executable path
  119. %c maximum size of core file by resource limit RLIMIT_CORE
  120. %<OTHER> both are dropped
  121. ======== ==========================================
  122. * If the first character of the pattern is a '|', the kernel will treat
  123. the rest of the pattern as a command to run. The core dump will be
  124. written to the standard input of that program instead of to a file.
  125. core_pipe_limit
  126. ===============
  127. This sysctl is only applicable when `core_pattern`_ is configured to
  128. pipe core files to a user space helper (when the first character of
  129. ``core_pattern`` is a '|', see above).
  130. When collecting cores via a pipe to an application, it is occasionally
  131. useful for the collecting application to gather data about the
  132. crashing process from its ``/proc/pid`` directory.
  133. In order to do this safely, the kernel must wait for the collecting
  134. process to exit, so as not to remove the crashing processes proc files
  135. prematurely.
  136. This in turn creates the possibility that a misbehaving userspace
  137. collecting process can block the reaping of a crashed process simply
  138. by never exiting.
  139. This sysctl defends against that.
  140. It defines how many concurrent crashing processes may be piped to user
  141. space applications in parallel.
  142. If this value is exceeded, then those crashing processes above that
  143. value are noted via the kernel log and their cores are skipped.
  144. 0 is a special value, indicating that unlimited processes may be
  145. captured in parallel, but that no waiting will take place (i.e. the
  146. collecting process is not guaranteed access to ``/proc/<crashing
  147. pid>/``).
  148. This value defaults to 0.
  149. core_uses_pid
  150. =============
  151. The default coredump filename is "core". By setting
  152. ``core_uses_pid`` to 1, the coredump filename becomes core.PID.
  153. If `core_pattern`_ does not include "%p" (default does not)
  154. and ``core_uses_pid`` is set, then .PID will be appended to
  155. the filename.
  156. ctrl-alt-del
  157. ============
  158. When the value in this file is 0, ctrl-alt-del is trapped and
  159. sent to the ``init(1)`` program to handle a graceful restart.
  160. When, however, the value is > 0, Linux's reaction to a Vulcan
  161. Nerve Pinch (tm) will be an immediate reboot, without even
  162. syncing its dirty buffers.
  163. Note:
  164. when a program (like dosemu) has the keyboard in 'raw'
  165. mode, the ctrl-alt-del is intercepted by the program before it
  166. ever reaches the kernel tty layer, and it's up to the program
  167. to decide what to do with it.
  168. dmesg_restrict
  169. ==============
  170. This toggle indicates whether unprivileged users are prevented
  171. from using ``dmesg(8)`` to view messages from the kernel's log
  172. buffer.
  173. When ``dmesg_restrict`` is set to 0 there are no restrictions.
  174. When ``dmesg_restrict`` is set to 1, users must have
  175. ``CAP_SYSLOG`` to use ``dmesg(8)``.
  176. The kernel config option ``CONFIG_SECURITY_DMESG_RESTRICT`` sets the
  177. default value of ``dmesg_restrict``.
  178. domainname & hostname
  179. =====================
  180. These files can be used to set the NIS/YP domainname and the
  181. hostname of your box in exactly the same way as the commands
  182. domainname and hostname, i.e.::
  183. # echo "darkstar" > /proc/sys/kernel/hostname
  184. # echo "mydomain" > /proc/sys/kernel/domainname
  185. has the same effect as::
  186. # hostname "darkstar"
  187. # domainname "mydomain"
  188. Note, however, that the classic darkstar.frop.org has the
  189. hostname "darkstar" and DNS (Internet Domain Name Server)
  190. domainname "frop.org", not to be confused with the NIS (Network
  191. Information Service) or YP (Yellow Pages) domainname. These two
  192. domain names are in general different. For a detailed discussion
  193. see the ``hostname(1)`` man page.
  194. firmware_config
  195. ===============
  196. See :doc:`/driver-api/firmware/fallback-mechanisms`.
  197. The entries in this directory allow the firmware loader helper
  198. fallback to be controlled:
  199. * ``force_sysfs_fallback``, when set to 1, forces the use of the
  200. fallback;
  201. * ``ignore_sysfs_fallback``, when set to 1, ignores any fallback.
  202. ftrace_dump_on_oops
  203. ===================
  204. Determines whether ``ftrace_dump()`` should be called on an oops (or
  205. kernel panic). This will output the contents of the ftrace buffers to
  206. the console. This is very useful for capturing traces that lead to
  207. crashes and outputting them to a serial console.
  208. = ===================================================
  209. 0 Disabled (default).
  210. 1 Dump buffers of all CPUs.
  211. 2 Dump the buffer of the CPU that triggered the oops.
  212. = ===================================================
  213. ftrace_enabled, stack_tracer_enabled
  214. ====================================
  215. See :doc:`/trace/ftrace`.
  216. hardlockup_all_cpu_backtrace
  217. ============================
  218. This value controls the hard lockup detector behavior when a hard
  219. lockup condition is detected as to whether or not to gather further
  220. debug information. If enabled, arch-specific all-CPU stack dumping
  221. will be initiated.
  222. = ============================================
  223. 0 Do nothing. This is the default behavior.
  224. 1 On detection capture more debug information.
  225. = ============================================
  226. hardlockup_panic
  227. ================
  228. This parameter can be used to control whether the kernel panics
  229. when a hard lockup is detected.
  230. = ===========================
  231. 0 Don't panic on hard lockup.
  232. 1 Panic on hard lockup.
  233. = ===========================
  234. See :doc:`/admin-guide/lockup-watchdogs` for more information.
  235. This can also be set using the nmi_watchdog kernel parameter.
  236. hotplug
  237. =======
  238. Path for the hotplug policy agent.
  239. Default value is "``/sbin/hotplug``".
  240. hung_task_all_cpu_backtrace
  241. ===========================
  242. If this option is set, the kernel will send an NMI to all CPUs to dump
  243. their backtraces when a hung task is detected. This file shows up if
  244. CONFIG_DETECT_HUNG_TASK and CONFIG_SMP are enabled.
  245. 0: Won't show all CPUs backtraces when a hung task is detected.
  246. This is the default behavior.
  247. 1: Will non-maskably interrupt all CPUs and dump their backtraces when
  248. a hung task is detected.
  249. hung_task_panic
  250. ===============
  251. Controls the kernel's behavior when a hung task is detected.
  252. This file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled.
  253. = =================================================
  254. 0 Continue operation. This is the default behavior.
  255. 1 Panic immediately.
  256. = =================================================
  257. hung_task_check_count
  258. =====================
  259. The upper bound on the number of tasks that are checked.
  260. This file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled.
  261. hung_task_timeout_secs
  262. ======================
  263. When a task in D state did not get scheduled
  264. for more than this value report a warning.
  265. This file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled.
  266. 0 means infinite timeout, no checking is done.
  267. Possible values to set are in range {0:``LONG_MAX``/``HZ``}.
  268. hung_task_check_interval_secs
  269. =============================
  270. Hung task check interval. If hung task checking is enabled
  271. (see `hung_task_timeout_secs`_), the check is done every
  272. ``hung_task_check_interval_secs`` seconds.
  273. This file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled.
  274. 0 (default) means use ``hung_task_timeout_secs`` as checking
  275. interval.
  276. Possible values to set are in range {0:``LONG_MAX``/``HZ``}.
  277. hung_task_warnings
  278. ==================
  279. The maximum number of warnings to report. During a check interval
  280. if a hung task is detected, this value is decreased by 1.
  281. When this value reaches 0, no more warnings will be reported.
  282. This file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled.
  283. -1: report an infinite number of warnings.
  284. hyperv_record_panic_msg
  285. =======================
  286. Controls whether the panic kmsg data should be reported to Hyper-V.
  287. = =========================================================
  288. 0 Do not report panic kmsg data.
  289. 1 Report the panic kmsg data. This is the default behavior.
  290. = =========================================================
  291. ignore-unaligned-usertrap
  292. =========================
  293. On architectures where unaligned accesses cause traps, and where this
  294. feature is supported (``CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN``;
  295. currently, ``arc`` and ``ia64``), controls whether all unaligned traps
  296. are logged.
  297. = =============================================================
  298. 0 Log all unaligned accesses.
  299. 1 Only warn the first time a process traps. This is the default
  300. setting.
  301. = =============================================================
  302. See also `unaligned-trap`_ and `unaligned-dump-stack`_. On ``ia64``,
  303. this allows system administrators to override the
  304. ``IA64_THREAD_UAC_NOPRINT`` ``prctl`` and avoid logs being flooded.
  305. kexec_load_disabled
  306. ===================
  307. A toggle indicating if the ``kexec_load`` syscall has been disabled.
  308. This value defaults to 0 (false: ``kexec_load`` enabled), but can be
  309. set to 1 (true: ``kexec_load`` disabled).
  310. Once true, kexec can no longer be used, and the toggle cannot be set
  311. back to false.
  312. This allows a kexec image to be loaded before disabling the syscall,
  313. allowing a system to set up (and later use) an image without it being
  314. altered.
  315. Generally used together with the `modules_disabled`_ sysctl.
  316. kptr_restrict
  317. =============
  318. This toggle indicates whether restrictions are placed on
  319. exposing kernel addresses via ``/proc`` and other interfaces.
  320. When ``kptr_restrict`` is set to 0 (the default) the address is hashed
  321. before printing.
  322. (This is the equivalent to %p.)
  323. When ``kptr_restrict`` is set to 1, kernel pointers printed using the
  324. %pK format specifier will be replaced with 0s unless the user has
  325. ``CAP_SYSLOG`` and effective user and group ids are equal to the real
  326. ids.
  327. This is because %pK checks are done at read() time rather than open()
  328. time, so if permissions are elevated between the open() and the read()
  329. (e.g via a setuid binary) then %pK will not leak kernel pointers to
  330. unprivileged users.
  331. Note, this is a temporary solution only.
  332. The correct long-term solution is to do the permission checks at
  333. open() time.
  334. Consider removing world read permissions from files that use %pK, and
  335. using `dmesg_restrict`_ to protect against uses of %pK in ``dmesg(8)``
  336. if leaking kernel pointer values to unprivileged users is a concern.
  337. When ``kptr_restrict`` is set to 2, kernel pointers printed using
  338. %pK will be replaced with 0s regardless of privileges.
  339. modprobe
  340. ========
  341. The full path to the usermode helper for autoloading kernel modules,
  342. by default "/sbin/modprobe". This binary is executed when the kernel
  343. requests a module. For example, if userspace passes an unknown
  344. filesystem type to mount(), then the kernel will automatically request
  345. the corresponding filesystem module by executing this usermode helper.
  346. This usermode helper should insert the needed module into the kernel.
  347. This sysctl only affects module autoloading. It has no effect on the
  348. ability to explicitly insert modules.
  349. This sysctl can be used to debug module loading requests::
  350. echo '#! /bin/sh' > /tmp/modprobe
  351. echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe
  352. echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe
  353. chmod a+x /tmp/modprobe
  354. echo /tmp/modprobe > /proc/sys/kernel/modprobe
  355. Alternatively, if this sysctl is set to the empty string, then module
  356. autoloading is completely disabled. The kernel will not try to
  357. execute a usermode helper at all, nor will it call the
  358. kernel_module_request LSM hook.
  359. If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
  360. then the configured static usermode helper overrides this sysctl,
  361. except that the empty string is still accepted to completely disable
  362. module autoloading as described above.
  363. modules_disabled
  364. ================
  365. A toggle value indicating if modules are allowed to be loaded
  366. in an otherwise modular kernel. This toggle defaults to off
  367. (0), but can be set true (1). Once true, modules can be
  368. neither loaded nor unloaded, and the toggle cannot be set back
  369. to false. Generally used with the `kexec_load_disabled`_ toggle.
  370. .. _msgmni:
  371. msgmax, msgmnb, and msgmni
  372. ==========================
  373. ``msgmax`` is the maximum size of an IPC message, in bytes. 8192 by
  374. default (``MSGMAX``).
  375. ``msgmnb`` is the maximum size of an IPC queue, in bytes. 16384 by
  376. default (``MSGMNB``).
  377. ``msgmni`` is the maximum number of IPC queues. 32000 by default
  378. (``MSGMNI``).
  379. msg_next_id, sem_next_id, and shm_next_id (System V IPC)
  380. ========================================================
  381. These three toggles allows to specify desired id for next allocated IPC
  382. object: message, semaphore or shared memory respectively.
  383. By default they are equal to -1, which means generic allocation logic.
  384. Possible values to set are in range {0:``INT_MAX``}.
  385. Notes:
  386. 1) kernel doesn't guarantee, that new object will have desired id. So,
  387. it's up to userspace, how to handle an object with "wrong" id.
  388. 2) Toggle with non-default value will be set back to -1 by kernel after
  389. successful IPC object allocation. If an IPC object allocation syscall
  390. fails, it is undefined if the value remains unmodified or is reset to -1.
  391. ngroups_max
  392. ===========
  393. Maximum number of supplementary groups, _i.e._ the maximum size which
  394. ``setgroups`` will accept. Exports ``NGROUPS_MAX`` from the kernel.
  395. nmi_watchdog
  396. ============
  397. This parameter can be used to control the NMI watchdog
  398. (i.e. the hard lockup detector) on x86 systems.
  399. = =================================
  400. 0 Disable the hard lockup detector.
  401. 1 Enable the hard lockup detector.
  402. = =================================
  403. The hard lockup detector monitors each CPU for its ability to respond to
  404. timer interrupts. The mechanism utilizes CPU performance counter registers
  405. that are programmed to generate Non-Maskable Interrupts (NMIs) periodically
  406. while a CPU is busy. Hence, the alternative name 'NMI watchdog'.
  407. The NMI watchdog is disabled by default if the kernel is running as a guest
  408. in a KVM virtual machine. This default can be overridden by adding::
  409. nmi_watchdog=1
  410. to the guest kernel command line (see :doc:`/admin-guide/kernel-parameters`).
  411. numa_balancing
  412. ==============
  413. Enables/disables automatic page fault based NUMA memory
  414. balancing. Memory is moved automatically to nodes
  415. that access it often.
  416. Enables/disables automatic NUMA memory balancing. On NUMA machines, there
  417. is a performance penalty if remote memory is accessed by a CPU. When this
  418. feature is enabled the kernel samples what task thread is accessing memory
  419. by periodically unmapping pages and later trapping a page fault. At the
  420. time of the page fault, it is determined if the data being accessed should
  421. be migrated to a local memory node.
  422. The unmapping of pages and trapping faults incur additional overhead that
  423. ideally is offset by improved memory locality but there is no universal
  424. guarantee. If the target workload is already bound to NUMA nodes then this
  425. feature should be disabled. Otherwise, if the system overhead from the
  426. feature is too high then the rate the kernel samples for NUMA hinting
  427. faults may be controlled by the `numa_balancing_scan_period_min_ms,
  428. numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms,
  429. numa_balancing_scan_size_mb`_, and numa_balancing_settle_count sysctls.
  430. numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb
  431. ===============================================================================================================================
  432. Automatic NUMA balancing scans tasks address space and unmaps pages to
  433. detect if pages are properly placed or if the data should be migrated to a
  434. memory node local to where the task is running. Every "scan delay" the task
  435. scans the next "scan size" number of pages in its address space. When the
  436. end of the address space is reached the scanner restarts from the beginning.
  437. In combination, the "scan delay" and "scan size" determine the scan rate.
  438. When "scan delay" decreases, the scan rate increases. The scan delay and
  439. hence the scan rate of every task is adaptive and depends on historical
  440. behaviour. If pages are properly placed then the scan delay increases,
  441. otherwise the scan delay decreases. The "scan size" is not adaptive but
  442. the higher the "scan size", the higher the scan rate.
  443. Higher scan rates incur higher system overhead as page faults must be
  444. trapped and potentially data must be migrated. However, the higher the scan
  445. rate, the more quickly a tasks memory is migrated to a local node if the
  446. workload pattern changes and minimises performance impact due to remote
  447. memory accesses. These sysctls control the thresholds for scan delays and
  448. the number of pages scanned.
  449. ``numa_balancing_scan_period_min_ms`` is the minimum time in milliseconds to
  450. scan a tasks virtual memory. It effectively controls the maximum scanning
  451. rate for each task.
  452. ``numa_balancing_scan_delay_ms`` is the starting "scan delay" used for a task
  453. when it initially forks.
  454. ``numa_balancing_scan_period_max_ms`` is the maximum time in milliseconds to
  455. scan a tasks virtual memory. It effectively controls the minimum scanning
  456. rate for each task.
  457. ``numa_balancing_scan_size_mb`` is how many megabytes worth of pages are
  458. scanned for a given scan.
  459. oops_all_cpu_backtrace
  460. ======================
  461. If this option is set, the kernel will send an NMI to all CPUs to dump
  462. their backtraces when an oops event occurs. It should be used as a last
  463. resort in case a panic cannot be triggered (to protect VMs running, for
  464. example) or kdump can't be collected. This file shows up if CONFIG_SMP
  465. is enabled.
  466. 0: Won't show all CPUs backtraces when an oops is detected.
  467. This is the default behavior.
  468. 1: Will non-maskably interrupt all CPUs and dump their backtraces when
  469. an oops event is detected.
  470. osrelease, ostype & version
  471. ===========================
  472. ::
  473. # cat osrelease
  474. 2.1.88
  475. # cat ostype
  476. Linux
  477. # cat version
  478. #5 Wed Feb 25 21:49:24 MET 1998
  479. The files ``osrelease`` and ``ostype`` should be clear enough.
  480. ``version``
  481. needs a little more clarification however. The '#5' means that
  482. this is the fifth kernel built from this source base and the
  483. date behind it indicates the time the kernel was built.
  484. The only way to tune these values is to rebuild the kernel :-)
  485. overflowgid & overflowuid
  486. =========================
  487. if your architecture did not always support 32-bit UIDs (i.e. arm,
  488. i386, m68k, sh, and sparc32), a fixed UID and GID will be returned to
  489. applications that use the old 16-bit UID/GID system calls, if the
  490. actual UID or GID would exceed 65535.
  491. These sysctls allow you to change the value of the fixed UID and GID.
  492. The default is 65534.
  493. panic
  494. =====
  495. The value in this file determines the behaviour of the kernel on a
  496. panic:
  497. * if zero, the kernel will loop forever;
  498. * if negative, the kernel will reboot immediately;
  499. * if positive, the kernel will reboot after the corresponding number
  500. of seconds.
  501. When you use the software watchdog, the recommended setting is 60.
  502. panic_on_io_nmi
  503. ===============
  504. Controls the kernel's behavior when a CPU receives an NMI caused by
  505. an IO error.
  506. = ==================================================================
  507. 0 Try to continue operation (default).
  508. 1 Panic immediately. The IO error triggered an NMI. This indicates a
  509. serious system condition which could result in IO data corruption.
  510. Rather than continuing, panicking might be a better choice. Some
  511. servers issue this sort of NMI when the dump button is pushed,
  512. and you can use this option to take a crash dump.
  513. = ==================================================================
  514. panic_on_oops
  515. =============
  516. Controls the kernel's behaviour when an oops or BUG is encountered.
  517. = ===================================================================
  518. 0 Try to continue operation.
  519. 1 Panic immediately. If the `panic` sysctl is also non-zero then the
  520. machine will be rebooted.
  521. = ===================================================================
  522. panic_on_stackoverflow
  523. ======================
  524. Controls the kernel's behavior when detecting the overflows of
  525. kernel, IRQ and exception stacks except a user stack.
  526. This file shows up if ``CONFIG_DEBUG_STACKOVERFLOW`` is enabled.
  527. = ==========================
  528. 0 Try to continue operation.
  529. 1 Panic immediately.
  530. = ==========================
  531. panic_on_unrecovered_nmi
  532. ========================
  533. The default Linux behaviour on an NMI of either memory or unknown is
  534. to continue operation. For many environments such as scientific
  535. computing it is preferable that the box is taken out and the error
  536. dealt with than an uncorrected parity/ECC error get propagated.
  537. A small number of systems do generate NMIs for bizarre random reasons
  538. such as power management so the default is off. That sysctl works like
  539. the existing panic controls already in that directory.
  540. panic_on_warn
  541. =============
  542. Calls panic() in the WARN() path when set to 1. This is useful to avoid
  543. a kernel rebuild when attempting to kdump at the location of a WARN().
  544. = ================================================
  545. 0 Only WARN(), default behaviour.
  546. 1 Call panic() after printing out WARN() location.
  547. = ================================================
  548. panic_print
  549. ===========
  550. Bitmask for printing system info when panic happens. User can chose
  551. combination of the following bits:
  552. ===== ============================================
  553. bit 0 print all tasks info
  554. bit 1 print system memory info
  555. bit 2 print timer info
  556. bit 3 print locks info if ``CONFIG_LOCKDEP`` is on
  557. bit 4 print ftrace buffer
  558. bit 5 print all printk messages in buffer
  559. ===== ============================================
  560. So for example to print tasks and memory info on panic, user can::
  561. echo 3 > /proc/sys/kernel/panic_print
  562. panic_on_rcu_stall
  563. ==================
  564. When set to 1, calls panic() after RCU stall detection messages. This
  565. is useful to define the root cause of RCU stalls using a vmcore.
  566. = ============================================================
  567. 0 Do not panic() when RCU stall takes place, default behavior.
  568. 1 panic() after printing RCU stall messages.
  569. = ============================================================
  570. perf_cpu_time_max_percent
  571. =========================
  572. Hints to the kernel how much CPU time it should be allowed to
  573. use to handle perf sampling events. If the perf subsystem
  574. is informed that its samples are exceeding this limit, it
  575. will drop its sampling frequency to attempt to reduce its CPU
  576. usage.
  577. Some perf sampling happens in NMIs. If these samples
  578. unexpectedly take too long to execute, the NMIs can become
  579. stacked up next to each other so much that nothing else is
  580. allowed to execute.
  581. ===== ========================================================
  582. 0 Disable the mechanism. Do not monitor or correct perf's
  583. sampling rate no matter how CPU time it takes.
  584. 1-100 Attempt to throttle perf's sample rate to this
  585. percentage of CPU. Note: the kernel calculates an
  586. "expected" length of each sample event. 100 here means
  587. 100% of that expected length. Even if this is set to
  588. 100, you may still see sample throttling if this
  589. length is exceeded. Set to 0 if you truly do not care
  590. how much CPU is consumed.
  591. ===== ========================================================
  592. perf_event_paranoid
  593. ===================
  594. Controls use of the performance events system by unprivileged
  595. users (without CAP_PERFMON). The default value is 2.
  596. For backward compatibility reasons access to system performance
  597. monitoring and observability remains open for CAP_SYS_ADMIN
  598. privileged processes but CAP_SYS_ADMIN usage for secure system
  599. performance monitoring and observability operations is discouraged
  600. with respect to CAP_PERFMON use cases.
  601. === ==================================================================
  602. -1 Allow use of (almost) all events by all users.
  603. Ignore mlock limit after perf_event_mlock_kb without
  604. ``CAP_IPC_LOCK``.
  605. >=0 Disallow ftrace function tracepoint by users without
  606. ``CAP_PERFMON``.
  607. Disallow raw tracepoint access by users without ``CAP_PERFMON``.
  608. >=1 Disallow CPU event access by users without ``CAP_PERFMON``.
  609. >=2 Disallow kernel profiling by users without ``CAP_PERFMON``.
  610. === ==================================================================
  611. perf_event_max_stack
  612. ====================
  613. Controls maximum number of stack frames to copy for (``attr.sample_type &
  614. PERF_SAMPLE_CALLCHAIN``) configured events, for instance, when using
  615. '``perf record -g``' or '``perf trace --call-graph fp``'.
  616. This can only be done when no events are in use that have callchains
  617. enabled, otherwise writing to this file will return ``-EBUSY``.
  618. The default value is 127.
  619. perf_event_mlock_kb
  620. ===================
  621. Control size of per-cpu ring buffer not counted agains mlock limit.
  622. The default value is 512 + 1 page
  623. perf_event_max_contexts_per_stack
  624. =================================
  625. Controls maximum number of stack frame context entries for
  626. (``attr.sample_type & PERF_SAMPLE_CALLCHAIN``) configured events, for
  627. instance, when using '``perf record -g``' or '``perf trace --call-graph fp``'.
  628. This can only be done when no events are in use that have callchains
  629. enabled, otherwise writing to this file will return ``-EBUSY``.
  630. The default value is 8.
  631. pid_max
  632. =======
  633. PID allocation wrap value. When the kernel's next PID value
  634. reaches this value, it wraps back to a minimum PID value.
  635. PIDs of value ``pid_max`` or larger are not allocated.
  636. ns_last_pid
  637. ===========
  638. The last pid allocated in the current (the one task using this sysctl
  639. lives in) pid namespace. When selecting a pid for a next task on fork
  640. kernel tries to allocate a number starting from this one.
  641. powersave-nap (PPC only)
  642. ========================
  643. If set, Linux-PPC will use the 'nap' mode of powersaving,
  644. otherwise the 'doze' mode will be used.
  645. ==============================================================
  646. printk
  647. ======
  648. The four values in printk denote: ``console_loglevel``,
  649. ``default_message_loglevel``, ``minimum_console_loglevel`` and
  650. ``default_console_loglevel`` respectively.
  651. These values influence printk() behavior when printing or
  652. logging error messages. See '``man 2 syslog``' for more info on
  653. the different loglevels.
  654. ======================== =====================================
  655. console_loglevel messages with a higher priority than
  656. this will be printed to the console
  657. default_message_loglevel messages without an explicit priority
  658. will be printed with this priority
  659. minimum_console_loglevel minimum (highest) value to which
  660. console_loglevel can be set
  661. default_console_loglevel default value for console_loglevel
  662. ======================== =====================================
  663. printk_delay
  664. ============
  665. Delay each printk message in ``printk_delay`` milliseconds
  666. Value from 0 - 10000 is allowed.
  667. printk_ratelimit
  668. ================
  669. Some warning messages are rate limited. ``printk_ratelimit`` specifies
  670. the minimum length of time between these messages (in seconds).
  671. The default value is 5 seconds.
  672. A value of 0 will disable rate limiting.
  673. printk_ratelimit_burst
  674. ======================
  675. While long term we enforce one message per `printk_ratelimit`_
  676. seconds, we do allow a burst of messages to pass through.
  677. ``printk_ratelimit_burst`` specifies the number of messages we can
  678. send before ratelimiting kicks in.
  679. The default value is 10 messages.
  680. printk_devkmsg
  681. ==============
  682. Control the logging to ``/dev/kmsg`` from userspace:
  683. ========= =============================================
  684. ratelimit default, ratelimited
  685. on unlimited logging to /dev/kmsg from userspace
  686. off logging to /dev/kmsg disabled
  687. ========= =============================================
  688. The kernel command line parameter ``printk.devkmsg=`` overrides this and is
  689. a one-time setting until next reboot: once set, it cannot be changed by
  690. this sysctl interface anymore.
  691. ==============================================================
  692. pty
  693. ===
  694. See Documentation/filesystems/devpts.rst.
  695. random
  696. ======
  697. This is a directory, with the following entries:
  698. * ``boot_id``: a UUID generated the first time this is retrieved, and
  699. unvarying after that;
  700. * ``entropy_avail``: the pool's entropy count, in bits;
  701. * ``poolsize``: the entropy pool size, in bits;
  702. * ``urandom_min_reseed_secs``: obsolete (used to determine the minimum
  703. number of seconds between urandom pool reseeding).
  704. * ``uuid``: a UUID generated every time this is retrieved (this can
  705. thus be used to generate UUIDs at will);
  706. * ``write_wakeup_threshold``: when the entropy count drops below this
  707. (as a number of bits), processes waiting to write to ``/dev/random``
  708. are woken up.
  709. If ``drivers/char/random.c`` is built with ``ADD_INTERRUPT_BENCH``
  710. defined, these additional entries are present:
  711. * ``add_interrupt_avg_cycles``: the average number of cycles between
  712. interrupts used to feed the pool;
  713. * ``add_interrupt_avg_deviation``: the standard deviation seen on the
  714. number of cycles between interrupts used to feed the pool.
  715. randomize_va_space
  716. ==================
  717. This option can be used to select the type of process address
  718. space randomization that is used in the system, for architectures
  719. that support this feature.
  720. == ===========================================================================
  721. 0 Turn the process address space randomization off. This is the
  722. default for architectures that do not support this feature anyways,
  723. and kernels that are booted with the "norandmaps" parameter.
  724. 1 Make the addresses of mmap base, stack and VDSO page randomized.
  725. This, among other things, implies that shared libraries will be
  726. loaded to random addresses. Also for PIE-linked binaries, the
  727. location of code start is randomized. This is the default if the
  728. ``CONFIG_COMPAT_BRK`` option is enabled.
  729. 2 Additionally enable heap randomization. This is the default if
  730. ``CONFIG_COMPAT_BRK`` is disabled.
  731. There are a few legacy applications out there (such as some ancient
  732. versions of libc.so.5 from 1996) that assume that brk area starts
  733. just after the end of the code+bss. These applications break when
  734. start of the brk area is randomized. There are however no known
  735. non-legacy applications that would be broken this way, so for most
  736. systems it is safe to choose full randomization.
  737. Systems with ancient and/or broken binaries should be configured
  738. with ``CONFIG_COMPAT_BRK`` enabled, which excludes the heap from process
  739. address space randomization.
  740. == ===========================================================================
  741. real-root-dev
  742. =============
  743. See :doc:`/admin-guide/initrd`.
  744. reboot-cmd (SPARC only)
  745. =======================
  746. ??? This seems to be a way to give an argument to the Sparc
  747. ROM/Flash boot loader. Maybe to tell it what to do after
  748. rebooting. ???
  749. sched_energy_aware
  750. ==================
  751. Enables/disables Energy Aware Scheduling (EAS). EAS starts
  752. automatically on platforms where it can run (that is,
  753. platforms with asymmetric CPU topologies and having an Energy
  754. Model available). If your platform happens to meet the
  755. requirements for EAS but you do not want to use it, change
  756. this value to 0.
  757. sched_schedstats
  758. ================
  759. Enables/disables scheduler statistics. Enabling this feature
  760. incurs a small amount of overhead in the scheduler but is
  761. useful for debugging and performance tuning.
  762. sched_util_clamp_min:
  763. =====================
  764. Max allowed *minimum* utilization.
  765. Default value is 1024, which is the maximum possible value.
  766. It means that any requested uclamp.min value cannot be greater than
  767. sched_util_clamp_min, i.e., it is restricted to the range
  768. [0:sched_util_clamp_min].
  769. sched_util_clamp_max:
  770. =====================
  771. Max allowed *maximum* utilization.
  772. Default value is 1024, which is the maximum possible value.
  773. It means that any requested uclamp.max value cannot be greater than
  774. sched_util_clamp_max, i.e., it is restricted to the range
  775. [0:sched_util_clamp_max].
  776. sched_util_clamp_min_rt_default:
  777. ================================
  778. By default Linux is tuned for performance. Which means that RT tasks always run
  779. at the highest frequency and most capable (highest capacity) CPU (in
  780. heterogeneous systems).
  781. Uclamp achieves this by setting the requested uclamp.min of all RT tasks to
  782. 1024 by default, which effectively boosts the tasks to run at the highest
  783. frequency and biases them to run on the biggest CPU.
  784. This knob allows admins to change the default behavior when uclamp is being
  785. used. In battery powered devices particularly, running at the maximum
  786. capacity and frequency will increase energy consumption and shorten the battery
  787. life.
  788. This knob is only effective for RT tasks which the user hasn't modified their
  789. requested uclamp.min value via sched_setattr() syscall.
  790. This knob will not escape the range constraint imposed by sched_util_clamp_min
  791. defined above.
  792. For example if
  793. sched_util_clamp_min_rt_default = 800
  794. sched_util_clamp_min = 600
  795. Then the boost will be clamped to 600 because 800 is outside of the permissible
  796. range of [0:600]. This could happen for instance if a powersave mode will
  797. restrict all boosts temporarily by modifying sched_util_clamp_min. As soon as
  798. this restriction is lifted, the requested sched_util_clamp_min_rt_default
  799. will take effect.
  800. seccomp
  801. =======
  802. See :doc:`/userspace-api/seccomp_filter`.
  803. sg-big-buff
  804. ===========
  805. This file shows the size of the generic SCSI (sg) buffer.
  806. You can't tune it just yet, but you could change it on
  807. compile time by editing ``include/scsi/sg.h`` and changing
  808. the value of ``SG_BIG_BUFF``.
  809. There shouldn't be any reason to change this value. If
  810. you can come up with one, you probably know what you
  811. are doing anyway :)
  812. shmall
  813. ======
  814. This parameter sets the total amount of shared memory pages that
  815. can be used system wide. Hence, ``shmall`` should always be at least
  816. ``ceil(shmmax/PAGE_SIZE)``.
  817. If you are not sure what the default ``PAGE_SIZE`` is on your Linux
  818. system, you can run the following command::
  819. # getconf PAGE_SIZE
  820. shmmax
  821. ======
  822. This value can be used to query and set the run time limit
  823. on the maximum shared memory segment size that can be created.
  824. Shared memory segments up to 1Gb are now supported in the
  825. kernel. This value defaults to ``SHMMAX``.
  826. shmmni
  827. ======
  828. This value determines the maximum number of shared memory segments.
  829. 4096 by default (``SHMMNI``).
  830. shm_rmid_forced
  831. ===============
  832. Linux lets you set resource limits, including how much memory one
  833. process can consume, via ``setrlimit(2)``. Unfortunately, shared memory
  834. segments are allowed to exist without association with any process, and
  835. thus might not be counted against any resource limits. If enabled,
  836. shared memory segments are automatically destroyed when their attach
  837. count becomes zero after a detach or a process termination. It will
  838. also destroy segments that were created, but never attached to, on exit
  839. from the process. The only use left for ``IPC_RMID`` is to immediately
  840. destroy an unattached segment. Of course, this breaks the way things are
  841. defined, so some applications might stop working. Note that this
  842. feature will do you no good unless you also configure your resource
  843. limits (in particular, ``RLIMIT_AS`` and ``RLIMIT_NPROC``). Most systems don't
  844. need this.
  845. Note that if you change this from 0 to 1, already created segments
  846. without users and with a dead originative process will be destroyed.
  847. sysctl_writes_strict
  848. ====================
  849. Control how file position affects the behavior of updating sysctl values
  850. via the ``/proc/sys`` interface:
  851. == ======================================================================
  852. -1 Legacy per-write sysctl value handling, with no printk warnings.
  853. Each write syscall must fully contain the sysctl value to be
  854. written, and multiple writes on the same sysctl file descriptor
  855. will rewrite the sysctl value, regardless of file position.
  856. 0 Same behavior as above, but warn about processes that perform writes
  857. to a sysctl file descriptor when the file position is not 0.
  858. 1 (default) Respect file position when writing sysctl strings. Multiple
  859. writes will append to the sysctl value buffer. Anything past the max
  860. length of the sysctl value buffer will be ignored. Writes to numeric
  861. sysctl entries must always be at file position 0 and the value must
  862. be fully contained in the buffer sent in the write syscall.
  863. == ======================================================================
  864. softlockup_all_cpu_backtrace
  865. ============================
  866. This value controls the soft lockup detector thread's behavior
  867. when a soft lockup condition is detected as to whether or not
  868. to gather further debug information. If enabled, each cpu will
  869. be issued an NMI and instructed to capture stack trace.
  870. This feature is only applicable for architectures which support
  871. NMI.
  872. = ============================================
  873. 0 Do nothing. This is the default behavior.
  874. 1 On detection capture more debug information.
  875. = ============================================
  876. softlockup_panic
  877. =================
  878. This parameter can be used to control whether the kernel panics
  879. when a soft lockup is detected.
  880. = ============================================
  881. 0 Don't panic on soft lockup.
  882. 1 Panic on soft lockup.
  883. = ============================================
  884. This can also be set using the softlockup_panic kernel parameter.
  885. soft_watchdog
  886. =============
  887. This parameter can be used to control the soft lockup detector.
  888. = =================================
  889. 0 Disable the soft lockup detector.
  890. 1 Enable the soft lockup detector.
  891. = =================================
  892. The soft lockup detector monitors CPUs for threads that are hogging the CPUs
  893. without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads
  894. from running. The mechanism depends on the CPUs ability to respond to timer
  895. interrupts which are needed for the 'watchdog/N' threads to be woken up by
  896. the watchdog timer function, otherwise the NMI watchdog — if enabled — can
  897. detect a hard lockup condition.
  898. stack_erasing
  899. =============
  900. This parameter can be used to control kernel stack erasing at the end
  901. of syscalls for kernels built with ``CONFIG_GCC_PLUGIN_STACKLEAK``.
  902. That erasing reduces the information which kernel stack leak bugs
  903. can reveal and blocks some uninitialized stack variable attacks.
  904. The tradeoff is the performance impact: on a single CPU system kernel
  905. compilation sees a 1% slowdown, other systems and workloads may vary.
  906. = ====================================================================
  907. 0 Kernel stack erasing is disabled, STACKLEAK_METRICS are not updated.
  908. 1 Kernel stack erasing is enabled (default), it is performed before
  909. returning to the userspace at the end of syscalls.
  910. = ====================================================================
  911. stop-a (SPARC only)
  912. ===================
  913. Controls Stop-A:
  914. = ====================================
  915. 0 Stop-A has no effect.
  916. 1 Stop-A breaks to the PROM (default).
  917. = ====================================
  918. Stop-A is always enabled on a panic, so that the user can return to
  919. the boot PROM.
  920. sysrq
  921. =====
  922. See :doc:`/admin-guide/sysrq`.
  923. tainted
  924. =======
  925. Non-zero if the kernel has been tainted. Numeric values, which can be
  926. ORed together. The letters are seen in "Tainted" line of Oops reports.
  927. ====== ===== ==============================================================
  928. 1 `(P)` proprietary module was loaded
  929. 2 `(F)` module was force loaded
  930. 4 `(S)` SMP kernel oops on an officially SMP incapable processor
  931. 8 `(R)` module was force unloaded
  932. 16 `(M)` processor reported a Machine Check Exception (MCE)
  933. 32 `(B)` bad page referenced or some unexpected page flags
  934. 64 `(U)` taint requested by userspace application
  935. 128 `(D)` kernel died recently, i.e. there was an OOPS or BUG
  936. 256 `(A)` an ACPI table was overridden by user
  937. 512 `(W)` kernel issued warning
  938. 1024 `(C)` staging driver was loaded
  939. 2048 `(I)` workaround for bug in platform firmware applied
  940. 4096 `(O)` externally-built ("out-of-tree") module was loaded
  941. 8192 `(E)` unsigned module was loaded
  942. 16384 `(L)` soft lockup occurred
  943. 32768 `(K)` kernel has been live patched
  944. 65536 `(X)` Auxiliary taint, defined and used by for distros
  945. 131072 `(T)` The kernel was built with the struct randomization plugin
  946. ====== ===== ==============================================================
  947. See :doc:`/admin-guide/tainted-kernels` for more information.
  948. Note:
  949. writes to this sysctl interface will fail with ``EINVAL`` if the kernel is
  950. booted with the command line option ``panic_on_taint=<bitmask>,nousertaint``
  951. and any of the ORed together values being written to ``tainted`` match with
  952. the bitmask declared on panic_on_taint.
  953. See :doc:`/admin-guide/kernel-parameters` for more details on that particular
  954. kernel command line option and its optional ``nousertaint`` switch.
  955. threads-max
  956. ===========
  957. This value controls the maximum number of threads that can be created
  958. using ``fork()``.
  959. During initialization the kernel sets this value such that even if the
  960. maximum number of threads is created, the thread structures occupy only
  961. a part (1/8th) of the available RAM pages.
  962. The minimum value that can be written to ``threads-max`` is 1.
  963. The maximum value that can be written to ``threads-max`` is given by the
  964. constant ``FUTEX_TID_MASK`` (0x3fffffff).
  965. If a value outside of this range is written to ``threads-max`` an
  966. ``EINVAL`` error occurs.
  967. traceoff_on_warning
  968. ===================
  969. When set, disables tracing (see :doc:`/trace/ftrace`) when a
  970. ``WARN()`` is hit.
  971. tracepoint_printk
  972. =================
  973. When tracepoints are sent to printk() (enabled by the ``tp_printk``
  974. boot parameter), this entry provides runtime control::
  975. echo 0 > /proc/sys/kernel/tracepoint_printk
  976. will stop tracepoints from being sent to printk(), and::
  977. echo 1 > /proc/sys/kernel/tracepoint_printk
  978. will send them to printk() again.
  979. This only works if the kernel was booted with ``tp_printk`` enabled.
  980. See :doc:`/admin-guide/kernel-parameters` and
  981. :doc:`/trace/boottime-trace`.
  982. .. _unaligned-dump-stack:
  983. unaligned-dump-stack (ia64)
  984. ===========================
  985. When logging unaligned accesses, controls whether the stack is
  986. dumped.
  987. = ===================================================
  988. 0 Do not dump the stack. This is the default setting.
  989. 1 Dump the stack.
  990. = ===================================================
  991. See also `ignore-unaligned-usertrap`_.
  992. unaligned-trap
  993. ==============
  994. On architectures where unaligned accesses cause traps, and where this
  995. feature is supported (``CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW``; currently,
  996. ``arc`` and ``parisc``), controls whether unaligned traps are caught
  997. and emulated (instead of failing).
  998. = ========================================================
  999. 0 Do not emulate unaligned accesses.
  1000. 1 Emulate unaligned accesses. This is the default setting.
  1001. = ========================================================
  1002. See also `ignore-unaligned-usertrap`_.
  1003. unknown_nmi_panic
  1004. =================
  1005. The value in this file affects behavior of handling NMI. When the
  1006. value is non-zero, unknown NMI is trapped and then panic occurs. At
  1007. that time, kernel debugging information is displayed on console.
  1008. NMI switch that most IA32 servers have fires unknown NMI up, for
  1009. example. If a system hangs up, try pressing the NMI switch.
  1010. unprivileged_bpf_disabled
  1011. =========================
  1012. Writing 1 to this entry will disable unprivileged calls to ``bpf()``;
  1013. once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` or ``CAP_BPF``
  1014. will return ``-EPERM``. Once set to 1, this can't be cleared from the
  1015. running kernel anymore.
  1016. Writing 2 to this entry will also disable unprivileged calls to ``bpf()``,
  1017. however, an admin can still change this setting later on, if needed, by
  1018. writing 0 or 1 to this entry.
  1019. If ``BPF_UNPRIV_DEFAULT_OFF`` is enabled in the kernel config, then this
  1020. entry will default to 2 instead of 0.
  1021. = =============================================================
  1022. 0 Unprivileged calls to ``bpf()`` are enabled
  1023. 1 Unprivileged calls to ``bpf()`` are disabled without recovery
  1024. 2 Unprivileged calls to ``bpf()`` are disabled
  1025. = =============================================================
  1026. watchdog
  1027. ========
  1028. This parameter can be used to disable or enable the soft lockup detector
  1029. *and* the NMI watchdog (i.e. the hard lockup detector) at the same time.
  1030. = ==============================
  1031. 0 Disable both lockup detectors.
  1032. 1 Enable both lockup detectors.
  1033. = ==============================
  1034. The soft lockup detector and the NMI watchdog can also be disabled or
  1035. enabled individually, using the ``soft_watchdog`` and ``nmi_watchdog``
  1036. parameters.
  1037. If the ``watchdog`` parameter is read, for example by executing::
  1038. cat /proc/sys/kernel/watchdog
  1039. the output of this command (0 or 1) shows the logical OR of
  1040. ``soft_watchdog`` and ``nmi_watchdog``.
  1041. watchdog_cpumask
  1042. ================
  1043. This value can be used to control on which cpus the watchdog may run.
  1044. The default cpumask is all possible cores, but if ``NO_HZ_FULL`` is
  1045. enabled in the kernel config, and cores are specified with the
  1046. ``nohz_full=`` boot argument, those cores are excluded by default.
  1047. Offline cores can be included in this mask, and if the core is later
  1048. brought online, the watchdog will be started based on the mask value.
  1049. Typically this value would only be touched in the ``nohz_full`` case
  1050. to re-enable cores that by default were not running the watchdog,
  1051. if a kernel lockup was suspected on those cores.
  1052. The argument value is the standard cpulist format for cpumasks,
  1053. so for example to enable the watchdog on cores 0, 2, 3, and 4 you
  1054. might say::
  1055. echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask
  1056. watchdog_thresh
  1057. ===============
  1058. This value can be used to control the frequency of hrtimer and NMI
  1059. events and the soft and hard lockup thresholds. The default threshold
  1060. is 10 seconds.
  1061. The softlockup threshold is (``2 * watchdog_thresh``). Setting this
  1062. tunable to zero will disable lockup detection altogether.