Skip to content

Instantly share code, notes, and snippets.

@bols-blue
Forked from anonymous/fs.txt
Last active February 13, 2017 14:37
Show Gist options
  • Save bols-blue/3b44203a8dfa8e9a685d898a5b5d15e8 to your computer and use it in GitHub Desktop.
Save bols-blue/3b44203a8dfa8e9a685d898a5b5d15e8 to your computer and use it in GitHub Desktop.
kernel param
Documentation for /proc/sys/fs/* kernel version 2.2.10
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
(c) 2009, Shen Feng<shen@cn.fujitsu.com>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in
/proc/sys/fs/ and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune and monitor
miscellaneous and general things in the operation of the Linux
kernel. Since some of the files _can_ be used to screw up your
system, it is advisable to read both documentation and source
before actually making adjustments.
1. /proc/sys/fs
----------------------------------------------------------
Currently, these files are in /proc/sys/fs:
- aio-max-nr
- aio-nr
- dentry-state
- dquot-max
- dquot-nr
- file-max
- file-nr
- inode-max
- inode-nr
- inode-state
- nr_open
- overflowuid
- overflowgid
- pipe-user-pages-hard
- pipe-user-pages-soft
- protected_hardlinks
- protected_symlinks
- suid_dumpable
- super-max
- super-nr
==============================================================
aio-nr & aio-max-nr:
aio-nr is the running total of the number of events specified on the
io_setup system call for all currently active aio contexts. If aio-nr
reaches aio-max-nr then io_setup will fail with EAGAIN. Note that
raising aio-max-nr does not result in the pre-allocation or re-sizing
of any kernel data structures.
==============================================================
dentry-state:
From linux/fs/dentry.c:
--------------------------------------------------------------
struct {
int nr_dentry;
int nr_unused;
int age_limit; /* age in seconds */
int want_pages; /* pages requested by system */
int dummy[2];
} dentry_stat = {0, 0, 45, 0,};
--------------------------------------------------------------
Dentries are dynamically allocated and deallocated, and
nr_dentry seems to be 0 all the time. Hence it's safe to
assume that only nr_unused, age_limit and want_pages are
used. Nr_unused seems to be exactly what its name says.
Age_limit is the age in seconds after which dcache entries
can be reclaimed when memory is short and want_pages is
nonzero when shrink_dcache_pages() has been called and the
dcache isn't pruned yet.
==============================================================
dquot-max & dquot-nr:
The file dquot-max shows the maximum number of cached disk
quota entries.
The file dquot-nr shows the number of allocated disk quota
entries and the number of free disk quota entries.
If the number of free cached disk quotas is very low and
you have some awesome number of simultaneous system users,
you might want to raise the limit.
==============================================================
file-max & file-nr:
The value in file-max denotes the maximum number of file-
handles that the Linux kernel will allocate. When you get lots
of error messages about running out of file handles, you might
want to increase this limit.
Historically,the kernel was able to allocate file handles
dynamically, but not to free them again. The three values in
file-nr denote the number of allocated file handles, the number
of allocated but unused file handles, and the maximum number of
file handles. Linux 2.6 always reports 0 as the number of free
file handles -- this is not an error, it just means that the
number of allocated file handles exactly matches the number of
used file handles.
Attempts to allocate more file descriptors than file-max are
reported with printk, look for "VFS: file-max limit <number>
reached".
==============================================================
nr_open:
This denotes the maximum number of file-handles a process can
allocate. Default value is 1024*1024 (1048576) which should be
enough for most machines. Actual limit depends on RLIMIT_NOFILE
resource limit.
==============================================================
inode-max, inode-nr & inode-state:
As with file handles, the kernel allocates the inode structures
dynamically, but can't free them yet.
The value in inode-max denotes the maximum number of inode
handlers. This value should be 3-4 times larger than the value
in file-max, since stdin, stdout and network sockets also
need an inode struct to handle them. When you regularly run
out of inodes, you need to increase this value.
The file inode-nr contains the first two items from
inode-state, so we'll skip to that file...
Inode-state contains three actual numbers and four dummies.
The actual numbers are, in order of appearance, nr_inodes,
nr_free_inodes and preshrink.
Nr_inodes stands for the number of inodes the system has
allocated, this can be slightly more than inode-max because
Linux allocates them one pageful at a time.
Nr_free_inodes represents the number of free inodes (?) and
preshrink is nonzero when the nr_inodes > inode-max and the
system needs to prune the inode list instead of allocating
more.
==============================================================
overflowgid & overflowuid:
Some filesystems only support 16-bit UIDs and GIDs, although in Linux
UIDs and GIDs are 32 bits. When one of these filesystems is mounted
with writes enabled, any UID or GID that would exceed 65535 is translated
to a fixed value before being written to disk.
These sysctls allow you to change the value of the fixed UID and GID.
The default is 65534.
==============================================================
pipe-user-pages-hard:
Maximum total number of pages a non-privileged user may allocate for pipes.
Once this limit is reached, no new pipes may be allocated until usage goes
below the limit again. When set to 0, no limit is applied, which is the default
setting.
==============================================================
pipe-user-pages-soft:
Maximum total number of pages a non-privileged user may allocate for pipes
before the pipe size gets limited to a single page. Once this limit is reached,
new pipes will be limited to a single page in size for this user in order to
limit total memory usage, and trying to increase them using fcntl() will be
denied until usage goes below the limit again. The default value allows to
allocate up to 1024 pipes at their default size. When set to 0, no limit is
applied.
==============================================================
protected_hardlinks:
A long-standing class of security issues is the hardlink-based
time-of-check-time-of-use race, most commonly seen in world-writable
directories like /tmp. The common method of exploitation of this flaw
is to cross privilege boundaries when following a given hardlink (i.e. a
root process follows a hardlink created by another user). Additionally,
on systems without separated partitions, this stops unauthorized users
from "pinning" vulnerable setuid/setgid files against being upgraded by
the administrator, or linking to special files.
When set to "0", hardlink creation behavior is unrestricted.
When set to "1" hardlinks cannot be created by users if they do not
already own the source file, or do not have read/write access to it.
This protection is based on the restrictions in Openwall and grsecurity.
==============================================================
protected_symlinks:
A long-standing class of security issues is the symlink-based
time-of-check-time-of-use race, most commonly seen in world-writable
directories like /tmp. The common method of exploitation of this flaw
is to cross privilege boundaries when following a given symlink (i.e. a
root process follows a symlink belonging to another user). For a likely
incomplete list of hundreds of examples across the years, please see:
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=/tmp
When set to "0", symlink following behavior is unrestricted.
When set to "1" symlinks are permitted to be followed only when outside
a sticky world-writable directory, or when the uid of the symlink and
follower match, or when the directory owner matches the symlink's owner.
This protection is based on the restrictions in Openwall and grsecurity.
==============================================================
suid_dumpable:
This value can be used to query and set the core dump mode for setuid
or otherwise protected/tainted binaries. The modes are
0 - (default) - traditional behaviour. Any process which has changed
privilege levels or is execute only will not be dumped.
1 - (debug) - all processes dump core when possible. The core dump is
owned by the current user and no security is applied. This is
intended for system debugging situations only. Ptrace is unchecked.
This is insecure as it allows regular users to examine the memory
contents of privileged processes.
2 - (suidsafe) - any binary which normally would not be dumped is dumped
anyway, but only if the "core_pattern" kernel sysctl is set to
either a pipe handler or a fully qualified path. (For more details
on this limitation, see CVE-2006-2451.) This mode is appropriate
when administrators are attempting to debug problems in a normal
environment, and either have a core dump pipe handler that knows
to treat privileged core dumps with care, or specific directory
defined for catching core dumps. If a core dump happens without
a pipe handler or fully qualifid path, a message will be emitted
to syslog warning about the lack of a correct setting.
==============================================================
super-max & super-nr:
These numbers control the maximum number of superblocks, and
thus the maximum number of mounted filesystems the kernel
can have. You only need to increase super-max if you need to
mount more filesystems than the current value in super-max
allows you to.
==============================================================
aio-nr & aio-max-nr:
aio-nr shows the current system-wide number of asynchronous io
requests. aio-max-nr allows you to change the maximum value
aio-nr can grow to.
==============================================================
mount-max:
This denotes the maximum number of mounts that may exist
in a mount namespace.
==============================================================
2. /proc/sys/fs/binfmt_misc
----------------------------------------------------------
Documentation for the files in /proc/sys/fs/binfmt_misc is
in Documentation/binfmt_misc.txt.
3. /proc/sys/fs/mqueue - POSIX message queues filesystem
----------------------------------------------------------
The "mqueue" filesystem provides the necessary kernel features to enable the
creation of a user space library that implements the POSIX message queues
API (as noted by the MSG tag in the POSIX 1003.1-2001 version of the System
Interfaces specification.)
The "mqueue" filesystem contains values for determining/setting the amount of
resources used by the file system.
/proc/sys/fs/mqueue/queues_max is a read/write file for setting/getting the
maximum number of message queues allowed on the system.
/proc/sys/fs/mqueue/msg_max is a read/write file for setting/getting the
maximum number of messages in a queue value. In fact it is the limiting value
for another (user) limit which is set in mq_open invocation. This attribute of
a queue must be less or equal then msg_max.
/proc/sys/fs/mqueue/msgsize_max is a read/write file for setting/getting the
maximum message size value (it is every message queue's attribute set during
its creation).
/proc/sys/fs/mqueue/msg_default is a read/write file for setting/getting the
default number of messages in a queue value if attr parameter of mq_open(2) is
NULL. If it exceed msg_max, the default value is initialized msg_max.
/proc/sys/fs/mqueue/msgsize_default is a read/write file for setting/getting
the default message size value if attr parameter of mq_open(2) is NULL. If it
exceed msgsize_max, the default value is initialized msgsize_max.
4. /proc/sys/fs/epoll - Configuration options for the epoll interface
--------------------------------------------------------
This directory contains configuration options for the epoll(7) interface.
max_user_watches
----------------
Every epoll file descriptor can store a number of files to be monitored
for event readiness. Each one of these monitored files constitutes a "watch".
This configuration option sets the maximum number of "watches" that are
allowed for each user.
Each "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes
on a 64bit one.
The current default value for max_user_watches is the 1/32 of the available
low memory, divided for the "watch" cost in bytes.
Documentation for /proc/sys/kernel/* kernel version 2.2.10 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
(c) 2009, Shen Feng<shen@cn.fujitsu.com>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in/proc/sys/kernel/ and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune and monitormiscellaneous and general things in the operation of the Linuxkernel. Since some of the files _can_ be used to screw up yoursystem, it is advisable to read both documentation and sourcebefore actually making adjustments.
Currently, these files might (depending on your configuration)
show up in /proc/sys/kernel:
- acct- acpi_video_flags- auto_msgmni- bootloader_type [ X86 only ]
- bootloader_version [ X86 only ]
- callhome [ S390 only ]
- cap_last_cap- core_pattern- core_pipe_limit- core_uses_pid- ctrl-alt-del- dmesg_restrict- domainname- hostname- hotplug- hardlockup_all_cpu_backtrace- hung_task_panic- hung_task_check_count- hung_task_timeout_secs- hung_task_warnings- kexec_load_disabled- kptr_restrict- l2cr [ PPC only ]
- modprobe ==> Documentation/debugging-modules.txt- modules_disabled- msg_next_id [ sysv ipc ]
- msgmax- msgmnb- msgmni- nmi_watchdog- osrelease- ostype- overflowgid- overflowuid- panic- panic_on_oops- panic_on_stackoverflow- panic_on_unrecovered_nmi- panic_on_warn- panic_on_rcu_stall- perf_cpu_time_max_percent- perf_event_paranoid- perf_event_max_stack- perf_event_max_contexts_per_stack- pid_max- powersave-nap [ PPC only ]
- printk- printk_delay- printk_ratelimit- printk_ratelimit_burst- pty ==> Documentation/filesystems/devpts.txt- randomize_va_space- real-root-dev ==> Documentation/admin-guide/initrd.rst- reboot-cmd [ SPARC only ]
- rtsig-max- rtsig-nr- sem- sem_next_id [ sysv ipc ]
- sg-big-buff [ generic SCSI device (sg) ]
- shm_next_id [ sysv ipc ]
- shm_rmid_forced- shmall- shmmax [ sysv ipc ]
- shmmni- softlockup_all_cpu_backtrace- soft_watchdog- stop-a [ SPARC only ]
- sysrq ==> Documentation/sysrq.txt- sysctl_writes_strict- tainted- threads-max- unknown_nmi_panic- watchdog- watchdog_thresh- version
==============================================================
acct:
highwater lowwater frequency
If BSD-style process accounting is enabled these values controlits behaviour. If free space on filesystem where the log livesgoes below <lowwater>% accounting suspends. If free space getsabove <highwater>% accounting resumes. <Frequency> determineshow often do we check the amount of free space (value is inseconds). Default:
4 2 30That is, suspend accounting if there left <= 2% free; resume itif we got >=4%; consider information about amount of free spacevalid for 30 seconds.
==============================================================
acpi_video_flags:
flags
See Doc*/kernel/power/video.txt, it allows mode of video boot to beset during run time.
==============================================================
auto_msgmni:
This variable has no effect and may be removed in future kernelreleases. Reading it always returns 0.
Up to Linux 3.17, it enabled/disabled automatic recomputing of msgmniupon memory add/remove or upon ipc namespace creation/removal.
Echoing "1" into this file enabled msgmni automatic recomputing.
Echoing "0" turned it off. auto_msgmni default value was 1.
==============================================================
bootloader_type:
x86 bootloader identification
This gives the bootloader type number as indicated by the bootloader,
shifted left by 4, and OR'd with the low four bits of the bootloaderversion. The reason for this encoding is that this used to match thetype_of_loader field in the kernel header; the encoding is kept forbackwards compatibility. That is, if the full bootloader type numberis 0x15 and the full version number is 0x234, this file will containthe value 340 = 0x154.
See the type_of_loader and ext_loader_type fields inDocumentation/x86/boot.txt for additional information.
==============================================================
bootloader_version:
x86 bootloader version
The complete bootloader version number. In the example above, thisfile will contain the value 564 = 0x234.
See the type_of_loader and ext_loader_ver fields inDocumentation/x86/boot.txt for additional information.
==============================================================
callhome:
Controls the kernel's callhome behavior in case of a kernel panic.
The s390 hardware allows an operating system to send a notificationto a service organization (callhome) in case of an operating system panic.
When the value in this file is 0 (which is the default behavior)
nothing happens in case of a kernel panic. If this value is set to "1"
the complete kernel oops message is send to the IBM customer serviceorganization in case the mainframe the Linux operating system is runningon has a service contract with IBM.
==============================================================
cap_last_cap
Highest valid capability of the running kernel. ExportsCAP_LAST_CAP from the kernel.
==============================================================
core_pattern:
core_pattern is used to specify a core dumpfile pattern name.
. max length 128 characters; default value is "core"
. core_pattern is used as a pattern template for the output filename;
certain string patterns (beginning with '%') are substituted with their actual values.
. backward compatibility with core_uses_pid:
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended to the filename.
. corename format specifiers:
%<NUL> '%' is dropped %% output one '%'
%p pid %P global pid (init PID namespace)
%i tid %I global tid (init PID namespace)
%u uid (in initial user namespace)
%g gid (in initial user namespace)
%d dump mode, matches PR_SET_DUMPABLE and /proc/sys/fs/suid_dumpable %s signal number %t UNIX time of dump %h hostname %e executable filename (may be shortened)
%E executable path %<OTHER> both are dropped. If the first character of the pattern is a '|', the kernel will treat the rest of the pattern as a command to run. The core dump will be written to the standard input of that program instead of to a file.
==============================================================
core_pipe_limit:
This sysctl is only applicable when core_pattern is configured to pipecore files to a user space helper (when the first character ofcore_pattern is a '|', see above). When collecting cores via a pipeto an application, it is occasionally useful for the collectingapplication to gather data about the crashing process from its/proc/pid directory. In order to do this safely, the kernel must waitfor the collecting process to exit, so as not to remove the crashingprocesses proc files prematurely. This in turn creates thepossibility that a misbehaving userspace collecting process can blockthe reaping of a crashed process simply by never exiting. This sysctldefends against that. It defines how many concurrent crashingprocesses may be piped to user space applications in parallel. Ifthis value is exceeded, then those crashing processes above that valueare noted via the kernel log and their cores are skipped. 0 is aspecial value, indicating that unlimited processes may be captured inparallel, but that no waiting will take place (i.e. the collectingprocess is not guaranteed access to /proc/<crashing pid>/). Thisvalue defaults to 0.
==============================================================
core_uses_pid:
The default coredump filename is "core". By settingcore_uses_pid to 1, the coredump filename becomes core.PID.
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended tothe filename.
==============================================================
ctrl-alt-del:
When the value in this file is 0, ctrl-alt-del is trapped andsent to the init(1) program to handle a graceful restart.
When, however, the value is > 0, Linux's reaction to a VulcanNerve Pinch (tm) will be an immediate reboot, without evensyncing its dirty buffers.
Note: when a program (like dosemu) has the keyboard in 'raw'
mode, the ctrl-alt-del is intercepted by the program before itever reaches the kernel tty layer, and it's up to the programto decide what to do with it.
==============================================================
dmesg_restrict:
This toggle indicates whether unprivileged users are preventedfrom using dmesg(8) to view messages from the kernel's log buffer.
When dmesg_restrict is set to (0) there are no restrictions. Whendmesg_restrict is set set to (1), users must have CAP_SYSLOG to usedmesg(8).
The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets thedefault value of dmesg_restrict.
==============================================================
domainname & hostname:
These files can be used to set the NIS/YP domainname and thehostname of your box in exactly the same way as the commandsdomainname and hostname, i.e.:
# echo "darkstar" > /proc/sys/kernel/hostname# echo "mydomain" > /proc/sys/kernel/domainnamehas the same effect as# hostname "darkstar"
# domainname "mydomain"
Note, however, that the classic darkstar.frop.org has thehostname "darkstar" and DNS (Internet Domain Name Server)
domainname "frop.org", not to be confused with the NIS (NetworkInformation Service) or YP (Yellow Pages) domainname. These twodomain names are in general different. For a detailed discussionsee the hostname(1) man page.
==============================================================
hardlockup_all_cpu_backtrace:
This value controls the hard lockup detector behavior when a hardlockup condition is detected as to whether or not to gather furtherdebug information. If enabled, arch-specific all-CPU stack dumpingwill be initiated.
0: do nothing. This is the default behavior.
1: on detection capture more debug information.
==============================================================
hotplug:
Path for the hotplug policy agent.
Default value is "/sbin/hotplug".
==============================================================
hung_task_panic:
Controls the kernel's behavior when a hung task is detected.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: continue operation. This is the default behavior.
1: panic immediately.
==============================================================
hung_task_check_count:
The upper bound on the number of tasks that are checked.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
==============================================================
hung_task_timeout_secs:
Check interval. When a task in D state did not get scheduledfor more than this value report a warning.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: means infinite timeout - no checking done.
Possible values to set are in range {0..LONG_MAX/HZ}.
==============================================================
hung_task_warnings:
The maximum number of warnings to report. During a check intervalif a hung task is detected, this value is decreased by 1.
When this value reaches 0, no more warnings will be reported.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
-1: report an infinite number of warnings.
==============================================================
kexec_load_disabled:
A toggle indicating if the kexec_load syscall has been disabled. Thisvalue defaults to 0 (false: kexec_load enabled), but can be set to 1(true: kexec_load disabled). Once true, kexec can no longer be used, andthe toggle cannot be set back to false. This allows a kexec image to beloaded before disabling the syscall, allowing a system to set up (andlater use) an image without it being altered. Generally used togetherwith the "modules_disabled" sysctl.
==============================================================
kptr_restrict:
This toggle indicates whether restrictions are placed onexposing kernel addresses via /proc and other interfaces.
When kptr_restrict is set to (0), the default, there are no restrictions.
When kptr_restrict is set to (1), kernel pointers printed using the %pKformat specifier will be replaced with 0's unless the user has CAP_SYSLOGand effective user and group ids are equal to the real ids. This isbecause %pK checks are done at read() time rather than open() time, soif permissions are elevated between the open() and the read() (e.g viaa setuid binary) then %pK will not leak kernel pointers to unprivilegedusers. Note, this is a temporary solution only. The correct long-termsolution is to do the permission checks at open() time. Consider removingworld read permissions from files that use %pK, and using dmesg_restrictto protect against uses of %pK in dmesg(8) if leaking kernel pointervalues to unprivileged users is a concern.
When kptr_restrict is set to (2), kernel pointers printed using%pK will be replaced with 0's regardless of privileges.
==============================================================
l2cr: (PPC only)
This flag controls the L2 cache of G3 processor boards. If0, the cache is disabled. Enabled if nonzero.
==============================================================
modules_disabled:
A toggle value indicating if modules are allowed to be loadedin an otherwise modular kernel. This toggle defaults to off(0), but can be set true (1). Once true, modules can beneither loaded nor unloaded, and the toggle cannot be set backto false. Generally used with the "kexec_load_disabled" toggle.
==============================================================
msg_next_id, sem_next_id, and shm_next_id:
These three toggles allows to specify desired id for next allocated IPCobject: message, semaphore or shared memory respectively.
By default they are equal to -1, which means generic allocation logic.
Possible values to set are in range {0..INT_MAX}.
Notes:
1) kernel doesn't guarantee, that new object will have desired id. So,
it's up to userspace, how to handle an object with "wrong" id.
2) Toggle with non-default value will be set back to -1 by kernel aftersuccessful IPC object allocation.
==============================================================
nmi_watchdog:
This parameter can be used to control the NMI watchdog(i.e. the hard lockup detector) on x86 systems.
0 - disable the hard lockup detector 1 - enable the hard lockup detector
The hard lockup detector monitors each CPU for its ability to respond totimer interrupts. The mechanism utilizes CPU performance counter registersthat are programmed to generate Non-Maskable Interrupts (NMIs) periodicallywhile a CPU is busy. Hence, the alternative name 'NMI watchdog'.
The NMI watchdog is disabled by default if the kernel is running as a guestin a KVM virtual machine. This default can be overridden by adding
nmi_watchdog=1
to the guest kernel command line (see Documentation/admin-guide/kernel-parameters.rst).
==============================================================
numa_balancing
Enables/disables automatic page fault based NUMA memorybalancing. Memory is moved automatically to nodesthat access it often.
Enables/disables automatic NUMA memory balancing. On NUMA machines, thereis a performance penalty if remote memory is accessed by a CPU. When thisfeature is enabled the kernel samples what task thread is accessing memoryby periodically unmapping pages and later trapping a page fault. At thetime of the page fault, it is determined if the data being accessed shouldbe migrated to a local memory node.
The unmapping of pages and trapping faults incur additional overhead thatideally is offset by improved memory locality but there is no universalguarantee. If the target workload is already bound to NUMA nodes then thisfeature should be disabled. Otherwise, if the system overhead from thefeature is too high then the rate the kernel samples for NUMA hintingfaults may be controlled by the numa_balancing_scan_period_min_ms,
numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms,
numa_balancing_scan_size_mb, and numa_balancing_settle_count sysctls.
==============================================================
numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms,
numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb
Automatic NUMA balancing scans tasks address space and unmaps pages todetect if pages are properly placed or if the data should be migrated to amemory node local to where the task is running. Every "scan delay" the taskscans the next "scan size" number of pages in its address space. When theend of the address space is reached the scanner restarts from the beginning.
In combination, the "scan delay" and "scan size" determine the scan rate.
When "scan delay" decreases, the scan rate increases. The scan delay andhence the scan rate of every task is adaptive and depends on historicalbehaviour. If pages are properly placed then the scan delay increases,
otherwise the scan delay decreases. The "scan size" is not adaptive butthe higher the "scan size", the higher the scan rate.
Higher scan rates incur higher system overhead as page faults must betrapped and potentially data must be migrated. However, the higher the scanrate, the more quickly a tasks memory is migrated to a local node if theworkload pattern changes and minimises performance impact due to remotememory accesses. These sysctls control the thresholds for scan delays andthe number of pages scanned.
numa_balancing_scan_period_min_ms is the minimum time in milliseconds toscan a tasks virtual memory. It effectively controls the maximum scanningrate for each task.
numa_balancing_scan_delay_ms is the starting "scan delay" used for a taskwhen it initially forks.
numa_balancing_scan_period_max_ms is the maximum time in milliseconds toscan a tasks virtual memory. It effectively controls the minimum scanningrate for each task.
numa_balancing_scan_size_mb is how many megabytes worth of pages arescanned for a given scan.
==============================================================
osrelease, ostype & version:
# cat osrelease2.1.88# cat ostypeLinux# cat version#5 Wed Feb 25 21:49:24 MET 1998
The files osrelease and ostype should be clear enough. Versionneeds a little more clarification however. The '#5' means thatthis is the fifth kernel built from this source base and thedate behind it indicates the time the kernel was built.
The only way to tune these values is to rebuild the kernel :-)
==============================================================
overflowgid & overflowuid:
if your architecture did not always support 32-bit UIDs (i.e. arm,
i386, m68k, sh, and sparc32), a fixed UID and GID will be returned toapplications that use the old 16-bit UID/GID system calls, if theactual UID or GID would exceed 65535.
These sysctls allow you to change the value of the fixed UID and GID.
The default is 65534.
==============================================================
panic:
The value in this file represents the number of seconds the kernelwaits before rebooting on a panic. When you use the software watchdog,
the recommended setting is 60.
==============================================================
panic_on_io_nmi:
Controls the kernel's behavior when a CPU receives an NMI caused byan IO error.
0: try to continue operation (default)
1: panic immediately. The IO error triggered an NMI. This indicates a serious system condition which could result in IO data corruption.
Rather than continuing, panicking might be a better choice. Some servers issue this sort of NMI when the dump button is pushed,
and you can use this option to take a crash dump.
==============================================================
panic_on_oops:
Controls the kernel's behaviour when an oops or BUG is encountered.
0: try to continue operation
1: panic immediately. If the `panic' sysctl is also non-zero then the machine will be rebooted.
==============================================================
panic_on_stackoverflow:
Controls the kernel's behavior when detecting the overflows ofkernel, IRQ and exception stacks except a user stack.
This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.
0: try to continue operation.
1: panic immediately.
==============================================================
panic_on_unrecovered_nmi:
The default Linux behaviour on an NMI of either memory or unknown isto continue operation. For many environments such as scientificcomputing it is preferable that the box is taken out and the errordealt with than an uncorrected parity/ECC error get propagated.
A small number of systems do generate NMI's for bizarre random reasonssuch as power management so the default is off. That sysctl works likethe existing panic controls already in that directory.
==============================================================
panic_on_warn:
Calls panic() in the WARN() path when set to 1. This is useful to avoida kernel rebuild when attempting to kdump at the location of a WARN().
0: only WARN(), default behaviour.
1: call panic() after printing out WARN() location.
==============================================================
panic_on_rcu_stall:
When set to 1, calls panic() after RCU stall detection messages. Thisis useful to define the root cause of RCU stalls using a vmcore.
0: do not panic() when RCU stall takes place, default behavior.
1: panic() after printing RCU stall messages.
==============================================================
perf_cpu_time_max_percent:
Hints to the kernel how much CPU time it should be allowed touse to handle perf sampling events. If the perf subsystemis informed that its samples are exceeding this limit, itwill drop its sampling frequency to attempt to reduce its CPUusage.
Some perf sampling happens in NMIs. If these samplesunexpectedly take too long to execute, the NMIs can becomestacked up next to each other so much that nothing else isallowed to execute.
0: disable the mechanism. Do not monitor or correct perf's sampling rate no matter how CPU time it takes.
1-100: attempt to throttle perf's sample rate to this percentage of CPU. Note: the kernel calculates an "expected" length of each sample event. 100 here means 100% of that expected length. Even if this is set to 100, you may still see sample throttling if this length is exceeded. Set to 0 if you truly do not care how much CPU is consumed.
==============================================================
perf_event_paranoid:
Controls use of the performance events system by unprivilegedusers (without CAP_SYS_ADMIN). The default value is 2.
-1: Allow use of (almost) all events by all users>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK>=1: Disallow CPU event access by users without CAP_SYS_ADMIN>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
==============================================================
perf_event_max_stack:
Controls maximum number of stack frames to copy for (attr.sample_type &
PERF_SAMPLE_CALLCHAIN) configured events, for instance, when using'perf record -g' or 'perf trace --call-graph fp'.
This can only be done when no events are in use that have callchainsenabled, otherwise writing to this file will return -EBUSY.
The default value is 127.
==============================================================
perf_event_max_contexts_per_stack:
Controls maximum number of stack frame context entries for(attr.sample_type & PERF_SAMPLE_CALLCHAIN) configured events, forinstance, when using 'perf record -g' or 'perf trace --call-graph fp'.
This can only be done when no events are in use that have callchainsenabled, otherwise writing to this file will return -EBUSY.
The default value is 8.
==============================================================
pid_max:
PID allocation wrap value. When the kernel's next PID valuereaches this value, it wraps back to a minimum PID value.
PIDs of value pid_max or larger are not allocated.
==============================================================
ns_last_pid:
The last pid allocated in the current (the one task using this sysctllives in) pid namespace. When selecting a pid for a next task on forkkernel tries to allocate a number starting from this one.
==============================================================
powersave-nap: (PPC only)
If set, Linux-PPC will use the 'nap' mode of powersaving,
otherwise the 'doze' mode will be used.
==============================================================
printk:
The four values in printk denote: console_loglevel,
default_message_loglevel, minimum_console_loglevel anddefault_console_loglevel respectively.
These values influence printk() behavior when printing orlogging error messages. See 'man 2 syslog' for more info onthe different loglevels.
- console_loglevel: messages with a higher priority than this will be printed to the console- default_message_loglevel: messages without an explicit priority will be printed with this priority- minimum_console_loglevel: minimum (highest) value to which console_loglevel can be set- default_console_loglevel: default value for console_loglevel
==============================================================
printk_delay:
Delay each printk message in printk_delay milliseconds
Value from 0 - 10000 is allowed.
==============================================================
printk_ratelimit:
Some warning messages are rate limited. printk_ratelimit specifiesthe minimum length of time between these messages (in jiffies), bydefault we allow one every 5 seconds.
A value of 0 will disable rate limiting.
==============================================================
printk_ratelimit_burst:
While long term we enforce one message per printk_ratelimitseconds, we do allow a burst of messages to pass through.
printk_ratelimit_burst specifies the number of messages we cansend before ratelimiting kicks in.
==============================================================
printk_devkmsg:
Control the logging to /dev/kmsg from userspace:
ratelimit: default, ratelimitedon: unlimited logging to /dev/kmsg from userspaceoff: logging to /dev/kmsg disabled
The kernel command line parameter printk.devkmsg= overrides this and isa one-time setting until next reboot: once set, it cannot be changed bythis sysctl interface anymore.
==============================================================
randomize_va_space:
This option can be used to select the type of process addressspace randomization that is used in the system, for architecturesthat support this feature.
0 - Turn the process address space randomization off. This is the default for architectures that do not support this feature anyways,
and kernels that are booted with the "norandmaps" parameter.
1 - Make the addresses of mmap base, stack and VDSO page randomized.
This, among other things, implies that shared libraries will be loaded to random addresses. Also for PIE-linked binaries, the location of code start is randomized. This is the default if the CONFIG_COMPAT_BRK option is enabled.
2 - Additionally enable heap randomization. This is the default if CONFIG_COMPAT_BRK is disabled.
There are a few legacy applications out there (such as some ancient versions of libc.so.5 from 1996) that assume that brk area starts just after the end of the code+bss. These applications break when start of the brk area is randomized. There are however no known non-legacy applications that would be broken this way, so for most systems it is safe to choose full randomization.
Systems with ancient and/or broken binaries should be configured with CONFIG_COMPAT_BRK enabled, which excludes the heap from process address space randomization.
==============================================================
reboot-cmd: (Sparc only)
??? This seems to be a way to give an argument to the SparcROM/Flash boot loader. Maybe to tell it what to do afterrebooting. ???
==============================================================
rtsig-max & rtsig-nr:
The file rtsig-max can be used to tune the maximum numberof POSIX realtime (queued) signals that can be outstandingin the system.
rtsig-nr shows the number of RT signals currently queued.
==============================================================
sched_schedstats:
Enables/disables scheduler statistics. Enabling this featureincurs a small amount of overhead in the scheduler but isuseful for debugging and performance tuning.
==============================================================
sg-big-buff:
This file shows the size of the generic SCSI (sg) buffer.
You can't tune it just yet, but you could change it oncompile time by editing include/scsi/sg.h and changingthe value of SG_BIG_BUFF.
There shouldn't be any reason to change this value. Ifyou can come up with one, you probably know what youare doing anyway :)
==============================================================
shmall:
This parameter sets the total amount of shared memory pages thatcan be used system wide. Hence, SHMALL should always be at leastceil(shmmax/PAGE_SIZE).
If you are not sure what the default PAGE_SIZE is on your Linuxsystem, you can run the following command:
# getconf PAGE_SIZE
==============================================================
shmmax:
This value can be used to query and set the run time limiton the maximum shared memory segment size that can be created.
Shared memory segments up to 1Gb are now supported in thekernel. This value defaults to SHMMAX.
==============================================================
shm_rmid_forced:
Linux lets you set resource limits, including how much memory oneprocess can consume, via setrlimit(2). Unfortunately, shared memorysegments are allowed to exist without association with any process, andthus might not be counted against any resource limits. If enabled,
shared memory segments are automatically destroyed when their attachcount becomes zero after a detach or a process termination. It willalso destroy segments that were created, but never attached to, on exitfrom the process. The only use left for IPC_RMID is to immediatelydestroy an unattached segment. Of course, this breaks the way things aredefined, so some applications might stop working. Note that thisfeature will do you no good unless you also configure your resourcelimits (in particular, RLIMIT_AS and RLIMIT_NPROC). Most systems don'tneed this.
Note that if you change this from 0 to 1, already created segmentswithout users and with a dead originative process will be destroyed.
==============================================================
sysctl_writes_strict:
Control how file position affects the behavior of updating sysctl valuesvia the /proc/sys interface:
-1 - Legacy per-write sysctl value handling, with no printk warnings.
Each write syscall must fully contain the sysctl value to be written, and multiple writes on the same sysctl file descriptor will rewrite the sysctl value, regardless of file position.
0 - Same behavior as above, but warn about processes that perform writes to a sysctl file descriptor when the file position is not 0.
1 - (default) Respect file position when writing sysctl strings. Multiple writes will append to the sysctl value buffer. Anything past the max length of the sysctl value buffer will be ignored. Writes to numeric sysctl entries must always be at file position 0 and the value must be fully contained in the buffer sent in the write syscall.
==============================================================
softlockup_all_cpu_backtrace:
This value controls the soft lockup detector thread's behaviorwhen a soft lockup condition is detected as to whether or notto gather further debug information. If enabled, each cpu willbe issued an NMI and instructed to capture stack trace.
This feature is only applicable for architectures which supportNMI.
0: do nothing. This is the default behavior.
1: on detection capture more debug information.
==============================================================
soft_watchdog
This parameter can be used to control the soft lockup detector.
0 - disable the soft lockup detector 1 - enable the soft lockup detector
The soft lockup detector monitors CPUs for threads that are hogging the CPUswithout rescheduling voluntarily, and thus prevent the 'watchdog/N' threadsfrom running. The mechanism depends on the CPUs ability to respond to timerinterrupts which are needed for the 'watchdog/N' threads to be woken up bythe watchdog timer function, otherwise the NMI watchdog - if enabled - candetect a hard lockup condition.
==============================================================
tainted:
Non-zero if the kernel has been tainted. Numeric values, whichcan be ORed together:
1 - A module with a non-GPL license has been loaded, this includes modules with no license.
Set by modutils >= 2.4.9 and module-init-tools.
2 - A module was force loaded by insmod -f.
Set by modutils >= 2.4.9 and module-init-tools.
4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
8 - A module was forcibly unloaded from the system by rmmod -f.
16 - A hardware machine check error occurred on the system.
32 - A bad page was discovered on the system.
64 - The user has asked that the system be marked "tainted". This could be because they are running software that directly modifies the hardware, or for other reasons.
128 - The system has died.
256 - The ACPI DSDT has been overridden with one supplied by the user instead of using the one provided by the hardware.
512 - A kernel warning has occurred.
1024 - A module from drivers/staging was loaded.
2048 - The system is working around a severe firmware bug.
4096 - An out-of-tree module has been loaded.
8192 - An unsigned module has been loaded in a kernel supporting module signature.
16384 - A soft lockup has previously occurred on the system.
32768 - The kernel has been live patched.
==============================================================
threads-max
This value controls the maximum number of threads that can be createdusing fork().
During initialization the kernel sets this value such that even if themaximum number of threads is created, the thread structures occupy onlya part (1/8th) of the available RAM pages.
The minimum value that can be written to threads-max is 20.
The maximum value that can be written to threads-max is given by theconstant FUTEX_TID_MASK (0x3fffffff).
If a value outside of this range is written to threads-max an errorEINVAL occurs.
The value written is checked against the available RAM pages. If thethread structures would occupy too much (more than 1/8th) of theavailable RAM pages threads-max is reduced accordingly.
==============================================================
unknown_nmi_panic:
The value in this file affects behavior of handling NMI. When thevalue is non-zero, unknown NMI is trapped and then panic occurs. Atthat time, kernel debugging information is displayed on console.
NMI switch that most IA32 servers have fires unknown NMI up, forexample. If a system hangs up, try pressing the NMI switch.
==============================================================
watchdog:
This parameter can be used to disable or enable the soft lockup detector_and_ the NMI watchdog (i.e. the hard lockup detector) at the same time.
0 - disable both lockup detectors 1 - enable both lockup detectors
The soft lockup detector and the NMI watchdog can also be disabled orenabled individually, using the soft_watchdog and nmi_watchdog parameters.
If the watchdog parameter is read, for example by executing
cat /proc/sys/kernel/watchdog
the output of this command (0 or 1) shows the logical OR of soft_watchdogand nmi_watchdog.
==============================================================
watchdog_cpumask:
This value can be used to control on which cpus the watchdog may run.
The default cpumask is all possible cores, but if NO_HZ_FULL isenabled in the kernel config, and cores are specified with thenohz_full= boot argument, those cores are excluded by default.
Offline cores can be included in this mask, and if the core is laterbrought online, the watchdog will be started based on the mask value.
Typically this value would only be touched in the nohz_full caseto re-enable cores that by default were not running the watchdog,
if a kernel lockup was suspected on those cores.
The argument value is the standard cpulist format for cpumasks,
so for example to enable the watchdog on cores 0, 2, 3, and 4 youmight say:
echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask
==============================================================
watchdog_thresh:
This value can be used to control the frequency of hrtimer and NMIevents and the soft and hard lockup thresholds. The default thresholdis 10 seconds.
The softlockup threshold is (2 * watchdog_thresh). Setting thistunable to zero will disable lockup detection altogether.
==============================================================Documentation for /proc/sys/kernel/* kernel version 2.2.10 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
(c) 2009, Shen Feng<shen@cn.fujitsu.com>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in/proc/sys/kernel/ and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune and monitormiscellaneous and general things in the operation of the Linuxkernel. Since some of the files _can_ be used to screw up yoursystem, it is advisable to read both documentation and sourcebefore actually making adjustments.
Currently, these files might (depending on your configuration)
show up in /proc/sys/kernel:
- acct- acpi_video_flags- auto_msgmni- bootloader_type [ X86 only ]
- bootloader_version [ X86 only ]
- callhome [ S390 only ]
- cap_last_cap- core_pattern- core_pipe_limit- core_uses_pid- ctrl-alt-del- dmesg_restrict- domainname- hostname- hotplug- hardlockup_all_cpu_backtrace- hung_task_panic- hung_task_check_count- hung_task_timeout_secs- hung_task_warnings- kexec_load_disabled- kptr_restrict- l2cr [ PPC only ]
- modprobe ==> Documentation/debugging-modules.txt- modules_disabled- msg_next_id [ sysv ipc ]
- msgmax- msgmnb- msgmni- nmi_watchdog- osrelease- ostype- overflowgid- overflowuid- panic- panic_on_oops- panic_on_stackoverflow- panic_on_unrecovered_nmi- panic_on_warn- panic_on_rcu_stall- perf_cpu_time_max_percent- perf_event_paranoid- perf_event_max_stack- perf_event_max_contexts_per_stack- pid_max- powersave-nap [ PPC only ]
- printk- printk_delay- printk_ratelimit- printk_ratelimit_burst- pty ==> Documentation/filesystems/devpts.txt- randomize_va_space- real-root-dev ==> Documentation/admin-guide/initrd.rst- reboot-cmd [ SPARC only ]
- rtsig-max- rtsig-nr- sem- sem_next_id [ sysv ipc ]
- sg-big-buff [ generic SCSI device (sg) ]
- shm_next_id [ sysv ipc ]
- shm_rmid_forced- shmall- shmmax [ sysv ipc ]
- shmmni- softlockup_all_cpu_backtrace- soft_watchdog- stop-a [ SPARC only ]
- sysrq ==> Documentation/sysrq.txt- sysctl_writes_strict- tainted- threads-max- unknown_nmi_panic- watchdog- watchdog_thresh- version
==============================================================
acct:
highwater lowwater frequency
If BSD-style process accounting is enabled these values controlits behaviour. If free space on filesystem where the log livesgoes below <lowwater>% accounting suspends. If free space getsabove <highwater>% accounting resumes. <Frequency> determineshow often do we check the amount of free space (value is inseconds). Default:
4 2 30That is, suspend accounting if there left <= 2% free; resume itif we got >=4%; consider information about amount of free spacevalid for 30 seconds.
==============================================================
acpi_video_flags:
flags
See Doc*/kernel/power/video.txt, it allows mode of video boot to beset during run time.
==============================================================
auto_msgmni:
This variable has no effect and may be removed in future kernelreleases. Reading it always returns 0.
Up to Linux 3.17, it enabled/disabled automatic recomputing of msgmniupon memory add/remove or upon ipc namespace creation/removal.
Echoing "1" into this file enabled msgmni automatic recomputing.
Echoing "0" turned it off. auto_msgmni default value was 1.
==============================================================
bootloader_type:
x86 bootloader identification
This gives the bootloader type number as indicated by the bootloader,
shifted left by 4, and OR'd with the low four bits of the bootloaderversion. The reason for this encoding is that this used to match thetype_of_loader field in the kernel header; the encoding is kept forbackwards compatibility. That is, if the full bootloader type numberis 0x15 and the full version number is 0x234, this file will containthe value 340 = 0x154.
See the type_of_loader and ext_loader_type fields inDocumentation/x86/boot.txt for additional information.
==============================================================
bootloader_version:
x86 bootloader version
The complete bootloader version number. In the example above, thisfile will contain the value 564 = 0x234.
See the type_of_loader and ext_loader_ver fields inDocumentation/x86/boot.txt for additional information.
==============================================================
callhome:
Controls the kernel's callhome behavior in case of a kernel panic.
The s390 hardware allows an operating system to send a notificationto a service organization (callhome) in case of an operating system panic.
When the value in this file is 0 (which is the default behavior)
nothing happens in case of a kernel panic. If this value is set to "1"
the complete kernel oops message is send to the IBM customer serviceorganization in case the mainframe the Linux operating system is runningon has a service contract with IBM.
==============================================================
cap_last_cap
Highest valid capability of the running kernel. ExportsCAP_LAST_CAP from the kernel.
==============================================================
core_pattern:
core_pattern is used to specify a core dumpfile pattern name.
. max length 128 characters; default value is "core"
. core_pattern is used as a pattern template for the output filename;
certain string patterns (beginning with '%') are substituted with their actual values.
. backward compatibility with core_uses_pid:
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended to the filename.
. corename format specifiers:
%<NUL> '%' is dropped %% output one '%'
%p pid %P global pid (init PID namespace)
%i tid %I global tid (init PID namespace)
%u uid (in initial user namespace)
%g gid (in initial user namespace)
%d dump mode, matches PR_SET_DUMPABLE and /proc/sys/fs/suid_dumpable %s signal number %t UNIX time of dump %h hostname %e executable filename (may be shortened)
%E executable path %<OTHER> both are dropped. If the first character of the pattern is a '|', the kernel will treat the rest of the pattern as a command to run. The core dump will be written to the standard input of that program instead of to a file.
==============================================================
core_pipe_limit:
This sysctl is only applicable when core_pattern is configured to pipecore files to a user space helper (when the first character ofcore_pattern is a '|', see above). When collecting cores via a pipeto an application, it is occasionally useful for the collectingapplication to gather data about the crashing process from its/proc/pid directory. In order to do this safely, the kernel must waitfor the collecting process to exit, so as not to remove the crashingprocesses proc files prematurely. This in turn creates thepossibility that a misbehaving userspace collecting process can blockthe reaping of a crashed process simply by never exiting. This sysctldefends against that. It defines how many concurrent crashingprocesses may be piped to user space applications in parallel. Ifthis value is exceeded, then those crashing processes above that valueare noted via the kernel log and their cores are skipped. 0 is aspecial value, indicating that unlimited processes may be captured inparallel, but that no waiting will take place (i.e. the collectingprocess is not guaranteed access to /proc/<crashing pid>/). Thisvalue defaults to 0.
==============================================================
core_uses_pid:
The default coredump filename is "core". By settingcore_uses_pid to 1, the coredump filename becomes core.PID.
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended tothe filename.
==============================================================
ctrl-alt-del:
When the value in this file is 0, ctrl-alt-del is trapped andsent to the init(1) program to handle a graceful restart.
When, however, the value is > 0, Linux's reaction to a VulcanNerve Pinch (tm) will be an immediate reboot, without evensyncing its dirty buffers.
Note: when a program (like dosemu) has the keyboard in 'raw'
mode, the ctrl-alt-del is intercepted by the program before itever reaches the kernel tty layer, and it's up to the programto decide what to do with it.
==============================================================
dmesg_restrict:
This toggle indicates whether unprivileged users are preventedfrom using dmesg(8) to view messages from the kernel's log buffer.
When dmesg_restrict is set to (0) there are no restrictions. Whendmesg_restrict is set set to (1), users must have CAP_SYSLOG to usedmesg(8).
The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets thedefault value of dmesg_restrict.
==============================================================
domainname & hostname:
These files can be used to set the NIS/YP domainname and thehostname of your box in exactly the same way as the commandsdomainname and hostname, i.e.:
# echo "darkstar" > /proc/sys/kernel/hostname# echo "mydomain" > /proc/sys/kernel/domainnamehas the same effect as# hostname "darkstar"
# domainname "mydomain"
Note, however, that the classic darkstar.frop.org has thehostname "darkstar" and DNS (Internet Domain Name Server)
domainname "frop.org", not to be confused with the NIS (NetworkInformation Service) or YP (Yellow Pages) domainname. These twodomain names are in general different. For a detailed discussionsee the hostname(1) man page.
==============================================================
hardlockup_all_cpu_backtrace:
This value controls the hard lockup detector behavior when a hardlockup condition is detected as to whether or not to gather furtherdebug information. If enabled, arch-specific all-CPU stack dumpingwill be initiated.
0: do nothing. This is the default behavior.
1: on detection capture more debug information.
==============================================================
hotplug:
Path for the hotplug policy agent.
Default value is "/sbin/hotplug".
==============================================================
hung_task_panic:
Controls the kernel's behavior when a hung task is detected.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: continue operation. This is the default behavior.
1: panic immediately.
==============================================================
hung_task_check_count:
The upper bound on the number of tasks that are checked.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
==============================================================
hung_task_timeout_secs:
Check interval. When a task in D state did not get scheduledfor more than this value report a warning.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: means infinite timeout - no checking done.
Possible values to set are in range {0..LONG_MAX/HZ}.
==============================================================
hung_task_warnings:
The maximum number of warnings to report. During a check intervalif a hung task is detected, this value is decreased by 1.
When this value reaches 0, no more warnings will be reported.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
-1: report an infinite number of warnings.
==============================================================
kexec_load_disabled:
A toggle indicating if the kexec_load syscall has been disabled. Thisvalue defaults to 0 (false: kexec_load enabled), but can be set to 1(true: kexec_load disabled). Once true, kexec can no longer be used, andthe toggle cannot be set back to false. This allows a kexec image to beloaded before disabling the syscall, allowing a system to set up (andlater use) an image without it being altered. Generally used togetherwith the "modules_disabled" sysctl.
==============================================================
kptr_restrict:
This toggle indicates whether restrictions are placed onexposing kernel addresses via /proc and other interfaces.
When kptr_restrict is set to (0), the default, there are no restrictions.
When kptr_restrict is set to (1), kernel pointers printed using the %pKformat specifier will be replaced with 0's unless the user has CAP_SYSLOGand effective user and group ids are equal to the real ids. This isbecause %pK checks are done at read() time rather than open() time, soif permissions are elevated between the open() and the read() (e.g viaa setuid binary) then %pK will not leak kernel pointers to unprivilegedusers. Note, this is a temporary solution only. The correct long-termsolution is to do the permission checks at open() time. Consider removingworld read permissions from files that use %pK, and using dmesg_restrictto protect against uses of %pK in dmesg(8) if leaking kernel pointervalues to unprivileged users is a concern.
When kptr_restrict is set to (2), kernel pointers printed using%pK will be replaced with 0's regardless of privileges.
==============================================================
l2cr: (PPC only)
This flag controls the L2 cache of G3 processor boards. If0, the cache is disabled. Enabled if nonzero.
==============================================================
modules_disabled:
A toggle value indicating if modules are allowed to be loadedin an otherwise modular kernel. This toggle defaults to off(0), but can be set true (1). Once true, modules can beneither loaded nor unloaded, and the toggle cannot be set backto false. Generally used with the "kexec_load_disabled" toggle.
==============================================================
msg_next_id, sem_next_id, and shm_next_id:
These three toggles allows to specify desired id for next allocated IPCobject: message, semaphore or shared memory respectively.
By default they are equal to -1, which means generic allocation logic.
Possible values to set are in range {0..INT_MAX}.
Notes:
1) kernel doesn't guarantee, that new object will have desired id. So,
it's up to userspace, how to handle an object with "wrong" id.
2) Toggle with non-default value will be set back to -1 by kernel aftersuccessful IPC object allocation.
==============================================================
nmi_watchdog:
This parameter can be used to control the NMI watchdog(i.e. the hard lockup detector) on x86 systems.
0 - disable the hard lockup detector 1 - enable the hard lockup detector
The hard lockup detector monitors each CPU for its ability to respond totimer interrupts. The mechanism utilizes CPU performance counter registersthat are programmed to generate Non-Maskable Interrupts (NMIs) periodicallywhile a CPU is busy. Hence, the alternative name 'NMI watchdog'.
The NMI watchdog is disabled by default if the kernel is running as a guestin a KVM virtual machine. This default can be overridden by adding
nmi_watchdog=1
to the guest kernel command line (see Documentation/admin-guide/kernel-parameters.rst).
==============================================================
numa_balancing
Enables/disables automatic page fault based NUMA memorybalancing. Memory is moved automatically to nodesthat access it often.
Enables/disables automatic NUMA memory balancing. On NUMA machines, thereis a performance penalty if remote memory is accessed by a CPU. When thisfeature is enabled the kernel samples what task thread is accessing memoryby periodically unmapping pages and later trapping a page fault. At thetime of the page fault, it is determined if the data being accessed shouldbe migrated to a local memory node.
The unmapping of pages and trapping faults incur additional overhead thatideally is offset by improved memory locality but there is no universalguarantee. If the target workload is already bound to NUMA nodes then thisfeature should be disabled. Otherwise, if the system overhead from thefeature is too high then the rate the kernel samples for NUMA hintingfaults may be controlled by the numa_balancing_scan_period_min_ms,
numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms,
numa_balancing_scan_size_mb, and numa_balancing_settle_count sysctls.
==============================================================
numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms,
numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb
Automatic NUMA balancing scans tasks address space and unmaps pages todetect if pages are properly placed or if the data should be migrated to amemory node local to where the task is running. Every "scan delay" the taskscans the next "scan size" number of pages in its address space. When theend of the address space is reached the scanner restarts from the beginning.
In combination, the "scan delay" and "scan size" determine the scan rate.
When "scan delay" decreases, the scan rate increases. The scan delay andhence the scan rate of every task is adaptive and depends on historicalbehaviour. If pages are properly placed then the scan delay increases,
otherwise the scan delay decreases. The "scan size" is not adaptive butthe higher the "scan size", the higher the scan rate.
Higher scan rates incur higher system overhead as page faults must betrapped and potentially data must be migrated. However, the higher the scanrate, the more quickly a tasks memory is migrated to a local node if theworkload pattern changes and minimises performance impact due to remotememory accesses. These sysctls control the thresholds for scan delays andthe number of pages scanned.
numa_balancing_scan_period_min_ms is the minimum time in milliseconds toscan a tasks virtual memory. It effectively controls the maximum scanningrate for each task.
numa_balancing_scan_delay_ms is the starting "scan delay" used for a taskwhen it initially forks.
numa_balancing_scan_period_max_ms is the maximum time in milliseconds toscan a tasks virtual memory. It effectively controls the minimum scanningrate for each task.
numa_balancing_scan_size_mb is how many megabytes worth of pages arescanned for a given scan.
==============================================================
osrelease, ostype & version:
# cat osrelease2.1.88# cat ostypeLinux# cat version#5 Wed Feb 25 21:49:24 MET 1998
The files osrelease and ostype should be clear enough. Versionneeds a little more clarification however. The '#5' means thatthis is the fifth kernel built from this source base and thedate behind it indicates the time the kernel was built.
The only way to tune these values is to rebuild the kernel :-)
==============================================================
overflowgid & overflowuid:
if your architecture did not always support 32-bit UIDs (i.e. arm,
i386, m68k, sh, and sparc32), a fixed UID and GID will be returned toapplications that use the old 16-bit UID/GID system calls, if theactual UID or GID would exceed 65535.
These sysctls allow you to change the value of the fixed UID and GID.
The default is 65534.
==============================================================
panic:
The value in this file represents the number of seconds the kernelwaits before rebooting on a panic. When you use the software watchdog,
the recommended setting is 60.
==============================================================
panic_on_io_nmi:
Controls the kernel's behavior when a CPU receives an NMI caused byan IO error.
0: try to continue operation (default)
1: panic immediately. The IO error triggered an NMI. This indicates a serious system condition which could result in IO data corruption.
Rather than continuing, panicking might be a better choice. Some servers issue this sort of NMI when the dump button is pushed,
and you can use this option to take a crash dump.
==============================================================
panic_on_oops:
Controls the kernel's behaviour when an oops or BUG is encountered.
0: try to continue operation
1: panic immediately. If the `panic' sysctl is also non-zero then the machine will be rebooted.
==============================================================
panic_on_stackoverflow:
Controls the kernel's behavior when detecting the overflows ofkernel, IRQ and exception stacks except a user stack.
This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.
0: try to continue operation.
1: panic immediately.
==============================================================
panic_on_unrecovered_nmi:
The default Linux behaviour on an NMI of either memory or unknown isto continue operation. For many environments such as scientificcomputing it is preferable that the box is taken out and the errordealt with than an uncorrected parity/ECC error get propagated.
A small number of systems do generate NMI's for bizarre random reasonssuch as power management so the default is off. That sysctl works likethe existing panic controls already in that directory.
==============================================================
panic_on_warn:
Calls panic() in the WARN() path when set to 1. This is useful to avoida kernel rebuild when attempting to kdump at the location of a WARN().
0: only WARN(), default behaviour.
1: call panic() after printing out WARN() location.
==============================================================
panic_on_rcu_stall:
When set to 1, calls panic() after RCU stall detection messages. Thisis useful to define the root cause of RCU stalls using a vmcore.
0: do not panic() when RCU stall takes place, default behavior.
1: panic() after printing RCU stall messages.
==============================================================
perf_cpu_time_max_percent:
Hints to the kernel how much CPU time it should be allowed touse to handle perf sampling events. If the perf subsystemis informed that its samples are exceeding this limit, itwill drop its sampling frequency to attempt to reduce its CPUusage.
Some perf sampling happens in NMIs. If these samplesunexpectedly take too long to execute, the NMIs can becomestacked up next to each other so much that nothing else isallowed to execute.
0: disable the mechanism. Do not monitor or correct perf's sampling rate no matter how CPU time it takes.
1-100: attempt to throttle perf's sample rate to this percentage of CPU. Note: the kernel calculates an "expected" length of each sample event. 100 here means 100% of that expected length. Even if this is set to 100, you may still see sample throttling if this length is exceeded. Set to 0 if you truly do not care how much CPU is consumed.
==============================================================
perf_event_paranoid:
Controls use of the performance events system by unprivilegedusers (without CAP_SYS_ADMIN). The default value is 2.
-1: Allow use of (almost) all events by all users>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK>=1: Disallow CPU event access by users without CAP_SYS_ADMIN>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
==============================================================
perf_event_max_stack:
Controls maximum number of stack frames to copy for (attr.sample_type &
PERF_SAMPLE_CALLCHAIN) configured events, for instance, when using'perf record -g' or 'perf trace --call-graph fp'.
This can only be done when no events are in use that have callchainsenabled, otherwise writing to this file will return -EBUSY.
The default value is 127.
==============================================================
perf_event_max_contexts_per_stack:
Controls maximum number of stack frame context entries for(attr.sample_type & PERF_SAMPLE_CALLCHAIN) configured events, forinstance, when using 'perf record -g' or 'perf trace --call-graph fp'.
This can only be done when no events are in use that have callchainsenabled, otherwise writing to this file will return -EBUSY.
The default value is 8.
==============================================================
pid_max:
PID allocation wrap value. When the kernel's next PID valuereaches this value, it wraps back to a minimum PID value.
PIDs of value pid_max or larger are not allocated.
==============================================================
ns_last_pid:
The last pid allocated in the current (the one task using this sysctllives in) pid namespace. When selecting a pid for a next task on forkkernel tries to allocate a number starting from this one.
==============================================================
powersave-nap: (PPC only)
If set, Linux-PPC will use the 'nap' mode of powersaving,
otherwise the 'doze' mode will be used.
==============================================================
printk:
The four values in printk denote: console_loglevel,
default_message_loglevel, minimum_console_loglevel anddefault_console_loglevel respectively.
These values influence printk() behavior when printing orlogging error messages. See 'man 2 syslog' for more info onthe different loglevels.
- console_loglevel: messages with a higher priority than this will be printed to the console- default_message_loglevel: messages without an explicit priority will be printed with this priority- minimum_console_loglevel: minimum (highest) value to which console_loglevel can be set- default_console_loglevel: default value for console_loglevel
==============================================================
printk_delay:
Delay each printk message in printk_delay milliseconds
Value from 0 - 10000 is allowed.
==============================================================
printk_ratelimit:
Some warning messages are rate limited. printk_ratelimit specifiesthe minimum length of time between these messages (in jiffies), bydefault we allow one every 5 seconds.
A value of 0 will disable rate limiting.
==============================================================
printk_ratelimit_burst:
While long term we enforce one message per printk_ratelimitseconds, we do allow a burst of messages to pass through.
printk_ratelimit_burst specifies the number of messages we cansend before ratelimiting kicks in.
==============================================================
printk_devkmsg:
Control the logging to /dev/kmsg from userspace:
ratelimit: default, ratelimitedon: unlimited logging to /dev/kmsg from userspaceoff: logging to /dev/kmsg disabled
The kernel command line parameter printk.devkmsg= overrides this and isa one-time setting until next reboot: once set, it cannot be changed bythis sysctl interface anymore.
==============================================================
randomize_va_space:
This option can be used to select the type of process addressspace randomization that is used in the system, for architecturesthat support this feature.
0 - Turn the process address space randomization off. This is the default for architectures that do not support this feature anyways,
and kernels that are booted with the "norandmaps" parameter.
1 - Make the addresses of mmap base, stack and VDSO page randomized.
This, among other things, implies that shared libraries will be loaded to random addresses. Also for PIE-linked binaries, the location of code start is randomized. This is the default if the CONFIG_COMPAT_BRK option is enabled.
2 - Additionally enable heap randomization. This is the default if CONFIG_COMPAT_BRK is disabled.
There are a few legacy applications out there (such as some ancient versions of libc.so.5 from 1996) that assume that brk area starts just after the end of the code+bss. These applications break when start of the brk area is randomized. There are however no known non-legacy applications that would be broken this way, so for most systems it is safe to choose full randomization.
Systems with ancient and/or broken binaries should be configured with CONFIG_COMPAT_BRK enabled, which excludes the heap from process address space randomization.
==============================================================
reboot-cmd: (Sparc only)
??? This seems to be a way to give an argument to the SparcROM/Flash boot loader. Maybe to tell it what to do afterrebooting. ???
==============================================================
rtsig-max & rtsig-nr:
The file rtsig-max can be used to tune the maximum numberof POSIX realtime (queued) signals that can be outstandingin the system.
rtsig-nr shows the number of RT signals currently queued.
==============================================================
sched_schedstats:
Enables/disables scheduler statistics. Enabling this featureincurs a small amount of overhead in the scheduler but isuseful for debugging and performance tuning.
==============================================================
sg-big-buff:
This file shows the size of the generic SCSI (sg) buffer.
You can't tune it just yet, but you could change it oncompile time by editing include/scsi/sg.h and changingthe value of SG_BIG_BUFF.
There shouldn't be any reason to change this value. Ifyou can come up with one, you probably know what youare doing anyway :)
==============================================================
shmall:
This parameter sets the total amount of shared memory pages thatcan be used system wide. Hence, SHMALL should always be at leastceil(shmmax/PAGE_SIZE).
If you are not sure what the default PAGE_SIZE is on your Linuxsystem, you can run the following command:
# getconf PAGE_SIZE
==============================================================
shmmax:
This value can be used to query and set the run time limiton the maximum shared memory segment size that can be created.
Shared memory segments up to 1Gb are now supported in thekernel. This value defaults to SHMMAX.
==============================================================
shm_rmid_forced:
Linux lets you set resource limits, including how much memory oneprocess can consume, via setrlimit(2). Unfortunately, shared memorysegments are allowed to exist without association with any process, andthus might not be counted against any resource limits. If enabled,
shared memory segments are automatically destroyed when their attachcount becomes zero after a detach or a process termination. It willalso destroy segments that were created, but never attached to, on exitfrom the process. The only use left for IPC_RMID is to immediatelydestroy an unattached segment. Of course, this breaks the way things aredefined, so some applications might stop working. Note that thisfeature will do you no good unless you also configure your resourcelimits (in particular, RLIMIT_AS and RLIMIT_NPROC). Most systems don'tneed this.
Note that if you change this from 0 to 1, already created segmentswithout users and with a dead originative process will be destroyed.
==============================================================
sysctl_writes_strict:
Control how file position affects the behavior of updating sysctl valuesvia the /proc/sys interface:
-1 - Legacy per-write sysctl value handling, with no printk warnings.
Each write syscall must fully contain the sysctl value to be written, and multiple writes on the same sysctl file descriptor will rewrite the sysctl value, regardless of file position.
0 - Same behavior as above, but warn about processes that perform writes to a sysctl file descriptor when the file position is not 0.
1 - (default) Respect file position when writing sysctl strings. Multiple writes will append to the sysctl value buffer. Anything past the max length of the sysctl value buffer will be ignored. Writes to numeric sysctl entries must always be at file position 0 and the value must be fully contained in the buffer sent in the write syscall.
==============================================================
softlockup_all_cpu_backtrace:
This value controls the soft lockup detector thread's behaviorwhen a soft lockup condition is detected as to whether or notto gather further debug information. If enabled, each cpu willbe issued an NMI and instructed to capture stack trace.
This feature is only applicable for architectures which supportNMI.
0: do nothing. This is the default behavior.
1: on detection capture more debug information.
==============================================================
soft_watchdog
This parameter can be used to control the soft lockup detector.
0 - disable the soft lockup detector 1 - enable the soft lockup detector
The soft lockup detector monitors CPUs for threads that are hogging the CPUswithout rescheduling voluntarily, and thus prevent the 'watchdog/N' threadsfrom running. The mechanism depends on the CPUs ability to respond to timerinterrupts which are needed for the 'watchdog/N' threads to be woken up bythe watchdog timer function, otherwise the NMI watchdog - if enabled - candetect a hard lockup condition.
==============================================================
tainted:
Non-zero if the kernel has been tainted. Numeric values, whichcan be ORed together:
1 - A module with a non-GPL license has been loaded, this includes modules with no license.
Set by modutils >= 2.4.9 and module-init-tools.
2 - A module was force loaded by insmod -f.
Set by modutils >= 2.4.9 and module-init-tools.
4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
8 - A module was forcibly unloaded from the system by rmmod -f.
16 - A hardware machine check error occurred on the system.
32 - A bad page was discovered on the system.
64 - The user has asked that the system be marked "tainted". This could be because they are running software that directly modifies the hardware, or for other reasons.
128 - The system has died.
256 - The ACPI DSDT has been overridden with one supplied by the user instead of using the one provided by the hardware.
512 - A kernel warning has occurred.
1024 - A module from drivers/staging was loaded.
2048 - The system is working around a severe firmware bug.
4096 - An out-of-tree module has been loaded.
8192 - An unsigned module has been loaded in a kernel supporting module signature.
16384 - A soft lockup has previously occurred on the system.
32768 - The kernel has been live patched.
==============================================================
threads-max
This value controls the maximum number of threads that can be createdusing fork().
During initialization the kernel sets this value such that even if themaximum number of threads is created, the thread structures occupy onlya part (1/8th) of the available RAM pages.
The minimum value that can be written to threads-max is 20.
The maximum value that can be written to threads-max is given by theconstant FUTEX_TID_MASK (0x3fffffff).
If a value outside of this range is written to threads-max an errorEINVAL occurs.
The value written is checked against the available RAM pages. If thethread structures would occupy too much (more than 1/8th) of theavailable RAM pages threads-max is reduced accordingly.
==============================================================
unknown_nmi_panic:
The value in this file affects behavior of handling NMI. When thevalue is non-zero, unknown NMI is trapped and then panic occurs. Atthat time, kernel debugging information is displayed on console.
NMI switch that most IA32 servers have fires unknown NMI up, forexample. If a system hangs up, try pressing the NMI switch.
==============================================================
watchdog:
This parameter can be used to disable or enable the soft lockup detector_and_ the NMI watchdog (i.e. the hard lockup detector) at the same time.
0 - disable both lockup detectors 1 - enable both lockup detectors
The soft lockup detector and the NMI watchdog can also be disabled orenabled individually, using the soft_watchdog and nmi_watchdog parameters.
If the watchdog parameter is read, for example by executing
cat /proc/sys/kernel/watchdog
the output of this command (0 or 1) shows the logical OR of soft_watchdogand nmi_watchdog.
==============================================================
watchdog_cpumask:
This value can be used to control on which cpus the watchdog may run.
The default cpumask is all possible cores, but if NO_HZ_FULL isenabled in the kernel config, and cores are specified with thenohz_full= boot argument, those cores are excluded by default.
Offline cores can be included in this mask, and if the core is laterbrought online, the watchdog will be started based on the mask value.
Typically this value would only be touched in the nohz_full caseto re-enable cores that by default were not running the watchdog,
if a kernel lockup was suspected on those cores.
The argument value is the standard cpulist format for cpumasks,
so for example to enable the watchdog on cores 0, 2, 3, and 4 youmight say:
echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask
==============================================================
watchdog_thresh:
This value can be used to control the frequency of hrtimer and NMIevents and the soft and hard lockup thresholds. The default thresholdis 10 seconds.
The softlockup threshold is (2 * watchdog_thresh). Setting thistunable to zero will disable lockup detection altogether.
==============================================================Documentation for /proc/sys/kernel/* kernel version 2.2.10 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
(c) 2009, Shen Feng<shen@cn.fujitsu.com>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in/proc/sys/kernel/ and is valid for Linux kernel version 2.2.
The files in this directory can be used to tune and monitormiscellaneous and general things in the operation of the Linuxkernel. Since some of the files _can_ be used to screw up yoursystem, it is advisable to read both documentation and sourcebefore actually making adjustments.
Currently, these files might (depending on your configuration)
show up in /proc/sys/kernel:
- acct- acpi_video_flags- auto_msgmni- bootloader_type [ X86 only ]
- bootloader_version [ X86 only ]
- callhome [ S390 only ]
- cap_last_cap- core_pattern- core_pipe_limit- core_uses_pid- ctrl-alt-del- dmesg_restrict- domainname- hostname- hotplug- hardlockup_all_cpu_backtrace- hung_task_panic- hung_task_check_count- hung_task_timeout_secs- hung_task_warnings- kexec_load_disabled- kptr_restrict- l2cr [ PPC only ]
- modprobe ==> Documentation/debugging-modules.txt- modules_disabled- msg_next_id [ sysv ipc ]
- msgmax- msgmnb- msgmni- nmi_watchdog- osrelease- ostype- overflowgid- overflowuid- panic- panic_on_oops- panic_on_stackoverflow- panic_on_unrecovered_nmi- panic_on_warn- panic_on_rcu_stall- perf_cpu_time_max_percent- perf_event_paranoid- perf_event_max_stack- perf_event_max_contexts_per_stack- pid_max- powersave-nap [ PPC only ]
- printk- printk_delay- printk_ratelimit- printk_ratelimit_burst- pty ==> Documentation/filesystems/devpts.txt- randomize_va_space- real-root-dev ==> Documentation/admin-guide/initrd.rst- reboot-cmd [ SPARC only ]
- rtsig-max- rtsig-nr- sem- sem_next_id [ sysv ipc ]
- sg-big-buff [ generic SCSI device (sg) ]
- shm_next_id [ sysv ipc ]
- shm_rmid_forced- shmall- shmmax [ sysv ipc ]
- shmmni- softlockup_all_cpu_backtrace- soft_watchdog- stop-a [ SPARC only ]
- sysrq ==> Documentation/sysrq.txt- sysctl_writes_strict- tainted- threads-max- unknown_nmi_panic- watchdog- watchdog_thresh- version
==============================================================
acct:
highwater lowwater frequency
If BSD-style process accounting is enabled these values controlits behaviour. If free space on filesystem where the log livesgoes below <lowwater>% accounting suspends. If free space getsabove <highwater>% accounting resumes. <Frequency> determineshow often do we check the amount of free space (value is inseconds). Default:
4 2 30That is, suspend accounting if there left <= 2% free; resume itif we got >=4%; consider information about amount of free spacevalid for 30 seconds.
==============================================================
acpi_video_flags:
flags
See Doc*/kernel/power/video.txt, it allows mode of video boot to beset during run time.
==============================================================
auto_msgmni:
This variable has no effect and may be removed in future kernelreleases. Reading it always returns 0.
Up to Linux 3.17, it enabled/disabled automatic recomputing of msgmniupon memory add/remove or upon ipc namespace creation/removal.
Echoing "1" into this file enabled msgmni automatic recomputing.
Echoing "0" turned it off. auto_msgmni default value was 1.
==============================================================
bootloader_type:
x86 bootloader identification
This gives the bootloader type number as indicated by the bootloader,
shifted left by 4, and OR'd with the low four bits of the bootloaderversion. The reason for this encoding is that this used to match thetype_of_loader field in the kernel header; the encoding is kept forbackwards compatibility. That is, if the full bootloader type numberis 0x15 and the full version number is 0x234, this file will containthe value 340 = 0x154.
See the type_of_loader and ext_loader_type fields inDocumentation/x86/boot.txt for additional information.
==============================================================
bootloader_version:
x86 bootloader version
The complete bootloader version number. In the example above, thisfile will contain the value 564 = 0x234.
See the type_of_loader and ext_loader_ver fields inDocumentation/x86/boot.txt for additional information.
==============================================================
callhome:
Controls the kernel's callhome behavior in case of a kernel panic.
The s390 hardware allows an operating system to send a notificationto a service organization (callhome) in case of an operating system panic.
When the value in this file is 0 (which is the default behavior)
nothing happens in case of a kernel panic. If this value is set to "1"
the complete kernel oops message is send to the IBM customer serviceorganization in case the mainframe the Linux operating system is runningon has a service contract with IBM.
==============================================================
cap_last_cap
Highest valid capability of the running kernel. ExportsCAP_LAST_CAP from the kernel.
==============================================================
core_pattern:
core_pattern is used to specify a core dumpfile pattern name.
. max length 128 characters; default value is "core"
. core_pattern is used as a pattern template for the output filename;
certain string patterns (beginning with '%') are substituted with their actual values.
. backward compatibility with core_uses_pid:
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended to the filename.
. corename format specifiers:
%<NUL> '%' is dropped %% output one '%'
%p pid %P global pid (init PID namespace)
%i tid %I global tid (init PID namespace)
%u uid (in initial user namespace)
%g gid (in initial user namespace)
%d dump mode, matches PR_SET_DUMPABLE and /proc/sys/fs/suid_dumpable %s signal number %t UNIX time of dump %h hostname %e executable filename (may be shortened)
%E executable path %<OTHER> both are dropped. If the first character of the pattern is a '|', the kernel will treat the rest of the pattern as a command to run. The core dump will be written to the standard input of that program instead of to a file.
==============================================================
core_pipe_limit:
This sysctl is only applicable when core_pattern is configured to pipecore files to a user space helper (when the first character ofcore_pattern is a '|', see above). When collecting cores via a pipeto an application, it is occasionally useful for the collectingapplication to gather data about the crashing process from its/proc/pid directory. In order to do this safely, the kernel must waitfor the collecting process to exit, so as not to remove the crashingprocesses proc files prematurely. This in turn creates thepossibility that a misbehaving userspace collecting process can blockthe reaping of a crashed process simply by never exiting. This sysctldefends against that. It defines how many concurrent crashingprocesses may be piped to user space applications in parallel. Ifthis value is exceeded, then those crashing processes above that valueare noted via the kernel log and their cores are skipped. 0 is aspecial value, indicating that unlimited processes may be captured inparallel, but that no waiting will take place (i.e. the collectingprocess is not guaranteed access to /proc/<crashing pid>/). Thisvalue defaults to 0.
==============================================================
core_uses_pid:
The default coredump filename is "core". By settingcore_uses_pid to 1, the coredump filename becomes core.PID.
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended tothe filename.
==============================================================
ctrl-alt-del:
When the value in this file is 0, ctrl-alt-del is trapped andsent to the init(1) program to handle a graceful restart.
When, however, the value is > 0, Linux's reaction to a VulcanNerve Pinch (tm) will be an immediate reboot, without evensyncing its dirty buffers.
Note: when a program (like dosemu) has the keyboard in 'raw'
mode, the ctrl-alt-del is intercepted by the program before itever reaches the kernel tty layer, and it's up to the programto decide what to do with it.
==============================================================
dmesg_restrict:
This toggle indicates whether unprivileged users are preventedfrom using dmesg(8) to view messages from the kernel's log buffer.
When dmesg_restrict is set to (0) there are no restrictions. Whendmesg_restrict is set set to (1), users must have CAP_SYSLOG to usedmesg(8).
The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets thedefault value of dmesg_restrict.
==============================================================
domainname & hostname:
These files can be used to set the NIS/YP domainname and thehostname of your box in exactly the same way as the commandsdomainname and hostname, i.e.:
# echo "darkstar" > /proc/sys/kernel/hostname# echo "mydomain" > /proc/sys/kernel/domainnamehas the same effect as# hostname "darkstar"
# domainname "mydomain"
Note, however, that the classic darkstar.frop.org has thehostname "darkstar" and DNS (Internet Domain Name Server)
domainname "frop.org", not to be confused with the NIS (NetworkInformation Service) or YP (Yellow Pages) domainname. These twodomain names are in general different. For a detailed discussionsee the hostname(1) man page.
==============================================================
hardlockup_all_cpu_backtrace:
This value controls the hard lockup detector behavior when a hardlockup condition is detected as to whether or not to gather furtherdebug information. If enabled, arch-specific all-CPU stack dumpingwill be initiated.
0: do nothing. This is the default behavior.
1: on detection capture more debug information.
==============================================================
hotplug:
Path for the hotplug policy agent.
Default value is "/sbin/hotplug".
==============================================================
hung_task_panic:
Controls the kernel's behavior when a hung task is detected.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: continue operation. This is the default behavior.
1: panic immediately.
==============================================================
hung_task_check_count:
The upper bound on the number of tasks that are checked.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
==============================================================
hung_task_timeout_secs:
Check interval. When a task in D state did not get scheduledfor more than this value report a warning.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: means infinite timeout - no checking done.
Possible values to set are in range {0..LONG_MAX/HZ}.
==============================================================
hung_task_warnings:
The maximum number of warnings to report. During a check intervalif a hung task is detected, this value is decreased by 1.
When this value reaches 0, no more warnings will be reported.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
-1: report an infinite number of warnings.
==============================================================
kexec_load_disabled:
A toggle indicating if the kexec_load syscall has been disabled. Thisvalue defaults to 0 (false: kexec_load enabled), but can be set to 1(true: kexec_load disabled). Once true, kexec can no longer be used, andthe toggle cannot be set back to false. This allows a kexec image to beloaded before disabling the syscall, allowing a system to set up (andlater use) an image without it being altered. Generally used togetherwith the "modules_disabled" sysctl.
==============================================================
kptr_restrict:
This toggle indicates whether restrictions are placed onexposing kernel addresses via /proc and other interfaces.
When kptr_restrict is set to (0), the default, there are no restrictions.
When kptr_restrict is set to (1), kernel pointers printed using the %pKformat specifier will be replaced with 0's unless the user has CAP_SYSLOGand effective user and group ids are equal to the real ids. This isbecause %pK checks are done at read() time rather than open() time, soif permissions are elevated between the open() and the read() (e.g viaa setuid binary) then %pK will not leak kernel pointers to unprivilegedusers. Note, this is a temporary solution only. The correct long-termsolution is to do the permission checks at open() time. Consider removingworld read permissions from files that use %pK, and using dmesg_restrictto protect against uses of %pK in dmesg(8) if leaking kernel pointervalues to unprivileged users is a concern.
When kptr_restrict is set to (2), kernel pointers printed using%pK will be replaced with 0's regardless of privileges.
==============================================================
l2cr: (PPC only)
This flag controls the L2 cache of G3 processor boards. If0, the cache is disabled. Enabled if nonzero.
==============================================================
modules_disabled:
A toggle value indicating if modules are allowed to be loadedin an otherwise modular kernel. This toggle defaults to off(0), but can be set true (1). Once true, modules can beneither loaded nor unloaded, and the toggle cannot be set backto false. Generally used with the "kexec_load_disabled" toggle.
==============================================================
msg_next_id, sem_next_id, and shm_next_id:
These three toggles allows to specify desired id for next allocated IPCobject: message, semaphore or shared memory respectively.
By default they are equal to -1, which means generic allocation logic.
Possible values to set are in range {0..INT_MAX}.
Notes:
1) kernel doesn't guarantee, that new object will have desired id. So,
it's up to userspace, how to handle an object with "wrong" id.
2) Toggle with non-default value will be set back to -1 by kernel aftersuccessful IPC object allocation.
==============================================================
nmi_watchdog:
This parameter can be used to control the NMI watchdog(i.e. the hard lockup detector) on x86 systems.
0 - disable the hard lockup detector 1 - enable the hard lockup detector
The hard lockup detector monitors each CPU for its ability to respond totimer interrupts. The mechanism utilizes CPU performance counter registersthat are programmed to generate Non-Maskable Interrupts (NMIs) periodicallywhile a CPU is busy. Hence, the alternative name 'NMI watchdog'.
The NMI watchdog is disabled by default if the kernel is running as a guestin a KVM virtual machine. This default can be overridden by adding
nmi_watchdog=1
to the guest kernel command line (see Documentation/admin-guide/kernel-parameters.rst).
==============================================================
numa_balancing
Enables/disables automatic page fault based NUMA memorybalancing. Memory is moved automatically to nodesthat access it often.
Enables/disables automatic NUMA memory balancing. On NUMA machines, thereis a performance penalty if remote memory is accessed by a CPU. When thisfeature is enabled the kernel samples what task thread is accessing memoryby periodically unmapping pages and later trapping a page fault. At thetime of the page fault, it is determined if the data being accessed shouldbe migrated to a local memory node.
The unmapping of pages and trapping faults incur additional overhead thatideally is offset by improved memory locality but there is no universalguarantee. If the target workload is already bound to NUMA nodes then thisfeature should be disabled. Otherwise, if the system overhead from thefeature is too high then the rate the kernel samples for NUMA hintingfaults may be controlled by the numa_balancing_scan_period_min_ms,
numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms,
numa_balancing_scan_size_mb, and numa_balancing_settle_count sysctls.
==============================================================
numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms,
numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb
Automatic NUMA balancing scans tasks address space and unmaps pages todetect if pages are properly placed or if the data should be migrated to amemory node local to where the task is running. Every "scan delay" the taskscans the next "scan size" number of pages in its address space. When theend of the address space is reached the scanner restarts from the beginning.
In combination, the "scan delay" and "scan size" determine the scan rate.
When "scan delay" decreases, the scan rate increases. The scan delay andhence the scan rate of every task is adaptive and depends on historicalbehaviour. If pages are properly placed then the scan delay increases,
otherwise the scan delay decreases. The "scan size" is not adaptive butthe higher the "scan size", the higher the scan rate.
Higher scan rates incur higher system overhead as page faults must betrapped and potentially data must be migrated. However, the higher the scanrate, the more quickly a tasks memory is migrated to a local node if theworkload pattern changes and minimises performance impact due to remotememory accesses. These sysctls control the thresholds for scan delays andthe number of pages scanned.
numa_balancing_scan_period_min_ms is the minimum time in milliseconds toscan a tasks virtual memory. It effectively controls the maximum scanningrate for each task.
numa_balancing_scan_delay_ms is the starting "scan delay" used for a taskwhen it initially forks.
numa_balancing_scan_period_max_ms is the maximum time in milliseconds toscan a tasks virtual memory. It effectively controls the minimum scanningrate for each task.
numa_balancing_scan_size_mb is how many megabytes worth of pages arescanned for a given scan.
==============================================================
osrelease, ostype & version:
# cat osrelease2.1.88# cat ostypeLinux# cat version#5 Wed Feb 25 21:49:24 MET 1998
The files osrelease and ostype should be clear enough. Versionneeds a little more clarification however. The '#5' means thatthis is the fifth kernel built from this source base and thedate behind it indicates the time the kernel was built.
The only way to tune these values is to rebuild the kernel :-)
==============================================================
overflowgid & overflowuid:
if your architecture did not always support 32-bit UIDs (i.e. arm,
i386, m68k, sh, and sparc32), a fixed UID and GID will be returned toapplications that use the old 16-bit UID/GID system calls, if theactual UID or GID would exceed 65535.
These sysctls allow you to change the value of the fixed UID and GID.
The default is 65534.
==============================================================
panic:
The value in this file represents the number of seconds the kernelwaits before rebooting on a panic. When you use the software watchdog,
the recommended setting is 60.
==============================================================
panic_on_io_nmi:
Controls the kernel's behavior when a CPU receives an NMI caused byan IO error.
0: try to continue operation (default)
1: panic immediately. The IO error triggered an NMI. This indicates a serious system condition which could result in IO data corruption.
Rather than continuing, panicking might be a better choice. Some servers issue this sort of NMI when the dump button is pushed,
and you can use this option to take a crash dump.
==============================================================
panic_on_oops:
Controls the kernel's behaviour when an oops or BUG is encountered.
0: try to continue operation
1: panic immediately. If the `panic' sysctl is also non-zero then the machine will be rebooted.
==============================================================
panic_on_stackoverflow:
Controls the kernel's behavior when detecting the overflows ofkernel, IRQ and exception stacks except a user stack.
This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.
0: try to continue operation.
1: panic immediately.
==============================================================
panic_on_unrecovered_nmi:
The default Linux behaviour on an NMI of either memory or unknown isto continue operation. For many environments such as scientificcomputing it is preferable that the box is taken out and the errordealt with than an uncorrected parity/ECC error get propagated.
A small number of systems do generate NMI's for bizarre random reasonssuch as power management so the default is off. That sysctl works likethe existing panic controls already in that directory.
==============================================================
panic_on_warn:
Calls panic() in the WARN() path when set to 1. This is useful to avoida kernel rebuild when attempting to kdump at the location of a WARN().
0: only WARN(), default behaviour.
1: call panic() after printing out WARN() location.
==============================================================
panic_on_rcu_stall:
When set to 1, calls panic() after RCU stall detection messages. Thisis useful to define the root cause of RCU stalls using a vmcore.
0: do not panic() when RCU stall takes place, default behavior.
1: panic() after printing RCU stall messages.
==============================================================
perf_cpu_time_max_percent:
Hints to the kernel how much CPU time it should be allowed touse to handle perf sampling events. If the perf subsystemis informed that its samples are exceeding this limit, itwill drop its sampling frequency to attempt to reduce its CPUusage.
Some perf sampling happens in NMIs. If these samplesunexpectedly take too long to execute, the NMIs can becomestacked up next to each other so much that nothing else isallowed to execute.
0: disable the mechanism. Do not monitor or correct perf's sampling rate no matter how CPU time it takes.
1-100: attempt to throttle perf's sample rate to this percentage of CPU. Note: the kernel calculates an "expected" length of each sample event. 100 here means 100% of that expected length. Even if this is set to 100, you may still see sample throttling if this length is exceeded. Set to 0 if you truly do not care how much CPU is consumed.
==============================================================
perf_event_paranoid:
Controls use of the performance events system by unprivilegedusers (without CAP_SYS_ADMIN). The default value is 2.
-1: Allow use of (almost) all events by all users>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK>=1: Disallow CPU event access by users without CAP_SYS_ADMIN>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
==============================================================
perf_event_max_stack:
Controls maximum number of stack frames to copy for (attr.sample_type &
PERF_SAMPLE_CALLCHAIN) configured events, for instance, when using'perf record -g' or 'perf trace --call-graph fp'.
This can only be done when no events are in use that have callchainsenabled, otherwise writing to this file will return -EBUSY.
The default value is 127.
==============================================================
perf_event_max_contexts_per_stack:
Controls maximum number of stack frame context entries for(attr.sample_type & PERF_SAMPLE_CALLCHAIN) configured events, forinstance, when using 'perf record -g' or 'perf trace --call-graph fp'.
This can only be done when no events are in use that have callchainsenabled, otherwise writing to this file will return -EBUSY.
The default value is 8.
==============================================================
pid_max:
PID allocation wrap value. When the kernel's next PID valuereaches this value, it wraps back to a minimum PID value.
PIDs of value pid_max or larger are not allocated.
==============================================================
ns_last_pid:
The last pid allocated in the current (the one task using this sysctllives in) pid namespace. When selecting a pid for a next task on forkkernel tries to allocate a number starting from this one.
==============================================================
powersave-nap: (PPC only)
If set, Linux-PPC will use the 'nap' mode of powersaving,
otherwise the 'doze' mode will be used.
==============================================================
printk:
The four values in printk denote: console_loglevel,
default_message_loglevel, minimum_console_loglevel anddefault_console_loglevel respectively.
These values influence printk() behavior when printing orlogging error messages. See 'man 2 syslog' for more info onthe different loglevels.
- console_loglevel: messages with a higher priority than this will be printed to the console- default_message_loglevel: messages without an explicit priority will be printed with this priority- minimum_console_loglevel: minimum (highest) value to which console_loglevel can be set- default_console_loglevel: default value for console_loglevel
==============================================================
printk_delay:
Delay each printk message in printk_delay milliseconds
Value from 0 - 10000 is allowed.
==============================================================
printk_ratelimit:
Some warning messages are rate limited. printk_ratelimit specifiesthe minimum length of time between these messages (in jiffies), bydefault we allow one every 5 seconds.
A value of 0 will disable rate limiting.
==============================================================
printk_ratelimit_burst:
While long term we enforce one message per printk_ratelimitseconds, we do allow a burst of messages to pass through.
printk_ratelimit_burst specifies the number of messages we cansend before ratelimiting kicks in.
==============================================================
printk_devkmsg:
Control the logging to /dev/kmsg from userspace:
ratelimit: default, ratelimitedon: unlimited logging to /dev/kmsg from userspaceoff: logging to /dev/kmsg disabled
The kernel command line parameter printk.devkmsg= overrides this and isa one-time setting until next reboot: once set, it cannot be changed bythis sysctl interface anymore.
==============================================================
randomize_va_space:
This option can be used to select the type of process addressspace randomization that is used in the system, for architecturesthat support this feature.
0 - Turn the process address space randomization off. This is the default for architectures that do not support this feature anyways,
and kernels that are booted with the "norandmaps" parameter.
1 - Make the addresses of mmap base, stack and VDSO page randomized.
This, among other things, implies that shared libraries will be loaded to random addresses. Also for PIE-linked binaries, the location of code start is randomized. This is the default if the CONFIG_COMPAT_BRK option is enabled.
2 - Additionally enable heap randomization. This is the default if CONFIG_COMPAT_BRK is disabled.
There are a few legacy applications out there (such as some ancient versions of libc.so.5 from 1996) that assume that brk area starts just after the end of the code+bss. These applications break when start of the brk area is randomized. There are however no known non-legacy applications that would be broken this way, so for most systems it is safe to choose full randomization.
Systems with ancient and/or broken binaries should be configured with CONFIG_COMPAT_BRK enabled, which excludes the heap from process address space randomization.
==============================================================
reboot-cmd: (Sparc only)
??? This seems to be a way to give an argument to the SparcROM/Flash boot loader. Maybe to tell it what to do afterrebooting. ???
==============================================================
rtsig-max & rtsig-nr:
The file rtsig-max can be used to tune the maximum numberof POSIX realtime (queued) signals that can be outstandingin the system.
rtsig-nr shows the number of RT signals currently queued.
==============================================================
sched_schedstats:
Enables/disables scheduler statistics. Enabling this featureincurs a small amount of overhead in the scheduler but isuseful for debugging and performance tuning.
==============================================================
sg-big-buff:
This file shows the size of the generic SCSI (sg) buffer.
You can't tune it just yet, but you could change it oncompile time by editing include/scsi/sg.h and changingthe value of SG_BIG_BUFF.
There shouldn't be any reason to change this value. Ifyou can come up with one, you probably know what youare doing anyway :)
==============================================================
shmall:
This parameter sets the total amount of shared memory pages thatcan be used system wide. Hence, SHMALL should always be at leastceil(shmmax/PAGE_SIZE).
If you are not sure what the default PAGE_SIZE is on your Linuxsystem, you can run the following command:
# getconf PAGE_SIZE
==============================================================
shmmax:
This value can be used to query and set the run time limiton the maximum shared memory segment size that can be created.
Shared memory segments up to 1Gb are now supported in thekernel. This value defaults to SHMMAX.
==============================================================
shm_rmid_forced:
Linux lets you set resource limits, including how much memory oneprocess can consume, via setrlimit(2). Unfortunately, shared memorysegments are allowed to exist without association with any process, andthus might not be counted against any resource limits. If enabled,
shared memory segments are automatically destroyed when their attachcount becomes zero after a detach or a process termination. It willalso destroy segments that were created, but never attached to, on exitfrom the process. The only use left for IPC_RMID is to immediatelydestroy an unattached segment. Of course, this breaks the way things aredefined, so some applications might stop working. Note that thisfeature will do you no good unless you also configure your resourcelimits (in particular, RLIMIT_AS and RLIMIT_NPROC). Most systems don'tneed this.
Note that if you change this from 0 to 1, already created segmentswithout users and with a dead originative process will be destroyed.
==============================================================
sysctl_writes_strict:
Control how file position affects the behavior of updating sysctl valuesvia the /proc/sys interface:
-1 - Legacy per-write sysctl value handling, with no printk warnings.
Each write syscall must fully contain the sysctl value to be written, and multiple writes on the same sysctl file descriptor will rewrite the sysctl value, regardless of file position.
0 - Same behavior as above, but warn about processes that perform writes to a sysctl file descriptor when the file position is not 0.
1 - (default) Respect file position when writing sysctl strings. Multiple writes will append to the sysctl value buffer. Anything past the max length of the sysctl value buffer will be ignored. Writes to numeric sysctl entries must always be at file position 0 and the value must be fully contained in the buffer sent in the write syscall.
==============================================================
softlockup_all_cpu_backtrace:
This value controls the soft lockup detector thread's behaviorwhen a soft lockup condition is detected as to whether or notto gather further debug information. If enabled, each cpu willbe issued an NMI and instructed to capture stack trace.
This feature is only applicable for architectures which supportNMI.
0: do nothing. This is the default behavior.
1: on detection capture more debug information.
==============================================================
soft_watchdog
This parameter can be used to control the soft lockup detector.
0 - disable the soft lockup detector 1 - enable the soft lockup detector
The soft lockup detector monitors CPUs for threads that are hogging the CPUswithout rescheduling voluntarily, and thus prevent the 'watchdog/N' threadsfrom running. The mechanism depends on the CPUs ability to respond to timerinterrupts which are needed for the 'watchdog/N' threads to be woken up bythe watchdog timer function, otherwise the NMI watchdog - if enabled - candetect a hard lockup condition.
==============================================================
tainted:
Non-zero if the kernel has been tainted. Numeric values, whichcan be ORed together:
1 - A module with a non-GPL license has been loaded, this includes modules with no license.
Set by modutils >= 2.4.9 and module-init-tools.
2 - A module was force loaded by insmod -f.
Set by modutils >= 2.4.9 and module-init-tools.
4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
8 - A module was forcibly unloaded from the system by rmmod -f.
16 - A hardware machine check error occurred on the system.
32 - A bad page was discovered on the system.
64 - The user has asked that the system be marked "tainted". This could be because they are running software that directly modifies the hardware, or for other reasons.
128 - The system has died.
256 - The ACPI DSDT has been overridden with one supplied by the user instead of using the one provided by the hardware.
512 - A kernel warning has occurred.
1024 - A module from drivers/staging was loaded.
2048 - The system is working around a severe firmware bug.
4096 - An out-of-tree module has been loaded.
8192 - An unsigned module has been loaded in a kernel supporting module signature.
16384 - A soft lockup has previously occurred on the system.
32768 - The kernel has been live patched.
==============================================================
threads-max
This value controls the maximum number of threads that can be createdusing fork().
During initialization the kernel sets this value such that even if themaximum number of threads is created, the thread structures occupy onlya part (1/8th) of the available RAM pages.
The minimum value that can be written to threads-max is 20.
The maximum value that can be written to threads-max is given by theconstant FUTEX_TID_MASK (0x3fffffff).
If a value outside of this range is written to threads-max an errorEINVAL occurs.
The value written is checked against the available RAM pages. If thethread structures would occupy too much (more than 1/8th) of theavailable RAM pages threads-max is reduced accordingly.
==============================================================
unknown_nmi_panic:
The value in this file affects behavior of handling NMI. When thevalue is non-zero, unknown NMI is trapped and then panic occurs. Atthat time, kernel debugging information is displayed on console.
NMI switch that most IA32 servers have fires unknown NMI up, forexample. If a system hangs up, try pressing the NMI switch.
==============================================================
watchdog:
This parameter can be used to disable or enable the soft lockup detector_and_ the NMI watchdog (i.e. the hard lockup detector) at the same time.
0 - disable both lockup detectors 1 - enable both lockup detectors
The soft lockup detector and the NMI watchdog can also be disabled orenabled individually, using the soft_watchdog and nmi_watchdog parameters.
If the watchdog parameter is read, for example by executing
cat /proc/sys/kernel/watchdog
the output of this command (0 or 1) shows the logical OR of soft_watchdogand nmi_watchdog.
==============================================================
watchdog_cpumask:
This value can be used to control on which cpus the watchdog may run.
The default cpumask is all possible cores, but if NO_HZ_FULL isenabled in the kernel config, and cores are specified with thenohz_full= boot argument, those cores are excluded by default.
Offline cores can be included in this mask, and if the core is laterbrought online, the watchdog will be started based on the mask value.
Typically this value would only be touched in the nohz_full caseto re-enable cores that by default were not running the watchdog,
if a kernel lockup was suspected on those cores.
The argument value is the standard cpulist format for cpumasks,
so for example to enable the watchdog on cores 0, 2, 3, and 4 youmight say:
echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask
==============================================================
watchdog_thresh:
This value can be used to control the frequency of hrtimer and NMIevents and the soft and hard lockup thresholds. The default thresholdis 10 seconds.
The softlockup threshold is (2 * watchdog_thresh). Setting thistunable to zero will disable lockup detection altogether.
==============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment