1.\" $NetBSD: sysctl.7,v 1.151 2020/10/17 09:20:33 wiz Exp $ 2.\" 3.\" Copyright (c) 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 31.\" 32.Dd October 17, 2020 33.Dt SYSCTL 7 34.Os 35.Sh NAME 36.Nm sysctl 37.Nd system information variables 38.Sh DESCRIPTION 39The 40.Xr sysctl 3 41library function and the 42.Xr sysctl 8 43utility are used to get and set values of system variables, maintained 44by the kernel. 45The variables are organized in a tree and identified by a sequence of 46numbers, conventionally separated by dots with the topmost identifier 47at the left side. 48The numbers have corresponding text names. 49The 50.Xr sysctlnametomib 3 51function or the 52.Fl M 53argument to the 54.Xr sysctl 8 55utility can be used to convert the text representation to the 56numeric one. 57.Pp 58The individual sysctl variables are described below, both the textual 59and numeric form where applicable. 60The textual names can be used as argument to the 61.Xr sysctl 8 62utility and in the file 63.Pa /etc/sysctl.conf . 64The numeric names are usually defined as preprocessor constants and 65are intended for use by programs. 66Every such constant expands to one integer, which identifies the 67sysctl variable relative to the upper level of the tree. 68See the 69.Xr sysctl 3 70manual page for programming examples. 71.Ss Top level names 72The top level names are defined with a 73.Va CTL_ 74prefix in 75.In sys/sysctl.h , 76and are as follows. 77The next and subsequent levels down are found in the include files 78listed here, and described in separate sections below. 79.Bl -column "security" ".Dv CTL_SECURITY" ".In uvm/uvm_param.h" "High kernel limits" 80.It Sy Name Ta Sy Constant Ta Sy Next level names Ta Sy Description 81.It kern Ta Dv CTL_KERN Ta In sys/sysctl.h Ta High kernel limits 82.It vm Ta Dv CTL_VM Ta In uvm/uvm_param.h Ta Virtual memory 83.It vfs Ta Dv CTL_VFS Ta In sys/mount.h Ta Filesystem 84.It net Ta Dv CTL_NET Ta In sys/socket.h Ta Networking 85.It debug Ta Dv CTL_DEBUG Ta In sys/sysctl.h Ta Debugging 86.It hw Ta Dv CTL_HW Ta In sys/sysctl.h Ta Generic CPU, I/O 87.It machdep Ta Dv CTL_MACHDEP Ta In sys/sysctl.h Ta Machine dependent 88.It user Ta Dv CTL_USER Ta In sys/sysctl.h Ta User-level 89.It ddb Ta Dv CTL_DDB Ta In sys/sysctl.h Ta In-kernel debugger 90.It proc Ta Dv CTL_PROC Ta In sys/sysctl.h Ta Per-process 91.It vendor Ta Dv CTL_VENDOR Ta ? Ta Vendor specific 92.It emul Ta Dv CTL_EMUL Ta In sys/sysctl.h Ta Emulation settings 93.It security Ta Dv CTL_SECURITY Ta In sys/sysctl.h Ta Security settings 94.El 95.Ss The debug.* subtree 96The debugging variables vary from system to system. 97A debugging variable may be added or deleted without need to recompile 98.Nm 99to know about it. 100Each time it runs, 101.Nm 102gets the list of debugging variables from the kernel and 103displays their current values. 104The system defines twenty 105.Vt ( struct ctldebug ) 106variables named 107.Dv debug0 108through 109.Dv debug19 . 110They are declared as separate variables so that they can be 111individually initialized at the location of their associated variable. 112The loader prevents multiple use of the same variable by issuing errors 113if a variable is initialized in more than one place. 114For example, to export the variable 115.Va dospecialcheck 116as a debugging variable, the following declaration would be used: 117.Pp 118.Bd -literal -offset indent -compact 119int dospecialcheck = 1; 120struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck }; 121.Ed 122.Pp 123Note that the dynamic implementation of 124.Nm 125currently in use largely makes this particular 126.Nm 127interface obsolete. 128See 129.Xr sysctl 8 130.\" and 131.\" .Xr sysctl 9 132for more information. 133.Ss The vfs.* subtree 134A distinguished second level name, 135.Li vfs.generic ( Dv VFS_GENERIC ) , 136is used to get general information about all file systems. 137It has the following third level identifiers: 138.Bl -tag -width "123456" 139.It Li vfs.generic.maxtypenum ( Dv VFS_MAXTYPENUM ) 140The highest valid file system type number. 141.It Li vfs.generic.conf ( Dv VFS_CONF ) 142Returns configuration information about the file system type given as a fourth 143level identifier. 144.It Li vfs.generic.usermount ( Dv VFS_USERMOUNT ) 145Determines if non superuser mounts are allowed, defaults to 146.Dv 0 . 147.It Li vfs.generic.magiclinks ( Dv VFS_MAGICLINKS ) 148Controls if expansion of variables is going to be performed on pathnames 149or not. 150Defaults to no variable expansion, 151.Dv 0 . 152Variables are of the form 153.Li @name 154and the variables supported are described in 155.Xr symlink 7 156under 157.Dq "MAGIC SYMLINKS" . 158.El 159.Pp 160A second level name for controlling the 161.Xr wapbl 4 162(Write Ahead Physical Block Logging file system journalling) 163capabilities with the following third level identifiers: 164.Bl -tag -width "123456" 165.It Li vfs.wapbl.flush_disk_cache 166Controls whether to attempt to flush the disk cache on each commit. 167It defaults to 1 and it should always be on to ensure integrity 168of file system metadata in the event of a power loss. 169For slow disks, turning it off can improve performance. 170.It Li vfs.wapbl.verbose_commit 171For each transaction log commit, print the number of bytes written 172and the time it took to commit as seconds.nanoseconds. 173.El 174.Pp 175The remaining second level identifiers are the file system names, identified 176by the type number returned by a 177.Xr statvfs 2 178call or from 179.Li vfs.generic.conf . 180.Pp 181The third level identifiers available for each file system 182are given in the header file that defines the mount 183argument structure for that file system. 184.Ss The hw.* subtree 185The string and integer information available for the 186.Li hw 187level is detailed below. 188The changeable column shows whether a process with appropriate 189privilege may change the value. 190.Bl -column "hw.machine_arch" "integer" "Changeable" -offset indent 191.It Sy Second level name Ta Sy Type Ta Sy Changeable 192.It hw.alignbytes integer no 193.It hw.byteorder integer no 194.It hw.cnmagic string yes 195.It hw.disknames string no 196.It hw.diskstats struct no 197.It hw.machine string no 198.It hw.machine_arch string no 199.It hw.model string no 200.It hw.ncpu integer no 201.It hw.ncpuonline integer no 202.It hw.pagesize integer no 203.It hw.physmem integer no 204.It hw.physmem64 quad no 205.It hw.usermem integer no 206.It hw.usermem64 quad no 207.El 208.Bl -tag -width "123456" 209.It Li hw.alignbytes ( Dv HW_ALIGNBYTES ) 210Alignment constraint for all possible data types. 211This shows the value 212.Dv ALIGNBYTES 213in 214.In machine/param.h , 215at the kernel compilation time. 216.It Li hw.byteorder ( Dv HW_BYTEORDER ) 217The byteorder (4321, or 1234). 218.It Li hw.cnmagic ( Dv HW_CNMAGIC ) 219The console magic key sequence. 220.It Li hw.disknames ( Dv HW_DISKNAMES ) 221The list of (space separated) disk device names on the system. 222.It Li hw.iostatnames ( Dv HW_IOSTATNAMES ) 223A space separated list of devices that will have I/O statistics 224collected on them. 225.It Li hw.iostats ( Dv HW_IOSTATS ) 226Return statistical information on the NFS mounts, disk and tape 227devices on the system. 228An array of 229.Vt struct io_sysctl 230structures is returned, 231whose size depends on the current number of such objects in the system. 232The third level name is the size of the 233.Vt struct io_sysctl . 234The type of object can be determined by examining the 235.Va type 236element of 237.Vt struct io_sysctl . 238Which can be 239.Dv IOSTAT_DISK 240(disk drive), 241.Dv IOSTAT_TAPE 242(tape drive), or 243.Dv IOSTAT_NFS 244(NFS mount). 245.It Li hw.machine ( Dv HW_MACHINE ) 246The machine class. 247.It Li hw.machine_arch ( Dv HW_MACHINE_ARCH ) 248The machine CPU class. 249.It Li hw.model ( Dv HW_MODEL ) 250The machine model. 251.It Li hw.ncpu ( Dv HW_NCPU ) 252The number of CPUs configured. 253.It Li hw.ncpuonline ( Dv HW_NCPUONLINE ) 254The number of CPUs online. 255.It Li hw.pagesize ( Dv HW_PAGESIZE ) 256The software page size. 257.It Li hw.physmem ( Dv HW_PHYSMEM ) 258The bytes of physical memory as a 32-bit integer. 259.It Li hw.physmem64 ( Dv HW_PHYSMEM64 ) 260The bytes of physical memory as a 64-bit integer. 261.It Li hw.usermem ( Dv HW_USERMEM ) 262The bytes of non-kernel memory as a 32-bit integer. 263.It Li hw.usermem64 ( Dv HW_USERMEM64 ) 264The bytes of non-kernel memory as a 64-bit integer. 265.El 266.Ss The kern.* subtree 267This subtree includes data generally related to the kernel. 268The string and integer information available for the 269.Li kern 270level is detailed below. 271The changeable column shows whether a process with appropriate 272privilege may change the value. 273.Bl -column "kern.posix_reader_writer_locks" \ 274"struct kinfo_drivers" "not applicable" 275.It Sy Second level name Ta Sy Type Ta Sy Changeable 276.It kern.aio_listio_max integer yes 277.It kern.aio_max integer yes 278.It kern.arandom integer no 279.It kern.argmax integer no 280.It kern.boothowto integer no 281.It kern.boottime struct timespec no 282.It kern.buildinfo string no 283.\".It kern.bufq node not applicable 284.It kern.ccpu integer no 285.It kern.clockrate struct clockinfo no 286.It kern.consdev integer no 287.It kern.coredump node not applicable 288.It kern.cp_id struct no 289.It kern.cp_time uint64_t[\|] no 290.It kern.cryptodevallowsoft integer yes 291.It kern.defcorename string yes 292.It kern.detachall integer yes 293.It kern.domainname string yes 294.It kern.drivers struct kinfo_drivers no 295.It kern.dump_on_panic integer yes 296.It kern.expose_address integer yes 297.It kern.file struct file no 298.It kern.forkfsleep integer yes 299.It kern.fscale integer no 300.It kern.fsync integer no 301.It kern.hardclock_ticks integer no 302.It kern.hostid integer yes 303.It kern.hostname string yes 304.It kern.iov_max integer no 305.It kern.ipc node not applicable 306.It kern.job_control integer no 307.It kern.labeloffset integer no 308.It kern.labelsector integer no 309.It kern.login_name_max integer no 310.It kern.logsigexit integer yes 311.It kern.lwp struct kinfo_lwp yes 312.It kern.mapped_files integer no 313.It kern.maxfiles integer yes 314.It kern.maxlwp integer yes 315.It kern.maxpartitions integer no 316.It kern.maxphys integer no 317.It kern.maxproc integer yes 318.It kern.maxptys integer yes 319.It kern.maxvnodes integer yes 320.It kern.messages integer yes 321.It kern.mbuf node not applicable 322.It kern.memlock integer no 323.It kern.memlock_range integer no 324.It kern.memory_protection integer no 325.It kern.module node not applicable 326.It kern.monotonic_clock integer no 327.It kern.mqueue node not applicable 328.It kern.msgbuf integer no 329.It kern.msgbufsize integer no 330.It kern.ngroups integer no 331.\".It kern.no_sa_support integer yes 332.It kern.ntptime struct ntptimeval no 333.It kern.osrelease string no 334.It kern.osrevision integer no 335.It kern.ostype string no 336.\".It kern.panic_now integer yes 337.It kern.pipe node not applicable 338.It kern.pool struct pool_sysctl no 339.\" .It kern.posix node not applicable 340.It kern.posix1version integer no 341.It kern.posix_aio integer no 342.It kern.posix_barriers integer no 343.It kern.posix_reader_writer_locks integer no 344.\".It kern.posix_sched integer yes 345.It kern.posix_semaphores integer no 346.It kern.posix_spin_locks integer no 347.It kern.posix_threads integer no 348.It kern.posix_timers integer no 349.It kern.proc struct kinfo_proc no 350.It kern.proc2 struct kinfo_proc2 no 351.It kern.proc_args string no 352.It kern.profiling node not applicable 353.\".It kern.pset node not applicable 354.It kern.rawpartition integer no 355.It kern.root_device string no 356.It kern.root_partition integer no 357.It kern.rtc_offset integer yes 358.It kern.saved_ids integer no 359.It kern.sbmax integer yes 360.It kern.sched node not applicable 361.It kern.securelevel integer raise only 362.It kern.sofixedbuf boolean yes 363.It kern.somaxkva integer yes 364.It kern.sooptions integer yes 365.It kern.synchronized_io integer no 366.It kern.timecounter node not applicable 367.It kern.timex struct no 368.It kern.tkstat node not applicable 369.It kern.tty node not applicable 370.It kern.urandom integer no 371.It kern.usercrypto integer yes 372.It kern.userasymcrypto integer yes 373.It kern.veriexec node not applicable 374.It kern.version string no 375.It kern.vnode struct vnode no 376.El 377.Bl -tag -width "123456" 378.It Li kern.aio_listio_max 379The maximum number of asynchronous I/O operations in a single list 380I/O call. 381Like with all variables related to 382.Xr aio 3 , 383the variable may be created and removed dynamically 384upon loading or unloading the corresponding kernel module. 385.It Li kern.aio_max 386The maximum number of asynchronous I/O operations. 387.It Li kern.arandom ( Dv KERN_ARND ) 388Returns independent uniformly distributed bytes at random each time, as 389many as requested up to 256, derived from the system entropy pool; see 390.Xr rnd 4 . 391.Pp 392Reading 393.Li kern.arandom 394is equivalent to reading up to 256 bytes at a time from 395.Pa /dev/urandom : 396reading 397.Li kern.arandom 398never blocks, and once the system entropy pool has full entropy, output 399subsequently read from 400.Li kern.arandom 401is fit for use as cryptographic key material. 402For example, the 403.Xr arc4random 3 404library routine uses 405.Li kern.arandom 406internally to seed a cryptographic pseudorandom number generator. 407.It Li kern.argmax ( Dv KERN_ARGMAX ) 408The maximum bytes of argument to 409.Xr execve 2 . 410.It Li kern.boothowto 411Flags passed from the boot loader; see 412.Xr reboot 2 413for the meanings of the flags. 414.It Li kern.boottime ( Dv KERN_BOOTTIME ) 415A 416.Vt struct timespec 417structure is returned. 418This structure contains the time that the system was booted. 419That time is defined (for this purpose) to be the time at 420which the kernel first started accumulating clock ticks. 421.It Li kern.bufq 422This variable contains information on the 423.Xr bufq 9 424subsystem. 425Currently, the only third level name implemented is 426.Dv kern.bufq.strategies 427which provides a list of buffer queue strategies currently available. 428.It Li kern.buildinfo 429When the kernel is built, the build environment may optionally provide 430arbitrary information to be stored in this variable. 431.It Li kern.ccpu ( Dv KERN_CCPU ) 432The scheduler exponential decay value. 433.It Li kern.clockrate ( Dv KERN_CLOCKRATE ) 434A 435.Vt struct clockinfo 436structure is returned. 437This structure contains the clock, statistics clock and profiling clock 438frequencies, the number of micro-seconds per hz tick, and the clock 439skew rate. 440Refer to 441.Xr hz 9 442for additional details. 443.It Li kern.consdev ( Dv KERN_CONSDEV ) 444Console device. 445.It Li kern.coredump 446Settings related to set-id processes coredumps. 447By default, set-id processes do not dump core in situations where 448other processes would. 449The settings in this node allows an administrator to change this 450behavior. 451.Pp 452The third level name is 453.Dv kern.coredump.setid 454and fourth level variables are described below. 455.Bl -column "kern.coredump.setid.group" "integer" "Changeable" -offset indent 456.It Sy Fourth level name Ta Sy Type Ta Sy Changeable 457.It kern.coredump.setid.dump integer yes 458.It kern.coredump.setid.group integer yes 459.It kern.coredump.setid.mode integer yes 460.It kern.coredump.setid.owner integer yes 461.It kern.coredump.setid.path string yes 462.El 463.Bl -tag -width "123456" 464.It Li kern.coredump.setid.dump 465If non-zero, set-id processes will dump core. 466.It Li kern.coredump.setid.group 467The group-id for the set-id processes' coredump. 468.It Li kern.coredump.setid.mode 469The mode for the set-id processes' coredump. 470See 471.Xr chmod 1 . 472.It Li kern.coredump.setid.owner 473The user-id that will be used as the owner of the set-id processes' 474coredump. 475.It Li kern.coredump.setid.path 476The path to which set-id processes' coredumps will be saved to. 477Same syntax as kern.defcorename. 478.El 479.It Li kern.cp_id ( Dv KERN_CP_ID ) 480Mapping of CPU number to CPU id. 481.It Li kern.cp_time ( Dv KERN_CP_TIME ) 482Returns an array of 483.Dv CPUSTATES 484.Vt uint64_t Ns s . 485This array contains the 486number of clock ticks spent in different CPU states. 487On multi-processor systems, the sum across all CPUs is returned unless 488appropriate space is given for one data set for each CPU. 489Data for a specific CPU can also be obtained by adding the number of the 490CPU at the end of the MIB, enlarging it by one. 491.It Li kern.cryptodevallowsoft 492This variable controls userland access to hardware versus software transforms 493in the 494.Xr crypto 4 495system. 496The available values are as follows: 497.Bl -tag -width XX0 -offset indent 498.It Dv < 0 499Always force userlevel requests to use software transforms. 500.It Dv = 0 501If present, use hardware and grant userlevel requests for 502non-accelerated transforms (handling the latter in software). 503.It Dv > 0 504Allow user requests only for transforms which are hardware-accelerated. 505.El 506.It Li kern.defcorename ( Dv KERN_DEFCORENAME ) 507Default template for the name of core dump files (see also 508.Li proc.pid.corename 509in the per-process variables 510.Li proc.* , 511and 512.Xr core 5 513for format of this template). 514The default value is 515.Pa %n.core 516and can be changed with the kernel configuration option 517.Cd options DEFCORENAME 518(see 519.Xr options 4 520). 521.It Li kern.detachall 522Detach all devices at shutdown. 523.It Li kern.domainname ( Dv KERN_DOMAINNAME ) 524Get or set the YP domain name. 525.It Li kern.drivers ( Dv KERN_DRIVERS ) 526Return an array of 527.Vt struct kinfo_drivers 528that contains the name and major device numbers of all the device drivers 529in the current kernel. 530The 531.Va d_name 532field is always a NUL terminated string. 533The 534.Va d_bmajor 535field will be set to \-1 if the driver doesn't have a block device. 536.It Li kern.expose_address 537Expose kernel addresses in 538.Xr sysctl 3 539calls used by 540.Xr fstat 1 541and 542.Xr sockstat 1 . 543If it is set to 544.Dv 0 545access is not allowed. 546If it is set to 547.Dv 1 548then only processes that have opened 549.Pa /dev/kmem 550can have access. 551If it is set to 552.Dv 2 553every process is allowed. 554Defaults to 555.Dv 0 556for 557.Dv KASLR 558kernels 559and 560.Dv 1 561otherwise. 562Allowing general access renders KASLR ineffective; allowing only kmem 563accessing programs weakens KASLR if those programs can be subverted 564to leak the addresses. 565.It Li kern.dump_on_panic ( Dv KERN_DUMP_ON_PANIC ) 566Perform a crash dump on system 567.Xr panic 9 . 568.It Li kern.file ( Dv KERN_FILE ) 569Return the entire file table. 570The returned data consists of a single 571.Vt struct filelist 572followed by an array of 573.Vt struct file , 574whose size depends on the current number of such objects in the system. 575.It Li kern.forkfsleep ( Dv KERN_FORKFSLEEP ) 576If 577.Xr fork 2 578system call fails due to limit on number of processes (either 579the global maxproc limit or user's one), wait for this many 580milliseconds before returning 581.Er EAGAIN 582error to process. 583Useful to keep heavily forking runaway processes in bay. 584Default zero (no sleep). 585Maximum is 20 seconds. 586.It Li kern.fscale ( Dv KERN_FSCALE ) 587The kernel fixed-point scale factor. 588.It Li kern.fsync ( Dv KERN_FSYNC ) 589Return 1 if the 590.St -p1003.1b-93 591File Synchronization Option is available 592on this system, 593otherwise\ 0. 594.It Li kern.hardclock_ticks ( Dv KERN_HARDCLOCK_TICKS ) 595Returns the number of 596.Xr hardclock 9 597ticks. 598.It Li kern.hist 599This variable contains kernel history data if the kernel was 600configured for any of the options 601.Dv UVHMIST , 602.Dv USB_DEBUG , 603.Dv BIOHIST , 604or 605.Dv SCDEBUG . 606(See 607.Xr options 4 608for more details.) 609The third-level names correspond to each available history table. 610The values of the history tables are in an internal format, and can be 611decoded by the 612.Xr vmstat 1 613utility's 614.Fl U 615and 616.Fl u 617options; 618the 619.Fl l 620option can be used to see which tables are available. 621.It Li kern.hostid ( Dv KERN_HOSTID ) 622Get or set the host identifier. 623This is aimed to replace the legacy 624.Xr gethostid 3 625and 626.Xr sethostid 3 627system calls. 628.It Li kern.hostname ( Dv KERN_HOSTNAME ) 629Get or set the 630.Xr hostname 1 . 631.It Li kern.iov_max ( Dv KERN_IOV_MAX ) 632Return the maximum number of 633.Vt iovec 634structures that a process has available for use with 635.Xr preadv 2 , 636.Xr pwritev 2 , 637.Xr readv 2 , 638.Xr recvmsg 2 , 639.Xr sendmsg 2 640and 641.Xr writev 2 . 642.It Li kern.ipc ( Dv KERN_SYSVIPC ) 643Return information about the SysV IPC parameters. 644The third level names for the ipc variables are detailed below. 645.Bl -column "kern.ipc.shm_use_phys" "integer" "Changeable" -offset indent 646.It Sy Third level name Ta Sy Type Ta Sy Changeable 647.It kern.ipc.sysvmsg integer no 648.It kern.ipc.sysvsem integer no 649.It kern.ipc.sysvshm integer no 650.It kern.ipc.sysvipc_info struct no 651.It kern.ipc.shmmax integer yes 652.It kern.ipc.shmmni integer yes 653.It kern.ipc.shmseg integer yes 654.It kern.ipc.shmmaxpgs integer yes 655.It kern.ipc.shm_use_phys integer yes 656.It kern.ipc.msgmni integer yes 657.It kern.ipc.msgseg integer yes 658.It kern.ipc.semmni integer yes 659.It kern.ipc.semmns integer yes 660.It kern.ipc.semmnu integer yes 661.El 662.Bl -tag -width "123456" 663.It Li kern.ipc.sysvmsg ( Dv KERN_SYSVIPC_MSG ) 664Returns 1 if System V style message queue functionality is available 665on this system, 666otherwise\ 0. 667.It Li kern.ipc.sysvsem ( Dv KERN_SYSVIPC_SEM ) 668Returns 1 if System V style semaphore functionality is available 669on this system, 670otherwise\ 0. 671.It Li kern.ipc.sysvshm ( Dv KERN_SYSVIPC_SHM ) 672Returns 1 if System V style share memory functionality is available 673on this system, 674otherwise\ 0. 675.It Li kern.ipc.sysvipc_info ( Dv KERN_SYSVIPC_INFO ) 676Return System V style IPC configuration and run-time information. 677The fourth level name selects the System V style IPC facility. 678.Bl -column "KERN_SYSVIPC_MSG_INFO" "struct shm_sysctl_info" -offset indent 679.It Sy Fourth level name Ta Sy Type 680.It KERN_SYSVIPC_MSG_INFO struct msg_sysctl_info 681.It KERN_SYSVIPC_SEM_INFO struct sem_sysctl_info 682.It KERN_SYSVIPC_SHM_INFO struct shm_sysctl_info 683.El 684.Bl -tag -width "123456" 685.It Li KERN_SYSVIPC_MSG_INFO 686Return information on the System V style message facility. 687The 688.Sy msg_sysctl_info 689structure is defined in 690.In sys/msg.h . 691.It Li KERN_SYSVIPC_SEM_INFO 692Return information on the System V style semaphore facility. 693The 694.Sy sem_sysctl_info 695structure is defined in 696.In sys/sem.h . 697.It Li KERN_SYSVIPC_SHM_INFO 698Return information on the System V style shared memory facility. 699The 700.Sy shm_sysctl_info 701structure is defined in 702.In sys/shm.h . 703.El 704.It Li kern.ipc.shmmax ( Dv KERN_SYSVIPC_SHMMAX ) 705Max shared memory segment size in bytes. 706.It Li kern.ipc.shmmni ( Dv KERN_SYSVIPC_SHMMNI ) 707Max number of shared memory identifiers. 708.It Li kern.ipc.shmseg ( Dv KERN_SYSVIPC_SHMSEG ) 709Max shared memory segments per process. 710.It Li kern.ipc.shmmaxpgs ( Dv KERN_SYSVIPC_SHMMAXPGS ) 711Max amount of shared memory in pages. 712.It Li kern.ipc.shm_use_phys ( Dv KERN_SYSVIPC_SHMUSEPHYS ) 713Locking of shared memory in physical memory. 714If 0, memory can be swapped 715out, otherwise it will be locked in physical memory. 716.It Li kern.ipc.msgmni 717Max number of message queue identifiers. 718.It Li kern.ipc.msgseg 719Max number of number of message segments. 720.It Li kern.ipc.semmni 721Max number of number of semaphore identifiers. 722.It Li kern.ipc.semmns 723Max number of number of semaphores in system. 724.It Li kern.ipc.semmnu 725Max number of undo structures in system. 726.El 727.It Li kern.job_control ( Dv KERN_JOB_CONTROL ) 728Return 1 if job control is available on this system, otherwise\ 0. 729.It Li kern.labeloffset ( Dv KERN_LABELOFFSET ) 730The offset within the sector specified by 731.Dv KERN_LABELSECTOR 732of the 733.Xr disklabel 5 . 734.It Li kern.labelsector ( Dv KERN_LABELSECTOR ) 735The sector number containing the 736.Xr disklabel 5 . 737.It Li kern.login_name_max ( Dv KERN_LOGIN_NAME_MAX ) 738The size of the storage required for a login name, in bytes, 739including the terminating NUL. 740.It Li kern.logsigexit ( Dv KERN_LOGSIGEXIT ) 741If this flag is non-zero, the kernel will 742.Xr log 9 743all process exits due to signals which create a 744.Xr core 5 745file, and whether the coredump was created. 746.It Li kern.lwp ( Dv KERN_LWP ) 747Returns information about the current light-weight process. 748The 749.Sy kinfo_lwp 750structure is defined in 751.In sys/sysctl.h . 752.It Li kern.mapped_files ( Dv KERN_MAPPED_FILES ) 753Returns 1 if the 754.St -p1003.1b-93 755Memory Mapped Files Option is available on this system, 756otherwise\ 0. 757.It Li kern.maxfiles ( Dv KERN_MAXFILES ) 758The maximum number of open files that may be open in the system. 759.It Li kern.maxpartitions ( Dv KERN_MAXPARTITIONS ) 760The maximum number of partitions allowed per disk. 761.It Li kern.maxlwp 762The maximum number of Lightweight Processes (threads) the system allows 763per uid. 764.It Li kern.maxphys ( Dv KERN_MAXPHYS ) 765Maximum raw I/O transfer size. 766.It Li kern.maxproc ( Dv KERN_MAXPROC ) 767The maximum number of simultaneous processes the system will allow. 768.It Li kern.maxptys ( Dv KERN_MAXPTYS ) 769The maximum number of pseudo terminals. 770This value can be both raised and lowered, though it cannot 771be set lower than number of currently used ptys. 772See also 773.Xr pty 4 . 774.It Li kern.maxvnodes ( Dv KERN_MAXVNODES ) 775The maximum number of vnodes available on the system. 776This can only be raised. 777.It Li kern.mbuf ( Dv KERN_MBUF ) 778Return information about the mbuf control variables. 779Mbufs are data structures which store network packets and other data 780structures in the networking code, see 781.Xr mbuf 9 . 782The third level names for the mbuf variables are detailed below. 783The changeable column shows whether a process with appropriate 784privilege may change the value. 785.Bl -column "kern.mbuf.nmbclusters" "integer" "Changeable" -offset indent 786.It Sy Third level name Ta Sy Type Ta Sy Changeable 787.\" XXX Changeable? really? 788.It kern.mbuf.mblowat integer yes 789.It kern.mbuf.mclbytes integer yes 790.It kern.mbuf.mcllowat integer yes 791.It kern.mbuf.msize integer yes 792.It kern.mbuf.nmbclusters integer yes 793.El 794.Pp 795The variables are as follows: 796.Bl -tag -width "123456" 797.It Li kern.mbuf.mblowat ( Dv MBUF_MBLOWAT ) 798The mbuf low water mark. 799.It Li kern.mbuf.mclbytes ( Dv MBUF_MCLBYTES ) 800The mbuf cluster size. 801.It Li kern.mbuf.mcllowat ( Dv MBUF_MCLLOWAT ) 802The mbuf cluster low water mark. 803.It Li kern.mbuf.msize ( Dv MBUF_MSIZE ) 804The mbuf base size. 805.It Li kern.mbuf.nmbclusters ( Dv MBUF_NMBCLUSTERS ) 806The limit on the number of mbuf clusters. 807The variable can only be increased, and only increased on machines with 808direct-mapped pool pages. 809.El 810.It Li kern.memlock ( Dv KERN_MEMLOCK ) 811Returns 1 if the 812.St -p1003.1b-93 813Process Memory Locking Option is available on this system, 814otherwise\ 0. 815.It Li kern.memlock_range ( Dv KERN_MEMLOCK_RANGE ) 816Returns 1 if the 817.St -p1003.1b-93 818Range Memory Locking Option is available on this system, 819otherwise\ 0. 820.It Li kern.memory_protection ( Dv KERN_MEMORY_PROTECTION ) 821Returns 1 if the 822.St -p1003.1b-93 823Memory Protection Option is available on this system, 824otherwise\ 0. 825.It Li kern.messages 826Kernel console message verbosity. 827See 828.Aq Pa sys/reboot.h 829.Bl -column "verbosity" "setting" -offset indent 830.It Sy Value Ta Sy Verbosity Ta Sy sys/reboot.h equivalent 831.It 0 Ta Silent Ta Sy AB_SILENT 832.It 1 Ta Quiet Ta Sy AB_QUIET 833.It 2 Ta Normal Ta Sy AB_NORMAL 834.It 3 Ta Verbose Ta Sy AB_VERBOSE 835.It 4 Ta Debug Ta Sy AB_DEBUG 836.El 837.It Li kern.module 838Settings related to kernel modules. 839The third level names for the settings are described below. 840.Bl -column "kern.module.autoload" "integer" "Changeable" -offset indent 841.It Sy Third level name Ta Sy Type Ta Sy Changeable 842.It kern.module.autoload integer yes 843.It kern.module.autotime integer yes 844.It kern.module.verbose boolean yes 845.El 846.Pp 847The variables are as follows: 848.Bl -tag -width "123456" 849.It Li kern.module.autoload 850A boolean that controls whether kernel modules are loaded automatically. 851See 852.Xr module 7 853for additional details. 854.It Li kern.module.autotime 855An integer that controls the delay before an attempt is made to 856automatically unload a module that was auto-loaded. 857Setting this value to zero disables the auto-unload function. 858.It Li kern.module.verbose 859A boolean that enables or disables verbose 860debug messages related to kernel modules. 861.El 862.It Li kern.monotonic_clock ( Dv KERN_MONOTONIC_CLOCK ) 863Returns the standard version the implementation of the 864.St -p1003.1b-93 865Monotonic Clock Option conforms to, 866otherwise\ 0. 867.It Li kern.mqueue 868Settings related to POSIX message queues; see 869.Xr mqueue 3 . 870This node is created dynamically when 871the corresponding kernel module is loaded. 872The third level names for the settings are described below. 873.Bl -column "kern.mqueue.mq_max_msgsize" "integer" "Changeable" -offset indent 874.It Sy Third level name Ta Sy Type Ta Sy Changeable 875.It kern.mqueue.mq_open_max integer yes 876.It kern.mqueue.mq_prio_max integer yes 877.It kern.mqueue.mq_max_msgsize integer yes 878.It kern.mqueue.mq_def_maxmsg integer yes 879.It kern.mqueue.mq_max_maxmsg integer yes 880.El 881.Pp 882The variables are: 883.Bl -tag -width "123456" 884.It Li kern.mqueue.mq_open_max 885The maximum number of message queue descriptors any single process can open. 886.It Li kern.mqueue.mq_prio_max 887The maximum priority of a message. 888.It Li kern.mqueue.mq_max_msgsize 889The maximum size of a message in a message queue. 890.It Li kern.mqueue.mq_def_maxmsg 891The default maximum message count. 892.It Li kern.mqueue.mq_max_maxmsg 893The maximum number of messages in a message queue. 894.El 895.It Li kern.msgbuf ( Dv KERN_MSGBUF ) 896The kernel message buffer, rotated so that the head of the circular kernel 897message buffer is at the start of the returned data. 898The returned data may contain NUL bytes. 899.It Li kern.msgbufsize ( Dv KERN_MSGBUFSIZE ) 900The maximum number of characters that the kernel message buffer can hold. 901.It Li kern.ngroups ( Dv KERN_NGROUPS ) 902The maximum number of supplemental groups. 903.\" .It Li kern.no_sa_support 904.\" XXX: Undocumented. 905.It Li kern.ntptime ( Dv KERN_NTPTIME ) 906A 907.Vt struct ntptimeval 908structure is returned. 909This structure contains data used by the 910.Xr ntpd 8 911program. 912.It Li kern.osrelease ( Dv KERN_OSRELEASE ) 913The system release string. 914.It Li kern.osrevision ( Dv KERN_OSREV ) 915The system revision string. 916.It Li kern.ostype ( Dv KERN_OSTYPE ) 917The system type string. 918.\".It Li kern.panic_now 919.\" XXX: Undocumented. 920.It Li kern.pipe ( Dv KERN_PIPE ) 921Pipe settings. 922The third level names for the integer pipe settings is detailed below. 923The changeable column shows whether a process with appropriate 924privilege may change the value. 925.Bl -column "kern.pipe.maxbigpipes" "integer" "Changeable" -offset indent 926.It Sy Third level name Ta Sy Type Ta Sy Changeable 927.It kern.pipe.kvasiz integer yes 928.It kern.pipe.maxbigpipes integer yes 929.It kern.pipe.maxkvasz integer yes 930.It kern.pipe.limitkva integer yes 931.It kern.pipe.nbigpipes integer yes 932.El 933.Pp 934The variables are as follows: 935.Bl -tag -width "123456" 936.It Li kern.pipe.kvasiz ( Dv KERN_PIPE_KVASIZ ) 937Amount of kernel memory consumed by pipe buffers. 938.It Li kern.pipe.maxbigpipes ( Dv KERN_PIPE_MAXBIGPIPES ) 939Maximum number of 940.Dq big 941pipes. 942.It Li kern.pipe.maxkvasz ( Dv KERN_PIPE_MAXKVASZ ) 943Maximum amount of kernel memory to be used for pipes. 944.It Li kern.pipe.limitkva ( Dv KERN_PIPE_LIMITKVA ) 945Limit for direct transfers via page loan. 946.It Li kern.pipe.nbigpipes ( Dv KERN_PIPE_NBIGPIPES ) 947Number of 948.Dq big 949pipes. 950.El 951.It Li kern.pool 952Provides statistics about the 953.Xr pool 9 954and 955.Xr pool_cache 9 956subsystems. 957.\" XXX: Undocumented .It Li kern.posix ( ? ) 958.\" This is a node in which the only variable is semmax. 959.It Li kern.posix1version ( Dv KERN_POSIX1 ) 960The version of ISO/IEC 9945 961.Pq St -p1003.1 962with which the system attempts to comply. 963.It Li kern.posix_aio 964The version of 965.St -p1003.1 966and its Asynchronous I/O option to which the system attempts to conform. 967.It Li kern.posix_barriers ( Dv KERN_POSIX_BARRIERS ) 968The version of 969.St -p1003.1 970and its 971Barriers 972option to which the system attempts to conform, 973otherwise\ 0. 974.It Li kern.posix_reader_writer_locks ( Dv KERN_POSIX_READER_WRITER_LOCKS ) 975The version of 976.St -p1003.1 977and its 978Read-Write Locks 979option to which the system attempts to conform, 980otherwise\ 0. 981.\".It Li kern.posix_sched 982.\" XXX: Undocumented. 983.It Li kern.posix_semaphores ( Dv KERN_POSIX_SEMAPHORES ) 984The version of 985.St -p1003.1 986and its 987Semaphores 988option to which the system attempts to conform, 989otherwise\ 0. 990.It Li kern.posix_spin_locks ( Dv KERN_POSIX_SPIN_LOCKS ) 991The version of 992.St -p1003.1 993and its 994Spin Locks 995option to which the system attempts to conform, 996otherwise\ 0. 997.It Li kern.posix_threads ( Dv KERN_POSIX_THREADS ) 998The version of 999.St -p1003.1 1000and its 1001Threads 1002option to which the system attempts to conform, 1003otherwise\ 0. 1004.It Li kern.posix_timers ( Dv KERN_POSIX_TIMERS ) 1005The version of 1006.St -p1003.1 1007and its 1008Timers 1009option to which the system attempts to conform, 1010otherwise\ 0. 1011.It Li kern.proc ( Dv KERN_PROC ) 1012Return the entire process table, or a subset of it. 1013An array of 1014.Vt struct kinfo_proc 1015structures is returned, 1016whose size depends on the current number of such objects in the system. 1017The third and fourth level numeric names are as follows: 1018.Bl -column "KERN_PROC_SESSION" "Fourth level is:" -offset indent 1019.It Sy Third level name Ta Sy Fourth level is : 1020.It KERN_PROC_ALL None 1021.It KERN_PROC_GID A group ID 1022.It KERN_PROC_PID A process ID 1023.It KERN_PROC_PGRP A process group 1024.It KERN_PROC_RGID A real group ID 1025.It KERN_PROC_RUID A real user ID 1026.It KERN_PROC_SESSION A session ID 1027.It KERN_PROC_TTY A tty device 1028.It KERN_PROC_UID A user ID 1029.El 1030.It Li kern.proc2 ( Dv KERN_PROC2 ) 1031As for 1032.Dv KERN_PROC , 1033but an array of 1034.Vt struct kinfo_proc2 1035structures are returned. 1036The fifth level name is the size of the 1037.Vt struct kinfo_proc2 1038and the sixth level name is the number of structures to return. 1039.It Li kern.proc_args ( Dv KERN_PROC_ARGS ) 1040Return the argv or environment strings (or the number thereof) 1041of a process. 1042Multiple strings are returned separated by NUL characters. 1043The third level name is the process ID. 1044The fourth level name is as follows: 1045.Bl -column "KERN_PROG_PATHNAME" "The full pathname of the executable" -offset indent 1046.It Dv KERN_PROC_ARGV The argv strings 1047.It Dv KERN_PROC_ENV The environ strings 1048.It Dv KERN_PROC_NARGV The number of argv strings 1049.It Dv KERN_PROC_NENV The number of environ strings 1050.It Dv KERN_PROC_PATHNAME The full pathname of the executable 1051.It Dv KERN_PROC_CWD The current working directory 1052.El 1053.It Li kern.profiling ( Dv KERN_PROF ) 1054Return profiling information about the kernel. 1055If the kernel is not compiled for profiling, 1056attempts to retrieve any of the 1057.Dv KERN_PROF 1058values will fail with 1059.Er EOPNOTSUPP . 1060The third level names for the string and integer profiling information 1061is detailed below. 1062The changeable column shows whether a process with appropriate 1063privilege may change the value. 1064.Bl -column "kern.profiling.gmonparam" "struct gmonparam" "Changeable" -offset indent 1065.It Sy Third level name Ta Sy Type Ta Sy Changeable 1066.It kern.profiling.count u_short[\|] yes 1067.It kern.profiling.froms u_short[\|] yes 1068.It kern.profiling.gmonparam struct gmonparam no 1069.It kern.profiling.state integer yes 1070.It kern.profiling.tos struct tostruct yes 1071.El 1072.Pp 1073The variables are as follows: 1074.Bl -tag -width "123456" 1075.It Li kern.profiling.count ( Dv GPROF_COUNT ) 1076Array of statistical program counter counts. 1077.It Li kern.profiling.froms ( Dv GPROF_FROMS ) 1078Array indexed by program counter of call-from points. 1079.It Li kern.profiling.gmonparams ( Dv GPROF_GMONPARAM ) 1080Structure giving the sizes of the above arrays. 1081.It Li kern.profiling.state ( Dv GPROF_STATE ) 1082Profiling state. 1083If set to 1084.Dv GMON_PROF_ON , 1085starts profiling. 1086If set to 1087.Dv GMON_PROF_OFF , 1088stops profiling. 1089.It Li kern.profiling.tos ( Dv GPROF_TOS ) 1090Array of 1091.Vt struct tostruct 1092describing destination of calls and their counts. 1093.El 1094.\" .It Li kern.pset 1095.\" XXX: Undocumented. 1096.It Li kern.rawpartition ( Dv KERN_RAWPARTITION ) 1097The raw partition of a disk (a == 0). 1098.It Li kern.root_device ( Dv KERN_ROOT_DEVICE ) 1099The name of the root device (e.g., 1100.Dq wd0 ) . 1101.It Li kern.root_partition ( Dv KERN_ROOT_PARTITION ) 1102The root partition on the root device (a == 0). 1103.It Li kern.rtc_offset ( Dv KERN_RTC_OFFSET ) 1104Return the offset of real time clock from UTC in minutes. 1105.It Li kern.saved_ids ( Dv KERN_SAVED_IDS ) 1106Returns 1 if saved set-group and saved set-user ID is available. 1107.It Li kern.sbmax ( Dv KERN_SBMAX ) 1108Maximum socket buffer size in bytes. 1109.It Li kern.securelevel ( Dv KERN_SECURELVL ) 1110See 1111.Xr secmodel_securelevel 9 . 1112.It Li kern.sched ( dynamic ) 1113Influence the scheduling of LWPs, their priorisation and how they are 1114distributed on and moved between CPUs. 1115.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent 1116.It Sy Third level name Sy Type Sy Changeable 1117.It kern.sched.cacheht_time integer yes 1118.It kern.sched.balance_period integer yes 1119.It kern.sched.average_weight integer yes 1120.It kern.sched.min_catch integer yes 1121.It kern.sched.timesoftints integer yes 1122.It kern.sched.kpreempt_pri integer yes 1123.It kern.sched.upreempt_pri integer yes 1124.It kern.sched.maxts integer yes 1125.It kern.sched.mints integer yes 1126.It kern.sched.name string no 1127.It kern.sched.rtts integer no 1128.It kern.sched.pri_min integer no 1129.It kern.sched.pri_max integer no 1130.El 1131.Pp 1132The variables are as follows: 1133.Bl -tag -width "123456" 1134.It Li kern.sched.cacheht_time ( dynamic ) 1135Cache hotness time in which a LWP is kept on one particular CPU 1136and not moved to another CPU. 1137This reduces the overhead of flushing and reloading caches. 1138Defaults to 3ms. 1139Needs to be given in 1140.Dq hz 1141units, see 1142.Xr mstohz 9 . 1143.It Li kern.sched.balance_period ( dynamic ) 1144Interval at which the CPU queues are checked for re-balancing. 1145Defaults to 300ms. 1146Needs to be given in 1147.Dq hz 1148units, see 1149.Xr mstohz 9 . 1150.It Li kern.sched.average_weight ( dynamic ) 1151Can be used to influence how likely LWPs are to be migrated from 1152one CPU's queue of LWPs that are ready to run to a different, idle CPU. 1153The value gives the percentage for weighting the average count of 1154migratable threads from the past against the current number of 1155migratable threads. 1156A small value gives more weight to the past, a larger values more weight 1157on the current situation. 1158Defaults to 50 and must be between 0 and 100. 1159.It Li kern.sched.min_catch ( dynamic ) 1160Minimum count of migratable (runable) threads for catching (stealing) 1161from another CPU. 1162Defaults to 1 but can be increased to decrease chance of thread 1163migration between CPUs. 1164.It Li kern.sched.timesoftints ( dynamic ) 1165Enable tracking of CPU time for soft interrupts 1166as part of a LWP's real execution time. 1167Set to a non-zero value to enable, 1168and see 1169.Xr ps 1 1170for printing CPU times. 1171.It Li kern.sched.kpreempt_pri ( dynamic ) 1172Minimum priority to trigger kernel preemption. 1173.It Li kern.sched.upreempt_pri ( dynamic ) 1174Minimum priority to trigger user preemption. 1175.It Li kern.sched.maxts ( dynamic ) 1176Scheduler specific maximal time quantum (in milliseconds). 1177Must be set to a value larger than 1178.Dq mints 1179and between 10 and 1180.Dq hz 1181as given by the 1182.Dv kern.clockrate 1183sysctl. 1184Provided by the M2 scheduler. 1185.It Li kern.sched.mints ( dynamic ) 1186Scheduler specific minimal time quantum (in milliseconds). 1187Must be set to a value smaller than 1188.Dq maxts 1189and between 1 and 1190.Dq hz 1191as given by the 1192.Dq kern.clockrate 1193sysctl. 1194Provided by the M2 scheduler. 1195.It Li kern.sched.name ( dynamic ) 1196Scheduler name. 1197Provided both by the M2 and the 4BSD scheduler. 1198.It Li kern.sched.rtts ( dynamic ) 1199Fixed scheduler specific round-robin time quantum in milliseconds. 1200Provided both by the M2 and the 4BSD scheduler. 1201.It Li kern.sched.pri_min ( dynamic ) 1202Minimal POSIX real-time priority. 1203See 1204.Xr sched 3 . 1205.It Li kern.sched.pri_max ( dynamic ) 1206Maximal POSIX real-time priority. 1207See 1208.Xr sched 3 . 1209.El 1210.It Li kern.sofixedbuf ( Dv KERN_SOFIXEDBUF ) 1211Prevent socket buffer autoscaling when a size is set with 1212.Dv SO_SNDBUF 1213or 1214.Dv SO_RCVBUF . 1215.It Li kern.somaxkva ( Dv KERN_SOMAXKVA ) 1216Maximum amount of kernel memory to be used for socket buffers in bytes. 1217.It Li kern.sooptions 1218Set the default socket option flags for 1219.Xr socket 2 1220creation. 1221See 1222.Xr setsockopt 2 1223for a list of supported flags. 1224.It Li kern.synchronized_io ( Dv KERN_SYNCHRONIZED_IO ) 1225Returns 1 if the 1226.St -p1003.1b-93 1227Synchronized I/O Option is available on this system, 1228otherwise\ 0. 1229.It Li kern.timecounter ( dynamic ) 1230Display and control the timecounter source of the system. 1231.Bl -column "kern.timecounter.timestepwarnings" "integer" "Changeable" -offset indent 1232.It Sy Third level name Ta Sy Type Ta Sy Changeable 1233.It kern.timecounter.choice string no 1234.It kern.timecounter.hardware string yes 1235.It kern.timecounter.timestepwarnings integer yes 1236.El 1237.Pp 1238The variables are as follows: 1239.Bl -tag -width "123456" 1240.It Li kern.timecounter.choice ( dynamic ) 1241The list of available timecounters with their quality and frequency. 1242.It Li kern.timecounter.hardware ( dynamic ) 1243The currently selected timecounter source. 1244.It Li kern.timecounter.timestepwarnings ( dynamic ) 1245If non-zero display a message each time the time is stepped. 1246.El 1247.It Li kern.timex ( Dv KERN_TIMEX ) 1248Not available. 1249.It Li kern.tkstat ( Dv KERN_TKSTAT ) 1250Return information about the number of characters sent and received 1251on ttys. 1252The third level names for the tty statistic variables are detailed below. 1253The changeable column shows whether a process 1254with appropriate privilege may change the value. 1255.Bl -column "kern.tkstat.cancc" "quad" "Changeable" -offset indent 1256.It Sy Third level name Ta Sy Type Ta Sy Changeable 1257.It kern.tkstat.cancc quad no 1258.It kern.tkstat.nin quad no 1259.It kern.tkstat.nout quad no 1260.It kern.tkstat.rawcc quad no 1261.El 1262.Pp 1263The variables are as follows: 1264.Bl -tag -width "123456" 1265.It Li kern.tkstat.cancc ( Dv KERN_TKSTAT_CANCC ) 1266The number of canonical input characters. 1267.It Li kern.tkstat.nin ( Dv KERN_TKSTAT_NIN ) 1268The total number of input characters. 1269.It Li kern.tkstat.nout ( Dv KERN_TKSTAT_NOUT ) 1270The total number of output characters. 1271.It Li kern.tkstat.rawcc ( Dv KERN_TKSTAT_RAWCC ) 1272The number of raw input characters. 1273.El 1274.It Li kern.tty 1275The third level names for the tty setup variables are detailed below. 1276The changeable column shows whether a process 1277with appropriate privilege may change the value. 1278.Bl -column "kern.tty.qsize" "int" "Changeable" -offset indent 1279.It Sy Third level name Ta Sy Type Ta Sy Changeable 1280.It kern.tty.qsize int yes 1281.El 1282.Pp 1283The variables are as follows: 1284.Bl -tag -width "123456" 1285.It Li kern.tty.qsize 1286Control/display the size of the default input and output queues selected 1287during tty creation. 1288Is converted to a power of two and its range is between 1289.Dv 1024 1290and 1291.Dv 65536 . 1292.El 1293.It Li kern.uidinfo 1294Resource usage for the current user. 1295.Bl -column "kern.uidinfo.proccnt" "integer" "Changeable" -offset indent 1296.It Sy Third level name Ta Sy Type Ta Sy Changeable 1297.It kern.uidinfo.proccnt integer no 1298.It kern.uidinfo.lwpcnt integer no 1299.It kern.uidinfo.lockcnt integer no 1300.It kern.uidinfo.semcnt integer no 1301.It kern.uidinfo.sbsize integer no 1302.El 1303.Bl -tag -width "123456" 1304.It Li kern.uidinfo.proccnt 1305Returns the number of active processes for the current user. 1306.It Li kern.uidinfo.lwpcnt 1307Returns the number of active threads for the current user; the first thread 1308of each process is not counted. 1309.It Li kern.uidinfo.lockcnt 1310Number of locks held by the current user. 1311.It Li kern.uidinfo.semcnt 1312Number of semaphores held by the current user. 1313.It Li kern.uidinfo.sbsize 1314Number of bytes in socket buffers allocated to the current user. 1315.El 1316.It Li kern.urandom ( Dv KERN_URND ) 1317Random integer value. 1318.It Li kern.usercrypto 1319When enabled, allows userland to 1320.Xr open 2 1321the 1322.Pa /dev/crypto 1323special device, used by the 1324.Xr crypto 4 1325system. 1326.It Li kern.userasymcrypto 1327Enables or disables the use of software asymmetric crypto support in the 1328.Xr crypto 4 1329system. 1330.It Li kern.veriexec 1331Runtime information for 1332.Xr veriexec 8 . 1333.Bl -column "kern.veriexec.algorithms" "integer" "Changeable" -offset indent 1334.It Sy Third level name Ta Sy Type Ta Sy Changeable 1335.It kern.veriexec.algorithms string no 1336.It kern.veriexec.count node not applicable 1337.It kern.veriexec.strict integer yes 1338.It kern.veriexec.verbose integer yes 1339.El 1340.Bl -tag -width "123456" 1341.It Li kern.veriexec.algorithms 1342Returns a string with the supported algorithms in Veriexec. 1343.It Li kern.veriexec.count 1344Sub-nodes are added to this node as new mounts are monitored by Veriexec. 1345Each mount will be under its own 1346.No tableN 1347node. 1348Under each node there will be three variables, indicating the mount 1349point, the file system type, and the number of entries. 1350.It Li kern.veriexec.strict 1351Controls the strict level of Veriexec. 1352See 1353.Xr security 7 1354for more information on each level's implications. 1355.It Li kern.veriexec.verbose 1356Controls the verbosity level of Veriexec. 1357If 0, only the minimal 1358indication required will be given about what's happening - fingerprint 1359mismatches, removal of entries from the tables, modification of a 1360fingerprinted file. 1361If 1, more messages will be printed (ie., when a file with a valid 1362fingerprint is accessed). 1363Verbose level 2 is debug mode. 1364.El 1365.It Li kern.version ( Dv KERN_VERSION ) 1366The system version string. 1367.It Li kern.vnode ( Dv KERN_VNODE ) 1368Return the entire vnode table. 1369Note, the vnode table is not necessarily a consistent snapshot of 1370the system. 1371The returned data consists of an array whose size depends on the 1372current number of such objects in the system. 1373Each element of the array contains the kernel address of a vnode 1374.Vt struct vnode * 1375followed by the vnode itself 1376.Vt struct vnode . 1377.El 1378.Ss The machdep.* subtree 1379The set of variables defined is architecture dependent. 1380Most architectures define at least the following variables. 1381.Bl -column "machdep.booted_kernel" "Type" "Changeable" -offset indent 1382.It Sy Second level name Ta Sy Type Ta Sy Changeable 1383.It Li machdep.booted_kernel string no 1384.El 1385.\" XXX: Document the above. 1386.Ss The net.* subtree 1387The string and integer information available for the 1388.Li net 1389level is detailed below. 1390The changeable column shows whether a process with appropriate 1391privilege may change the value. 1392The second and third levels are typically the protocol family and 1393protocol number, though this is not always the case. 1394.Bl -column "Second level name" "IPsec key management values" "Changeable" -offset indent 1395.It Sy Second level name Ta Sy Type Ta Sy Changeable 1396.It net.route routing messages no 1397.It net.inet IPv4 values yes 1398.It net.inet6 IPv6 values yes 1399.It net.key IPsec key management values yes 1400.El 1401.Bl -tag -width "123456" 1402.It Li net.route ( Dv PF_ROUTE ) 1403.\" XXX really? 1404Return the entire routing table or a subset of it. 1405The data is returned as a sequence of routing messages (see 1406.Xr route 4 1407for the header file, format and meaning). 1408The length of each message is contained in the message header. 1409.Pp 1410The third level name is a protocol number, which is currently always\ 0. 1411The fourth level name is an address family, which may be set to 0 to 1412select all address families. 1413The fifth and sixth level names are as follows: 1414.Bl -column "Fifth level name" "Sixth level is:" -offset indent 1415.It Sy Fifth level name Ta Sy Sixth level is : 1416.It NET_RT_FLAGS rtflags 1417.It NET_RT_DUMP None 1418.It NET_RT_IFLIST None 1419.El 1420.It Li net.inet ( Dv PF_INET ) 1421Get or set various global information about the IPv4 1422.Pq Internet Protocol version 4 . 1423The third level name is the protocol. 1424The fourth level name is the variable name. 1425The currently defined protocols and names are: 1426.Bl -column "Protocol" "anonportalgo.available" "integer" "Changeable" -offset indent 1427.It Sy Protocol Variable Ta Sy Type Ta Sy Changeable 1428.It arp nd_delay integer yes 1429.It arp nd_bmaxtries integer yes 1430.It arp nd_umaxtries integer yes 1431.It arp nd_basereachable integer yes 1432.It arp nd_retrans integer yes 1433.It arp nd_nud integer yes 1434.It arp nd_maxnudhint integer yes 1435.It arp log_movements integer yes 1436.It arp log_permanent_modify integer yes 1437.It arp log_unknown_network integer yes 1438.It arp log_wrong_iface integer yes 1439.It carp allow integer yes 1440.It carp preempt integer yes 1441.It carp log integer yes 1442.It carp arpbalance integer yes 1443.It icmp errppslimit integer yes 1444.It icmp maskrepl integer yes 1445.It icmp rediraccept integer yes 1446.It icmp redirtimeout integer yes 1447.It icmp bmcastecho integer yes 1448.It ip allowsrcrt integer yes 1449.It ip anonportalgo.selected string yes 1450.It ip anonportalgo.available string yes 1451.It ip anonportalgo.reserve struct yes 1452.It ip anonportmax integer yes 1453.It ip anonportmin integer yes 1454.It ip checkinterface integer yes 1455.It ip dad_count integer yes 1456.It ip directed-broadcast integer yes 1457.It ip do_loopback_cksum integer yes 1458.It ip forwarding integer yes 1459.It ip forwsrcrt integer yes 1460.It ip gifttl integer yes 1461.It ip grettl integer yes 1462.It ip hashsize integer yes 1463.It ip hostzerobroadcast integer yes 1464.It ip lowportmin integer yes 1465.It ip lowportmax integer yes 1466.It ip maxflows integer yes 1467.It ip maxfragpackets integer yes 1468.It ip mtudisc integer yes 1469.It ip mtudisctimeout integer yes 1470.It ip random_id integer yes 1471.It ip redirect integer yes 1472.It ip subnetsarelocal integer yes 1473.It ip ttl integer yes 1474.It tcp rfc1323 integer yes 1475.It tcp sendspace integer yes 1476.It tcp recvspace integer yes 1477.It tcp mssdflt integer yes 1478.It tcp syn_cache_limit integer yes 1479.It tcp syn_bucket_limit integer yes 1480.It tcp syn_cache_interval integer yes 1481.It tcp init_win integer yes 1482.It tcp init_win_local integer yes 1483.It tcp mss_ifmtu integer yes 1484.It tcp win_scale integer yes 1485.It tcp timestamps integer yes 1486.It tcp cwm integer yes 1487.It tcp cwm_burstsize integer yes 1488.It tcp ack_on_push integer yes 1489.It tcp keepidle integer yes 1490.It tcp keepintvl integer yes 1491.It tcp keepcnt integer yes 1492.It tcp slowhz integer no 1493.It tcp keepinit integer yes 1494.It tcp log_refused integer yes 1495.It tcp rstppslimit integer yes 1496.It tcp ident struct no 1497.It tcp drop struct no 1498.It tcp sack.enable integer yes 1499.It tcp sack.globalholes integer no 1500.It tcp sack.globalmaxholes integer yes 1501.It tcp sack.maxholes integer yes 1502.It tcp ecn.enable integer yes 1503.It tcp ecn.maxretries integer yes 1504.It tcp congctl.selected string yes 1505.It tcp congctl.available string yes 1506.It tcp abc.enable integer yes 1507.It tcp abc.aggressive integer yes 1508.It udp checksum integer yes 1509.It udp do_loopback_cksum integer yes 1510.It udp recvspace integer yes 1511.It udp sendspace integer yes 1512.El 1513.Pp 1514The variables are as follows: 1515.Bl -tag -width "123456" 1516.It Li arp.nd_delay 1517The delay in seconds before sending the first probe, 1518after it has been decided that the entry is stale. 1519.It Li arp.nd_bmaxtries 1520The maximum number of broadcasts send to discover the hardware address 1521claiming an IP address. 1522.It Li arp.nd_umaxtries 1523The maximum number of unicasts send to the hardware address to ensure 1524it still claims an IP address. 1525.It Li arp.nd_basereachable 1526The number of milliseconds the ARP entry is considered reachable before 1527probing reachability. 1528.It Li arp.nd_retrans 1529The number of milliseconds between ARP probes. 1530.It Li arp.nd_nud 1531If set to non-zero, perform Neighor Unreachability Detection. 1532.It Li arp.nd_maxnudhint 1533Neighbor discovery permits upper layer protocols to supply reachability 1534hints, to avoid unnecessary neighbor discovery exchanges. 1535The variable defines the number of consecutive hints the neighbor discovery 1536layer will take. 1537For example, by setting the variable to 3, neighbor discovery layer 1538will take 3 consecutive hints in maximum. 1539After receiving 3 hints, neighbor discovery layer will perform 1540normal neighbor discovery process. 1541.It Li carp.allow 1542If set to 0, incoming 1543.Xr carp 4 1544packets will not be processed. 1545If set to any other value, processing will occur. 1546Enabled by default. 1547.It Li carp.arpbalance 1548If set to any value other than 0, the ARP balancing functionality of 1549.Xr carp 4 1550is enabled. 1551When ARP requests are received for an IP address which is part of any virtual 1552host, carp will hash the source IP in the ARP request to select one of the 1553virtual hosts from the set of all the virtual hosts which have that IP address. 1554The master of that host will respond with the correct virtual MAC address. 1555Disabled by default. 1556.It Li carp.log 1557If set to any value other than 0, 1558.Xr carp 4 1559will log errors. 1560Disabled by default. 1561.It Li carp.preempt 1562If set to 0, 1563.Xr carp 4 1564will not attempt to become master if it is receiving advertisements from 1565another active master. 1566If set to any other value, carp will become master of the virtual host if it 1567believes it can send advertisements more frequently than the current master. 1568Disabled by default. 1569.It Li ip.allowsrcrt 1570If set to 1, the host accepts source routed packets. 1571.It Li ip.anonportalgo.available 1572The available RFC 6056 port randomization algorithms. 1573.It Li ip.anonportalgo.reserve 1574A bitmask of ports that will not be used during anonymous or privileged 1575port selection. 1576.It Li ip.anonportalgo.selected 1577The currently selected RFC 6056 port randomization algorithm; see 1578.Xr rfc6056 7 1579for details. 1580.It Li ip.anonportmax 1581The highest port number to use for TCP and UDP ephemeral port allocation. 1582This cannot be set to less than 1024 or greater than 65535, and must 1583be greater than 1584.Li ip.anonportmin . 1585.It Li ip.anonportmin 1586The lowest port number to use for TCP and UDP ephemeral port allocation. 1587This cannot be set to less than 1024 or greater than 65535. 1588.It Li ip.checkinterface 1589If set to non-zero, the host will reject packets addressed to it 1590that arrive on an interface not bound to that address. 1591Currently, this must be disabled if NAT is used to translate the 1592destination address to another local interface, or if addresses 1593are added to the loopback interface instead of the interface where 1594the packets for those packets are received. 1595.It Li ip.dad_count 1596The number of 1597.Xr arp 4 1598probes sent for Address Conflict Detection. 1599Set to 0 to disable this. 1600.It Li ip.directed-broadcast 1601If set to 1, enables directed broadcast behavior for the host. 1602.It Li ip.do_loopback_cksum 1603Perform IP checksum on loopback. 1604.It Li ip.forwarding 1605If set to 1, enables IP forwarding for the host, 1606meaning that the host is acting as a router. 1607.It Li ip.forwsrcrt 1608If set to 1, enables forwarding of source-routed packets for the host. 1609This value may only be changed if the kernel security level is less than 1. 1610.It Li ip.gifttl 1611The maximum time-to-live (hop count) value for an IPv4 packet generated by 1612.Xr gif 4 1613tunnel interface. 1614.It Li ip.grettl 1615The maximum time-to-live (hop count) value for an IPv4 packet generated by 1616.Xr gre 4 1617tunnel interface. 1618.It Li ip.hashsize 1619The size of IPv4 Fast Forward hash table. 1620This value must be a power of 2 (64, 256...). 1621A larger hash table size results in fewer collisions. 1622Also see 1623.Li ip.maxflows . 1624.It Li ip.hostzerobroadcast 1625All zeroes address is broadcast address. 1626.It Li ip.lowportmax 1627The highest port number to use for TCP and UDP reserved port allocation. 1628This cannot be set to less than 0 or greater than 1024, and must 1629be greater than 1630.Li ip.lowportmin . 1631.It Li ip.lowportmin 1632The lowest port number to use for TCP and UDP reserved port allocation. 1633This cannot be set to less than 0 or greater than 1024, and must 1634be smaller than 1635.Li ip.lowportmax . 1636.It Li ip.maxflows 1637IPv4 Fast Forwarding is enabled by default. 1638If set to 0, IPv4 Fast Forwarding is disabled. 1639.Li ip.maxflows 1640controls the maximum amount of flows which can be created. 1641The default value is 256. 1642.It Li ip.maxfragpackets 1643The maximum number of fragmented packets the node will accept. 16440 means that the node will not accept any fragmented packets. 1645\-1 means that the node will accept as many fragmented packets as it receives. 1646The flag is provided basically for avoiding possible DoS attacks. 1647.It Li ip.mtudisc 1648If set to 1, enables Path MTU Discovery (RFC 1191). 1649When Path MTU Discovery is enabled, the transmitted TCP segment 1650size will be determined by the advertised maximum segment size 1651(MSS) from the remote end, as constrained by the path MTU. 1652If MTU Discovery is disabled, the transmitted segment size will 1653never be greater than 1654.Li tcp.mssdflt 1655(the local maximum segment size). 1656.It Li ip.mtudisctimeout 1657The number of seconds in which a route added by the Path MTU 1658Discovery engine will time out. 1659When the route times out, the Path 1660MTU Discovery engine will attempt to probe a larger path MTU. 1661.It Li ip.random_id 1662Assign random ip_id values. 1663.It Li ip.redirect 1664If set to 1, ICMP redirects may be sent by the host. 1665This option is ignored unless the host is routing IP packets, 1666and should normally be enabled on all systems. 1667.It Li ip.subnetsarelocal 1668If set to 1, subnets are to be considered local addresses. 1669.It Li ip.ttl 1670The maximum time-to-live (hop count) value for an IP packet sourced by 1671the system. 1672This value applies to normal transport protocols, not to ICMP. 1673.It Li icmp.errppslimit 1674The variable specifies the maximum number of outgoing ICMP error messages, 1675per second. 1676ICMP error messages that exceeded the value are subject to rate limitation 1677and will not go out from the node. 1678Negative value disables rate limitation. 1679.It Li icmp.maskrepl 1680If set to 1, ICMP network mask requests are to be answered. 1681.It Li icmp.rediraccept 1682If set to non-zero, the host will accept ICMP redirect packets. 1683Note that routers will never accept ICMP redirect packets, 1684and the variable is meaningful on IP hosts only. 1685.It Li icmp.redirtimeout 1686The variable specifies lifetime of routing entries generated by incoming 1687ICMP redirect. 1688This defaults to 600 seconds. 1689.It Li icmp.returndatabytes 1690Number of bytes to return in an ICMP error message. 1691.It Li icmp.bmcastecho 1692If set to 1, enables responding to ICMP echo or timestamp request to the 1693broadcast address. 1694.It Li tcp.ack_on_push 1695If set to 1, TCP is to immediately transmit an ACK upon reception of 1696a packet with PUSH set. 1697This can avoid losing a round trip time in some rare situations, 1698but has the caveat of potentially defeating TCP's delayed ACK algorithm. 1699Use of this option is generally not recommended, but 1700the variable exists in case your configuration really needs it. 1701.It Li tcp.cwm 1702If set to 1, enables use of the Hughes/Touch/Heidemann Congestion Window 1703Monitoring algorithm. 1704This algorithm prevents line-rate bursts of packets that could 1705otherwise occur when data begins flowing on an idle TCP connection. 1706These line-rate bursts can contribute to network and router congestion. 1707This can be particularly useful on World Wide Web servers 1708which support HTTP/1.1, which has lingering connections. 1709.It Li tcp.cwm_burstsize 1710The Congestion Window Monitoring allowed burst size, in terms 1711of packet count. 1712.It Li tcp.delack_ticks 1713Number of ticks to delay sending an ACK. 1714.It Li tcp.do_loopback_cksum 1715Perform TCP checksum on loopback. 1716.It Li tcp.init_win 1717A value indicating the TCP initial congestion window. 1718The valid range 1719is 0 to 10 (maximum specified by RFC6928), 1720with a default of 4 (approximately 4K per RFC3390). 1721.It Li tcp.init_win_local 1722Like 1723.Li tcp.init_win , 1724but used when communicating with hosts on a local network. 1725.It Li tcp.keepcnt 1726Number of keepalive probes sent before declaring a connection dead. 1727If set to zero, there is no limit; 1728keepalives will be sent until some kind of 1729response is received from the peer. 1730.It Li tcp.keepidle 1731Time a connection must be idle before keepalives are sent (if keepalives 1732are enabled for the connection). 1733See also tcp.slowhz. 1734.It Li tcp.keepintvl 1735Time after a keepalive probe is sent until, in the absence of any response, 1736another probe is sent. 1737See also tcp.slowhz. 1738.It Li tcp.log_refused 1739If set to 1, refused TCP connections to the host will be logged. 1740.It Li tcp.keepinit 1741Timeout in seconds during connection establishment. 1742.It Li tcp.mss_ifmtu 1743If set to 1, TCP calculates the outgoing maximum segment size based on 1744the MTU of the appropriate interface. 1745If set to 0, it is calculated based on the greater of the MTU of the 1746interface, and the largest (non-loopback) interface MTU on the system. 1747.It Li tcp.mssdflt 1748The default maximum segment size both advertised to the peer 1749and to use when either the peer does not advertise a maximum segment size to 1750us during connection setup or Path MTU Discovery 1751.Li ( ip.mtudisc ) 1752is disabled. 1753Do not change this value unless you really know what you are doing. 1754.It Li tcp.recvspace 1755The default TCP receive buffer size. 1756.It Li tcp.rfc1323 1757If set to 1, enables RFC 1323 extensions to TCP. 1758.It Li tcp.rstppslimit 1759The variable specifies the maximum number of outgoing TCP RST packets, 1760per second. 1761TCP RST packet that exceeded the value are subject to rate limitation 1762and will not go out from the node. 1763Negative value disables rate limitation. 1764.It Li tcp.ident 1765Return the user ID of a connected socket pair. 1766(RFC1413 Identification Protocol lookups.) 1767.It Li tcp.drop 1768Drop a TCP socket pair connection. 1769.It Li tcp.sack.enable 1770If set to 1, enables RFC 2018 Selective ACKnowledgement. 1771.It Li tcp.sack.globalholes 1772Global number of TCP SACK holes. 1773.It Li tcp.sack.globalmaxholes 1774Global maximum number of TCP SACK holes. 1775.It Li tcp.sack.maxholes 1776Maximum number of TCP SACK holes allowed per connection. 1777.It Li tcp.ecn.enable 1778If set to 1, enables RFC 3168 Explicit Congestion Notification. 1779.It Li tcp.ecn.maxretries 1780Number of times to retry sending the ECN-setup packet. 1781.It Li tcp.sendspace 1782The default TCP send buffer size. 1783.It Li tcp.slowhz 1784The units for tcp.keepidle and tcp.keepintvl; those variables are in ticks 1785of a clock that ticks tcp.slowhz times per second. 1786(That is, their values 1787must be divided by the tcp.slowhz value to get times in seconds.) 1788.It Li tcp.syn_bucket_limit 1789The maximum number of entries allowed per hash bucket in the TCP 1790compressed state engine. 1791.It Li tcp.syn_cache_limit 1792The maximum number of entries allowed in the TCP compressed state 1793engine. 1794.It Li tcp.timestamps 1795If rfc1323 is enabled, a value of 1 indicates RFC 1323 time stamp options, 1796used for measuring TCP round trip times, are enabled. 1797.It Li tcp.win_scale 1798If rfc1323 is enabled, a value of 1 indicates RFC 1323 window scale options, 1799for increasing the TCP window size, are enabled. 1800.It Li tcp.congctl.available 1801The available TCP congestion control algorithms. 1802.It Li tcp.congctl.selected 1803The currently selected TCP congestion control algorithm. 1804.It Li tcp.abc.enable 1805If set to 1, use RFC 3465 Appropriate Byte Counting (ABC). 1806If set to 0, use traditional Packet Counting. 1807.It Li tcp.abc.aggressive 1808Choose the L parameter found in RFC 3465. 1809L is the maximum cwnd increase for an ack during slow start. 1810If set to 1, use L=2*SMSS. 1811If set to 0, use L=1*SMSS. 1812It has no effect unless tcp.abc.enable is set to 1. 1813.It Li udp.checksum 1814If set to 1, UDP checksums are being computed. 1815Received non-zero UDP checksums are always checked. 1816Disabling UDP checksums is strongly discouraged. 1817.It Li udp.recvspace 1818The default UDP receive buffer size. 1819.It Li udp.sendspace 1820The default UDP send buffer size. 1821.El 1822.Pp 1823For variables net.*.ipsec, please refer to 1824.Xr ipsec 4 . 1825.It Li net.inet6 ( Dv PF_INET6 ) 1826Get or set various global information about the IPv6 1827.Pq Internet Protocol version 6 . 1828The third level name is the protocol. 1829The fourth level name is the variable name. 1830The currently defined protocols and names are: 1831.Bl -column "Protocol" "anonportalgo.available" "integer" "Changeable" -offset indent 1832.It Sy Protocol Variable Ta Sy Type Ta Sy Changeable 1833.It icmp6 errppslimit integer yes 1834.It icmp6 mtudisc_hiwat integer yes 1835.It icmp6 mtudisc_lowat integer yes 1836.It icmp6 nd6_debug integer yes 1837.It icmp6 nd6_delay integer yes 1838.It icmp6 nd6_maxnudhint integer yes 1839.It icmp6 nd6_mmaxtries integer yes 1840.It icmp6 nd6_prune integer yes 1841.It icmp6 nd6_umaxtries integer yes 1842.It icmp6 nd6_useloopback integer yes 1843.It icmp6 nodeinfo integer yes 1844.It icmp6 rediraccept integer yes 1845.It icmp6 redirtimeout integer yes 1846.It ip6 accept_rtadv integer yes 1847.It ip6 addctlpolicy struct in6_addrpolicy no 1848.It ip6 anonportalgo.selected string yes 1849.It ip6 anonportalgo.available string yes 1850.It ip6 anonportalgo.reserve struct yes 1851.It ip6 anonportmax integer yes 1852.It ip6 anonportmin integer yes 1853.It ip6 auto_flowlabel integer yes 1854.It ip6 dad_count integer yes 1855.It ip6 defmcasthlim integer yes 1856.It ip6 forwarding integer yes 1857.It ip6 gifhlim integer yes 1858.It ip6 hashsize integer yes 1859.It ip6 hlim integer yes 1860.It ip6 hdrnestlimit integer yes 1861.It ip6 kame_version string no 1862.It ip6 keepfaith integer yes 1863.It ip6 log_interval integer yes 1864.It ip6 lowportmax integer yes 1865.It ip6 lowportmin integer yes 1866.It ip6 maxdynroutes integer yes 1867.It ip6 maxifprefixes integer yes 1868.It ip6 maxifdefrouters integer yes 1869.It ip6 maxflows integer yes 1870.It ip6 maxfragpackets integer yes 1871.It ip6 maxfrags integer yes 1872.It ip6 neighborgcthresh integer yes 1873.It ip6 redirect integer yes 1874.It ip6 rr_prune integer yes 1875.It ip6 use_deprecated integer yes 1876.It ip6 v6only integer yes 1877.It udp6 do_loopback_cksum integer yes 1878.It udp6 recvspace integer yes 1879.It udp6 sendspace integer yes 1880.El 1881.Pp 1882The variables are as follows: 1883.Bl -tag -width "123456" 1884.It Li ip6.accept_rtadv 1885If set to non-zero, the node will accept ICMPv6 router advertisement packets 1886and autoconfigures address prefixes and default routers. 1887The node must be a host 1888.Pq not a router 1889for the option to be meaningful. 1890.It Li ip6.anonportalgo.available 1891The available RFC 6056 port randomization algorithms. 1892.It Li ip6.anonportalgo.reserve 1893A bitmask of ports that will not be used during anonymous or privileged 1894port selection. 1895.It Li ip6.anonportalgo.selected 1896The currently selected RFC 6056 port randomization algorithm; see 1897.Xr rfc6056 7 1898for details. 1899.It Li ip6.anonportmax 1900The highest port number to use for TCP and UDP ephemeral port allocation. 1901This cannot be set to less than 1024 or greater than 65535, and must 1902be greater than 1903.Li ip6.anonportmin . 1904.It Li ip6.anonportmin 1905The lowest port number to use for TCP and UDP ephemeral port allocation. 1906This cannot be set to less than 1024 or greater than 65535. 1907.It Li ip6.auto_flowlabel 1908On connected transport protocol packets, 1909fill IPv6 flowlabel field to help intermediate routers to identify packet flows. 1910.It Li ip6.dad_count 1911The variable configures number of IPv6 DAD 1912.Pq duplicated address detection 1913probe packets. 1914The packets will be generated when IPv6 interface addresses are configured. 1915.It Li ip6.defmcasthlim 1916The default hop limit value for an IPv6 multicast packet sourced by the node. 1917This value applies to all the transport protocols on top of IPv6. 1918There are APIs to override the value, as documented in 1919.Xr ip6 4 . 1920.It Li ip6.forwarding 1921If set to 1, enables IPv6 forwarding for the node, 1922meaning that the node is acting as a router. 1923If set to 0, disables IPv6 forwarding for the node, 1924meaning that the node is acting as a host. 1925IPv6 specification defines node behavior for 1926.Dq router 1927case and 1928.Dq host 1929case quite differently, and changing this variable during operation 1930may cause serious trouble. 1931It is recommended to configure the variable at bootstrap time, 1932and bootstrap time only. 1933.It Li ip6.gifhlim 1934The maximum hop limit value for an IPv6 packet generated by 1935.Xr gif 4 1936tunnel interface. 1937.It Li ip6.hdrnestlimit 1938The number of IPv6 extension headers permitted on incoming IPv6 packets. 1939If set to 0, the node will accept as many extension headers as possible. 1940.It Li ip6.hashsize 1941The size of IPv6 Fast Forward hash table. 1942This value must be a power of 2 (64, 256, ...). 1943A larger hash table size results in fewer collisions. 1944Also see 1945.Li ip6.maxflows . 1946.It Li ip6.hlim 1947The default hop limit value for an IPv6 unicast packet sourced by the node. 1948This value applies to all the transport protocols on top of IPv6. 1949There are APIs to override the value, as documented in 1950.Xr ip6 4 . 1951.It Li ip6.kame_version 1952The string identifies the version of KAME IPv6 stack implemented in the kernel. 1953.It Li ip6.keepfaith 1954If set to non-zero, it enables 1955.Dq FAITH 1956TCP relay IPv6-to-IPv4 translator code in the kernel. 1957Refer 1958.Xr faith 4 1959and 1960.Xr faithd 8 1961for detail. 1962.It Li ip6.log_interval 1963The variable controls amount of logs generated by IPv6 packet 1964forwarding engine, by setting interval between log output 1965.Pq in seconds . 1966.It Li ip6.lowportmax 1967The highest port number to use for TCP and UDP reserved port allocation. 1968This cannot be set to less than 0 or greater than 1024, and must 1969be greater than 1970.Li ip6.lowportmin . 1971.It Li ip6.lowportmin 1972The lowest port number to use for TCP and UDP reserved port allocation. 1973This cannot be set to less than 0 or greater than 1024, and must 1974be smaller than 1975.Li ip6.lowportmax . 1976.It Li ip6.maxdynroutes 1977Maximum number of routes created by redirect. 1978Set it to negative to disable. 1979The default value is 4096. 1980.It Li ip6.maxifprefixes 1981Maximum number of prefixes created by route advertisements per interface. 1982Set it to negative to disable. 1983The default value is 16. 1984.It Li ip6.maxifdefrouters 16 1985Maximum number of default routers created by route advertisements per interface. 1986Set it to negative to disable. 1987The default value is 16. 1988.It Li ip6.maxflows 1989IPv6 Fast Forwarding is enabled by default. 1990If set to 0, IPv6 Fast Forwarding is disabled. 1991.Li ip6.maxflows 1992controls the maximum amount of flows which can be created. 1993The default value is 256. 1994.It Li ip6.maxfragpackets 1995The maximum number of fragmented packets the node will accept. 19960 means that the node will not accept any fragmented packets. 1997\-1 means that the node will accept as many fragmented packets as it receives. 1998The flag is provided basically for avoiding possible DoS attacks. 1999.It Li ip6.maxfrags 2000The maximum number of fragments the node will accept. 20010 means that the node will not accept any fragments. 2002\-1 means that the node will accept as many fragments as it receives. 2003The flag is provided basically for avoiding possible DoS attacks. 2004.It Li ip6.neighborgcthresh 2005Maximum number of entries in neighbor cache per interface. 2006Set to negative to disable. 2007The default value is 2048. 2008.It Li ip6.redirect 2009If set to 1, ICMPv6 redirects may be sent by the node. 2010This option is ignored unless the node is routing IP packets, 2011and should normally be enabled on all systems. 2012.It Li ip6.rr_prune 2013The variable specifies interval between IPv6 router renumbering prefix 2014babysitting, in seconds. 2015.It Li ip6.use_deprecated 2016The variable controls use of deprecated address, specified in RFC 2462 5.5.4. 2017.It Li ip6.v6only 2018The variable specifies initial value for 2019.Dv IPV6_V6ONLY 2020socket option for 2021.Dv AF_INET6 2022socket. 2023Please refer to 2024.Xr ip6 4 2025for detail. 2026.It Li icmp6.errppslimit 2027The variable specifies the maximum number of outgoing ICMPv6 error messages, 2028per second. 2029ICMPv6 error messages that exceeded the value are subject to rate limitation 2030and will not go out from the node. 2031Negative value disables rate limitation. 2032.It Li icmp6.mtudisc_hiwat 2033.It Li icmp6.mtudisc_lowat 2034The variables define the maximum number of routing table entries, 2035created due to path MTU discovery 2036.Pq prevents denial-of-service attacks with ICMPv6 too big messages . 2037When IPv6 path MTU discovery happens, we keep path MTU information into 2038the routing table. 2039If the number of routing table entries exceed the value, 2040the kernel will not attempt to keep the path MTU information. 2041.Li icmp6.mtudisc_hiwat 2042is used when we have verified ICMPv6 too big messages. 2043.Li icmp6.mtudisc_lowat 2044is used when we have unverified ICMPv6 too big messages. 2045Verification is performed by using address/port pairs kept in connected pcbs. 2046Negative value disables the upper limit. 2047.It Li icmp6.nd6_debug 2048If set to non-zero, kernel IPv6 neighbor discovery code will generate 2049debugging messages. 2050The debug outputs are useful to diagnose IPv6 interoperability issues. 2051The flag must be set to 0 for normal operation. 2052.It Li icmp6.nd6_delay 2053The variable specifies 2054.Dv DELAY_FIRST_PROBE_TIME 2055timing constant in IPv6 neighbor discovery specification 2056.Pq RFC 2461 , 2057in seconds. 2058.It Li icmp6.nd6_maxnudhint 2059Neighbor discovery permits upper layer protocols to supply reachability 2060hints, to avoid unnecessary neighbor discovery exchanges. 2061The variable defines the number of consecutive hints the neighbor discovery 2062layer will take. 2063For example, by setting the variable to 3, neighbor discovery layer 2064will take 3 consecutive hints in maximum. 2065After receiving 3 hints, neighbor discovery layer will perform 2066normal neighbor discovery process. 2067.It Li icmp6.nd6_mmaxtries 2068The variable specifies 2069.Dv MAX_MULTICAST_SOLICIT 2070constant in IPv6 neighbor discovery specification 2071.Pq RFC 2461 . 2072.It Li icmp6.nd6_prune 2073The variable specifies interval between IPv6 neighbor cache babysitting, 2074in seconds. 2075.It Li icmp6.nd6_umaxtries 2076The variable specifies 2077.Dv MAX_UNICAST_SOLICIT 2078constant in IPv6 neighbor discovery specification 2079.Pq RFC 2461 . 2080.It Li icmp6.nd6_useloopback 2081If set to non-zero, kernel IPv6 stack will use loopback interface for 2082local traffic. 2083.It Li icmp6.nodeinfo 2084The variable enables responses to ICMPv6 node information queries. 2085If you set the variable to 0, responses will not be generated for 2086ICMPv6 node information queries. 2087Since node information queries can have a security impact, it is 2088possible to fine tune which responses should be answered. 2089Two separate bits can be set. 2090.Bl -tag -width "12345" 2091.It 1 2092Respond to ICMPv6 FQDN queries, e.g. 2093.Li ping6 -w . 2094.It 2 2095Respond to ICMPv6 node addresses queries, e.g. 2096.Li ping6 -a . 2097.El 2098.It Li icmp6.rediraccept 2099If set to non-zero, the host will accept ICMPv6 redirect packets. 2100Note that IPv6 routers will never accept ICMPv6 redirect packets, 2101and the variable is meaningful on IPv6 hosts 2102.Pq non-router 2103only. 2104.It Li icmp6.redirtimeout 2105The variable specifies lifetime of routing entries generated by incoming 2106ICMPv6 redirect. 2107.It Li udp6.do_loopback_cksum 2108Perform UDP checksum on loopback. 2109.It Li udp6.recvspace 2110Default UDP receive buffer size. 2111.It Li udp6.sendspace 2112Default UDP send buffer size. 2113.El 2114.Pp 2115We reuse net.*.tcp for TCP over IPv6, 2116and therefore we do not have variables net.*.tcp6. 2117Variables net.inet6.udp6 have identical meaning to net.inet.udp. 2118Please refer to 2119.Li PF_INET 2120section above. 2121For variables net.*.ipsec6, please refer to 2122.Xr ipsec 4 . 2123.It Li net.key ( Dv PF_KEY ) 2124Get or set various global information about the IPsec key management. 2125The third level name is the variable name. 2126The currently defined variable and names are: 2127.Bl -column "blockacq_lifetime" "integer" "Changeable" -offset indent 2128.It Sy Variable Type Ta Sy Changeable 2129.It debug integer yes 2130.It enabled integer yes 2131.It used integer no 2132.It spi_try integer yes 2133.It spi_min_value integer yes 2134.It spi_max_value integer yes 2135.It larval_lifetime integer yes 2136.It blockacq_count integer yes 2137.It blockacq_lifetime integer yes 2138.It esp_keymin integer yes 2139.It esp_auth integer yes 2140.It ah_keymin integer yes 2141.El 2142The variables are as follows: 2143.Bl -tag -width "123456" 2144.It Li debug 2145Turn on debugging message from within the kernel. 2146The value is a bitmap, as defined in 2147.In netipsec/key_debug.h . 2148.It Li enabled 2149Control processing of IPsec control messages. 2150.Bl -tag -width indent 2151.It 0 2152Never allow IPsec processing 2153.It 1 2154Allow IPsec processing when SPD policies are present. 2155.It 2 2156Force IPsec processing even when SPD policies are not present. 2157.El 2158.It Li used 2159Based on if IPsec is enabled, and SPD rule existence, show if 2160IPsec is being used. 2161Note that currently once IPsec is being used, it cannot be disabled. 2162.It Li spi_try 2163The number of times the kernel will try to obtain an unique SPI 2164when it generates it from random number generator. 2165.It Li spi_min_value 2166Minimum SPI value when generating it within the kernel. 2167.It Li spi_max_value 2168Maximum SPI value when generating it within the kernel. 2169.It Li larval_lifetime 2170Lifetime for LARVAL SAD entries, in seconds. 2171.It Li blockacq_count 2172Number of ACQUIRE PF_KEY messages to be blocked after an ACQUIRE message. 2173It avoids flood of ACQUIRE PF_KEY from being sent from the kernel to the 2174key management daemon. 2175.It Li blockacq_lifetime 2176Lifetime of ACQUIRE PF_KEY message. 2177.It Li esp_keymin 2178Minimum ESP key length, in bits. 2179The value is used when the kernel creates proposal payload 2180on ACQUIRE PF_KEY message. 2181.It Li esp_auth 2182Whether ESP authentication should be used or not. 2183Non-zero value indicates that ESP authentication should be used. 2184The value is used when the kernel creates proposal payload 2185on ACQUIRE PF_KEY message. 2186.It Li ah_keymin 2187Minimum AH key length, in bits, 2188The value is used when the kernel creates proposal payload 2189on ACQUIRE PF_KEY message. 2190.El 2191.It Li net.local ( Dv PF_LOCAL ) 2192Get or set various global information about 2193.Dv AF_LOCAL 2194type sockets. 2195For some variables, the third level name is the variable name: 2196.Bl -column "Variable" "integer" "Changeable" -offset indent 2197.It Sy Variable Type Ta Sy Changeable 2198.It inflight integer no 2199.It deferred integer no 2200.El 2201The variables are as follows: 2202.Bl -tag -width "123456" 2203.It Li inflight 2204The number of file descriptors currently passed between processes, 2205.Qq in flight . 2206.It Li deferred 2207The number of file descriptors passed between processes that have been 2208deferred for cleanup by a kernel task. 2209.El 2210.Pp 2211Other variables are specific to a socket type: 2212.Bl -column "seqpacket" "sendspace" "integer" "Changeable" -offset indent 2213.It Sy "Socket Type" Sy Variable Type Ta Sy Changeable 2214.It dgram pcblist struct no 2215.It dgram recvspace integer yes 2216.It dgram sendspace integer yes 2217.It seqpacket pcblist struct no 2218.It stream pcblist struct no 2219.It stream recvspace integer yes 2220.It stream sendspace integer yes 2221.El 2222The variables are as follows: 2223.Bl -tag -width "123456" 2224.It Li dgram.pcblist 2225The Protocol Control Block list structure for datagram sockets. 2226Parsed by 2227.Xr netstat 1 2228or 2229.Xr sockstat 1 . 2230.It Li dgram.recvspace 2231The default datagram receive buffer size. 2232.It Li dgram.sendspace 2233The default datagram send buffer size. 2234.It Li seqpacket.pcblist 2235The Protocol Control Block list structure for Sequential Packet sockets. 2236Parsed by 2237.Xr netstat 1 2238or 2239.Xr sockstat 1 . 2240.It Li stream.pcblist 2241The Protocol Control Block list structure for stream sockets. 2242Parsed by 2243.Xr netstat 1 2244or 2245.Xr sockstat 1 . 2246.It Li stream.recvspace 2247The default stream receive buffer size. 2248.It Li stream.sendspace 2249The default stream send buffer size. 2250.El 2251.El 2252.Ss The proc.* subtree 2253The string and integer information available for the 2254.Li proc 2255level is detailed below. 2256The changeable column shows whether a process with appropriate 2257privilege may change the value. 2258These values are per-process, 2259and as such may change from one process to another. 2260When a process is created, 2261the default values are inherited from its parent. 2262When a set-user-ID or set-group-ID binary is executed, the 2263value of PROC_PID_CORENAME is reset to the system default value. 2264The second level name is either the magic value PROC_CURPROC, which 2265points to the current process, or the PID of the target process. 2266.Bl -column "proc.pid.corename" "string" "not applicable" -offset indent 2267.It Sy Third level name Ta Sy Type Ta Sy Changeable 2268.It proc.pid.corename string yes 2269.It proc.pid.rlimit node not applicable 2270.It proc.pid.stopfork int yes 2271.It proc.pid.stopexec int yes 2272.It proc.pid.stopexit int yes 2273.It proc.pid.paxflags int no 2274.El 2275.Bl -tag -width "123456" 2276.It Li proc.pid.corename ( Dv PROC_PID_CORENAME ) 2277The template used for the core dump file name (see 2278.Xr core 5 2279for details). 2280The base name must either be 2281.Pa core 2282or end with the suffix 2283.Pa .core 2284(the super-user may set arbitrary names). 2285By default it points to 2286.Dv KERN_DEFCORENAME . 2287.It Li proc.pid.rlimit ( Dv PROC_PID_LIMIT ) 2288Return resources limits, as defined for the 2289.Xr getrlimit 2 2290and 2291.Xr setrlimit 2 2292system calls. 2293The fourth level name is one of: 2294.Bl -tag -width "123456" 2295.It Li proc.pid.rlimit.cputime ( Dv PROC_PID_LIMIT_CPU ) 2296The maximum amount of CPU time (in seconds) to be used by each process. 2297.It Li proc.pid.rlimit.filesize ( Dv PROC_PID_LIMIT_FSIZE ) 2298The largest size (in bytes) file that may be created. 2299.It Li proc.pid.rlimit.datasize ( Dv PROC_PID_LIMIT_DATA ) 2300The maximum size (in bytes) of the data segment for a process; 2301this defines how far a program may extend its break with the 2302.Xr sbrk 2 2303system call. 2304.It Li proc.pid.rlimit.stacksize ( Dv PROC_PID_LIMIT_STACK ) 2305The maximum size (in bytes) of the stack segment for a process; 2306this defines how far a program's stack segment may be extended. 2307Stack extension is performed automatically by the system. 2308.It Li proc.pid.rlimit.coredumpsize ( Dv PROC_PID_LIMIT_CORE ) 2309The largest size (in bytes) 2310.Pa core 2311file that may be created. 2312.It Li proc.pid.rlimit.memoryuse ( Dv PROC_PID_LIMIT_RSS ) 2313The maximum size (in bytes) to which a process's resident set size may 2314grow. 2315This imposes a limit on the amount of physical memory to be given to 2316a process; if memory is tight, the system will prefer to take memory 2317from processes that are exceeding their declared resident set size. 2318.It Li proc.pid.rlimit.memorylocked ( Dv PROC_PID_LIMIT_MEMLOCK ) 2319The maximum size (in bytes) which a process may lock into memory 2320using the 2321.Xr mlock 2 2322function. 2323.It Li proc.pid.rlimit.maxproc ( Dv PROC_PID_LIMIT_NPROC ) 2324The maximum number of simultaneous processes for this user id. 2325.It Li proc.pid.rlimit.descriptors ( Dv PROC_PID_LIMIT_NOFILE ) 2326The maximum number of open files for this process. 2327.It Li proc.pid.rlimit.sbsize ( Dv PROC_PID_LIMIT_SBSIZE ) 2328The maximum size (in bytes) of the socket buffers 2329set by the 2330.Xr setsockopt 2 2331.Dv SO_RCVBUF 2332and 2333.Dv SO_SNDBUF 2334options. 2335.It Li proc.pid.rlimit.vmemoryuse ( Dv PROC_PID_LIMIT_AS ) 2336The maximum size (in bytes) which a process can obtain. 2337.It Li proc.pid.rlimit.maxlwp ( Dv PROC_PID_LIMIT_NTHR ) 2338The maximum number of threads that cen be created and running at one time in 2339the process. 2340The first thread of each process is not counted against this. 2341.El 2342.Pp 2343The fifth level name is one of 2344.Li soft ( Dv PROC_PID_LIMIT_TYPE_SOFT ) 2345or 2346.Li hard ( Dv PROC_PID_LIMIT_TYPE_HARD ) , 2347to select respectively the soft or hard limit. 2348Both are of type integer. 2349.It Li proc.pid.stopfork ( Dv PROC_PID_STOPFORK ) 2350If non zero, the process' children will be stopped after 2351.Xr fork 2 2352calls. 2353The children are created in the SSTOP state and are never scheduled 2354for running before being stopped. 2355This feature enables attaching to a process with a debugger such as 2356.Xr gdb 1 2357before the process has the opportunity to actually do anything. 2358.Pp 2359This value is inherited by the process's children, and it also 2360applies to emulation specific system calls that fork a new process, such as 2361.Fn sproc 2362or 2363.Fn clone . 2364.It Li proc.pid.stopexec ( Dv PROC_PID_STOPEXEC ) 2365If non zero, the process will be stopped on the next 2366.Xr exec 3 2367call. 2368The process created by 2369.Xr exec 3 2370is created in the SSTOP state and is never scheduled for running 2371before being stopped. 2372This feature enables attaching to a process with a debugger such as 2373.Xr gdb 1 2374before the process has the opportunity to actually do anything. 2375.Pp 2376This value is inherited by the process's children. 2377.It Li proc.pid.stopexit ( Dv PROC_PID_STOPEXIT ) 2378If non zero, the process will be stopped when it has cause to exit, 2379either by way of calling 2380.Xr exit 3 , 2381.Xr _exit 2 , 2382or by the receipt of a specific signal. 2383The process is stopped before any of its resources or vm space is 2384released allowing examination of the termination state of the process 2385before it disappears. 2386This feature can be used to examine the final conditions of the 2387process's vmspace via 2388.Xr pmap 1 2389or its resource settings with 2390.Xr sysctl 8 2391before it disappears. 2392.Pp 2393This value is also inherited by the process's children. 2394.It Li proc.pid.paxflags ( Dv PROC_PID_PAXFLAGS ) 2395This read-only variable returns the current value of the process's pax 2396flags (see 2397.Xr paxctl 8 ) . 2398.El 2399.Ss The user.* subtree ( Dv CTL_USER ) 2400The string and integer information available for the 2401.Li user 2402level is detailed below. 2403The changeable column shows whether a process with appropriate 2404privilege may change the value. 2405.Bl -column "user.coll_weights_max" "integer" "Changeable" -offset indent 2406.It Sy Second level name Ta Sy Type Ta Sy Changeable 2407.It user.atexit_max integer no 2408.It user.bc_base_max integer no 2409.It user.bc_dim_max integer no 2410.It user.bc_scale_max integer no 2411.It user.bc_string_max integer no 2412.It user.coll_weights_max integer no 2413.It user.cs_path string no 2414.It user.expr_nest_max integer no 2415.It user.line_max integer no 2416.It user.posix2_c_bind integer no 2417.It user.posix2_c_dev integer no 2418.It user.posix2_char_term integer no 2419.It user.posix2_fort_dev integer no 2420.It user.posix2_fort_run integer no 2421.It user.posix2_localedef integer no 2422.It user.posix2_sw_dev integer no 2423.It user.posix2_upe integer no 2424.It user.posix2_version integer no 2425.It user.re_dup_max integer no 2426.It user.stream_max integer no 2427.It user.stream_max integer no 2428.It user.tzname_max integer no 2429.El 2430.Bl -tag -width "123456" 2431.It Li user.atexit_max ( Dv USER_ATEXIT_MAX ) 2432The maximum number of functions that may be registered with 2433.Xr atexit 3 . 2434.It Li user.bc_base_max ( Dv USER_BC_BASE_MAX ) 2435The maximum ibase/obase values in the 2436.Xr bc 1 2437utility. 2438.It Li user.bc_dim_max ( Dv USER_BC_DIM_MAX ) 2439The maximum array size in the 2440.Xr bc 1 2441utility. 2442.It Li user.bc_scale_max ( Dv USER_BC_SCALE_MAX ) 2443The maximum scale value in the 2444.Xr bc 1 2445utility. 2446.It Li user.bc_string_max ( Dv USER_BC_STRING_MAX ) 2447The maximum string length in the 2448.Xr bc 1 2449utility. 2450.It Li user.coll_weights_max ( Dv USER_COLL_WEIGHTS_MAX ) 2451The maximum number of weights that can be assigned to any entry of 2452the LC_COLLATE order keyword in the locale definition file. 2453.It Li user.cs_path ( USER_CS_PATH ) 2454Return a value for the 2455.Ev PATH 2456environment variable that finds all the standard utilities. 2457.It Li user.expr_nest_max ( Dv USER_EXPR_NEST_MAX ) 2458The maximum number of expressions that can be nested within 2459parenthesis by the 2460.Xr expr 1 2461utility. 2462.It Li user.line_max ( Dv USER_LINE_MAX ) 2463The maximum length in bytes of a text-processing utility's input 2464line. 2465.It Li user.posix2_char_term ( Dv USER_POSIX2_CHAR_TERM ) 2466Return 1 if the system supports at least one terminal type capable of 2467all operations described in 2468.St -p1003.2 , 2469otherwise\ 0. 2470.It Li user.posix2_c_bind ( Dv USER_POSIX2_C_BIND ) 2471Return 1 if the system's C-language development facilities support the 2472C-Language Bindings Option, otherwise\ 0. 2473.It Li user.posix2_c_dev ( Dv USER_POSIX2_C_DEV ) 2474Return 1 if the system supports the C-Language Development Utilities Option, 2475otherwise\ 0. 2476.It Li user.posix2_fort_dev ( Dv USER_POSIX2_FORT_DEV ) 2477Return 1 if the system supports the FORTRAN Development Utilities Option, 2478otherwise\ 0. 2479.It Li user.posix2_fort_run ( Dv USER_POSIX2_FORT_RUN ) 2480Return 1 if the system supports the FORTRAN Runtime Utilities Option, 2481otherwise\ 0. 2482.It Li user.posix2_localedef ( Dv USER_POSIX2_LOCALEDEF ) 2483Return 1 if the system supports the creation of locales, otherwise\ 0. 2484.It Li user.posix2_sw_dev ( Dv USER_POSIX2_SW_DEV ) 2485Return 1 if the system supports the Software Development Utilities Option, 2486otherwise\ 0. 2487.It Li user.posix2_upe ( Dv USER_POSIX2_UPE ) 2488Return 1 if the system supports the User Portability Utilities Option, 2489otherwise\ 0. 2490.It Li user.posix2_version ( Dv USER_POSIX2_VERSION ) 2491The version of 2492.St -p1003.2 2493with which the system attempts to comply. 2494.It Li user.re_dup_max ( Dv USER_RE_DUP_MAX ) 2495The maximum number of repeated occurrences of a regular expression 2496permitted when using interval notation. 2497.It Li user.stream_max ( Dv USER_STREAM_MAX ) 2498The minimum maximum number of streams that a process may have open 2499at any one time. 2500.It Li user.tzname_max ( Dv USER_TZNAME_MAX ) 2501The minimum maximum number of types supported for the name of a 2502timezone. 2503.El 2504.Ss The vm.* subtree ( Dv CTL_VM ) 2505The string and integer information available for the 2506.Li vm 2507level is detailed below. 2508The changeable column shows whether a process with appropriate 2509privilege may change the value. 2510.Bl -column "Second level name" "struct uvmexp_sysctl" "Changeable" -offset indent 2511.It Sy Second level name Ta Sy Type Ta Sy Changeable 2512.It vm.anonmax int yes 2513.It vm.anonmin int yes 2514.It vm.bufcache int yes 2515.It vm.bufmem int no 2516.It vm.bufmem_hiwater int yes 2517.It vm.bufmem_lowater int yes 2518.It vm.execmax int yes 2519.It vm.execmin int yes 2520.It vm.filemax int yes 2521.It vm.filemin int yes 2522.It vm.loadavg struct loadavg no 2523.It vm.maxslp int no 2524.It vm.nkmempages int no 2525.It vm.uspace int no 2526.It vm.uvmexp struct uvmexp no 2527.It vm.uvmexp2 struct uvmexp_sysctl no 2528.It vm.vmmeter struct vmtotal no 2529.It vm.proc.map struct kinfo_vmentry no 2530.It vm.guard_size unsigned int no 2531.It vm.thread_guard_size unsigned int yes 2532.It vm.swap_encrypt bool yes 2533.El 2534.Bl -tag -width "123456" 2535.It Li vm.anonmax ( Dv VM_ANONMAX ) 2536The percentage of physical memory which will be reclaimed 2537from other types of memory usage to store anonymous application data. 2538.It Li vm.anonmin ( Dv VM_ANONMIN ) 2539The percentage of physical memory which will be always be available for 2540anonymous application data. 2541.It Li vm.bufcache ( Dv VM_BUFCACHE ) 2542The percentage of physical memory which will be available 2543for the buffer cache. 2544.It Li vm.bufmem ( Dv VM_BUFMEM ) 2545The amount of kernel memory that is being used by the buffer cache. 2546.It Li vm.bufmem_lowater ( Dv VM_BUFMEM_LOWATER ) 2547The minimum amount of kernel memory to reserve for the 2548buffer cache. 2549.It Li vm.bufmem_hiwater ( Dv VM_BUFMEM_HIWATER ) 2550The maximum amount of kernel memory to be used for the 2551buffer cache. 2552.It Li vm.execmax ( Dv VM_EXECMAX ) 2553The percentage of physical memory which will be reclaimed 2554from other types of memory usage to store cached executable data. 2555.It Li vm.execmin ( Dv VM_EXECMIN ) 2556The percentage of physical memory which will be always be available for 2557cached executable data. 2558.It Li vm.filemax ( Dv VM_FILEMAX ) 2559The percentage of physical memory which will be reclaimed 2560from other types of memory usage to store cached file data. 2561.It Li vm.filemin ( Dv VM_FILEMIN ) 2562The percentage of physical memory which will be always be available for 2563cached file data. 2564.It Li vm.loadavg ( Dv VM_LOADAVG ) 2565Return the load average history. 2566The returned data consists of a 2567.Vt struct loadavg . 2568.It Li vm.maxslp ( Dv VM_MAXSLP ) 2569The value of the maxslp kernel global variable. 2570.It Li vm.vmmeter ( Dv VM_METER ) 2571Return system wide virtual memory statistics. 2572The returned data consists of a 2573.Vt struct vmtotal . 2574.It vm.user_va0_disable 2575A flag which controls whether user processes can map virtual address\ 0. 2576.It Li vm.proc.map ( Dv VM_PROC ) 2577The third level is 2578.Dv VM_PROC_MAP , 2579the fourth is the pid of the process to display the vm object entries for, and 2580the fifth is the size of 2581.Vt struct kinfo_vmentry . 2582Returns an array of 2583.Vt struct kinfo_vmentry 2584objects. 2585.It Li vm.ubc_direct Bq Sy "EXPERIMENTAL" Ns No , default off 2586Use direct map for UBC I/O, avoiding need to map and unmap buffer memory. 2587Speeds up operation for fast I/O devices like NVMe, especially 2588on multi-CPU systems. 2589Only available on some architectures. 2590.It Li vm.uspace ( Dv VM_USPACE ) 2591The number of bytes allocated for each kernel stack. 2592.It Li vm.uvmexp ( Dv VM_UVMEXP ) 2593Return system wide virtual memory statistics. 2594The returned data consists of a 2595.Vt struct uvmexp . 2596.It Li vm.uvmexp2 ( Dv VM_UVMEXP2 ) 2597Return system wide virtual memory statistics. 2598The returned data consists of a 2599.Vt struct uvmexp_sysctl . 2600.It Li vm.guard_size 2601Return system wide guard size for the main thread of a program. 2602.It Li vm.thread_guard_size 2603Return system wide default size for the guard area of all other threads 2604of a program. 2605.It Li vm.swap_encrypt Bq Sy "EXPERIMENTAL" Ns No , default off 2606If true, encrypt data while swapped out to disk. 2607.Pp 2608Each swap device maintains an independent AES-256 key, generated when 2609the first page is swapped to that device. 2610Each page is swapped independently using AES-CBC, with an 2611initialization vector chosen by the encryption under the AES-256 key of 2612the little-endian swap slot number padded to 128 bits with zeros. 2613(This is essentially the 2614.Xr cgd 4 2615.Sq encblkno1 2616method.) 2617.Pp 2618Changes to 2619.Li vm.swap_encrypt 2620only affect pages of swap newly written out. 2621To force encrypting or decrypting all existing swap, or to rekey 2622previously encrypted swap, you can remove the swap devices and re-add 2623them with 2624.Xr swapctl 8 , 2625with the caveat that whatever pages were already written to disk 2626unencrypted or encrypted with a compromised key may still be written to 2627disk afterward. 2628.El 2629.Ss The ddb.* subtree ( Dv CTL_DDB ) 2630The information available for the 2631.Li ddb 2632level is detailed below. 2633The changeable column shows whether a process with appropriate 2634privilege may change the value. 2635.Bl -column "Second level name" "integer" "Changeable" -offset indent 2636.It Sy Second level name Ta Sy Type Ta Sy Changeable 2637.It ddb.commandonenter string yes 2638.It ddb.dumpstack integer yes 2639.It ddb.fromconsole integer yes 2640.It ddb.lines integer yes 2641.It ddb.maxoff integer yes 2642.It ddb.maxwidth integer yes 2643.It ddb.onpanic integer yes 2644.It ddb.panicstackframes integer yes 2645.It ddb.radix integer yes 2646.It ddb.tabstops integer yes 2647.It ddb.tee_msgbuf integer yes 2648.El 2649.Bl -tag -width "123456" 2650.It Li ddb.commandonenter 2651If not empty, the string is used as the DDB command to be executed each time 2652DDB is entered. 2653.It Li ddb.dumpstack 2654A value of 1 causes a stack trace to be printed on entering ddb from a panic. 2655A value of 0 disables this behaviour. 2656The default value is 1. 2657.It Li ddb.fromconsole ( Dv DDBCTL_FROMCONSOLE ) 2658If not zero, DDB may be entered by sending a break on a serial 2659console or by a special key sequence on a graphics console. 2660.It Li ddb.lines ( Dv DDBCTL_LINES ) 2661Number of display lines. 2662.It Li ddb.maxoff ( Dv DDBCTL_MAXOFF ) 2663The maximum symbol offset. 2664.It Li ddb.maxwidth ( Dv DDBCTL_MAXWIDTH ) 2665The maximum output line width. 2666.It Li ddb.onpanic ( Dv DDBCTL_ONPANIC ) 2667If greater than zero, DDB will be entered if the kernel panics. 2668A value of 1 causes the system to enter DDB on panic. 2669A value of 0 causes the kernel to attempt to print a stack trace, then 2670reboot, while a value of \-1 means neither a stack trace will be printed 2671nor DDB entered. 2672.It Li ddb.panicstackframes 2673Number of stack frames to display on panic. 2674Useful to avoid scrolling away the interesting frames on a glass tty. 2675Default value is 2676.Dv 65535 2677(all frames), useful value around 2678.Dv 10 . 2679.It Li ddb.radix ( Dv DDBCTL_RADIX ) 2680The input and output radix. 2681.It Li ddb.tabstops ( Dv DDBCTL_TABSTOPS ) 2682Tab width. 2683.It Li ddb.tee_msgbuf 2684If not zero, DDB will output also to the kernel message buffer. 2685.El 2686.Pp 2687Some of these MIB 2688nodes are also available as variables from within the debugger. 2689See 2690.Xr ddb 4 2691for more details. 2692.Ss The security.* subtree ( Dv CTL_SECURITY ) 2693The 2694.Li security 2695level contains various security-related settings for 2696the system. 2697The available second level names are: 2698.Bl -column "Second level name" "integer" "Changeable" -offset indent 2699.It Sy Second level name Ta Sy Type Ta Sy Changeable 2700.It Li security.curtain integer yes 2701.It Li security.models node not applicable 2702.It Li security.pax node not applicable 2703.El 2704.Pp 2705Available settings are detailed below. 2706.Bl -tag -width "123456" 2707.It Li security.curtain 2708If non-zero, will filter return objects according to the user ID 2709requesting information about them, preventing users from 2710accessing any objects they do not own. 2711.Pp 2712At the moment, it affects 2713.Xr ps 1 , 2714.Xr netstat 1 2715(for 2716.Dv PF_INET , 2717.Dv PF_INET6 , 2718and 2719.Dv PF_UNIX 2720PCBs), and 2721.Xr w 1 . 2722.It Li security.models 2723.Nx 2724supports pluggable security models. 2725Every security model used, whether if loaded as a module or built with the system, 2726is required to add an entry to this node with at least one element, 2727.Dq name , 2728indicating the name of the security model. 2729.Pp 2730In addition to the name, any settings and other information private to the 2731security model will be available under this node. 2732See 2733.Xr secmodel 9 2734for more information. 2735.It Li security.pax 2736Settings for PaX \(em exploit mitigation features. 2737For more information on any of the PaX features, please see 2738.Xr paxctl 8 2739and 2740.Xr security 7 . 2741The available third and fourth level names are: 2742.Bl -column "security.pax.segvguard.suspend_timeout" "integer" "Changeable" \ 2743-offset 2n 2744.It Sy Third and fourth level names Ta Sy Type Ta Sy Changeable 2745.It Li security.pax.aslr.enabled integer yes 2746.\".It Li security.pax.aslr.exec_len integer yes 2747.It Li security.pax.aslr.global integer yes 2748.\".It Li security.pax.aslr.mmap_len integer yes 2749.\".It Li security.pax.aslr.stack_len integer yes 2750.It Li security.pax.mprotect.enabled integer yes 2751.It Li security.pax.mprotect.global integer yes 2752.It Li security.pax.mprotect.ptrace integer yes 2753.It Li security.pax.segvguard.enabled integer yes 2754.It Li security.pax.segvguard.expiry_timeout integer yes 2755.It Li security.pax.segvguard.global integer yes 2756.It Li security.pax.segvguard.max_crashes integer yes 2757.It Li security.pax.segvguard.suspend_timeout integer yes 2758.El 2759.Bl -tag -width "123456" 2760.It Li security.pax.aslr.enabled 2761Enable PaX ASLR (Address Space Layout Randomization). 2762.Pp 2763The value of this 2764knob must be non-zero for PaX ASLR to be enabled, even if a program is set to 2765explicit enable. 2766.\".It Li security.pax.aslr.exec_len 2767.\" XXX: Undocumented. 2768.It Li security.pax.aslr.global 2769Specifies the default global policy for programs without an 2770explicit enable/disable flag. 2771.Pp 2772When non-zero, all programs will get PaX ASLR, except those exempted with 2773.Xr paxctl 8 . 2774Otherwise, all programs will not get PaX ASLR, except those specifically 2775marked as such with 2776.Xr paxctl 8 . 2777.\".It Li security.pax.aslr.mmap_len 2778.\" XXX: Undocumented. 2779.\" .It Li security.pax.aslr.stack_len 2780.\" XXX: Undocumented. 2781.It Li security.pax.mprotect.enabled 2782Enable PaX MPROTECT restrictions. 2783.Pp 2784These are 2785.Xr mprotect 2 2786restrictions to better enforce a W^X policy. 2787The value of this 2788knob must be non-zero for PaX MPROTECT to be enabled, even if a 2789program is set to explicit enable. 2790.It Li security.pax.mprotect.global 2791Specifies the default global policy for programs without an 2792explicit enable/disable flag. 2793.Pp 2794When non-zero, all programs will get the PaX MPROTECT restrictions, 2795except those exempted with 2796.Xr paxctl 8 . 2797Otherwise, all programs will not get the PaX MPROTECT restrictions, 2798except those specifically marked as such with 2799.Xr paxctl 8 . 2800.It Li security.pax.mprotect.ptrace 2801This variable allows 2802.Xr ptrace 2 2803to override PaX MPROTECT permissions. 2804It can have the following values: 2805.Bl -tag -width XX -compact 2806.It 0 2807Does not let override any permissions. 2808.It 1 2809Disables PaX MPROTECT from processes that start executing while traced (default). 2810.It 2 2811Bypasses PaX MPROTECT for all processes being traced. 2812.El 2813.It Li security.pax.segvguard.enabled 2814Enable PaX Segvguard. 2815.Pp 2816PaX Segvguard can detect and prevent certain exploitation attempts, where 2817an attacker may try for example to brute-force function return addresses 2818of respawning daemons. 2819.Pp 2820.Em Note : 2821The 2822.Nx 2823interface and implementation of the Segvguard is still experimental, and may 2824change in future releases. 2825.It Li security.pax.segvguard.expiry_timeout 2826If the max number was not reached within this timeout (in seconds), the entry 2827will expire. 2828.It Li security.pax.segvguard.global 2829Specifies the default global policy for programs without an 2830explicit enable/disable flag. 2831.Pp 2832When non-zero, all programs will get the PaX Segvguard, 2833except those exempted with 2834.Xr paxctl 8 . 2835Otherwise, no program will get the PaX Segvguard restrictions, 2836except those specifically marked as such with 2837.Xr paxctl 8 . 2838.It Li security.pax.segvguard.max_crashes 2839The maximum number of segfaults a program can receive before suspension. 2840.It Li security.pax.segvguard.suspend_timeout 2841Number of seconds to suspend a user from running a faulting program when the 2842limit was exceeded. 2843.El 2844.El 2845.Ss The vendor.* subtree ( Dv CTL_VENDOR ) 2846The 2847.Li vendor 2848toplevel name is reserved to be used by vendors who wish to 2849have their own private MIB tree. 2850Intended use is to store values under 2851.Dq vendor.<yourname>.* . 2852.Sh SEE ALSO 2853.Xr sysctl 3 , 2854.Xr ipsec 4 , 2855.Xr tcp 4 , 2856.Xr security 7 , 2857.Xr sysctl 8 2858.Sh HISTORY 2859The 2860.Nm 2861variables first appeared in 2862.Bx 4.4 . 2863