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