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