Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/share/man/man7/sysctl.7,v rcsdiff: /ftp/cvs/cvsroot/src/share/man/man7/sysctl.7,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.107 retrieving revision 1.131 diff -u -p -r1.107 -r1.131 --- src/share/man/man7/sysctl.7 2017/01/08 14:28:42 1.107 +++ src/share/man/man7/sysctl.7 2018/09/06 10:09:29 1.131 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.107 2017/01/08 14:28:42 wiz Exp $ +.\" $NetBSD: sysctl.7,v 1.131 2018/09/06 10:09:29 maxv Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" -.Dd November 17, 2016 +.Dd September 6, 2018 .Dt SYSCTL 7 .Os .Sh NAME @@ -117,7 +117,7 @@ as a debugging variable, the following d .Pp .Bd -literal -offset indent -compact int dospecialcheck = 1; -struct ctldebug debug5 = { "dospecialcheck", \*[Am]dospecialcheck }; +struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck }; .Ed .Pp Note that the dynamic implementation of @@ -315,7 +315,7 @@ privilege may change the value. .It kern.maxproc integer yes .It kern.maxptys integer yes .It kern.maxvnodes integer yes -.It kern.messages integer yes +.It kern.messages integer yes .It kern.mbuf node not applicable .It kern.memlock integer no .It kern.memlock_range integer no @@ -355,7 +355,7 @@ privilege may change the value. .It kern.rtc_offset integer yes .It kern.saved_ids integer no .It kern.sbmax integer yes -.\".It kern.sched node not applicable +.It kern.sched node not applicable .It kern.securelevel integer raise only .It kern.somaxkva integer yes .It kern.synchronized_io integer no @@ -372,9 +372,8 @@ privilege may change the value. .El .Bl -tag -width "123456" .It Li kern.aio_listio_max -The maximum number of asynchronous -.Tn I/O -operations in a single list I/O call. +The maximum number of asynchronous I/O operations in a single list +I/O call. Like with all variables related to .Xr aio 3 , the variable may be created and removed dynamically @@ -384,7 +383,7 @@ The maximum number of asynchronous I/O o .It Li kern.arandom This variable picks a random number each time it is queried. The used random number generator -.Pf ( Tn RNG ) +.Pf ( RNG ) is based on .Xr arc4random 3 . .It Li kern.argmax ( Dv KERN_ARGMAX ) @@ -476,12 +475,12 @@ in the system. The available values are as follows: .Bl -tag -width XX0 -offset indent -.It Dv \*[Lt] 0 +.It Dv < 0 Always force userlevel requests to use software transforms. .It Dv = 0 If present, use hardware and grant userlevel requests for non-accelerated transforms (handling the latter in software). -.It Dv \*[Gt] 0 +.It Dv > 0 Allow user requests only for transforms which are hardware-accelerated. .El .It Li kern.defcorename ( Dv KERN_DEFCORENAME ) @@ -771,14 +770,14 @@ otherwise\ 0. .It Li kern.messages Kernel console message verbosity. See -.Sy \ +.Aq Pa sys/reboot.h .Bl -column "verbosity" "setting" -offset indent -.It Sy Verbosity Setting -.It \ \ \ \ 0 Silent Sy AB_SILENT -.It \ \ \ \ 1 Quiet Sy AB_QUIET -.It \ \ \ \ 2 Normal Sy AB_NORMAL -.It \ \ \ \ 3 Verbose Sy AB_VERBOSE -.It \ \ \ \ 4 Debug Sy AB_DEBUG +.It Sy Value Ta Sy Verbosity Ta Sy sys/reboot.h equivalent +.It 0 Ta Silent Ta Sy AB_SILENT +.It 1 Ta Quiet Ta Sy AB_QUIET +.It 2 Ta Normal Ta Sy AB_NORMAL +.It 3 Ta Verbose Ta Sy AB_VERBOSE +.It 4 Ta Debug Ta Sy AB_DEBUG .El .It Li kern.module Settings related to kernel modules. @@ -787,7 +786,7 @@ The third level names for the settings a .It Sy Third level name Ta Sy Type Ta Sy Changeable .It kern.module.autoload integer yes .It kern.module.autotime integer yes -.It kern.module.verbose integer yes +.It kern.module.verbose boolean yes .El .Pp The variables are as follows: @@ -811,9 +810,7 @@ Returns the standard version the impleme Monotonic Clock Option conforms to, otherwise\ 0. .It Li kern.mqueue -Settings related to -.Tn POSIX -message queues; see +Settings related to POSIX message queues; see .Xr mqueue 3 . This node is created dynamically when the corresponding kernel module is loaded. @@ -964,7 +961,7 @@ structures is returned, whose size depends on the current number of such objects in the system. The third and fourth level numeric names are as follows: .Bl -column "KERN_PROC_SESSION" "Fourth level is:" -offset indent -.It Sy Third level name Ta Sy Fourth level is: +.It Sy Third level name Ta Sy Fourth level is : .It KERN_PROC_ALL None .It KERN_PROC_GID A group ID .It KERN_PROC_PID A process ID @@ -1057,8 +1054,104 @@ Maximum socket buffer size. .It Li kern.securelevel ( Dv KERN_SECURELVL ) See .Xr secmodel_securelevel 9 . -.\" .It Li kern.sched -.\" XXX: Undocumented. +.It Li kern.sched ( dynamic ) +Influence the scheduling of LWPs, their priorisation and how they are +distributed on and moved between CPUs. +.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent +.It Sy Third level name Sy Type Sy Changeable +.It kern.sched.cacheht_time integer yes +.It kern.sched.balance_period integer yes +.It kern.sched.average_weight integer yes +.It kern.sched.min_catch integer yes +.It kern.sched.timesoftints integer yes +.It kern.sched.kpreempt_pri integer yes +.It kern.sched.upreempt_pri integer yes +.It kern.sched.maxts integer yes +.It kern.sched.mints integer yes +.It kern.sched.name string no +.It kern.sched.rtts integer no +.It kern.sched.pri_min integer no +.It kern.sched.pri_max integer no +.El +.Pp +The variables are as follows: +.Bl -tag -width "123456" +.It Li kern.sched.cacheht_time ( dynamic ) +Cache hotness time in which a LWP is kept on one particular CPU +and not moved to another CPU. +This reduces the overhead of flushing and reloading caches. +Defaults to 3ms. +Needs to be given in +.Dq hz +units, see +.Xr mstohz 9 . +.It Li kern.sched.balance_period ( dynamic ) +Interval at which the CPU queues are checked for re-balancing. +Defaults to 300ms. +Needs to be given in +.Dq hz +units, see +.Xr mstohz 9 . +.It Li kern.sched.average_weight ( dynamic ) +Can be used to influence how likely LWPs are to be migrated from +one CPU's queue of LWPs that are ready to run to a different, idle CPU. +The value gives the percentage for weighting the average count of +migratable threads from the past against the current number of +migratable threads. +A small value gives more weight to the past, a larger values more weight +on the current situation. +Defaults to 50 and must be between 0 and 100. +.It Li kern.sched.min_catch ( dynamic ) +Minimum count of migratable (runable) threads for catching (stealing) +from another CPU. +Defaults to 1 but can be increased to decrease chance of thread +migration between CPUs. +.It Li kern.sched.timesoftints ( dynamic ) +Enable tracking of CPU time for soft interrupts +as part of a LWP's real execution time. +Set to a non-zero value to enable, +and see +.Xr ps 1 +for printing CPU times. +.It Li kern.sched.kpreempt_pri ( dynamic ) +Minimum priority to trigger kernel preemption. +.It Li kern.sched.upreempt_pri ( dynamic ) +Minimum priority to trigger user preemption. +.It Li kern.sched.maxts ( dynamic ) +Scheduler specific maximal time quantum (in milliseconds). +Must be set to a value larger than +.Dq mints +and between 10 and +.Dq hz +as given by the +.Dv kern.clockrate +sysctl. +Provided by the M2 scheduler. +.It Li kern.sched.mints ( dynamic ) +Scheduler specific minimal time quantum (in milliseconds). +Must be set to a value smaller than +.Dq maxts +and between 1 and +.Dq hz +as given by the +.Dq kern.clockrate +sysctl. +Provided by the M2 scheduler. +.It Li kern.sched.name ( dynamic ) +Scheduler name. +Provided both by the M2 and the 4BSD scheduler. +.It Li kern.sched.rtts ( dynamic ) +Fixed scheduler specific round-robin time quantum in milliseconds. +Provided both by the M2 and the 4BSD scheduler. +.It Li kern.sched.pri_min ( dynamic ) +Minimal POSIX real-time priority. +See +.Xr sched 3 . +.It Li kern.sched.pri_max ( dynamic ) +Maximal POSIX real-time priority. +See +.Xr sched 3 . +.El .It Li kern.somaxkva ( Dv KERN_SOMAXKVA ) Maximum amount of kernel memory to be used for socket buffers. .\" XXX units? @@ -1251,7 +1344,7 @@ The fourth level name is an address fami select all address families. The fifth and sixth level names are as follows: .Bl -column "Fifth level name" "Sixth level is:" -offset indent -.It Sy Fifth level name Ta Sy Sixth level is: +.It Sy Fifth level name Ta Sy Sixth level is : .It NET_RT_FLAGS rtflags .It NET_RT_DUMP None .It NET_RT_IFLIST None @@ -1317,7 +1410,6 @@ The currently defined protocols and name .It tcp mss_ifmtu integer yes .It tcp win_scale integer yes .It tcp timestamps integer yes -.It tcp compat_42 integer yes .It tcp cwm integer yes .It tcp cwm_burstsize integer yes .It tcp ack_on_push integer yes @@ -1400,7 +1492,7 @@ This cannot be set to less than 1024 or .It Li ip.checkinterface If set to non-zero, the host will reject packets addressed to it that arrive on an interface not bound to that address. -Currently, this must be disabled if ipnat is used to translate the +Currently, this must be disabled if NAT is used to translate the destination address to another local interface, or if addresses are added to the loopback interface instead of the interface where the packets for those packets are received. @@ -1510,10 +1602,6 @@ This can avoid losing a round trip time but has the caveat of potentially defeating TCP's delayed ACK algorithm. Use of this option is generally not recommended, but the variable exists in case your configuration really needs it. -.It Li tcp.compat_42 -If set to 1, enables work-arounds for bugs in the 4.2BSD TCP implementation. -Use of this option is not recommended, although it may be -required in order to communicate with extremely old TCP implementations. .It Li tcp.cwm If set to 1, enables use of the Hughes/Touch/Heidemann Congestion Window Monitoring algorithm. @@ -1926,10 +2014,7 @@ Default UDP receive buffer size. Default UDP send buffer size. .El .Pp -We reuse net.*.tcp for -.Tn TCP -over -.Tn IPv6 , +We reuse net.*.tcp for TCP over IPv6, and therefore we do not have variables net.*.tcp6. Variables net.inet6.udp6 have identical meaning to net.inet.udp. Please refer to @@ -1956,13 +2041,12 @@ The currently defined variable and names .It esp_auth integer yes .It ah_keymin integer yes .El -.Pp The variables are as follows: .Bl -tag -width "123456" .It Li debug Turn on debugging message from within the kernel. The value is a bitmap, as defined in -.In netkey/key_debug.h . +.In netipsec/key_debug.h . .It Li enabled Control processing of IPsec control messages. .Bl -tag -width indent @@ -1974,9 +2058,9 @@ Allow IPsec processing when SPD policies Force IPsec processing even when SPD policies are not present. .El .It Li used -Based on if IPsec is enabled, and SPD rule existance, show if +Based on if IPsec is enabled, and SPD rule existence, show if IPsec is being used. -Note that currenly once IPsec is being used, it cannot be disabled. +Note that currently once IPsec is being used, it cannot be disabled. .It Li spi_try The number of times the kernel will try to obtain an unique SPI when it generates it from random number generator. @@ -2006,6 +2090,66 @@ Minimum AH key length, in bits, The value is used when the kernel creates proposal payload on ACQUIRE PF_KEY message. .El +.It Li net.local ( Dv PF_LOCAL ) +Get or set various global information about +.Dv AF_LOCAL +type sockets. +For some variables, the third level name is the variable name: +.Bl -column "Variable" "integer" "Changeable" -offset indent +.It Sy Variable Type Ta Sy Changeable +.It inflight integer no +.It deferred integer no +.El +The variables are as follows: +.Bl -tag -width "123456" +.It Li inflight +The number of file descriptors currently passed between processes, +.Qq in flight . +.It Li deferred +The number of file descriptors passed between processes that have been +deferred for cleanup by a kernel task. +.El +.Pp +Other variables are specific to a socket type: +.Bl -column "seqpacket" "sendspace" "integer" "Changeable" -offset indent +.It Sy "Socket Type" Sy Variable Type Ta Sy Changeable +.It dgram pcblist struct no +.It dgram recvspace integer yes +.It dgram sendspace integer yes +.It seqpacket pcblist struct no +.It stream pcblist struct no +.It stream recvspace integer yes +.It stream sendspace integer yes +.El +The variables are as follows: +.Bl -tag -width "123456" +.It Li dgram.pcblist +The Protocol Control Block list structure for datagram sockets. +Parsed by +.Xr netstat 8 +or +.Xr sockstat 8 . +.It Li dgram.recvspace +The default datagram receive buffer size. +.It Li dgram.sendspace +The default datagram send buffer size. +.It Li seqpacket.pcblist +The Protocol Control Block list structure for Sequential Packet sockets. +Parsed by +.Xr netstat 8 +or +.Xr sockstat 8 . +.It Li stream.pcblist +The Protocol Control Block list structure for stream sockets. +Parsed by +.Xr netstat 8 +or +.Xr sockstat 8 . +.It Li stream.recvspace +The default stream receive buffer size. +.It Li stream.sendspace +The default stream send buffer size. +.El .El .Ss The proc.* subtree The string and integer information available for the @@ -2028,6 +2172,7 @@ points to the current process, or the PI .It proc.pid.stopfork int yes .It proc.pid.stopexec int yes .It proc.pid.stopexit int yes +.It proc.pid.paxflags int no .El .Bl -tag -width "123456" .It Li proc.pid.corename ( Dv PROC_PID_CORENAME ) @@ -2107,38 +2252,38 @@ Both are of type integer. If non zero, the process' children will be stopped after .Xr fork 2 calls. -The children is created in the SSTOP state and is never scheduled +The children are created in the SSTOP state and are never scheduled for running before being stopped. -This feature helps attaching a process with a debugger such as +This feature enables attaching to a process with a debugger such as .Xr gdb 1 -before it had the opportunity to actually do anything. +before the process has the opportunity to actually do anything. .Pp This value is inherited by the process's children, and it also -apply to emulation specific system calls that fork a new process, such as +applies to emulation specific system calls that fork a new process, such as .Fn sproc or .Fn clone . .It Li proc.pid.stopexec ( Dv PROC_PID_STOPEXEC ) -If non zero, the process will be stopped on next +If non zero, the process will be stopped on the next .Xr exec 3 call. The process created by .Xr exec 3 is created in the SSTOP state and is never scheduled for running before being stopped. -This feature helps attaching a process with a debugger such as +This feature enables attaching to a process with a debugger such as .Xr gdb 1 -before it had the opportunity to actually do anything. +before the process has the opportunity to actually do anything. .Pp This value is inherited by the process's children. .It Li proc.pid.stopexit ( Dv PROC_PID_STOPEXIT ) -If non zero, the process will be stopped on when it has cause to exit, +If non zero, the process will be stopped when it has cause to exit, either by way of calling .Xr exit 3 , .Xr _exit 2 , or by the receipt of a specific signal. The process is stopped before any of its resources or vm space is -released allowing examination of the termination state of a process +released allowing examination of the termination state of the process before it disappears. This feature can be used to examine the final conditions of the process's vmspace via @@ -2148,6 +2293,10 @@ or its resource settings with before it disappears. .Pp This value is also inherited by the process's children. +.It Li proc.pid.paxflags ( Dv PROC_PID_PAXFLAGS ) +This read-only variable returns the current value of the process's pax +flags (see +.Xr paxctl 8 ) . .El .Ss The user.* subtree ( Dv CTL_USER ) The string and integer information available for the @@ -2280,6 +2429,8 @@ privilege may change the value. .It vm.uvmexp2 struct uvmexp_sysctl no .It vm.vmmeter struct vmtotal no .It vm.proc.map struct kinfo_vmentry no +.It vm.guard_size unsigned int no +.It vm.thread_guard_size unsigned int yes .El .Bl -tag -width "123456" .It Li vm.anonmax ( Dv VM_ANONMAX ) @@ -2325,7 +2476,7 @@ The returned data consists of a A flag which controls whether user processes can map virtual address\ 0. .It Li vm.proc.map ( Dv VM_PROC ) The third level is -.dv VM_PROC_MAP , +.Dv VM_PROC_MAP , the fourth is the pid of the process to display the vm object entries for, and the fifth is the size of .Vt struct kinfo_vmentry . @@ -2342,6 +2493,11 @@ The returned data consists of a Return system wide virtual memory statistics. The returned data consists of a .Vt struct uvmexp_sysctl . +.It Li vm.guard_size +Return system wide guard size for the main thread of a program. +.It Li vm.thread_guard_size +Return system wide default size for the guard area of all other threads +of a program. .\" XXX vm.idlezero .El .Ss The ddb.* subtree ( Dv CTL_DDB ) @@ -2350,52 +2506,59 @@ The information available for the level is detailed below. The changeable column shows whether a process with appropriate privilege may change the value. -.\" XXX sort .Bl -column "Second level name" "integer" "Changeable" -offset indent .It Sy Second level name Ta Sy Type Ta Sy Changeable -.It ddb.radix integer yes +.It ddb.commandonenter string yes +.It ddb.dumpstack integer yes +.It ddb.fromconsole integer yes +.It ddb.lines integer yes .It ddb.maxoff integer yes .It ddb.maxwidth integer yes -.It ddb.lines integer yes -.It ddb.tabstops integer yes .It ddb.onpanic integer yes -.It ddb.fromconsole integer yes +.It ddb.panicstackframes integer yes +.It ddb.radix integer yes +.It ddb.tabstops integer yes .It ddb.tee_msgbuf integer yes -.It ddb.commandonenter string yes .El .Bl -tag -width "123456" -.It Li ddb.radix ( Dv DDBCTL_RADIX ) -The input and output radix. +.It Li ddb.commandonenter +If not empty, the string is used as the DDB command to be executed each time +DDB is entered. +.It Li ddb.dumpstack +A value of 1 causes a stack trace to be printed on entering ddb from a panic. +A value of 0 disables this behaviour. +The default value is 1. +.It Li ddb.fromconsole ( Dv DDBCTL_FROMCONSOLE ) +If not zero, DDB may be entered by sending a break on a serial +console or by a special key sequence on a graphics console. +.It Li ddb.lines ( Dv DDBCTL_LINES ) +Number of display lines. .It Li ddb.maxoff ( Dv DDBCTL_MAXOFF ) The maximum symbol offset. .It Li ddb.maxwidth ( Dv DDBCTL_MAXWIDTH ) The maximum output line width. -.It Li ddb.lines ( Dv DDBCTL_LINES ) -Number of display lines. -.It Li ddb.tabstops ( Dv DDBCTL_TABSTOPS ) -Tab width. .It Li ddb.onpanic ( Dv DDBCTL_ONPANIC ) If greater than zero, DDB will be entered if the kernel panics. -A value of 1 causes the system to enter DDB on panic, while a value of 2 -causes the kernel to attempt to print out a stack trace before entering DDB. +A value of 1 causes the system to enter DDB on panic. A value of 0 causes the kernel to attempt to print a stack trace, then reboot, while a value of \-1 means neither a stack trace will be printed nor DDB entered. -.It Li ddb.fromconsole ( Dv DDBCTL_FROMCONSOLE ) -If not zero, DDB may be entered by sending a break on a serial -console or by a special key sequence on a graphics console. +.It Li ddb.panicstackframes +Number of stack frames to display on panic. +Useful to avoid scrolling away the interesting frames on a glass tty. +Default value is +.Dv 65535 +(all frames), useful value around +.Dv 10 . +.It Li ddb.radix ( Dv DDBCTL_RADIX ) +The input and output radix. +.It Li ddb.tabstops ( Dv DDBCTL_TABSTOPS ) +Tab width. .It Li ddb.tee_msgbuf If not zero, DDB will output also to the kernel message buffer. -.It Li ddb.commandonenter -If not empty, a command to be executed on each enter to the -.Tn DDB . -.\" -.\" XXX: (a) ddb.commandonenter is missing in ddb(4); -.\" (b) No DDBCTL definitions for tee_msgbuf and commandonenter. .El .Pp -Some of these -.Tn MIB +Some of these MIB nodes are also available as variables from within the debugger. See .Xr ddb 4 @@ -2416,8 +2579,7 @@ The available second level names are: Available settings are detailed below. .Bl -tag -width "123456" .It Li security.curtain -If non-zero, will filter return objects according to the user -.Tn ID +If non-zero, will filter return objects according to the user ID requesting information about them, preventing users from accessing any objects they do not own. .Pp @@ -2560,7 +2722,7 @@ The toplevel name is reserved to be used by vendors who wish to have their own private MIB tree. Intended use is to store values under -.Dq vendor.\*[Lt]yourname\*[Gt].* . +.Dq vendor..* . .Sh SEE ALSO .Xr sysctl 3 , .Xr ipsec 4 ,