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