[BACK]Return to sysctl.7 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man7

Annotation of src/share/man/man7/sysctl.7, Revision 1.55

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

CVSweb <webmaster@jp.NetBSD.org>