xref: /netbsd-src/share/man/man7/sysctl.7 (revision d8c86e1768d8cd72bad35a1e286c24e1525f2159)
1*d8c86e17Sgutteridge.\"	$NetBSD: sysctl.7,v 1.167 2024/03/07 23:03:55 gutteridge Exp $
2edab7457Spavel.\"
3edab7457Spavel.\" Copyright (c) 1993
4edab7457Spavel.\"	The Regents of the University of California.  All rights reserved.
5edab7457Spavel.\"
6edab7457Spavel.\" Redistribution and use in source and binary forms, with or without
7edab7457Spavel.\" modification, are permitted provided that the following conditions
8edab7457Spavel.\" are met:
9edab7457Spavel.\" 1. Redistributions of source code must retain the above copyright
10edab7457Spavel.\"    notice, this list of conditions and the following disclaimer.
11edab7457Spavel.\" 2. Redistributions in binary form must reproduce the above copyright
12edab7457Spavel.\"    notice, this list of conditions and the following disclaimer in the
13edab7457Spavel.\"    documentation and/or other materials provided with the distribution.
14edab7457Spavel.\" 3. Neither the name of the University nor the names of its contributors
15edab7457Spavel.\"    may be used to endorse or promote products derived from this software
16edab7457Spavel.\"    without specific prior written permission.
17edab7457Spavel.\"
18edab7457Spavel.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19edab7457Spavel.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20edab7457Spavel.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21edab7457Spavel.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22edab7457Spavel.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23edab7457Spavel.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24edab7457Spavel.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25edab7457Spavel.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26edab7457Spavel.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27edab7457Spavel.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28edab7457Spavel.\" SUCH DAMAGE.
29edab7457Spavel.\"
30edab7457Spavel.\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
31edab7457Spavel.\"
32*d8c86e17Sgutteridge.Dd March 7, 2024
33edab7457Spavel.Dt SYSCTL 7
34edab7457Spavel.Os
35edab7457Spavel.Sh NAME
36edab7457Spavel.Nm sysctl
37edab7457Spavel.Nd system information variables
38edab7457Spavel.Sh DESCRIPTION
39edab7457SpavelThe
40edab7457Spavel.Xr sysctl 3
41edab7457Spavellibrary function and the
42edab7457Spavel.Xr sysctl 8
43edab7457Spavelutility are used to get and set values of system variables, maintained
44edab7457Spavelby the kernel.
45edab7457SpavelThe variables are organized in a tree and identified by a sequence of
46edab7457Spavelnumbers, conventionally separated by dots with the topmost identifier
47edab7457Spavelat the left side.
48edab7457SpavelThe numbers have corresponding text names.
49edab7457SpavelThe
50edab7457Spavel.Xr sysctlnametomib 3
51edab7457Spavelfunction or the
52edab7457Spavel.Fl M
53edab7457Spavelargument to the
54edab7457Spavel.Xr sysctl 8
55edab7457Spavelutility can be used to convert the text representation to the
56edab7457Spavelnumeric one.
57edab7457Spavel.Pp
58edab7457SpavelThe individual sysctl variables are described below, both the textual
59edab7457Spaveland numeric form where applicable.
60edab7457SpavelThe textual names can be used as argument to the
61edab7457Spavel.Xr sysctl 8
62edab7457Spavelutility and in the file
63edab7457Spavel.Pa /etc/sysctl.conf .
64edab7457SpavelThe numeric names are usually defined as preprocessor constants and
65edab7457Spavelare intended for use by programs.
66edab7457SpavelEvery such constant expands to one integer, which identifies the
67edab7457Spavelsysctl variable relative to the upper level of the tree.
68edab7457SpavelSee the
69edab7457Spavel.Xr sysctl 3
70edab7457Spavelmanual page for programming examples.
71a0585143Sjruoho.Ss Top level names
7210263f69SuweThe top level names are defined with a
7310263f69Suwe.Va CTL_
7410263f69Suweprefix in
755e015e5eSjoerg.In sys/sysctl.h ,
76edab7457Spaveland are as follows.
77edab7457SpavelThe next and subsequent levels down are found in the include files
78edab7457Spavellisted here, and described in separate sections below.
7910263f69Suwe.Bl -column "security" ".Dv CTL_SECURITY" ".In uvm/uvm_param.h" "High kernel limits"
8010263f69Suwe.It Sy Name  Ta Sy Constant     Ta Sy Next level names Ta Sy Description
8110263f69Suwe.It kern     Ta Dv CTL_KERN     Ta In sys/sysctl.h     Ta High kernel limits
8210263f69Suwe.It vm       Ta Dv CTL_VM       Ta In uvm/uvm_param.h  Ta Virtual memory
8310263f69Suwe.It vfs      Ta Dv CTL_VFS      Ta In sys/mount.h      Ta Filesystem
8410263f69Suwe.It net      Ta Dv CTL_NET      Ta In sys/socket.h     Ta Networking
8510263f69Suwe.It debug    Ta Dv CTL_DEBUG    Ta In sys/sysctl.h     Ta Debugging
8610263f69Suwe.It hw       Ta Dv CTL_HW       Ta In sys/sysctl.h     Ta Generic CPU, I/O
8710263f69Suwe.It machdep  Ta Dv CTL_MACHDEP  Ta In sys/sysctl.h     Ta Machine dependent
8810263f69Suwe.It user     Ta Dv CTL_USER     Ta In sys/sysctl.h     Ta User-level
8910263f69Suwe.It ddb      Ta Dv CTL_DDB      Ta In sys/sysctl.h     Ta In-kernel debugger
9010263f69Suwe.It proc     Ta Dv CTL_PROC     Ta In sys/sysctl.h     Ta Per-process
9110263f69Suwe.It vendor   Ta Dv CTL_VENDOR   Ta ?                   Ta Vendor specific
9210263f69Suwe.It emul     Ta Dv CTL_EMUL     Ta In sys/sysctl.h     Ta Emulation settings
9310263f69Suwe.It security Ta Dv CTL_SECURITY Ta In sys/sysctl.h     Ta Security settings
94edab7457Spavel.El
95a0585143Sjruoho.Ss The debug.* subtree
96edab7457SpavelThe debugging variables vary from system to system.
97edab7457SpavelA debugging variable may be added or deleted without need to recompile
98edab7457Spavel.Nm
99edab7457Spavelto know about it.
100edab7457SpavelEach time it runs,
101edab7457Spavel.Nm
102edab7457Spavelgets the list of debugging variables from the kernel and
103edab7457Spaveldisplays their current values.
104edab7457SpavelThe system defines twenty
10510263f69Suwe.Vt ( struct ctldebug )
106edab7457Spavelvariables named
107edab7457Spavel.Dv debug0
108edab7457Spavelthrough
109edab7457Spavel.Dv debug19 .
110edab7457SpavelThey are declared as separate variables so that they can be
111edab7457Spavelindividually initialized at the location of their associated variable.
112edab7457SpavelThe loader prevents multiple use of the same variable by issuing errors
113edab7457Spavelif a variable is initialized in more than one place.
114edab7457SpavelFor example, to export the variable
11510263f69Suwe.Va dospecialcheck
116edab7457Spavelas a debugging variable, the following declaration would be used:
11791d2b147Sjruoho.Pp
118edab7457Spavel.Bd -literal -offset indent -compact
119edab7457Spavelint dospecialcheck = 1;
12001869ca4Swizstruct ctldebug debug5 = { "dospecialcheck", &dospecialcheck };
121edab7457Spavel.Ed
122edab7457Spavel.Pp
123edab7457SpavelNote that the dynamic implementation of
124edab7457Spavel.Nm
125edab7457Spavelcurrently in use largely makes this particular
126edab7457Spavel.Nm
127edab7457Spavelinterface obsolete.
128edab7457SpavelSee
129edab7457Spavel.Xr sysctl 8
130edab7457Spavel.\" and
131edab7457Spavel.\" .Xr sysctl 9
132edab7457Spavelfor more information.
133a0585143Sjruoho.Ss The vfs.* subtree
134edab7457SpavelA distinguished second level name,
13517598373Skamil.Li vfs.generic ( Dv VFS_GENERIC ) ,
136edab7457Spavelis used to get general information about all file systems.
137fa3aa43aSeladIt has the following third level identifiers:
13810263f69Suwe.Bl -tag -width "123456"
13917598373Skamil.It Li vfs.generic.maxtypenum ( Dv VFS_MAXTYPENUM )
140fa3aa43aSeladThe highest valid file system type number.
14117598373Skamil.It Li vfs.generic.conf ( Dv VFS_CONF )
1423998b152SwizReturns configuration information about the file system type given as a fourth
143fa3aa43aSeladlevel identifier.
14417598373Skamil.It Li vfs.generic.usermount ( Dv VFS_USERMOUNT )
1456a953260SriastradhControls whether users other than the super-user can mount file
1466a953260Sriastradhsystems.
1476a953260SriastradhDefaults to
1486a953260Sriastradh.Li 0 ,
1496a953260Sriastradhso only the super-user can mount file systems.
1506a953260Sriastradh.Pp
1516a953260SriastradhFile systems mounted by unprivileged users must be mounted with the
1526a953260Sriastradh.Li nodev
1536a953260Sriastradhand
1546a953260Sriastradh.Li nosuid
1556a953260Sriastradh.Xr mount 8
1566a953260Sriastradhoptions.
15717598373Skamil.It Li vfs.generic.magiclinks ( Dv VFS_MAGICLINKS )
1586a953260SriastradhControls whether expansion of variables is going to be performed on
1596a953260Sriastradhpathnames or not.
1606a953260SriastradhDefaults to
1616a953260Sriastradh.Li 0 ,
1626a953260Sriastradhno variable expansion.
16308dbb1aaSchristosVariables are of the form
16408dbb1aaSchristos.Li @name
1659f6dc01cSchristosand the variables supported are described in
1669f6dc01cSchristos.Xr symlink 7
1679f6dc01cSchristosunder
1689f6dc01cSchristos.Dq "MAGIC SYMLINKS" .
169fa3aa43aSelad.El
170fa3aa43aSelad.Pp
171e58abe36SchristosA second level name for controlling the
172e58abe36Schristos.Xr wapbl 4
1736f8dc150Sandvar(Write Ahead Physical Block Logging file system journaling)
174e58abe36Schristoscapabilities with the following third level identifiers:
17510263f69Suwe.Bl -tag -width "123456"
17610263f69Suwe.It Li vfs.wapbl.flush_disk_cache
17750a0ea86SwizControls whether to attempt to flush the disk cache on each commit.
17892e9e572SapbIt defaults to 1 and it should always be on to ensure integrity
17992e9e572Sapbof file system metadata in the event of a power loss.
180e58abe36SchristosFor slow disks, turning it off can improve performance.
18110263f69Suwe.It Li vfs.wapbl.verbose_commit
18250a0ea86SwizFor each transaction log commit, print the number of bytes written
18350a0ea86Swizand the time it took to commit as seconds.nanoseconds.
184e58abe36Schristos.El
185e58abe36Schristos.Pp
1863998b152SwizThe remaining second level identifiers are the file system names, identified
187fa3aa43aSeladby the type number returned by a
188edab7457Spavel.Xr statvfs 2
189edab7457Spavelcall or from
190edab7457Spavel.Li vfs.generic.conf .
19110263f69Suwe.Pp
192edab7457SpavelThe third level identifiers available for each file system
193edab7457Spavelare given in the header file that defines the mount
194edab7457Spavelargument structure for that file system.
195a0585143Sjruoho.Ss The hw.* subtree
196edab7457SpavelThe string and integer information available for the
197edab7457Spavel.Li hw
198edab7457Spavellevel is detailed below.
199edab7457SpavelThe changeable column shows whether a process with appropriate
200edab7457Spavelprivilege may change the value.
2014b7c7ca1Sjruoho.Bl -column "hw.machine_arch" "integer" "Changeable" -offset indent
202aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
203edab7457Spavel.It hw.alignbytes	integer	no
204edab7457Spavel.It hw.byteorder	integer	no
205edab7457Spavel.It hw.cnmagic	string	yes
206edab7457Spavel.It hw.disknames	string	no
207edab7457Spavel.It hw.diskstats	struct	no
208edab7457Spavel.It hw.machine	string	no
209edab7457Spavel.It hw.machine_arch	string	no
210edab7457Spavel.It hw.model	string	no
211edab7457Spavel.It hw.ncpu	integer	no
212c038ed9dSnjoly.It hw.ncpuonline	integer	no
213edab7457Spavel.It hw.pagesize	integer	no
214edab7457Spavel.It hw.physmem	integer	no
215edab7457Spavel.It hw.physmem64	quad	no
216edab7457Spavel.It hw.usermem	integer	no
217edab7457Spavel.It hw.usermem64	quad	no
218edab7457Spavel.El
219edab7457Spavel.Bl -tag -width "123456"
22017598373Skamil.It Li hw.alignbytes ( Dv HW_ALIGNBYTES )
221edab7457SpavelAlignment constraint for all possible data types.
222edab7457SpavelThis shows the value
223edab7457Spavel.Dv ALIGNBYTES
224edab7457Spavelin
22510263f69Suwe.In machine/param.h ,
226edab7457Spavelat the kernel compilation time.
22717598373Skamil.It Li hw.byteorder ( Dv HW_BYTEORDER )
22810263f69SuweThe byteorder (4321, or 1234).
22917598373Skamil.It Li hw.cnmagic ( Dv HW_CNMAGIC )
230edab7457SpavelThe console magic key sequence.
23117598373Skamil.It Li hw.disknames ( Dv HW_DISKNAMES )
232edab7457SpavelThe list of (space separated) disk device names on the system.
23317598373Skamil.It Li hw.iostatnames ( Dv HW_IOSTATNAMES )
234edab7457SpavelA space separated list of devices that will have I/O statistics
235edab7457Spavelcollected on them.
23617598373Skamil.It Li hw.iostats ( Dv HW_IOSTATS )
237edab7457SpavelReturn statistical information on the NFS mounts, disk and tape
238edab7457Spaveldevices on the system.
239edab7457SpavelAn array of
24010263f69Suwe.Vt struct io_sysctl
241edab7457Spavelstructures is returned,
242edab7457Spavelwhose size depends on the current number of such objects in the system.
243edab7457SpavelThe third level name is the size of the
24410263f69Suwe.Vt struct io_sysctl .
245edab7457SpavelThe type of object can be determined by examining the
246edab7457Spavel.Va type
247edab7457Spavelelement of
24810263f69Suwe.Vt struct io_sysctl .
249edab7457SpavelWhich can be
250edab7457Spavel.Dv IOSTAT_DISK
251edab7457Spavel(disk drive),
252edab7457Spavel.Dv IOSTAT_TAPE
253edab7457Spavel(tape drive), or
254edab7457Spavel.Dv IOSTAT_NFS
255edab7457Spavel(NFS mount).
25617598373Skamil.It Li hw.machine ( Dv HW_MACHINE )
257edab7457SpavelThe machine class.
25817598373Skamil.It Li hw.machine_arch ( Dv HW_MACHINE_ARCH )
259edab7457SpavelThe machine CPU class.
26017598373Skamil.It Li hw.model ( Dv HW_MODEL )
261edab7457SpavelThe machine model.
26217598373Skamil.It Li hw.ncpu ( Dv HW_NCPU )
263c038ed9dSnjolyThe number of CPUs configured.
26417598373Skamil.It Li hw.ncpuonline ( Dv HW_NCPUONLINE )
265c038ed9dSnjolyThe number of CPUs online.
26617598373Skamil.It Li hw.pagesize ( Dv HW_PAGESIZE )
267edab7457SpavelThe software page size.
26817598373Skamil.It Li hw.physmem ( Dv HW_PHYSMEM )
269edab7457SpavelThe bytes of physical memory as a 32-bit integer.
27017598373Skamil.It Li hw.physmem64 ( Dv HW_PHYSMEM64 )
271edab7457SpavelThe bytes of physical memory as a 64-bit integer.
27217598373Skamil.It Li hw.usermem ( Dv HW_USERMEM )
273edab7457SpavelThe bytes of non-kernel memory as a 32-bit integer.
27417598373Skamil.It Li hw.usermem64 ( Dv HW_USERMEM64 )
275edab7457SpavelThe bytes of non-kernel memory as a 64-bit integer.
276edab7457Spavel.El
277a0585143Sjruoho.Ss The kern.* subtree
27891d2b147SjruohoThis subtree includes data generally related to the kernel.
279edab7457SpavelThe string and integer information available for the
280edab7457Spavel.Li kern
281edab7457Spavellevel is detailed below.
282edab7457SpavelThe changeable column shows whether a process with appropriate
283edab7457Spavelprivilege may change the value.
28491d2b147Sjruoho.Bl -column "kern.posix_reader_writer_locks" \
28591d2b147Sjruoho"struct kinfo_drivers" "not applicable"
286aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
28772795172Sjruoho.It kern.aio_listio_max	integer	yes
28872795172Sjruoho.It kern.aio_max	integer	yes
289b74a54b7Sjruoho.It kern.arandom	integer	no
290edab7457Spavel.It kern.argmax	integer	no
2919ee9f188Sjruoho.It kern.boothowto	integer	no
292c576beb7Skre.It kern.boottime	struct timespec	no
2937f8e46d6Sapb.It kern.buildinfo	string	no
2949ee9f188Sjruoho.\".It kern.bufq	node	not applicable
295edab7457Spavel.It kern.ccpu	integer	no
296edab7457Spavel.It kern.clockrate	struct clockinfo	no
297edab7457Spavel.It kern.consdev	integer	no
2989ee9f188Sjruoho.It kern.coredump	node	not applicable
299bcacc711Sjoerg.It kern.cp_id	struct	no
300bcacc711Sjoerg.It kern.cp_time	uint64_t[\|]	no
30175868060Sjruoho.It kern.cryptodevallowsoft	integer	yes
302edab7457Spavel.It kern.defcorename	string	yes
303e9ebdbdfSjruoho.It kern.detachall	integer	yes
304edab7457Spavel.It kern.domainname	string	yes
305edab7457Spavel.It kern.drivers	struct kinfo_drivers	no
3069ee9f188Sjruoho.It kern.dump_on_panic	integer	yes
307fc10b73eSchristos.It kern.expose_address	integer	yes
308edab7457Spavel.It kern.file	struct file	no
309edab7457Spavel.It kern.forkfsleep	integer	yes
310edab7457Spavel.It kern.fscale	integer	no
311edab7457Spavel.It kern.fsync	integer	no
312bcacc711Sjoerg.It kern.hardclock_ticks	integer	no
313ec44863eSriastradh.It kern.heartbeat.max_period	integer	yes
314edab7457Spavel.It kern.hostid	integer	yes
315edab7457Spavel.It kern.hostname	string	yes
316bcacc711Sjoerg.It kern.iov_max	integer	no
3179ee9f188Sjruoho.It kern.ipc	node	not applicable
318bcacc711Sjoerg.It kern.job_control	integer	no
319edab7457Spavel.It kern.labeloffset	integer	no
320edab7457Spavel.It kern.labelsector	integer	no
321bcacc711Sjoerg.It kern.login_name_max	integer	no
322edab7457Spavel.It kern.logsigexit	integer	yes
323ba1beab6Smaya.It kern.lwp	struct kinfo_lwp	yes
324bcacc711Sjoerg.It kern.mapped_files	integer	no
325edab7457Spavel.It kern.maxfiles	integer	yes
326679d94d8Schristos.It kern.maxlwp	integer	yes
327edab7457Spavel.It kern.maxpartitions	integer	no
328edab7457Spavel.It kern.maxphys	integer	no
329edab7457Spavel.It kern.maxproc	integer	yes
330edab7457Spavel.It kern.maxptys	integer	yes
331edab7457Spavel.It kern.maxvnodes	integer	yes
3327bdbb58bSpgoyette.It kern.messages	integer	yes
333edab7457Spavel.It kern.mbuf	node	not applicable
334edab7457Spavel.It kern.memlock	integer	no
335bcacc711Sjoerg.It kern.memlock_range	integer	no
336bcacc711Sjoerg.It kern.memory_protection	integer	no
337ce752138Sjruoho.It kern.module	node	not applicable
338bcacc711Sjoerg.It kern.monotonic_clock	integer	no
3397b03aec1Sjruoho.It kern.mqueue	node	not applicable
340edab7457Spavel.It kern.msgbuf	integer	no
341edab7457Spavel.It kern.msgbufsize	integer	no
342edab7457Spavel.It kern.ngroups	integer	no
343cd3f3658Sjruoho.\".It kern.no_sa_support	integer	yes
344edab7457Spavel.It kern.ntptime	struct ntptimeval	no
345edab7457Spavel.It kern.osrelease	string	no
3469ee9f188Sjruoho.It kern.osrevision	integer	no
347edab7457Spavel.It kern.ostype	string	no
348cd3f3658Sjruoho.\".It kern.panic_now	integer	yes
349edab7457Spavel.It kern.pipe	node	not applicable
350d0f3f689Sjoerg.It kern.pool	struct pool_sysctl	no
3519ee9f188Sjruoho.\" .It kern.posix	node	not applicable
3529ee9f188Sjruoho.It kern.posix1version	integer	no
35372795172Sjruoho.It kern.posix_aio	integer	no
354bcacc711Sjoerg.It kern.posix_barriers	integer	no
355bcacc711Sjoerg.It kern.posix_reader_writer_locks	integer	no
3569ee9f188Sjruoho.\".It kern.posix_sched	integer	yes
357bcacc711Sjoerg.It kern.posix_semaphores	integer	no
358bcacc711Sjoerg.It kern.posix_spin_locks	integer	no
359bcacc711Sjoerg.It kern.posix_threads	integer	no
360bcacc711Sjoerg.It kern.posix_timers	integer	no
361edab7457Spavel.It kern.proc	struct kinfo_proc	no
362edab7457Spavel.It kern.proc2	struct kinfo_proc2	no
363bcacc711Sjoerg.It kern.proc_args	string	no
3649ee9f188Sjruoho.It kern.profiling	node	not applicable
365cd3f3658Sjruoho.\".It kern.pset	node	not applicable
366edab7457Spavel.It kern.rawpartition	integer	no
367bcacc711Sjoerg.It kern.root_device	string	no
368bcacc711Sjoerg.It kern.root_partition	integer	no
369bcacc711Sjoerg.It kern.rtc_offset	integer	yes
370bcacc711Sjoerg.It kern.saved_ids	integer	no
3719ee9f188Sjruoho.It kern.sbmax	integer	yes
372a12c8506Shubertf.It kern.sched	node	not applicable
373edab7457Spavel.It kern.securelevel	integer	raise only
374b761783aSmlelstv.It kern.sofixedbuf	boolean	yes
3759ee9f188Sjruoho.It kern.somaxkva	integer	yes
3762d24b2e8Schristos.It kern.sooptions	integer	yes
377bcacc711Sjoerg.It kern.synchronized_io	integer	no
378981d8f83Schristos.It kern.timecounter	node	not applicable
379edab7457Spavel.It kern.timex	struct	no
380edab7457Spavel.It kern.tkstat	node	not applicable
381ed66ced6Schristos.It kern.tty	node	not applicable
382edab7457Spavel.It kern.urandom	integer	no
38388aba632Sjruoho.It kern.usercrypto	integer	yes
38488aba632Sjruoho.It kern.userasymcrypto	integer	yes
3859ee9f188Sjruoho.It kern.veriexec	node	not applicable
386edab7457Spavel.It kern.version	string	no
387edab7457Spavel.It kern.vnode	struct vnode	no
388edab7457Spavel.El
389edab7457Spavel.Bl -tag -width "123456"
39072795172Sjruoho.It Li kern.aio_listio_max
39185227de8SwizThe maximum number of asynchronous I/O operations in a single list
39285227de8SwizI/O call.
39372795172SjruohoLike with all variables related to
39472795172Sjruoho.Xr aio 3 ,
39572795172Sjruohothe variable may be created and removed dynamically
39672795172Sjruohoupon loading or unloading the corresponding kernel module.
39772795172Sjruoho.It Li kern.aio_max
39872795172SjruohoThe maximum number of asynchronous I/O operations.
399dc40b3d9Snia.It Li kern.arandom ( Dv KERN_ARND )
4003d1d29c8SriastradhReturns independent uniformly distributed bytes at random each time, as
4013d1d29c8Sriastradhmany as requested up to 256, derived from the system entropy pool; see
4023d1d29c8Sriastradh.Xr rnd 4 .
4033d1d29c8Sriastradh.Pp
4043d1d29c8SriastradhReading
4053d1d29c8Sriastradh.Li kern.arandom
4063d1d29c8Sriastradhis equivalent to reading up to 256 bytes at a time from
4073d1d29c8Sriastradh.Pa /dev/urandom :
4083d1d29c8Sriastradhreading
4093d1d29c8Sriastradh.Li kern.arandom
4103d1d29c8Sriastradhnever blocks, and once the system entropy pool has full entropy, output
4113d1d29c8Sriastradhsubsequently read from
4123d1d29c8Sriastradh.Li kern.arandom
4133d1d29c8Sriastradhis fit for use as cryptographic key material.
4143d1d29c8SriastradhFor example, the
4153d1d29c8Sriastradh.Xr arc4random 3
4163d1d29c8Sriastradhlibrary routine uses
4173d1d29c8Sriastradh.Li kern.arandom
4183d1d29c8Sriastradhinternally to seed a cryptographic pseudorandom number generator.
41917598373Skamil.It Li kern.argmax ( Dv KERN_ARGMAX )
420edab7457SpavelThe maximum bytes of argument to
421edab7457Spavel.Xr execve 2 .
4227ab65de0Sapb.It Li kern.boothowto
4237ab65de0SapbFlags passed from the boot loader; see
4247ab65de0Sapb.Xr reboot 2
4257ab65de0Sapbfor the meanings of the flags.
42617598373Skamil.It Li kern.boottime ( Dv KERN_BOOTTIME )
427edab7457SpavelA
428c576beb7Skre.Vt struct timespec
429edab7457Spavelstructure is returned.
430edab7457SpavelThis structure contains the time that the system was booted.
431c576beb7SkreThat time is defined (for this purpose) to be the time at
432c576beb7Skrewhich the kernel first started accumulating clock ticks.
433c8638169Spgoyette.It Li kern.bufq
434c8638169SpgoyetteThis variable contains information on the
435c8638169Spgoyette.Xr bufq 9
436c8638169Spgoyettesubsystem.
437c8638169SpgoyetteCurrently, the only third level name implemented is
438c8638169Spgoyette.Dv kern.bufq.strategies
439c8638169Spgoyettewhich provides a list of buffer queue strategies currently available.
4407f8e46d6Sapb.It Li kern.buildinfo
4417f8e46d6SapbWhen the kernel is built, the build environment may optionally provide
4427f8e46d6Sapbarbitrary information to be stored in this variable.
44317598373Skamil.It Li kern.ccpu ( Dv KERN_CCPU )
444edab7457SpavelThe scheduler exponential decay value.
44517598373Skamil.It Li kern.clockrate ( Dv KERN_CLOCKRATE )
446edab7457SpavelA
44710263f69Suwe.Vt struct clockinfo
448edab7457Spavelstructure is returned.
449edab7457SpavelThis structure contains the clock, statistics clock and profiling clock
450edab7457Spavelfrequencies, the number of micro-seconds per hz tick, and the clock
451edab7457Spavelskew rate.
45238cd37ceSjruohoRefer to
45338cd37ceSjruoho.Xr hz 9
45438cd37ceSjruohofor additional details.
45517598373Skamil.It Li kern.consdev ( Dv KERN_CONSDEV )
456edab7457SpavelConsole device.
4579ee9f188Sjruoho.It Li kern.coredump
4589ee9f188SjruohoSettings related to set-id processes coredumps.
4599ee9f188SjruohoBy default, set-id processes do not dump core in situations where
4609ee9f188Sjruohoother processes would.
4619ee9f188SjruohoThe settings in this node allows an administrator to change this
4629ee9f188Sjruohobehavior.
4639ee9f188Sjruoho.Pp
4649ee9f188SjruohoThe third level name is
4659ee9f188Sjruoho.Dv kern.coredump.setid
466809154f2Sjruohoand fourth level variables are described below.
467809154f2Sjruoho.Bl -column "kern.coredump.setid.group" "integer" "Changeable" -offset indent
468aca767b2Swiz.It Sy Fourth level name Ta Sy Type Ta Sy Changeable
469809154f2Sjruoho.It kern.coredump.setid.dump	integer	yes
470809154f2Sjruoho.It kern.coredump.setid.group	integer	yes
471809154f2Sjruoho.It kern.coredump.setid.mode	integer	yes
472809154f2Sjruoho.It kern.coredump.setid.owner	integer	yes
473809154f2Sjruoho.It kern.coredump.setid.path	string	yes
474809154f2Sjruoho.El
4759ee9f188Sjruoho.Bl -tag -width "123456"
4769ee9f188Sjruoho.It Li kern.coredump.setid.dump
4779ee9f188SjruohoIf non-zero, set-id processes will dump core.
4789ee9f188Sjruoho.It Li kern.coredump.setid.group
4799ee9f188SjruohoThe group-id for the set-id processes' coredump.
4809ee9f188Sjruoho.It Li kern.coredump.setid.mode
4819ee9f188SjruohoThe mode for the set-id processes' coredump.
4829ee9f188SjruohoSee
4839ee9f188Sjruoho.Xr chmod 1 .
4849ee9f188Sjruoho.It Li kern.coredump.setid.owner
4859ee9f188SjruohoThe user-id that will be used as the owner of the set-id processes'
4869ee9f188Sjruohocoredump.
4879ee9f188Sjruoho.It Li kern.coredump.setid.path
4889ee9f188SjruohoThe path to which set-id processes' coredumps will be saved to.
4899ee9f188SjruohoSame syntax as kern.defcorename.
4909ee9f188Sjruoho.El
49117598373Skamil.It Li kern.cp_id ( Dv KERN_CP_ID )
492edab7457SpavelMapping of CPU number to CPU id.
49317598373Skamil.It Li kern.cp_time ( Dv KERN_CP_TIME )
49410263f69SuweReturns an array of
49510263f69Suwe.Dv CPUSTATES
49610263f69Suwe.Vt uint64_t Ns s .
497edab7457SpavelThis array contains the
498edab7457Spavelnumber of clock ticks spent in different CPU states.
499edab7457SpavelOn multi-processor systems, the sum across all CPUs is returned unless
500edab7457Spavelappropriate space is given for one data set for each CPU.
501edab7457SpavelData for a specific CPU can also be obtained by adding the number of the
502edab7457SpavelCPU at the end of the MIB, enlarging it by one.
50375868060Sjruoho.It Li kern.cryptodevallowsoft
50475868060SjruohoThis variable controls userland access to hardware versus software transforms
50575868060Sjruohoin the
50675868060Sjruoho.Xr crypto 4
50775868060Sjruohosystem.
50875868060SjruohoThe available values are as follows:
509283d4512Swiz.Bl -tag -width XX0 -offset indent
51001869ca4Swiz.It Dv < 0
51175868060SjruohoAlways force userlevel requests to use software transforms.
51275868060Sjruoho.It Dv = 0
51375868060SjruohoIf present, use hardware and grant userlevel requests for
51475868060Sjruohonon-accelerated transforms (handling the latter in software).
51501869ca4Swiz.It Dv > 0
51675868060SjruohoAllow user requests only for transforms which are hardware-accelerated.
51775868060Sjruoho.El
51817598373Skamil.It Li kern.defcorename ( Dv KERN_DEFCORENAME )
519edab7457SpavelDefault template for the name of core dump files (see also
520edab7457Spavel.Li proc.pid.corename
521edab7457Spavelin the per-process variables
522edab7457Spavel.Li proc.* ,
523edab7457Spaveland
524edab7457Spavel.Xr core 5
525edab7457Spavelfor format of this template).
526edab7457SpavelThe default value is
52710263f69Suwe.Pa %n.core
528edab7457Spaveland can be changed with the kernel configuration option
529edab7457Spavel.Cd options DEFCORENAME
530edab7457Spavel(see
531edab7457Spavel.Xr options 4
532edab7457Spavel).
533e9ebdbdfSjruoho.It Li kern.detachall
534e9ebdbdfSjruohoDetach all devices at shutdown.
53517598373Skamil.It Li kern.domainname ( Dv KERN_DOMAINNAME )
536edab7457SpavelGet or set the YP domain name.
53717598373Skamil.It Li kern.drivers ( Dv KERN_DRIVERS )
538edab7457SpavelReturn an array of
53910263f69Suwe.Vt struct kinfo_drivers
540edab7457Spavelthat contains the name and major device numbers of all the device drivers
541edab7457Spavelin the current kernel.
542edab7457SpavelThe
543edab7457Spavel.Va d_name
544edab7457Spavelfield is always a NUL terminated string.
545edab7457SpavelThe
546edab7457Spavel.Va d_bmajor
547edab7457Spavelfield will be set to \-1 if the driver doesn't have a block device.
548fc10b73eSchristos.It Li kern.expose_address
549fc10b73eSchristosExpose kernel addresses in
550fc10b73eSchristos.Xr sysctl 3
551fc10b73eSchristoscalls used by
552fc10b73eSchristos.Xr fstat 1
553fc10b73eSchristosand
554fc10b73eSchristos.Xr sockstat 1 .
555dea54605SchristosIf it is set to
556dea54605Schristos.Dv 0
557dea54605Schristosaccess is not allowed.
558dea54605SchristosIf it is set to
559dea54605Schristos.Dv 1
560dea54605Schristosthen only processes that have opened
561dea54605Schristos.Pa /dev/kmem
562dea54605Schristoscan have access.
563dea54605SchristosIf it is set to
564dea54605Schristos.Dv 2
565dea54605Schristosevery process is allowed.
566fc10b73eSchristosDefaults to
567dea54605Schristos.Dv 0
568dea54605Schristosfor
569dea54605Schristos.Dv KASLR
570dea54605Schristoskernels
571dea54605Schristosand
572dea54605Schristos.Dv 1
573dea54605Schristosotherwise.
574dea54605SchristosAllowing general access renders KASLR ineffective; allowing only kmem
57549bf433eSwizaccessing programs weakens KASLR if those programs can be subverted
576dea54605Schristosto leak the addresses.
57717598373Skamil.It Li kern.dump_on_panic ( Dv KERN_DUMP_ON_PANIC )
578cd3f3658SjruohoPerform a crash dump on system
579cd3f3658Sjruoho.Xr panic 9 .
58017598373Skamil.It Li kern.file ( Dv KERN_FILE )
581edab7457SpavelReturn the entire file table.
582edab7457SpavelThe returned data consists of a single
58310263f69Suwe.Vt struct filelist
584edab7457Spavelfollowed by an array of
58510263f69Suwe.Vt struct file ,
586edab7457Spavelwhose size depends on the current number of such objects in the system.
58717598373Skamil.It Li kern.forkfsleep ( Dv KERN_FORKFSLEEP )
588edab7457SpavelIf
589edab7457Spavel.Xr fork 2
590edab7457Spavelsystem call fails due to limit on number of processes (either
591edab7457Spavelthe global maxproc limit or user's one), wait for this many
592edab7457Spavelmilliseconds before returning
593edab7457Spavel.Er EAGAIN
594edab7457Spavelerror to process.
595edab7457SpavelUseful to keep heavily forking runaway processes in bay.
596edab7457SpavelDefault zero (no sleep).
597edab7457SpavelMaximum is 20 seconds.
59817598373Skamil.It Li kern.fscale ( Dv KERN_FSCALE )
599edab7457SpavelThe kernel fixed-point scale factor.
60017598373Skamil.It Li kern.fsync ( Dv KERN_FSYNC )
6015cc9db89SwizReturn 1 if the
6025cc9db89Swiz.St -p1003.1b-93
6035cc9db89SwizFile Synchronization Option is available
604edab7457Spavelon this system,
60510263f69Suweotherwise\ 0.
60617598373Skamil.It Li kern.hardclock_ticks ( Dv KERN_HARDCLOCK_TICKS )
607edab7457SpavelReturns the number of
608edab7457Spavel.Xr hardclock 9
609edab7457Spavelticks.
610ec44863eSriastradh.It Li kern.heartbeat.max_period
611ec44863eSriastradhTime in seconds since the last
612ec44863eSriastradh.Cd options HEARTBEAT
613ec44863eSriastradhprogress check has passed before it will trigger a panic.
614ec44863eSriastradhSee
615ec44863eSriastradh.Xr options 4 .
616c09178b6Spgoyette.It Li kern.hist
617c09178b6SpgoyetteThis variable contains kernel history data if the kernel was
618c09178b6Spgoyetteconfigured for any of the options
619c09178b6Spgoyette.Dv UVHMIST ,
620c09178b6Spgoyette.Dv USB_DEBUG ,
621c09178b6Spgoyette.Dv BIOHIST ,
622c09178b6Spgoyetteor
623c09178b6Spgoyette.Dv SCDEBUG .
624c09178b6Spgoyette(See
625c09178b6Spgoyette.Xr options 4
626c09178b6Spgoyettefor more details.)
627c09178b6SpgoyetteThe third-level names correspond to each available history table.
628c09178b6SpgoyetteThe values of the history tables are in an internal format, and can be
629c09178b6Spgoyettedecoded by the
630c09178b6Spgoyette.Xr vmstat 1
631c09178b6Spgoyetteutility's
632dd61d2eeSwiz.Fl U
633c09178b6Spgoyetteand
634dd61d2eeSwiz.Fl u
635c09178b6Spgoyetteoptions;
636dd61d2eeSwizthe
637dd61d2eeSwiz.Fl l
638dd61d2eeSwizoption can be used to see which tables are available.
63917598373Skamil.It Li kern.hostid ( Dv KERN_HOSTID )
6409ee9f188SjruohoGet or set the host identifier.
6419ee9f188SjruohoThis is aimed to replace the legacy
6429ee9f188Sjruoho.Xr gethostid 3
6439ee9f188Sjruohoand
6449ee9f188Sjruoho.Xr sethostid 3
6459ee9f188Sjruohosystem calls.
64617598373Skamil.It Li kern.hostname ( Dv KERN_HOSTNAME )
6479ee9f188SjruohoGet or set the
6489ee9f188Sjruoho.Xr hostname 1 .
64917598373Skamil.It Li kern.iov_max ( Dv KERN_IOV_MAX )
650edab7457SpavelReturn the maximum number of
65110263f69Suwe.Vt iovec
652edab7457Spavelstructures that a process has available for use with
653edab7457Spavel.Xr preadv 2 ,
654edab7457Spavel.Xr pwritev 2 ,
655edab7457Spavel.Xr readv 2 ,
656edab7457Spavel.Xr recvmsg 2 ,
657edab7457Spavel.Xr sendmsg 2
658edab7457Spaveland
659edab7457Spavel.Xr writev 2 .
66017598373Skamil.It Li kern.ipc ( Dv KERN_SYSVIPC )
6619ee9f188SjruohoReturn information about the SysV IPC parameters.
6629ee9f188SjruohoThe third level names for the ipc variables are detailed below.
6639ee9f188Sjruoho.Bl -column "kern.ipc.shm_use_phys" "integer" "Changeable" -offset indent
664aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
6659ee9f188Sjruoho.It kern.ipc.sysvmsg	integer	no
6669ee9f188Sjruoho.It kern.ipc.sysvsem	integer	no
6679ee9f188Sjruoho.It kern.ipc.sysvshm	integer	no
6689ee9f188Sjruoho.It kern.ipc.sysvipc_info	struct	no
6699ee9f188Sjruoho.It kern.ipc.shmmax	integer	yes
6709ee9f188Sjruoho.It kern.ipc.shmmni	integer	yes
6719ee9f188Sjruoho.It kern.ipc.shmseg	integer	yes
6729ee9f188Sjruoho.It kern.ipc.shmmaxpgs	integer	yes
6739ee9f188Sjruoho.It kern.ipc.shm_use_phys	integer	yes
6749ee9f188Sjruoho.It kern.ipc.msgmni	integer	yes
6759ee9f188Sjruoho.It kern.ipc.msgseg	integer	yes
6769ee9f188Sjruoho.It kern.ipc.semmni	integer	yes
6779ee9f188Sjruoho.It kern.ipc.semmns	integer	yes
6789ee9f188Sjruoho.It kern.ipc.semmnu	integer	yes
6799ee9f188Sjruoho.El
6809ee9f188Sjruoho.Bl -tag -width "123456"
68117598373Skamil.It Li kern.ipc.sysvmsg ( Dv KERN_SYSVIPC_MSG )
6829ee9f188SjruohoReturns 1 if System V style message queue functionality is available
6839ee9f188Sjruohoon this system,
68410263f69Suweotherwise\ 0.
68517598373Skamil.It Li kern.ipc.sysvsem ( Dv KERN_SYSVIPC_SEM )
6869ee9f188SjruohoReturns 1 if System V style semaphore functionality is available
6879ee9f188Sjruohoon this system,
68810263f69Suweotherwise\ 0.
68917598373Skamil.It Li kern.ipc.sysvshm ( Dv KERN_SYSVIPC_SHM )
6909ee9f188SjruohoReturns 1 if System V style share memory functionality is available
6919ee9f188Sjruohoon this system,
69210263f69Suweotherwise\ 0.
69317598373Skamil.It Li kern.ipc.sysvipc_info ( Dv KERN_SYSVIPC_INFO )
6949ee9f188SjruohoReturn System V style IPC configuration and run-time information.
6959ee9f188SjruohoThe fourth level name selects the System V style IPC facility.
6969ee9f188Sjruoho.Bl -column "KERN_SYSVIPC_MSG_INFO" "struct shm_sysctl_info" -offset indent
697aca767b2Swiz.It Sy Fourth level name Ta Sy Type
6989ee9f188Sjruoho.It KERN_SYSVIPC_MSG_INFO	struct msg_sysctl_info
6999ee9f188Sjruoho.It KERN_SYSVIPC_SEM_INFO	struct sem_sysctl_info
7009ee9f188Sjruoho.It KERN_SYSVIPC_SHM_INFO	struct shm_sysctl_info
7019ee9f188Sjruoho.El
7029ee9f188Sjruoho.Bl -tag -width "123456"
7039ee9f188Sjruoho.It Li KERN_SYSVIPC_MSG_INFO
7049ee9f188SjruohoReturn information on the System V style message facility.
7059ee9f188SjruohoThe
7069ee9f188Sjruoho.Sy msg_sysctl_info
7079ee9f188Sjruohostructure is defined in
7089ee9f188Sjruoho.In sys/msg.h .
7099ee9f188Sjruoho.It Li KERN_SYSVIPC_SEM_INFO
7109ee9f188SjruohoReturn information on the System V style semaphore facility.
7119ee9f188SjruohoThe
7129ee9f188Sjruoho.Sy sem_sysctl_info
7139ee9f188Sjruohostructure is defined in
7149ee9f188Sjruoho.In sys/sem.h .
7159ee9f188Sjruoho.It Li KERN_SYSVIPC_SHM_INFO
7169ee9f188SjruohoReturn information on the System V style shared memory facility.
7179ee9f188SjruohoThe
7189ee9f188Sjruoho.Sy shm_sysctl_info
7199ee9f188Sjruohostructure is defined in
7209ee9f188Sjruoho.In sys/shm.h .
7219ee9f188Sjruoho.El
72217598373Skamil.It Li kern.ipc.shmmax ( Dv KERN_SYSVIPC_SHMMAX )
7239ee9f188SjruohoMax shared memory segment size in bytes.
72417598373Skamil.It Li kern.ipc.shmmni ( Dv KERN_SYSVIPC_SHMMNI )
7259ee9f188SjruohoMax number of shared memory identifiers.
72617598373Skamil.It Li kern.ipc.shmseg ( Dv KERN_SYSVIPC_SHMSEG )
7279ee9f188SjruohoMax shared memory segments per process.
72817598373Skamil.It Li kern.ipc.shmmaxpgs ( Dv KERN_SYSVIPC_SHMMAXPGS )
7299ee9f188SjruohoMax amount of shared memory in pages.
73017598373Skamil.It Li kern.ipc.shm_use_phys ( Dv KERN_SYSVIPC_SHMUSEPHYS )
7319ee9f188SjruohoLocking of shared memory in physical memory.
7329ee9f188SjruohoIf 0, memory can be swapped
7339ee9f188Sjruohoout, otherwise it will be locked in physical memory.
7349ee9f188Sjruoho.It Li kern.ipc.msgmni
7359ee9f188SjruohoMax number of message queue identifiers.
7369ee9f188Sjruoho.It Li kern.ipc.msgseg
7379ee9f188SjruohoMax number of number of message segments.
7389ee9f188Sjruoho.It Li kern.ipc.semmni
7399ee9f188SjruohoMax number of number of semaphore identifiers.
7409ee9f188Sjruoho.It Li kern.ipc.semmns
7419ee9f188SjruohoMax number of number of semaphores in system.
7429ee9f188Sjruoho.It Li kern.ipc.semmnu
7439ee9f188SjruohoMax number of undo structures in system.
7449ee9f188Sjruoho.El
74517598373Skamil.It Li kern.job_control ( Dv KERN_JOB_CONTROL )
74610263f69SuweReturn 1 if job control is available on this system, otherwise\ 0.
74717598373Skamil.It Li kern.labeloffset ( Dv KERN_LABELOFFSET )
74810263f69SuweThe offset within the sector specified by
74910263f69Suwe.Dv KERN_LABELSECTOR
75010263f69Suweof the
751edab7457Spavel.Xr disklabel 5 .
75217598373Skamil.It Li kern.labelsector ( Dv KERN_LABELSECTOR )
753edab7457SpavelThe sector number containing the
754edab7457Spavel.Xr disklabel 5 .
75517598373Skamil.It Li kern.login_name_max ( Dv KERN_LOGIN_NAME_MAX )
756edab7457SpavelThe size of the storage required for a login name, in bytes,
757edab7457Spavelincluding the terminating NUL.
75817598373Skamil.It Li kern.logsigexit ( Dv KERN_LOGSIGEXIT )
759edab7457SpavelIf this flag is non-zero, the kernel will
760edab7457Spavel.Xr log 9
761edab7457Spavelall process exits due to signals which create a
762edab7457Spavel.Xr core 5
763edab7457Spavelfile, and whether the coredump was created.
764ba1beab6Smaya.It Li kern.lwp ( Dv KERN_LWP )
765ba1beab6SmayaReturns information about the current light-weight process.
766ba1beab6SmayaThe
767ba1beab6Smaya.Sy kinfo_lwp
768ba1beab6Smayastructure is defined in
769ba1beab6Smaya.In sys/sysctl.h .
77017598373Skamil.It Li kern.mapped_files ( Dv KERN_MAPPED_FILES )
7715cc9db89SwizReturns 1 if the
7725cc9db89Swiz.St -p1003.1b-93
7735cc9db89SwizMemory Mapped Files Option is available on this system,
77410263f69Suweotherwise\ 0.
77517598373Skamil.It Li kern.maxfiles ( Dv KERN_MAXFILES )
776edab7457SpavelThe maximum number of open files that may be open in the system.
777e2a90e41SwizThis also controls the maximum file locks per unprivileged user
778e5ffdc00Smanuenforced by
779e2a90e41Swiz.Xr fcntl 2
780e5ffdc00Smanuand
781e5ffdc00Smanu.Xr flock 2 .
78217598373Skamil.It Li kern.maxpartitions ( Dv KERN_MAXPARTITIONS )
783edab7457SpavelThe maximum number of partitions allowed per disk.
784679d94d8Schristos.It Li kern.maxlwp
785679d94d8SchristosThe maximum number of Lightweight Processes (threads) the system allows
786679d94d8Schristosper uid.
78717598373Skamil.It Li kern.maxphys ( Dv KERN_MAXPHYS )
788edab7457SpavelMaximum raw I/O transfer size.
78917598373Skamil.It Li kern.maxproc ( Dv KERN_MAXPROC )
790edab7457SpavelThe maximum number of simultaneous processes the system will allow.
79117598373Skamil.It Li kern.maxptys ( Dv KERN_MAXPTYS )
792edab7457SpavelThe maximum number of pseudo terminals.
793edab7457SpavelThis value can be both raised and lowered, though it cannot
794edab7457Spavelbe set lower than number of currently used ptys.
795edab7457SpavelSee also
796edab7457Spavel.Xr pty 4 .
79717598373Skamil.It Li kern.maxvnodes ( Dv KERN_MAXVNODES )
798edab7457SpavelThe maximum number of vnodes available on the system.
7992e9e18c3SpgoyetteThis cannot be lowered below the number of currently active vnodes.
80017598373Skamil.It Li kern.mbuf ( Dv KERN_MBUF )
801edab7457SpavelReturn information about the mbuf control variables.
802edab7457SpavelMbufs are data structures which store network packets and other data
803edab7457Spavelstructures in the networking code, see
804edab7457Spavel.Xr mbuf 9 .
805edab7457SpavelThe third level names for the mbuf variables are detailed below.
806edab7457SpavelThe changeable column shows whether a process with appropriate
807edab7457Spavelprivilege may change the value.
808d4ee2468Smsaitoh.Bl -column "kern.mbuf.nmbclusters_limit" "integer" "Changeable" -offset indent
809aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
810edab7457Spavel.\" XXX Changeable? really?
811edab7457Spavel.It kern.mbuf.mblowat	integer	yes
812edab7457Spavel.It kern.mbuf.mclbytes	integer	yes
813edab7457Spavel.It kern.mbuf.mcllowat	integer	yes
814edab7457Spavel.It kern.mbuf.msize	integer	yes
815edab7457Spavel.It kern.mbuf.nmbclusters	integer	yes
816d4ee2468Smsaitoh.It kern.mbuf.nmbclusters_limit	integer	no
817edab7457Spavel.El
818edab7457Spavel.Pp
819edab7457SpavelThe variables are as follows:
820edab7457Spavel.Bl -tag -width "123456"
82117598373Skamil.It Li kern.mbuf.mblowat ( Dv MBUF_MBLOWAT )
822edab7457SpavelThe mbuf low water mark.
82317598373Skamil.It Li kern.mbuf.mclbytes ( Dv MBUF_MCLBYTES )
824edab7457SpavelThe mbuf cluster size.
82517598373Skamil.It Li kern.mbuf.mcllowat ( Dv MBUF_MCLLOWAT )
826edab7457SpavelThe mbuf cluster low water mark.
82717598373Skamil.It Li kern.mbuf.msize ( Dv MBUF_MSIZE )
828edab7457SpavelThe mbuf base size.
82917598373Skamil.It Li kern.mbuf.nmbclusters ( Dv MBUF_NMBCLUSTERS )
830edab7457SpavelThe limit on the number of mbuf clusters.
831edab7457SpavelThe variable can only be increased, and only increased on machines with
832edab7457Spaveldirect-mapped pool pages.
833d4ee2468Smsaitoh.It Li kern.mbuf.nmbclusters_limit ( Dv MBUF_NMBCLUSTERS_LIMIT )
834d4ee2468SmsaitohThe limit of nmbclusters.
835edab7457Spavel.El
83617598373Skamil.It Li kern.memlock ( Dv KERN_MEMLOCK )
8375cc9db89SwizReturns 1 if the
8385cc9db89Swiz.St -p1003.1b-93
8395cc9db89SwizProcess Memory Locking Option is available on this system,
84010263f69Suweotherwise\ 0.
84117598373Skamil.It Li kern.memlock_range ( Dv KERN_MEMLOCK_RANGE )
8425cc9db89SwizReturns 1 if the
8435cc9db89Swiz.St -p1003.1b-93
8445cc9db89SwizRange Memory Locking Option is available on this system,
84510263f69Suweotherwise\ 0.
84617598373Skamil.It Li kern.memory_protection ( Dv KERN_MEMORY_PROTECTION )
8475cc9db89SwizReturns 1 if the
8485cc9db89Swiz.St -p1003.1b-93
8495cc9db89SwizMemory Protection Option is available on this system,
85010263f69Suweotherwise\ 0.
8517bdbb58bSpgoyette.It Li kern.messages
8527bdbb58bSpgoyetteKernel console message verbosity.
8537bdbb58bSpgoyetteSee
8549f3dcb26Swiz.Aq Pa sys/reboot.h
8557bdbb58bSpgoyette.Bl -column "verbosity" "setting" -offset indent
8569f3dcb26Swiz.It Sy Value Ta Sy Verbosity Ta Sy sys/reboot.h equivalent
8579f3dcb26Swiz.It 0 Ta Silent Ta Sy AB_SILENT
8589f3dcb26Swiz.It 1 Ta Quiet Ta Sy AB_QUIET
8599f3dcb26Swiz.It 2 Ta Normal Ta Sy AB_NORMAL
8609f3dcb26Swiz.It 3 Ta Verbose Ta Sy AB_VERBOSE
8619f3dcb26Swiz.It 4 Ta Debug Ta Sy AB_DEBUG
8627bdbb58bSpgoyette.El
863ce752138Sjruoho.It Li kern.module
864ce752138SjruohoSettings related to kernel modules.
865ce752138SjruohoThe third level names for the settings are described below.
8667ce51081Sriastradh.Bl -column "kern.module.autounload_unsafe" "integer" "Changeable" -offset indent
867aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
868ce752138Sjruoho.It kern.module.autoload	integer	yes
8697ce51081Sriastradh.It kern.module.autounload_unsafe	integer	yes
87084f27a78Spgoyette.It kern.module.autotime	integer	yes
871bf5029f1Spgoyette.It kern.module.verbose	boolean	yes
872ce752138Sjruoho.El
873ce752138Sjruoho.Pp
874ce752138SjruohoThe variables are as follows:
8757ce51081Sriastradh.Bl -tag -width 6n
876ce752138Sjruoho.It Li kern.module.autoload
877ce752138SjruohoA boolean that controls whether kernel modules are loaded automatically.
8785c1e669bSjruohoSee
87991e230c6Sjruoho.Xr module 7
8807ce51081Sriastradhfor details.
8817ce51081Sriastradh.It Li kern.module.autounload_unsafe
8827ce51081SriastradhA boolean that controls whether the kernel will autounload modules that
8837ce51081Sriastradhwere automatically loaded and have not been audited for autounload.
8847ce51081Sriastradh.Pp
8857ce51081SriastradhBy default, only modules that have been audited will be autounloaded,
8867ce51081Sriastradhand only if they were autoloaded to begin with.
88784f27a78Spgoyette.It Li kern.module.autotime
88884f27a78SpgoyetteAn integer that controls the delay before an attempt is made to
889449f8939Swizautomatically unload a module that was auto-loaded.
890449f8939SwizSetting this value to zero disables the auto-unload function.
891ce752138Sjruoho.It Li kern.module.verbose
892ce752138SjruohoA boolean that enables or disables verbose
893ce752138Sjruohodebug messages related to kernel modules.
894ce752138Sjruoho.El
89517598373Skamil.It Li kern.monotonic_clock ( Dv KERN_MONOTONIC_CLOCK )
8965cc9db89SwizReturns the standard version the implementation of the
8975cc9db89Swiz.St -p1003.1b-93
8987b03aec1SjruohoMonotonic Clock Option conforms to,
89910263f69Suweotherwise\ 0.
900c28dcae1Sjruoho.It Li kern.mqueue
90185227de8SwizSettings related to POSIX message queues; see
902c28dcae1Sjruoho.Xr mqueue 3 .
903c28dcae1SjruohoThis node is created dynamically when
904c28dcae1Sjruohothe corresponding kernel module is loaded.
905c28dcae1SjruohoThe third level names for the settings are described below.
906c28dcae1Sjruoho.Bl -column "kern.mqueue.mq_max_msgsize" "integer" "Changeable" -offset indent
907aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
908c28dcae1Sjruoho.It kern.mqueue.mq_open_max	integer	yes
909c28dcae1Sjruoho.It kern.mqueue.mq_prio_max	integer	yes
910c28dcae1Sjruoho.It kern.mqueue.mq_max_msgsize	integer	yes
911c28dcae1Sjruoho.It kern.mqueue.mq_def_maxmsg	integer	yes
912c28dcae1Sjruoho.It kern.mqueue.mq_max_maxmsg	integer	yes
913c28dcae1Sjruoho.El
914c28dcae1Sjruoho.Pp
915c28dcae1SjruohoThe variables are:
916c28dcae1Sjruoho.Bl -tag -width "123456"
917c28dcae1Sjruoho.It Li kern.mqueue.mq_open_max
918c28dcae1SjruohoThe maximum number of message queue descriptors any single process can open.
919c28dcae1Sjruoho.It Li kern.mqueue.mq_prio_max
920c28dcae1SjruohoThe maximum priority of a message.
921c28dcae1Sjruoho.It Li kern.mqueue.mq_max_msgsize
922c28dcae1SjruohoThe maximum size of a message in a message queue.
923c28dcae1Sjruoho.It Li kern.mqueue.mq_def_maxmsg
924c28dcae1SjruohoThe default maximum message count.
925c28dcae1Sjruoho.It Li kern.mqueue.mq_max_maxmsg
926c28dcae1SjruohoThe maximum number of messages in a message queue.
927c28dcae1Sjruoho.El
92817598373Skamil.It Li kern.msgbuf ( Dv KERN_MSGBUF )
929edab7457SpavelThe kernel message buffer, rotated so that the head of the circular kernel
930edab7457Spavelmessage buffer is at the start of the returned data.
931edab7457SpavelThe returned data may contain NUL bytes.
93217598373Skamil.It Li kern.msgbufsize ( Dv KERN_MSGBUFSIZE )
933edab7457SpavelThe maximum number of characters that the kernel message buffer can hold.
93417598373Skamil.It Li kern.ngroups ( Dv KERN_NGROUPS )
935edab7457SpavelThe maximum number of supplemental groups.
936cd3f3658Sjruoho.\" .It Li kern.no_sa_support
937cd3f3658Sjruoho.\" XXX: Undocumented.
93817598373Skamil.It Li kern.ntptime ( Dv KERN_NTPTIME )
939edab7457SpavelA
94010263f69Suwe.Vt struct ntptimeval
941edab7457Spavelstructure is returned.
942edab7457SpavelThis structure contains data used by the
943edab7457Spavel.Xr ntpd 8
944edab7457Spavelprogram.
94517598373Skamil.It Li kern.osrelease ( Dv KERN_OSRELEASE )
946edab7457SpavelThe system release string.
94717598373Skamil.It Li kern.osrevision ( Dv KERN_OSREV )
94892ce9f6bSgutteridgeThe system revision, expressed as an integer.
94917598373Skamil.It Li kern.ostype ( Dv KERN_OSTYPE )
950edab7457SpavelThe system type string.
951cd3f3658Sjruoho.\".It Li kern.panic_now
952cd3f3658Sjruoho.\" XXX: Undocumented.
95317598373Skamil.It Li kern.pipe ( Dv KERN_PIPE )
954edab7457SpavelPipe settings.
955edab7457SpavelThe third level names for the  integer pipe settings is detailed below.
956edab7457SpavelThe changeable column shows whether a process with appropriate
957edab7457Spavelprivilege may change the value.
958bcacc711Sjoerg.Bl -column "kern.pipe.maxbigpipes" "integer" "Changeable" -offset indent
959aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
960edab7457Spavel.It kern.pipe.kvasiz	integer	yes
961edab7457Spavel.It kern.pipe.maxbigpipes	integer	yes
962edab7457Spavel.It kern.pipe.maxkvasz	integer	yes
963edab7457Spavel.It kern.pipe.limitkva	integer	yes
964edab7457Spavel.It kern.pipe.nbigpipes	integer	yes
965edab7457Spavel.El
966edab7457Spavel.Pp
967edab7457SpavelThe variables are as follows:
968edab7457Spavel.Bl -tag -width "123456"
96917598373Skamil.It Li kern.pipe.kvasiz ( Dv KERN_PIPE_KVASIZ )
970edab7457SpavelAmount of kernel memory consumed by pipe buffers.
97117598373Skamil.It Li kern.pipe.maxbigpipes ( Dv KERN_PIPE_MAXBIGPIPES )
97210263f69SuweMaximum number of
97310263f69Suwe.Dq big
97410263f69Suwepipes.
97517598373Skamil.It Li kern.pipe.maxkvasz ( Dv KERN_PIPE_MAXKVASZ )
976edab7457SpavelMaximum amount of kernel memory to be used for pipes.
97717598373Skamil.It Li kern.pipe.limitkva ( Dv KERN_PIPE_LIMITKVA )
978edab7457SpavelLimit for direct transfers via page loan.
97917598373Skamil.It Li kern.pipe.nbigpipes ( Dv KERN_PIPE_NBIGPIPES )
98010263f69SuweNumber of
98110263f69Suwe.Dq big
98210263f69Suwepipes.
983edab7457Spavel.El
984d0f3f689Sjoerg.It Li kern.pool
985d0f3f689SjoergProvides statistics about the
986d0f3f689Sjoerg.Xr pool 9
987d0f3f689Sjoergand
988d0f3f689Sjoerg.Xr pool_cache 9
989d0f3f689Sjoergsubsystems.
9909ee9f188Sjruoho.\" XXX: Undocumented .It Li kern.posix ( ? )
9919ee9f188Sjruoho.\"	 This is a node in which the only variable is semmax.
99217598373Skamil.It Li kern.posix1version ( Dv KERN_POSIX1 )
9935cc9db89SwizThe version of ISO/IEC 9945
9945cc9db89Swiz.Pq St -p1003.1
9955cc9db89Swizwith which the system attempts to comply.
99672795172Sjruoho.It Li kern.posix_aio
99772795172SjruohoThe version of
99872795172Sjruoho.St -p1003.1
99972795172Sjruohoand its Asynchronous I/O option to which the system attempts to conform.
100017598373Skamil.It Li kern.posix_barriers ( Dv KERN_POSIX_BARRIERS )
1001edab7457SpavelThe version of
1002edab7457Spavel.St -p1003.1
1003edab7457Spaveland its
1004edab7457SpavelBarriers
1005edab7457Spaveloption to which the system attempts to conform,
100610263f69Suweotherwise\ 0.
100717598373Skamil.It Li kern.posix_reader_writer_locks ( Dv KERN_POSIX_READER_WRITER_LOCKS )
1008edab7457SpavelThe version of
1009edab7457Spavel.St -p1003.1
1010edab7457Spaveland its
1011edab7457SpavelRead-Write Locks
1012edab7457Spaveloption to which the system attempts to conform,
101310263f69Suweotherwise\ 0.
1014cd3f3658Sjruoho.\".It Li kern.posix_sched
1015cd3f3658Sjruoho.\" XXX: Undocumented.
101617598373Skamil.It Li kern.posix_semaphores ( Dv KERN_POSIX_SEMAPHORES )
1017edab7457SpavelThe version of
1018edab7457Spavel.St -p1003.1
1019edab7457Spaveland its
1020edab7457SpavelSemaphores
1021edab7457Spaveloption to which the system attempts to conform,
102210263f69Suweotherwise\ 0.
102317598373Skamil.It Li kern.posix_spin_locks ( Dv KERN_POSIX_SPIN_LOCKS )
1024edab7457SpavelThe version of
1025edab7457Spavel.St -p1003.1
1026edab7457Spaveland its
1027edab7457SpavelSpin Locks
1028edab7457Spaveloption to which the system attempts to conform,
102910263f69Suweotherwise\ 0.
103017598373Skamil.It Li kern.posix_threads ( Dv KERN_POSIX_THREADS )
1031edab7457SpavelThe version of
1032edab7457Spavel.St -p1003.1
1033edab7457Spaveland its
1034edab7457SpavelThreads
1035edab7457Spaveloption to which the system attempts to conform,
103610263f69Suweotherwise\ 0.
103717598373Skamil.It Li kern.posix_timers ( Dv KERN_POSIX_TIMERS )
1038edab7457SpavelThe version of
1039edab7457Spavel.St -p1003.1
1040edab7457Spaveland its
1041edab7457SpavelTimers
1042edab7457Spaveloption to which the system attempts to conform,
104310263f69Suweotherwise\ 0.
104417598373Skamil.It Li kern.proc ( Dv KERN_PROC )
1045edab7457SpavelReturn the entire process table, or a subset of it.
1046edab7457SpavelAn array of
104710263f69Suwe.Vt struct kinfo_proc
1048edab7457Spavelstructures is returned,
1049edab7457Spavelwhose size depends on the current number of such objects in the system.
1050edab7457SpavelThe third and fourth level numeric names are as follows:
1051bcacc711Sjoerg.Bl -column "KERN_PROC_SESSION" "Fourth level is:" -offset indent
1052aca767b2Swiz.It Sy Third level name Ta Sy Fourth level is :
1053bcacc711Sjoerg.It KERN_PROC_ALL	None
1054bcacc711Sjoerg.It KERN_PROC_GID	A group ID
1055bcacc711Sjoerg.It KERN_PROC_PID	A process ID
1056bcacc711Sjoerg.It KERN_PROC_PGRP	A process group
1057bcacc711Sjoerg.It KERN_PROC_RGID	A real group ID
1058bcacc711Sjoerg.It KERN_PROC_RUID	A real user ID
1059bcacc711Sjoerg.It KERN_PROC_SESSION	A session ID
1060bcacc711Sjoerg.It KERN_PROC_TTY	A tty device
1061bcacc711Sjoerg.It KERN_PROC_UID	A user ID
1062edab7457Spavel.El
106317598373Skamil.It Li kern.proc2 ( Dv KERN_PROC2 )
106410263f69SuweAs for
106510263f69Suwe.Dv KERN_PROC ,
106610263f69Suwebut an array of
106710263f69Suwe.Vt struct kinfo_proc2
1068edab7457Spavelstructures are returned.
1069edab7457SpavelThe fifth level name is the size of the
107010263f69Suwe.Vt struct kinfo_proc2
1071edab7457Spaveland the sixth level name is the number of structures to return.
107217598373Skamil.It Li kern.proc_args ( Dv KERN_PROC_ARGS )
1073edab7457SpavelReturn the argv or environment strings (or the number thereof)
1074edab7457Spavelof a process.
1075edab7457SpavelMultiple strings are returned separated by NUL characters.
1076edab7457SpavelThe third level name is the process ID.
1077edab7457SpavelThe fourth level name is as follows:
1078701e13f6Schristos.Bl -column "KERN_PROG_PATHNAME" "The full pathname of the executable" -offset indent
1079369f64d0Swiz.It Dv KERN_PROC_ARGV	The argv strings
1080369f64d0Swiz.It Dv KERN_PROC_ENV	The environ strings
1081369f64d0Swiz.It Dv KERN_PROC_NARGV	The number of argv strings
1082369f64d0Swiz.It Dv KERN_PROC_NENV	The number of environ strings
1083701e13f6Schristos.It Dv KERN_PROC_PATHNAME	The full pathname of the executable
1084c006081aSkamil.It Dv KERN_PROC_CWD	The current working directory
1085edab7457Spavel.El
108617598373Skamil.It Li kern.profiling ( Dv KERN_PROF )
1087edab7457SpavelReturn profiling information about the kernel.
1088edab7457SpavelIf the kernel is not compiled for profiling,
108910263f69Suweattempts to retrieve any of the
109010263f69Suwe.Dv KERN_PROF
109110263f69Suwevalues will fail with
1092edab7457Spavel.Er EOPNOTSUPP .
1093edab7457SpavelThe third level names for the string and integer profiling information
1094edab7457Spavelis detailed below.
1095edab7457SpavelThe changeable column shows whether a process with appropriate
1096edab7457Spavelprivilege may change the value.
1097bcacc711Sjoerg.Bl -column "kern.profiling.gmonparam" "struct gmonparam" "Changeable" -offset indent
1098aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
1099edab7457Spavel.It kern.profiling.count	u_short[\|]	yes
1100edab7457Spavel.It kern.profiling.froms	u_short[\|]	yes
1101edab7457Spavel.It kern.profiling.gmonparam	struct gmonparam	no
1102edab7457Spavel.It kern.profiling.state	integer	yes
1103edab7457Spavel.It kern.profiling.tos	struct tostruct	yes
1104edab7457Spavel.El
1105edab7457Spavel.Pp
1106edab7457SpavelThe variables are as follows:
1107edab7457Spavel.Bl -tag -width "123456"
110817598373Skamil.It Li kern.profiling.count ( Dv GPROF_COUNT )
1109edab7457SpavelArray of statistical program counter counts.
111017598373Skamil.It Li kern.profiling.froms ( Dv GPROF_FROMS )
1111edab7457SpavelArray indexed by program counter of call-from points.
111217598373Skamil.It Li kern.profiling.gmonparams ( Dv GPROF_GMONPARAM )
1113edab7457SpavelStructure giving the sizes of the above arrays.
111417598373Skamil.It Li kern.profiling.state ( Dv GPROF_STATE )
1115edab7457SpavelProfiling state.
111610263f69SuweIf set to
111710263f69Suwe.Dv GMON_PROF_ON ,
111810263f69Suwestarts profiling.
111910263f69SuweIf set to
112010263f69Suwe.Dv GMON_PROF_OFF ,
112110263f69Suwestops profiling.
112217598373Skamil.It Li kern.profiling.tos ( Dv GPROF_TOS )
1123edab7457SpavelArray of
112410263f69Suwe.Vt struct tostruct
1125edab7457Spaveldescribing destination of calls and their counts.
1126edab7457Spavel.El
1127cd3f3658Sjruoho.\" .It Li kern.pset
1128cd3f3658Sjruoho.\" XXX: Undocumented.
112917598373Skamil.It Li kern.rawpartition ( Dv KERN_RAWPARTITION )
1130edab7457SpavelThe raw partition of a disk (a == 0).
113117598373Skamil.It Li kern.root_device ( Dv KERN_ROOT_DEVICE )
1132edab7457SpavelThe name of the root device (e.g.,
1133edab7457Spavel.Dq wd0 ) .
113417598373Skamil.It Li kern.root_partition ( Dv KERN_ROOT_PARTITION )
1135edab7457SpavelThe root partition on the root device (a == 0).
113617598373Skamil.It Li kern.rtc_offset ( Dv KERN_RTC_OFFSET )
1137edab7457SpavelReturn the offset of real time clock from UTC in minutes.
113817598373Skamil.It Li kern.saved_ids ( Dv KERN_SAVED_IDS )
1139edab7457SpavelReturns 1 if saved set-group and saved set-user ID is available.
114017598373Skamil.It Li kern.sbmax ( Dv KERN_SBMAX )
11412d24b2e8SchristosMaximum socket buffer size in bytes.
114217598373Skamil.It Li kern.securelevel ( Dv KERN_SECURELVL )
11431df96080SeladSee
11441df96080Selad.Xr secmodel_securelevel 9 .
1145a12c8506Shubertf.It Li kern.sched ( dynamic )
1146a12c8506ShubertfInfluence the scheduling of LWPs, their priorisation and how they are
1147a12c8506Shubertfdistributed on and moved between CPUs.
1148a12c8506Shubertf.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent
1149a12c8506Shubertf.It Sy Third level name	   Sy Type	 Sy Changeable
1150a12c8506Shubertf.It kern.sched.cacheht_time	   integer	 yes
1151a12c8506Shubertf.It kern.sched.balance_period	   integer	 yes
1152a12c8506Shubertf.It kern.sched.average_weight	   integer	 yes
1153a12c8506Shubertf.It kern.sched.min_catch	   integer	 yes
1154a12c8506Shubertf.It kern.sched.timesoftints	   integer	 yes
1155a12c8506Shubertf.It kern.sched.kpreempt_pri	   integer	 yes
1156a12c8506Shubertf.It kern.sched.upreempt_pri	   integer	 yes
1157a12c8506Shubertf.It kern.sched.maxts	   integer	 yes
1158a12c8506Shubertf.It kern.sched.mints	   integer	 yes
1159a12c8506Shubertf.It kern.sched.name	   string	 no
1160a12c8506Shubertf.It kern.sched.rtts	   integer	 no
1161a12c8506Shubertf.It kern.sched.pri_min	   integer	 no
1162a12c8506Shubertf.It kern.sched.pri_max	   integer	 no
1163a12c8506Shubertf.El
1164a12c8506Shubertf.Pp
1165a12c8506ShubertfThe variables are as follows:
1166a12c8506Shubertf.Bl -tag -width "123456"
1167a12c8506Shubertf.It Li kern.sched.cacheht_time ( dynamic )
1168a12c8506ShubertfCache hotness time in which a LWP is kept on one particular CPU
116940563d40Swizand not moved to another CPU.
117040563d40SwizThis reduces the overhead of flushing and reloading caches.
1171a12c8506ShubertfDefaults to 3ms.
1172a12c8506ShubertfNeeds to be given in
1173a12c8506Shubertf.Dq hz
1174a12c8506Shubertfunits, see
1175a12c8506Shubertf.Xr mstohz 9 .
1176a12c8506Shubertf.It Li kern.sched.balance_period ( dynamic )
1177a12c8506ShubertfInterval at which the CPU queues are checked for re-balancing.
1178a12c8506ShubertfDefaults to 300ms.
1179a12c8506ShubertfNeeds to be given in
1180a12c8506Shubertf.Dq hz
1181a12c8506Shubertfunits, see
1182a12c8506Shubertf.Xr mstohz 9 .
1183a12c8506Shubertf.It Li kern.sched.average_weight ( dynamic )
1184a12c8506ShubertfCan be used to influence how likely LWPs are to be migrated from
1185a12c8506Shubertfone CPU's queue of LWPs that are ready to run to a different, idle CPU.
1186a12c8506ShubertfThe value gives the percentage for weighting the average count of
1187a12c8506Shubertfmigratable threads from the past against the current number of
1188a12c8506Shubertfmigratable threads.
1189a12c8506ShubertfA small value gives more weight to the past, a larger values more weight
1190a12c8506Shubertfon the current situation.
1191a12c8506ShubertfDefaults to 50 and must be between 0 and 100.
1192a12c8506Shubertf.It Li kern.sched.min_catch ( dynamic )
11938194593fSmsaitohMinimum count of migratable (runnable) threads for catching (stealing)
1194a12c8506Shubertffrom another CPU.
1195a12c8506ShubertfDefaults to 1 but can be increased to decrease chance of thread
1196a12c8506Shubertfmigration between CPUs.
1197a12c8506Shubertf.It Li kern.sched.timesoftints ( dynamic )
1198a12c8506ShubertfEnable tracking of CPU time for soft interrupts
1199a12c8506Shubertfas part of a LWP's real execution time.
1200a12c8506ShubertfSet to a non-zero value to enable,
1201a12c8506Shubertfand see
1202a12c8506Shubertf.Xr ps 1
1203a12c8506Shubertffor printing CPU times.
1204a12c8506Shubertf.It Li kern.sched.kpreempt_pri ( dynamic )
1205a12c8506ShubertfMinimum priority to trigger kernel preemption.
1206a12c8506Shubertf.It Li kern.sched.upreempt_pri ( dynamic )
1207a12c8506ShubertfMinimum priority to trigger user preemption.
1208a12c8506Shubertf.It Li kern.sched.maxts ( dynamic )
1209a12c8506ShubertfScheduler specific maximal time quantum (in milliseconds).
1210a12c8506ShubertfMust be set to a value larger than
1211a12c8506Shubertf.Dq mints
1212a12c8506Shubertfand between 10 and
1213a12c8506Shubertf.Dq hz
1214a12c8506Shubertfas given by the
1215a12c8506Shubertf.Dv kern.clockrate
1216a12c8506Shubertfsysctl.
1217a12c8506ShubertfProvided by the M2 scheduler.
1218a12c8506Shubertf.It Li kern.sched.mints ( dynamic )
1219a12c8506ShubertfScheduler specific minimal time quantum (in milliseconds).
1220a12c8506ShubertfMust be set to a value smaller than
1221a12c8506Shubertf.Dq maxts
1222a12c8506Shubertfand between 1 and
1223a12c8506Shubertf.Dq hz
1224a12c8506Shubertfas given by the
1225a12c8506Shubertf.Dq kern.clockrate
1226a12c8506Shubertfsysctl.
1227a12c8506ShubertfProvided by the M2 scheduler.
1228a12c8506Shubertf.It Li kern.sched.name ( dynamic )
1229a12c8506ShubertfScheduler name.
1230a12c8506ShubertfProvided both by the M2 and the 4BSD scheduler.
1231a12c8506Shubertf.It Li kern.sched.rtts ( dynamic )
1232a12c8506ShubertfFixed scheduler specific round-robin time quantum in milliseconds.
1233a12c8506ShubertfProvided both by the M2 and the 4BSD scheduler.
1234a12c8506Shubertf.It Li kern.sched.pri_min ( dynamic )
1235a12c8506ShubertfMinimal POSIX real-time priority.
1236a12c8506ShubertfSee
1237a12c8506Shubertf.Xr sched 3 .
1238a12c8506Shubertf.It Li kern.sched.pri_max ( dynamic )
1239a12c8506ShubertfMaximal POSIX real-time priority.
1240a12c8506ShubertfSee
1241a12c8506Shubertf.Xr sched 3 .
1242a12c8506Shubertf.El
1243b761783aSmlelstv.It Li kern.sofixedbuf ( Dv KERN_SOFIXEDBUF )
1244ab745affSwizPrevent socket buffer autoscaling when a size is set with
1245ab745affSwiz.Dv SO_SNDBUF
1246ab745affSwizor
1247ab745affSwiz.Dv SO_RCVBUF .
124817598373Skamil.It Li kern.somaxkva ( Dv KERN_SOMAXKVA )
12492d24b2e8SchristosMaximum amount of kernel memory to be used for socket buffers in bytes.
12502d24b2e8Schristos.It Li kern.sooptions
12512d24b2e8SchristosSet the default socket option flags for
12522d24b2e8Schristos.Xr socket 2
12532d24b2e8Schristoscreation.
12542d24b2e8SchristosSee
12552d24b2e8Schristos.Xr setsockopt 2
12562d24b2e8Schristosfor a list of supported flags.
125717598373Skamil.It Li kern.synchronized_io ( Dv KERN_SYNCHRONIZED_IO )
12585cc9db89SwizReturns 1 if the
12595cc9db89Swiz.St -p1003.1b-93
12605cc9db89SwizSynchronized I/O Option is available on this system,
126110263f69Suweotherwise\ 0.
1262981d8f83Schristos.It Li kern.timecounter ( dynamic )
1263981d8f83SchristosDisplay and control the timecounter source of the system.
1264bcacc711Sjoerg.Bl -column "kern.timecounter.timestepwarnings" "integer" "Changeable" -offset indent
1265aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
1266981d8f83Schristos.It kern.timecounter.choice	string	no
1267981d8f83Schristos.It kern.timecounter.hardware	string	yes
1268981d8f83Schristos.It kern.timecounter.timestepwarnings	integer	yes
1269981d8f83Schristos.El
1270981d8f83Schristos.Pp
1271981d8f83SchristosThe variables are as follows:
1272981d8f83Schristos.Bl -tag -width "123456"
1273981d8f83Schristos.It Li kern.timecounter.choice ( dynamic )
1274981d8f83SchristosThe list of available timecounters with their quality and frequency.
1275981d8f83Schristos.It Li kern.timecounter.hardware ( dynamic )
1276981d8f83SchristosThe currently selected timecounter source.
1277981d8f83Schristos.It Li kern.timecounter.timestepwarnings ( dynamic )
1278981d8f83SchristosIf non-zero display a message each time the time is stepped.
1279981d8f83Schristos.El
128017598373Skamil.It Li kern.timex ( Dv KERN_TIMEX )
1281edab7457SpavelNot available.
128217598373Skamil.It Li kern.tkstat ( Dv KERN_TKSTAT )
1283edab7457SpavelReturn information about the number of characters sent and received
1284edab7457Spavelon ttys.
1285edab7457SpavelThe third level names for the tty statistic variables are detailed below.
1286edab7457SpavelThe changeable column shows whether a process
1287edab7457Spavelwith appropriate privilege may change the value.
1288bcacc711Sjoerg.Bl -column "kern.tkstat.cancc" "quad" "Changeable" -offset indent
1289aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
1290edab7457Spavel.It kern.tkstat.cancc	quad	no
1291edab7457Spavel.It kern.tkstat.nin	quad	no
1292edab7457Spavel.It kern.tkstat.nout	quad	no
1293edab7457Spavel.It kern.tkstat.rawcc	quad	no
1294edab7457Spavel.El
1295edab7457Spavel.Pp
1296edab7457SpavelThe variables are as follows:
1297edab7457Spavel.Bl -tag -width "123456"
129817598373Skamil.It Li kern.tkstat.cancc ( Dv KERN_TKSTAT_CANCC )
1299edab7457SpavelThe number of canonical input characters.
130017598373Skamil.It Li kern.tkstat.nin ( Dv KERN_TKSTAT_NIN )
1301edab7457SpavelThe total number of input characters.
130217598373Skamil.It Li kern.tkstat.nout ( Dv KERN_TKSTAT_NOUT )
1303edab7457SpavelThe total number of output characters.
130417598373Skamil.It Li kern.tkstat.rawcc ( Dv KERN_TKSTAT_RAWCC )
1305edab7457SpavelThe number of raw input characters.
1306edab7457Spavel.El
1307ed66ced6Schristos.It Li kern.tty
1308ed66ced6SchristosThe third level names for the tty setup variables are detailed below.
1309ed66ced6SchristosThe changeable column shows whether a process
1310ed66ced6Schristoswith appropriate privilege may change the value.
1311ed66ced6Schristos.Bl -column "kern.tty.qsize" "int" "Changeable" -offset indent
1312aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
1313ed66ced6Schristos.It kern.tty.qsize	int	yes
1314ed66ced6Schristos.El
1315ed66ced6Schristos.Pp
1316ed66ced6SchristosThe variables are as follows:
1317ed66ced6Schristos.Bl -tag -width "123456"
1318ed66ced6Schristos.It Li kern.tty.qsize
1319ed66ced6SchristosControl/display the size of the default input and output queues selected
1320ed66ced6Schristosduring tty creation.
1321ed66ced6SchristosIs converted to a power of two and its range is between
1322ed66ced6Schristos.Dv 1024
1323ed66ced6Schristosand
1324ed66ced6Schristos.Dv 65536 .
1325ed66ced6Schristos.El
1326679d94d8Schristos.It Li kern.uidinfo
1327679d94d8SchristosResource usage for the current user.
1328679d94d8Schristos.Bl -column "kern.uidinfo.proccnt" "integer" "Changeable" -offset indent
1329aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
1330679d94d8Schristos.It kern.uidinfo.proccnt	integer	no
1331679d94d8Schristos.It kern.uidinfo.lwpcnt	integer	no
1332679d94d8Schristos.It kern.uidinfo.lockcnt	integer	no
133380f21430Schristos.It kern.uidinfo.semcnt	integer	no
1334679d94d8Schristos.It kern.uidinfo.sbsize	integer	no
1335679d94d8Schristos.El
1336679d94d8Schristos.Bl -tag -width "123456"
1337679d94d8Schristos.It Li kern.uidinfo.proccnt
1338679d94d8SchristosReturns the number of active processes for the current user.
1339679d94d8Schristos.It Li kern.uidinfo.lwpcnt
1340679d94d8SchristosReturns the number of active threads for the current user; the first thread
1341679d94d8Schristosof each process is not counted.
1342679d94d8Schristos.It Li kern.uidinfo.lockcnt
1343679d94d8SchristosNumber of locks held by the current user.
134480f21430Schristos.It Li kern.uidinfo.semcnt
134580f21430SchristosNumber of semaphores held by the current user.
1346679d94d8Schristos.It Li kern.uidinfo.sbsize
1347679d94d8SchristosNumber of bytes in socket buffers allocated to the current user.
1348679d94d8Schristos.El
134917598373Skamil.It Li kern.urandom ( Dv KERN_URND )
1350edab7457SpavelRandom integer value.
135188aba632Sjruoho.It Li kern.usercrypto
135288aba632SjruohoWhen enabled, allows userland to
135388aba632Sjruoho.Xr open 2
135488aba632Sjruohothe
135588aba632Sjruoho.Pa /dev/crypto
135688aba632Sjruohospecial device, used by the
135788aba632Sjruoho.Xr crypto 4
135888aba632Sjruohosystem.
135988aba632Sjruoho.It Li kern.userasymcrypto
136088aba632SjruohoEnables or disables the use of software asymmetric crypto support in the
136188aba632Sjruoho.Xr crypto 4
136288aba632Sjruohosystem.
1363edab7457Spavel.It Li kern.veriexec
1364809154f2SjruohoRuntime information for
1365809154f2Sjruoho.Xr veriexec 8 .
1366809154f2Sjruoho.Bl -column "kern.veriexec.algorithms" "integer" "Changeable" -offset indent
1367aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
1368809154f2Sjruoho.It kern.veriexec.algorithms	string	no
1369809154f2Sjruoho.It kern.veriexec.count	node	not applicable
1370809154f2Sjruoho.It kern.veriexec.strict	integer	yes
1371809154f2Sjruoho.It kern.veriexec.verbose	integer	yes
1372809154f2Sjruoho.El
1373edab7457Spavel.Bl -tag -width "123456"
1374edab7457Spavel.It Li kern.veriexec.algorithms
1375edab7457SpavelReturns a string with the supported algorithms in Veriexec.
1376edab7457Spavel.It Li kern.veriexec.count
1377edab7457SpavelSub-nodes are added to this node as new mounts are monitored by Veriexec.
1378edab7457SpavelEach mount will be under its own
1379edab7457Spavel.No tableN
1380edab7457Spavelnode.
1381edab7457SpavelUnder each node there will be three variables, indicating the mount
13823998b152Swizpoint, the file system type, and the number of entries.
1383edab7457Spavel.It Li kern.veriexec.strict
1384edab7457SpavelControls the strict level of Veriexec.
1385edab7457SpavelSee
13860ad14641Sjruoho.Xr security 7
1387edab7457Spavelfor more information on each level's implications.
1388edab7457Spavel.It Li kern.veriexec.verbose
1389edab7457SpavelControls the verbosity level of Veriexec.
1390edab7457SpavelIf 0, only the minimal
1391edab7457Spavelindication required will be given about what's happening - fingerprint
1392edab7457Spavelmismatches, removal of entries from the tables, modification of a
1393edab7457Spavelfingerprinted file.
1394edab7457SpavelIf 1, more messages will be printed (ie., when a file with a valid
1395edab7457Spavelfingerprint is accessed).
1396edab7457SpavelVerbose level 2 is debug mode.
1397edab7457Spavel.El
139817598373Skamil.It Li kern.version ( Dv KERN_VERSION )
1399edab7457SpavelThe system version string.
140017598373Skamil.It Li kern.vnode ( Dv KERN_VNODE )
1401edab7457SpavelReturn the entire vnode table.
1402edab7457SpavelNote, the vnode table is not necessarily a consistent snapshot of
1403edab7457Spavelthe system.
1404edab7457SpavelThe returned data consists of an array whose size depends on the
1405edab7457Spavelcurrent number of such objects in the system.
1406edab7457SpavelEach element of the array contains the kernel address of a vnode
140710263f69Suwe.Vt struct vnode *
1408edab7457Spavelfollowed by the vnode itself
140910263f69Suwe.Vt struct vnode .
1410edab7457Spavel.El
1411a0585143Sjruoho.Ss The machdep.* subtree
1412edab7457SpavelThe set of variables defined is architecture dependent.
1413edab7457SpavelMost architectures define at least the following variables.
141491d2b147Sjruoho.Bl -column "machdep.booted_kernel" "Type" "Changeable" -offset indent
1415aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
141691d2b147Sjruoho.It Li machdep.booted_kernel	string	no
1417edab7457Spavel.El
141891d2b147Sjruoho.\" XXX: Document the above.
1419a0585143Sjruoho.Ss The net.* subtree
1420edab7457SpavelThe string and integer information available for the
1421edab7457Spavel.Li net
1422edab7457Spavellevel is detailed below.
1423edab7457SpavelThe changeable column shows whether a process with appropriate
1424edab7457Spavelprivilege may change the value.
1425edab7457SpavelThe second and third levels are typically the protocol family and
1426edab7457Spavelprotocol number, though this is not always the case.
1427bcacc711Sjoerg.Bl -column "Second level name" "IPsec key management values" "Changeable" -offset indent
1428aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
1429edab7457Spavel.It net.route	routing messages	no
1430edab7457Spavel.It net.inet	IPv4 values	yes
1431edab7457Spavel.It net.inet6	IPv6 values	yes
1432edab7457Spavel.It net.key	IPsec key management values	yes
1433edab7457Spavel.El
1434edab7457Spavel.Bl -tag -width "123456"
143517598373Skamil.It Li net.route ( Dv PF_ROUTE )
1436edab7457Spavel.\" XXX really?
1437edab7457SpavelReturn the entire routing table or a subset of it.
1438edab7457SpavelThe data is returned as a sequence of routing messages (see
1439edab7457Spavel.Xr route 4
1440edab7457Spavelfor the header file, format and meaning).
1441edab7457SpavelThe length of each message is contained in the message header.
1442edab7457Spavel.Pp
144310263f69SuweThe third level name is a protocol number, which is currently always\ 0.
1444edab7457SpavelThe fourth level name is an address family, which may be set to 0 to
1445edab7457Spavelselect all address families.
1446edab7457SpavelThe fifth and sixth level names are as follows:
1447bcacc711Sjoerg.Bl -column "Fifth level name" "Sixth level is:" -offset indent
1448aca767b2Swiz.It Sy Fifth level name Ta Sy Sixth level is :
1449bcacc711Sjoerg.It NET_RT_FLAGS	rtflags
1450bcacc711Sjoerg.It NET_RT_DUMP	None
1451bcacc711Sjoerg.It NET_RT_IFLIST	None
1452edab7457Spavel.El
145317598373Skamil.It Li net.inet ( Dv PF_INET )
1454edab7457SpavelGet or set various global information about the IPv4
1455edab7457Spavel.Pq Internet Protocol version 4 .
1456edab7457SpavelThe third level name is the protocol.
1457edab7457SpavelThe fourth level name is the variable name.
1458edab7457SpavelThe currently defined protocols and names are:
1459369f64d0Swiz.Bl -column "Protocol" "anonportalgo.available" "integer" "Changeable" -offset indent
1460aca767b2Swiz.It Sy Protocol	Variable Ta Sy Type Ta Sy Changeable
1461f9cd9ecdSroy.It arp	nd_delay	integer	yes
1462f9cd9ecdSroy.It arp	nd_bmaxtries	integer	yes
1463f9cd9ecdSroy.It arp	nd_umaxtries	integer	yes
1464f9cd9ecdSroy.It arp	nd_basereachable	integer	yes
1465f9cd9ecdSroy.It arp	nd_retrans	integer	yes
1466f9cd9ecdSroy.It arp	nd_nud		integer	yes
1467f9cd9ecdSroy.It arp	nd_maxnudhint	integer	yes
14680aa57dbbSchristos.It arp	log_movements	integer	yes
14690aa57dbbSchristos.It arp	log_permanent_modify	integer	yes
1470d60f5081Schristos.It arp	log_unknown_network	integer	yes
14710aa57dbbSchristos.It arp	log_wrong_iface	integer	yes
1472edab7457Spavel.It carp	allow	integer	yes
1473edab7457Spavel.It carp	preempt	integer	yes
1474edab7457Spavel.It carp	log	integer	yes
1475edab7457Spavel.It carp	arpbalance	integer	yes
1476edab7457Spavel.It icmp	errppslimit	integer	yes
1477edab7457Spavel.It icmp	maskrepl	integer	yes
1478edab7457Spavel.It icmp	rediraccept	integer	yes
1479edab7457Spavel.It icmp	redirtimeout	integer	yes
1480adf7e471Schristos.It icmp	bmcastecho	integer	yes
14819362ee0dSknakahara.It icmp	dynamic_rt_msg	boolean	yes
1482edab7457Spavel.It ip	allowsrcrt	integer	yes
148340114b99Schristos.It ip 	anonportalgo.selected	string	yes
148440114b99Schristos.It ip 	anonportalgo.available	string	yes
1485b7bac3aaSchristos.It ip 	anonportalgo.reserve	struct	yes
1486edab7457Spavel.It ip	anonportmax	integer	yes
1487edab7457Spavel.It ip	anonportmin	integer	yes
1488edab7457Spavel.It ip	checkinterface	integer	yes
148959e4c4e0Sroy.It ip	dad_count	integer	yes
1490edab7457Spavel.It ip	directed-broadcast	integer	yes
1491edab7457Spavel.It ip	do_loopback_cksum	integer	yes
1492edab7457Spavel.It ip	forwarding	integer	yes
1493edab7457Spavel.It ip	forwsrcrt	integer	yes
1494edab7457Spavel.It ip	gifttl	integer	yes
1495edab7457Spavel.It ip	grettl	integer	yes
149628ed4dc8Sliamjfoy.It ip	hashsize	integer	yes
1497edab7457Spavel.It ip	hostzerobroadcast	integer	yes
1498edab7457Spavel.It ip	lowportmin	integer	yes
1499edab7457Spavel.It ip	lowportmax	integer	yes
1500edab7457Spavel.It ip	maxflows	integer	yes
1501edab7457Spavel.It ip	maxfragpackets	integer	yes
1502edab7457Spavel.It ip	mtudisc	integer	yes
1503edab7457Spavel.It ip	mtudisctimeout	integer	yes
1504edab7457Spavel.It ip	random_id	integer	yes
1505edab7457Spavel.It ip	redirect	integer	yes
1506edab7457Spavel.It ip	subnetsarelocal	integer	yes
1507edab7457Spavel.It ip	ttl	integer	yes
1508edab7457Spavel.It tcp	rfc1323	integer	yes
1509edab7457Spavel.It tcp	sendspace	integer	yes
1510edab7457Spavel.It tcp	recvspace	integer	yes
1511edab7457Spavel.It tcp	mssdflt	integer	yes
1512edab7457Spavel.It tcp	syn_cache_limit	integer	yes
1513edab7457Spavel.It tcp	syn_bucket_limit	integer	yes
1514edab7457Spavel.It tcp	syn_cache_interval	integer	yes
1515edab7457Spavel.It tcp	init_win	integer	yes
1516edab7457Spavel.It tcp	init_win_local	integer	yes
1517edab7457Spavel.It tcp	mss_ifmtu	integer	yes
1518edab7457Spavel.It tcp	win_scale	integer	yes
1519edab7457Spavel.It tcp	timestamps	integer	yes
1520edab7457Spavel.It tcp	cwm	integer	yes
1521edab7457Spavel.It tcp	cwm_burstsize	integer	yes
1522edab7457Spavel.It tcp	ack_on_push	integer	yes
1523edab7457Spavel.It tcp	keepidle	integer	yes
1524edab7457Spavel.It tcp	keepintvl	integer	yes
1525edab7457Spavel.It tcp	keepcnt	integer	yes
1526edab7457Spavel.It tcp	slowhz	integer	no
1527eeff1895Schristos.It tcp	keepinit	integer	yes
1528edab7457Spavel.It tcp	log_refused	integer	yes
1529edab7457Spavel.It tcp	rstppslimit	integer	yes
1530edab7457Spavel.It tcp	ident	struct	no
15315c67bb83Schristos.It tcp	drop	struct	no
1532edab7457Spavel.It tcp	sack.enable	integer	yes
1533edab7457Spavel.It tcp	sack.globalholes	integer	no
1534edab7457Spavel.It tcp	sack.globalmaxholes	integer	yes
1535edab7457Spavel.It tcp	sack.maxholes	integer	yes
1536edab7457Spavel.It tcp	ecn.enable	integer	yes
1537edab7457Spavel.It tcp	ecn.maxretries	integer	yes
1538edab7457Spavel.It tcp	congctl.selected	string	yes
1539edab7457Spavel.It tcp	congctl.available	string	yes
1540edab7457Spavel.It tcp	abc.enable	integer	yes
1541edab7457Spavel.It tcp	abc.aggressive	integer	yes
1542edab7457Spavel.It udp	checksum	integer	yes
1543edab7457Spavel.It udp	do_loopback_cksum	integer	yes
1544edab7457Spavel.It udp	recvspace	integer	yes
1545edab7457Spavel.It udp	sendspace	integer	yes
1546edab7457Spavel.El
1547edab7457Spavel.Pp
1548edab7457SpavelThe variables are as follows:
1549edab7457Spavel.Bl -tag -width "123456"
1550f9cd9ecdSroy.It Li arp.nd_delay
1551f9cd9ecdSroyThe delay in seconds before sending the first probe,
1552f9cd9ecdSroyafter it has been decided that the entry is stale.
1553f9cd9ecdSroy.It Li arp.nd_bmaxtries
1554f9cd9ecdSroyThe maximum number of broadcasts send to discover the hardware address
1555f9cd9ecdSroyclaiming an IP address.
1556f9cd9ecdSroy.It Li arp.nd_umaxtries
1557f9cd9ecdSroyThe maximum number of unicasts send to the hardware address to ensure
1558f9cd9ecdSroyit still claims an IP address.
1559f9cd9ecdSroy.It Li arp.nd_basereachable
1560f9cd9ecdSroyThe number of milliseconds the ARP entry is considered reachable before
1561f9cd9ecdSroyprobing reachability.
1562f9cd9ecdSroy.It Li arp.nd_retrans
1563f9cd9ecdSroyThe number of milliseconds between ARP probes.
1564f9cd9ecdSroy.It Li arp.nd_nud
1565f9cd9ecdSroyIf set to non-zero, perform Neighor Unreachability Detection.
1566f9cd9ecdSroy.It Li arp.nd_maxnudhint
1567f9cd9ecdSroyNeighbor discovery permits upper layer protocols to supply reachability
1568f9cd9ecdSroyhints, to avoid unnecessary neighbor discovery exchanges.
1569f9cd9ecdSroyThe variable defines the number of consecutive hints the neighbor discovery
1570f9cd9ecdSroylayer will take.
1571f9cd9ecdSroyFor example, by setting the variable to 3, neighbor discovery layer
1572f9cd9ecdSroywill take 3 consecutive hints in maximum.
1573f9cd9ecdSroyAfter receiving 3 hints, neighbor discovery layer will perform
1574f9cd9ecdSroynormal neighbor discovery process.
1575edab7457Spavel.It Li carp.allow
1576edab7457SpavelIf set to 0, incoming
1577edab7457Spavel.Xr carp 4
1578edab7457Spavelpackets will not be processed.
1579edab7457SpavelIf set to any other value, processing will occur.
1580edab7457SpavelEnabled by default.
1581edab7457Spavel.It Li carp.arpbalance
1582edab7457SpavelIf set to any value other than 0, the ARP balancing functionality of
1583edab7457Spavel.Xr carp 4
1584edab7457Spavelis enabled.
1585edab7457SpavelWhen ARP requests are received for an IP address which is part of any virtual
1586edab7457Spavelhost, carp will hash the source IP in the ARP request to select one of the
1587edab7457Spavelvirtual hosts from the set of all the virtual hosts which have that IP address.
1588edab7457SpavelThe master of that host will respond with the correct virtual MAC address.
1589edab7457SpavelDisabled by default.
1590edab7457Spavel.It Li carp.log
1591edab7457SpavelIf set to any value other than 0,
1592edab7457Spavel.Xr carp 4
1593edab7457Spavelwill log errors.
1594edab7457SpavelDisabled by default.
1595edab7457Spavel.It Li carp.preempt
1596edab7457SpavelIf set to 0,
1597edab7457Spavel.Xr carp 4
1598edab7457Spavelwill not attempt to become master if it is receiving advertisements from
1599edab7457Spavelanother active master.
1600edab7457SpavelIf set to any other value, carp will become master of the virtual host if it
1601edab7457Spavelbelieves it can send advertisements more frequently than the current master.
1602edab7457SpavelDisabled by default.
1603edab7457Spavel.It Li ip.allowsrcrt
1604edab7457SpavelIf set to 1, the host accepts source routed packets.
160540114b99Schristos.It Li ip.anonportalgo.available
160640114b99SchristosThe available RFC 6056 port randomization algorithms.
1607b7bac3aaSchristos.It Li ip.anonportalgo.reserve
1608b7bac3aaSchristosA bitmask of ports that will not be used during anonymous or privileged
1609b7bac3aaSchristosport selection.
161040114b99Schristos.It Li ip.anonportalgo.selected
1611de35f5b6SjruohoThe currently selected RFC 6056 port randomization algorithm; see
1612de35f5b6Sjruoho.Xr rfc6056 7
1613de35f5b6Sjruohofor details.
1614edab7457Spavel.It Li ip.anonportmax
1615edab7457SpavelThe highest port number to use for TCP and UDP ephemeral port allocation.
1616edab7457SpavelThis cannot be set to less than 1024 or greater than 65535, and must
1617edab7457Spavelbe greater than
1618edab7457Spavel.Li ip.anonportmin .
1619edab7457Spavel.It Li ip.anonportmin
1620edab7457SpavelThe lowest port number to use for TCP and UDP ephemeral port allocation.
1621edab7457SpavelThis cannot be set to less than 1024 or greater than 65535.
1622edab7457Spavel.It Li ip.checkinterface
1623edab7457SpavelIf set to non-zero, the host will reject packets addressed to it
1624edab7457Spavelthat arrive on an interface not bound to that address.
1625dcebb1dcSmaxvCurrently, this must be disabled if NAT is used to translate the
1626edab7457Spaveldestination address to another local interface, or if addresses
1627edab7457Spavelare added to the loopback interface instead of the interface where
1628edab7457Spavelthe packets for those packets are received.
162959e4c4e0Sroy.It Li ip.dad_count
163059e4c4e0SroyThe number of
163159e4c4e0Sroy.Xr arp 4
163259e4c4e0Sroyprobes sent for Address Conflict Detection.
163359e4c4e0SroySet to 0 to disable this.
1634edab7457Spavel.It Li ip.directed-broadcast
1635edab7457SpavelIf set to 1, enables directed broadcast behavior for the host.
1636edab7457Spavel.It Li ip.do_loopback_cksum
1637edab7457SpavelPerform IP checksum on loopback.
1638edab7457Spavel.It Li ip.forwarding
1639edab7457SpavelIf set to 1, enables IP forwarding for the host,
1640edab7457Spavelmeaning that the host is acting as a router.
1641edab7457Spavel.It Li ip.forwsrcrt
1642edab7457SpavelIf set to 1, enables forwarding of source-routed packets for the host.
1643edab7457SpavelThis value may only be changed if the kernel security level is less than 1.
1644edab7457Spavel.It Li ip.gifttl
1645edab7457SpavelThe maximum time-to-live (hop count) value for an IPv4 packet generated by
1646edab7457Spavel.Xr gif 4
1647edab7457Spaveltunnel interface.
1648edab7457Spavel.It Li ip.grettl
1649edab7457SpavelThe maximum time-to-live (hop count) value for an IPv4 packet generated by
1650edab7457Spavel.Xr gre 4
1651edab7457Spaveltunnel interface.
165228ed4dc8Sliamjfoy.It Li ip.hashsize
165328ed4dc8SliamjfoyThe size of IPv4 Fast Forward hash table.
165428ed4dc8SliamjfoyThis value must be a power of 2 (64, 256...).
165528ed4dc8SliamjfoyA larger hash table size results in fewer collisions.
165628ed4dc8SliamjfoyAlso see
165728ed4dc8Sliamjfoy.Li ip.maxflows .
1658edab7457Spavel.It Li ip.hostzerobroadcast
1659edab7457SpavelAll zeroes address is broadcast address.
1660edab7457Spavel.It Li ip.lowportmax
1661edab7457SpavelThe highest port number to use for TCP and UDP reserved port allocation.
1662edab7457SpavelThis cannot be set to less than 0 or greater than 1024, and must
1663edab7457Spavelbe greater than
1664edab7457Spavel.Li ip.lowportmin .
1665edab7457Spavel.It Li ip.lowportmin
1666edab7457SpavelThe lowest port number to use for TCP and UDP reserved port allocation.
1667edab7457SpavelThis cannot be set to less than 0 or greater than 1024, and must
1668edab7457Spavelbe smaller than
1669edab7457Spavel.Li ip.lowportmax .
1670edab7457Spavel.It Li ip.maxflows
167116b93348SliamjfoyIPv4 Fast Forwarding is enabled by default.
167216b93348SliamjfoyIf set to 0, IPv4 Fast Forwarding is disabled.
1673edab7457Spavel.Li ip.maxflows
1674edab7457Spavelcontrols the maximum amount of flows which can be created.
1675edab7457SpavelThe default value is 256.
1676edab7457Spavel.It Li ip.maxfragpackets
1677edab7457SpavelThe maximum number of fragmented packets the node will accept.
1678edab7457Spavel0 means that the node will not accept any fragmented packets.
1679edab7457Spavel\-1 means that the node will accept as many fragmented packets as it receives.
1680edab7457SpavelThe flag is provided basically for avoiding possible DoS attacks.
1681edab7457Spavel.It Li ip.mtudisc
1682edab7457SpavelIf set to 1, enables Path MTU Discovery (RFC 1191).
1683edab7457SpavelWhen Path MTU Discovery is enabled, the transmitted TCP segment
1684edab7457Spavelsize will be determined by the advertised maximum segment size
1685edab7457Spavel(MSS) from the remote end, as constrained by the path MTU.
1686edab7457SpavelIf MTU Discovery is disabled, the transmitted segment size will
1687edab7457Spavelnever be greater than
1688edab7457Spavel.Li tcp.mssdflt
1689edab7457Spavel(the local maximum segment size).
1690edab7457Spavel.It Li ip.mtudisctimeout
1691edab7457SpavelThe number of seconds in which a route added by the Path MTU
1692edab7457SpavelDiscovery engine will time out.
1693edab7457SpavelWhen the route times out, the Path
1694edab7457SpavelMTU Discovery engine will attempt to probe a larger path MTU.
1695edab7457Spavel.It Li ip.random_id
1696edab7457SpavelAssign random ip_id values.
1697edab7457Spavel.It Li ip.redirect
1698edab7457SpavelIf set to 1, ICMP redirects may be sent by the host.
1699edab7457SpavelThis option is ignored unless the host is routing IP packets,
1700edab7457Spaveland should normally be enabled on all systems.
1701edab7457Spavel.It Li ip.subnetsarelocal
1702edab7457SpavelIf set to 1, subnets are to be considered local addresses.
1703edab7457Spavel.It Li ip.ttl
1704edab7457SpavelThe maximum time-to-live (hop count) value for an IP packet sourced by
1705edab7457Spavelthe system.
1706edab7457SpavelThis value applies to normal transport protocols, not to ICMP.
1707edab7457Spavel.It Li icmp.errppslimit
1708edab7457SpavelThe variable specifies the maximum number of outgoing ICMP error messages,
1709edab7457Spavelper second.
1710edab7457SpavelICMP error messages that exceeded the value are subject to rate limitation
1711edab7457Spaveland will not go out from the node.
1712edab7457SpavelNegative value disables rate limitation.
1713edab7457Spavel.It Li icmp.maskrepl
1714edab7457SpavelIf set to 1, ICMP network mask requests are to be answered.
1715edab7457Spavel.It Li icmp.rediraccept
1716edab7457SpavelIf set to non-zero, the host will accept ICMP redirect packets.
1717edab7457SpavelNote that routers will never accept ICMP redirect packets,
1718edab7457Spaveland the variable is meaningful on IP hosts only.
1719edab7457Spavel.It Li icmp.redirtimeout
1720edab7457SpavelThe variable specifies lifetime of routing entries generated by incoming
1721edab7457SpavelICMP redirect.
1722edab7457SpavelThis defaults to 600 seconds.
1723edab7457Spavel.It Li icmp.returndatabytes
1724edab7457SpavelNumber of bytes to return in an ICMP error message.
1725adf7e471Schristos.It Li icmp.bmcastecho
1726adf7e471SchristosIf set to 1, enables responding to ICMP echo or timestamp request to the
1727adf7e471Schristosbroadcast address.
17289362ee0dSknakahara.It Li icmp.dynamic_rt_msg
17299362ee0dSknakaharaA boolean that the kernel sends routing message for RTM_DYNAMIC or not.
17309362ee0dSknakaharaIf set to true, sends such routing message.
1731edab7457Spavel.It Li tcp.ack_on_push
1732edab7457SpavelIf set to 1, TCP is to immediately transmit an ACK upon reception of
1733edab7457Spavela packet with PUSH set.
1734edab7457SpavelThis can avoid losing a round trip time in some rare situations,
1735edab7457Spavelbut has the caveat of potentially defeating TCP's delayed ACK algorithm.
1736edab7457SpavelUse of this option is generally not recommended, but
1737edab7457Spavelthe variable exists in case your configuration really needs it.
1738edab7457Spavel.It Li tcp.cwm
1739edab7457SpavelIf set to 1, enables use of the Hughes/Touch/Heidemann Congestion Window
1740edab7457SpavelMonitoring algorithm.
1741edab7457SpavelThis algorithm prevents line-rate bursts of packets that could
1742edab7457Spavelotherwise occur when data begins flowing on an idle TCP connection.
1743edab7457SpavelThese line-rate bursts can contribute to network and router congestion.
1744edab7457SpavelThis can be particularly useful on World Wide Web servers
1745edab7457Spavelwhich support HTTP/1.1, which has lingering connections.
1746edab7457Spavel.It Li tcp.cwm_burstsize
1747edab7457SpavelThe Congestion Window Monitoring allowed burst size, in terms
1748edab7457Spavelof packet count.
1749edab7457Spavel.It Li tcp.delack_ticks
1750edab7457SpavelNumber of ticks to delay sending an ACK.
1751edab7457Spavel.It Li tcp.do_loopback_cksum
1752edab7457SpavelPerform TCP checksum on loopback.
1753edab7457Spavel.It Li tcp.init_win
1754cdf08b52SwizA value indicating the TCP initial congestion window.
1755cdf08b52SwizThe valid range
1756a538b934Smattis 0 to 10 (maximum specified by RFC6928),
17576d6ea83fSchristoswith a default of 4 (approximately 4K per RFC3390).
1758edab7457Spavel.It Li tcp.init_win_local
1759edab7457SpavelLike
1760edab7457Spavel.Li tcp.init_win ,
1761edab7457Spavelbut used when communicating with hosts on a local network.
1762edab7457Spavel.It Li tcp.keepcnt
1763edab7457SpavelNumber of keepalive probes sent before declaring a connection dead.
1764edab7457SpavelIf set to zero, there is no limit;
1765edab7457Spavelkeepalives will be sent until some kind of
1766edab7457Spavelresponse is received from the peer.
1767edab7457Spavel.It Li tcp.keepidle
1768edab7457SpavelTime a connection must be idle before keepalives are sent (if keepalives
1769edab7457Spavelare enabled for the connection).
1770edab7457SpavelSee also tcp.slowhz.
1771edab7457Spavel.It Li tcp.keepintvl
1772edab7457SpavelTime after a keepalive probe is sent until, in the absence of any response,
1773edab7457Spavelanother probe is sent.
1774edab7457SpavelSee also tcp.slowhz.
1775edab7457Spavel.It Li tcp.log_refused
1776edab7457SpavelIf set to 1, refused TCP connections to the host will be logged.
1777eeff1895Schristos.It Li tcp.keepinit
1778eeff1895SchristosTimeout in seconds during connection establishment.
1779edab7457Spavel.It Li tcp.mss_ifmtu
1780edab7457SpavelIf set to 1, TCP calculates the outgoing maximum segment size based on
1781edab7457Spavelthe MTU of the appropriate interface.
1782edab7457SpavelIf set to 0, it is calculated based on the greater of the MTU of the
1783edab7457Spavelinterface, and the largest (non-loopback) interface MTU on the system.
1784edab7457Spavel.It Li tcp.mssdflt
1785edab7457SpavelThe default maximum segment size both advertised to the peer
1786edab7457Spaveland to use when either the peer does not advertise a maximum segment size to
1787edab7457Spavelus during connection setup or Path MTU Discovery
1788edab7457Spavel.Li ( ip.mtudisc )
1789edab7457Spavelis disabled.
1790edab7457SpavelDo not change this value unless you really know what you are doing.
1791edab7457Spavel.It Li tcp.recvspace
1792edab7457SpavelThe default TCP receive buffer size.
1793edab7457Spavel.It Li tcp.rfc1323
1794edab7457SpavelIf set to 1, enables RFC 1323 extensions to TCP.
1795edab7457Spavel.It Li tcp.rstppslimit
1796edab7457SpavelThe variable specifies the maximum number of outgoing TCP RST packets,
1797edab7457Spavelper second.
1798edab7457SpavelTCP RST packet that exceeded the value are subject to rate limitation
1799edab7457Spaveland will not go out from the node.
1800edab7457SpavelNegative value disables rate limitation.
18015c67bb83Schristos.It Li tcp.ident
18025c67bb83SchristosReturn the user ID of a connected socket pair.
18035c67bb83Schristos(RFC1413 Identification Protocol lookups.)
18045c67bb83Schristos.It Li tcp.drop
18055c67bb83SchristosDrop a TCP socket pair connection.
1806edab7457Spavel.It Li tcp.sack.enable
1807edab7457SpavelIf set to 1, enables RFC 2018 Selective ACKnowledgement.
1808edab7457Spavel.It Li tcp.sack.globalholes
1809edab7457SpavelGlobal number of TCP SACK holes.
1810edab7457Spavel.It Li tcp.sack.globalmaxholes
1811edab7457SpavelGlobal maximum number of TCP SACK holes.
1812edab7457Spavel.It Li tcp.sack.maxholes
1813edab7457SpavelMaximum number of TCP SACK holes allowed per connection.
1814edab7457Spavel.It Li tcp.ecn.enable
1815edab7457SpavelIf set to 1, enables RFC 3168 Explicit Congestion Notification.
1816edab7457Spavel.It Li tcp.ecn.maxretries
1817edab7457SpavelNumber of times to retry sending the ECN-setup packet.
1818edab7457Spavel.It Li tcp.sendspace
1819edab7457SpavelThe default TCP send buffer size.
1820edab7457Spavel.It Li tcp.slowhz
1821edab7457SpavelThe units for tcp.keepidle and tcp.keepintvl; those variables are in ticks
1822edab7457Spavelof a clock that ticks tcp.slowhz times per second.
1823edab7457Spavel(That is, their values
1824edab7457Spavelmust be divided by the tcp.slowhz value to get times in seconds.)
1825edab7457Spavel.It Li tcp.syn_bucket_limit
1826edab7457SpavelThe maximum number of entries allowed per hash bucket in the TCP
1827edab7457Spavelcompressed state engine.
1828edab7457Spavel.It Li tcp.syn_cache_limit
1829edab7457SpavelThe maximum number of entries allowed in the TCP compressed state
1830edab7457Spavelengine.
1831edab7457Spavel.It Li tcp.timestamps
1832edab7457SpavelIf rfc1323 is enabled, a value of 1 indicates RFC 1323 time stamp options,
1833edab7457Spavelused for measuring TCP round trip times, are enabled.
1834edab7457Spavel.It Li tcp.win_scale
1835edab7457SpavelIf rfc1323 is enabled, a value of 1 indicates RFC 1323 window scale options,
1836edab7457Spavelfor increasing the TCP window size, are enabled.
1837edab7457Spavel.It Li tcp.congctl.available
1838edab7457SpavelThe available TCP congestion control algorithms.
1839edab7457Spavel.It Li tcp.congctl.selected
1840edab7457SpavelThe currently selected TCP congestion control algorithm.
1841edab7457Spavel.It Li tcp.abc.enable
1842edab7457SpavelIf set to 1, use RFC 3465 Appropriate Byte Counting (ABC).
1843edab7457SpavelIf set to 0, use traditional Packet Counting.
1844edab7457Spavel.It Li tcp.abc.aggressive
1845edab7457SpavelChoose the L parameter found in RFC 3465.
1846edab7457SpavelL is the maximum cwnd increase for an ack during slow start.
1847edab7457SpavelIf set to 1, use L=2*SMSS.
1848edab7457SpavelIf set to 0, use L=1*SMSS.
1849edab7457SpavelIt has no effect unless tcp.abc.enable is set to 1.
1850edab7457Spavel.It Li udp.checksum
1851edab7457SpavelIf set to 1, UDP checksums are being computed.
1852edab7457SpavelReceived non-zero UDP checksums are always checked.
1853edab7457SpavelDisabling UDP checksums is strongly discouraged.
1854edab7457Spavel.It Li udp.recvspace
1855edab7457SpavelThe default UDP receive buffer size.
1856129ee666Schristos.It Li udp.sendspace
1857129ee666SchristosThe default UDP send buffer size.
1858edab7457Spavel.El
1859edab7457Spavel.Pp
1860edab7457SpavelFor variables net.*.ipsec, please refer to
1861edab7457Spavel.Xr ipsec 4 .
186217598373Skamil.It Li net.inet6 ( Dv PF_INET6 )
1863edab7457SpavelGet or set various global information about the IPv6
1864edab7457Spavel.Pq Internet Protocol version 6 .
1865edab7457SpavelThe third level name is the protocol.
1866edab7457SpavelThe fourth level name is the variable name.
1867edab7457SpavelThe currently defined protocols and names are:
1868369f64d0Swiz.Bl -column "Protocol" "anonportalgo.available" "integer" "Changeable" -offset indent
1869aca767b2Swiz.It Sy Protocol	Variable Ta Sy Type Ta Sy Changeable
1870edab7457Spavel.It icmp6	errppslimit	integer	yes
1871edab7457Spavel.It icmp6	mtudisc_hiwat	integer	yes
1872edab7457Spavel.It icmp6	mtudisc_lowat	integer	yes
1873edab7457Spavel.It icmp6	nd6_debug	integer	yes
1874edab7457Spavel.It icmp6	nd6_delay	integer	yes
1875edab7457Spavel.It icmp6	nd6_maxnudhint	integer	yes
1876edab7457Spavel.It icmp6	nd6_mmaxtries	integer	yes
1877edab7457Spavel.It icmp6	nd6_prune	integer	yes
1878edab7457Spavel.It icmp6	nd6_umaxtries	integer	yes
1879edab7457Spavel.It icmp6	nd6_useloopback	integer	yes
1880edab7457Spavel.It icmp6	nodeinfo	integer	yes
1881edab7457Spavel.It icmp6	rediraccept	integer	yes
1882edab7457Spavel.It icmp6	redirtimeout	integer	yes
1883fb9a6b51Sknakahara.It icmp6	reflect_pmtu	boolean	yes
18849362ee0dSknakahara.It icmp6	dynamic_rt_msg	boolean	yes
1885edab7457Spavel.It ip6	accept_rtadv	integer	yes
1886aea94175Schristos.It ip6	addctlpolicy	struct in6_addrpolicy	no
188740114b99Schristos.It ip6	anonportalgo.selected	string	yes
188840114b99Schristos.It ip6	anonportalgo.available	string	yes
1889b7bac3aaSchristos.It ip6	anonportalgo.reserve	struct	yes
1890edab7457Spavel.It ip6	anonportmax	integer	yes
1891edab7457Spavel.It ip6	anonportmin	integer	yes
1892edab7457Spavel.It ip6	auto_flowlabel	integer	yes
1893edab7457Spavel.It ip6	dad_count	integer	yes
1894edab7457Spavel.It ip6	defmcasthlim	integer	yes
1895edab7457Spavel.It ip6	forwarding	integer	yes
1896edab7457Spavel.It ip6	gifhlim	integer	yes
1897884675b0Sliamjfoy.It ip6	hashsize	integer	yes
1898edab7457Spavel.It ip6	hlim	integer	yes
1899edab7457Spavel.It ip6	hdrnestlimit	integer	yes
1900edab7457Spavel.It ip6	kame_version	string	no
1901edab7457Spavel.It ip6	keepfaith	integer	yes
1902edab7457Spavel.It ip6	log_interval	integer	yes
1903edab7457Spavel.It ip6	lowportmax	integer	yes
1904edab7457Spavel.It ip6	lowportmin	integer	yes
1905443eb0a2Schristos.It ip6	maxdynroutes	integer	yes
1906443eb0a2Schristos.It ip6	maxifprefixes	integer	yes
1907443eb0a2Schristos.It ip6	maxifdefrouters	integer	yes
190816b93348Sliamjfoy.It ip6	maxflows	integer	yes
1909edab7457Spavel.It ip6	maxfragpackets	integer	yes
1910edab7457Spavel.It ip6	maxfrags	integer	yes
1911443eb0a2Schristos.It ip6	neighborgcthresh	integer	yes
1912b54270a1Sknakahara.It ip6	param_rt_msg	integer	yes
1913edab7457Spavel.It ip6	redirect	integer	yes
1914edab7457Spavel.It ip6	rr_prune	integer	yes
1915edab7457Spavel.It ip6	use_deprecated	integer	yes
1916edab7457Spavel.It ip6	v6only	integer	yes
1917edab7457Spavel.It udp6	do_loopback_cksum	integer	yes
1918edab7457Spavel.It udp6	recvspace	integer	yes
1919edab7457Spavel.It udp6	sendspace	integer	yes
1920edab7457Spavel.El
1921edab7457Spavel.Pp
1922edab7457SpavelThe variables are as follows:
1923edab7457Spavel.Bl -tag -width "123456"
1924edab7457Spavel.It Li ip6.accept_rtadv
1925edab7457SpavelIf set to non-zero, the node will accept ICMPv6 router advertisement packets
1926edab7457Spaveland autoconfigures address prefixes and default routers.
1927edab7457SpavelThe node must be a host
1928edab7457Spavel.Pq not a router
1929edab7457Spavelfor the option to be meaningful.
193040114b99Schristos.It Li ip6.anonportalgo.available
193140114b99SchristosThe available RFC 6056 port randomization algorithms.
1932b7bac3aaSchristos.It Li ip6.anonportalgo.reserve
1933b7bac3aaSchristosA bitmask of ports that will not be used during anonymous or privileged
1934b7bac3aaSchristosport selection.
193540114b99Schristos.It Li ip6.anonportalgo.selected
1936de35f5b6SjruohoThe currently selected RFC 6056 port randomization algorithm; see
1937de35f5b6Sjruoho.Xr rfc6056 7
1938de35f5b6Sjruohofor details.
1939edab7457Spavel.It Li ip6.anonportmax
1940edab7457SpavelThe highest port number to use for TCP and UDP ephemeral port allocation.
1941edab7457SpavelThis cannot be set to less than 1024 or greater than 65535, and must
1942edab7457Spavelbe greater than
1943edab7457Spavel.Li ip6.anonportmin .
1944edab7457Spavel.It Li ip6.anonportmin
1945edab7457SpavelThe lowest port number to use for TCP and UDP ephemeral port allocation.
1946edab7457SpavelThis cannot be set to less than 1024 or greater than 65535.
1947edab7457Spavel.It Li ip6.auto_flowlabel
1948edab7457SpavelOn connected transport protocol packets,
1949edab7457Spavelfill IPv6 flowlabel field to help intermediate routers to identify packet flows.
1950edab7457Spavel.It Li ip6.dad_count
1951edab7457SpavelThe variable configures number of IPv6 DAD
1952edab7457Spavel.Pq duplicated address detection
1953edab7457Spavelprobe packets.
1954edab7457SpavelThe packets will be generated when IPv6 interface addresses are configured.
1955edab7457Spavel.It Li ip6.defmcasthlim
1956edab7457SpavelThe default hop limit value for an IPv6 multicast packet sourced by the node.
1957edab7457SpavelThis value applies to all the transport protocols on top of IPv6.
1958edab7457SpavelThere are APIs to override the value, as documented in
1959edab7457Spavel.Xr ip6 4 .
1960edab7457Spavel.It Li ip6.forwarding
1961edab7457SpavelIf set to 1, enables IPv6 forwarding for the node,
1962edab7457Spavelmeaning that the node is acting as a router.
1963edab7457SpavelIf set to 0, disables IPv6 forwarding for the node,
1964edab7457Spavelmeaning that the node is acting as a host.
1965edab7457SpavelIPv6 specification defines node behavior for
1966edab7457Spavel.Dq router
1967edab7457Spavelcase and
1968edab7457Spavel.Dq host
1969edab7457Spavelcase quite differently, and changing this variable during operation
1970edab7457Spavelmay cause serious trouble.
1971edab7457SpavelIt is recommended to configure the variable at bootstrap time,
1972edab7457Spaveland bootstrap time only.
1973edab7457Spavel.It Li ip6.gifhlim
1974edab7457SpavelThe maximum hop limit value for an IPv6 packet generated by
1975edab7457Spavel.Xr gif 4
1976edab7457Spaveltunnel interface.
1977edab7457Spavel.It Li ip6.hdrnestlimit
1978edab7457SpavelThe number of IPv6 extension headers permitted on incoming IPv6 packets.
1979edab7457SpavelIf set to 0, the node will accept as many extension headers as possible.
1980884675b0Sliamjfoy.It Li ip6.hashsize
1981884675b0SliamjfoyThe size of IPv6 Fast Forward hash table.
198210263f69SuweThis value must be a power of 2 (64, 256, ...).
1983884675b0SliamjfoyA larger hash table size results in fewer collisions.
1984884675b0SliamjfoyAlso see
1985884675b0Sliamjfoy.Li ip6.maxflows .
1986edab7457Spavel.It Li ip6.hlim
1987edab7457SpavelThe default hop limit value for an IPv6 unicast packet sourced by the node.
1988edab7457SpavelThis value applies to all the transport protocols on top of IPv6.
1989edab7457SpavelThere are APIs to override the value, as documented in
1990edab7457Spavel.Xr ip6 4 .
1991edab7457Spavel.It Li ip6.kame_version
1992edab7457SpavelThe string identifies the version of KAME IPv6 stack implemented in the kernel.
1993edab7457Spavel.It Li ip6.keepfaith
1994edab7457SpavelIf set to non-zero, it enables
1995edab7457Spavel.Dq FAITH
1996edab7457SpavelTCP relay IPv6-to-IPv4 translator code in the kernel.
1997edab7457SpavelRefer
1998edab7457Spavel.Xr faith 4
1999edab7457Spaveland
2000edab7457Spavel.Xr faithd 8
2001edab7457Spavelfor detail.
2002edab7457Spavel.It Li ip6.log_interval
2003edab7457SpavelThe variable controls amount of logs generated by IPv6 packet
2004edab7457Spavelforwarding engine, by setting interval between log output
2005edab7457Spavel.Pq in seconds .
2006edab7457Spavel.It Li ip6.lowportmax
2007edab7457SpavelThe highest port number to use for TCP and UDP reserved port allocation.
2008edab7457SpavelThis cannot be set to less than 0 or greater than 1024, and must
2009edab7457Spavelbe greater than
2010edab7457Spavel.Li ip6.lowportmin .
2011edab7457Spavel.It Li ip6.lowportmin
2012edab7457SpavelThe lowest port number to use for TCP and UDP reserved port allocation.
2013edab7457SpavelThis cannot be set to less than 0 or greater than 1024, and must
2014edab7457Spavelbe smaller than
2015edab7457Spavel.Li ip6.lowportmax .
2016443eb0a2Schristos.It Li ip6.maxdynroutes
2017443eb0a2SchristosMaximum number of routes created by redirect.
2018443eb0a2SchristosSet it to negative to disable.
2019443eb0a2SchristosThe default value is 4096.
2020443eb0a2Schristos.It Li ip6.maxifprefixes
2021443eb0a2SchristosMaximum number of prefixes created by route advertisements per interface.
2022443eb0a2SchristosSet it to negative to disable.
2023443eb0a2SchristosThe default value is 16.
2024443eb0a2Schristos.It Li ip6.maxifdefrouters 16
2025443eb0a2SchristosMaximum number of default routers created by route advertisements per interface.
2026443eb0a2SchristosSet it to negative to disable.
2027443eb0a2SchristosThe default value is 16.
202816b93348Sliamjfoy.It Li ip6.maxflows
202916b93348SliamjfoyIPv6 Fast Forwarding is enabled by default.
203016b93348SliamjfoyIf set to 0, IPv6 Fast Forwarding is disabled.
203116b93348Sliamjfoy.Li ip6.maxflows
203216b93348Sliamjfoycontrols the maximum amount of flows which can be created.
203341fd1926SliamjfoyThe default value is 256.
2034edab7457Spavel.It Li ip6.maxfragpackets
2035edab7457SpavelThe maximum number of fragmented packets the node will accept.
2036edab7457Spavel0 means that the node will not accept any fragmented packets.
2037edab7457Spavel\-1 means that the node will accept as many fragmented packets as it receives.
2038edab7457SpavelThe flag is provided basically for avoiding possible DoS attacks.
2039edab7457Spavel.It Li ip6.maxfrags
2040edab7457SpavelThe maximum number of fragments the node will accept.
2041edab7457Spavel0 means that the node will not accept any fragments.
2042edab7457Spavel\-1 means that the node will accept as many fragments as it receives.
2043edab7457SpavelThe flag is provided basically for avoiding possible DoS attacks.
2044443eb0a2Schristos.It Li ip6.neighborgcthresh
20459bacf058Sozaki-rMaximum number of entries in neighbor cache per interface.
2046443eb0a2SchristosSet to negative to disable.
2047443eb0a2SchristosThe default value is 2048.
2048b54270a1Sknakahara.It Li ip6.param_rt_msg
2049b54270a1SknakaharaIf set to 0, parameter changing routing message is suppressed.
2050b54270a1SknakaharaIf set to 1, parameter changing routing message is sent by RTM_NEWADDR.
2051b54270a1SknakaharaOther values are undefined yet.
2052edab7457Spavel.It Li ip6.redirect
2053edab7457SpavelIf set to 1, ICMPv6 redirects may be sent by the node.
2054edab7457SpavelThis option is ignored unless the node is routing IP packets,
2055edab7457Spaveland should normally be enabled on all systems.
2056edab7457Spavel.It Li ip6.rr_prune
2057edab7457SpavelThe variable specifies interval between IPv6 router renumbering prefix
2058edab7457Spavelbabysitting, in seconds.
2059edab7457Spavel.It Li ip6.use_deprecated
2060edab7457SpavelThe variable controls use of deprecated address, specified in RFC 2462 5.5.4.
2061edab7457Spavel.It Li ip6.v6only
2062edab7457SpavelThe variable specifies initial value for
2063edab7457Spavel.Dv IPV6_V6ONLY
2064edab7457Spavelsocket option for
2065edab7457Spavel.Dv AF_INET6
2066edab7457Spavelsocket.
2067edab7457SpavelPlease refer to
2068edab7457Spavel.Xr ip6 4
2069edab7457Spavelfor detail.
2070edab7457Spavel.It Li icmp6.errppslimit
2071edab7457SpavelThe variable specifies the maximum number of outgoing ICMPv6 error messages,
2072edab7457Spavelper second.
2073edab7457SpavelICMPv6 error messages that exceeded the value are subject to rate limitation
2074edab7457Spaveland will not go out from the node.
2075edab7457SpavelNegative value disables rate limitation.
2076edab7457Spavel.It Li icmp6.mtudisc_hiwat
2077edab7457Spavel.It Li icmp6.mtudisc_lowat
2078edab7457SpavelThe variables define the maximum number of routing table entries,
2079edab7457Spavelcreated due to path MTU discovery
2080edab7457Spavel.Pq prevents denial-of-service attacks with ICMPv6 too big messages .
2081edab7457SpavelWhen IPv6 path MTU discovery happens, we keep path MTU information into
2082edab7457Spavelthe routing table.
2083edab7457SpavelIf the number of routing table entries exceed the value,
2084edab7457Spavelthe kernel will not attempt to keep the path MTU information.
2085edab7457Spavel.Li icmp6.mtudisc_hiwat
2086edab7457Spavelis used when we have verified ICMPv6 too big messages.
2087edab7457Spavel.Li icmp6.mtudisc_lowat
2088edab7457Spavelis used when we have unverified ICMPv6 too big messages.
2089edab7457SpavelVerification is performed by using address/port pairs kept in connected pcbs.
2090edab7457SpavelNegative value disables the upper limit.
2091edab7457Spavel.It Li icmp6.nd6_debug
2092edab7457SpavelIf set to non-zero, kernel IPv6 neighbor discovery code will generate
2093edab7457Spaveldebugging messages.
2094edab7457SpavelThe debug outputs are useful to diagnose IPv6 interoperability issues.
2095edab7457SpavelThe flag must be set to 0 for normal operation.
2096edab7457Spavel.It Li icmp6.nd6_delay
2097edab7457SpavelThe variable specifies
2098edab7457Spavel.Dv DELAY_FIRST_PROBE_TIME
2099edab7457Spaveltiming constant in IPv6 neighbor discovery specification
2100edab7457Spavel.Pq RFC 2461 ,
2101edab7457Spavelin seconds.
2102edab7457Spavel.It Li icmp6.nd6_maxnudhint
2103f9cd9ecdSroyNeighbor discovery permits upper layer protocols to supply reachability
2104edab7457Spavelhints, to avoid unnecessary neighbor discovery exchanges.
2105edab7457SpavelThe variable defines the number of consecutive hints the neighbor discovery
2106edab7457Spavellayer will take.
2107edab7457SpavelFor example, by setting the variable to 3, neighbor discovery layer
2108edab7457Spavelwill take 3 consecutive hints in maximum.
2109edab7457SpavelAfter receiving 3 hints, neighbor discovery layer will perform
2110edab7457Spavelnormal neighbor discovery process.
2111edab7457Spavel.It Li icmp6.nd6_mmaxtries
2112edab7457SpavelThe variable specifies
2113edab7457Spavel.Dv MAX_MULTICAST_SOLICIT
2114edab7457Spavelconstant in IPv6 neighbor discovery specification
2115edab7457Spavel.Pq RFC 2461 .
2116edab7457Spavel.It Li icmp6.nd6_prune
2117edab7457SpavelThe variable specifies interval between IPv6 neighbor cache babysitting,
2118edab7457Spavelin seconds.
2119edab7457Spavel.It Li icmp6.nd6_umaxtries
2120edab7457SpavelThe variable specifies
2121edab7457Spavel.Dv MAX_UNICAST_SOLICIT
2122edab7457Spavelconstant in IPv6 neighbor discovery specification
2123edab7457Spavel.Pq RFC 2461 .
2124edab7457Spavel.It Li icmp6.nd6_useloopback
2125edab7457SpavelIf set to non-zero, kernel IPv6 stack will use loopback interface for
2126edab7457Spavellocal traffic.
2127edab7457Spavel.It Li icmp6.nodeinfo
2128edab7457SpavelThe variable enables responses to ICMPv6 node information queries.
2129edab7457SpavelIf you set the variable to 0, responses will not be generated for
2130edab7457SpavelICMPv6 node information queries.
2131edab7457SpavelSince node information queries can have a security impact, it is
2132edab7457Spavelpossible to fine tune which responses should be answered.
2133edab7457SpavelTwo separate bits can be set.
2134edab7457Spavel.Bl -tag -width "12345"
2135edab7457Spavel.It 1
2136edab7457SpavelRespond to ICMPv6 FQDN queries, e.g.
2137edab7457Spavel.Li ping6 -w .
2138edab7457Spavel.It 2
2139edab7457SpavelRespond to ICMPv6 node addresses queries, e.g.
2140edab7457Spavel.Li ping6 -a .
2141edab7457Spavel.El
2142edab7457Spavel.It Li icmp6.rediraccept
2143edab7457SpavelIf set to non-zero, the host will accept ICMPv6 redirect packets.
2144edab7457SpavelNote that IPv6 routers will never accept ICMPv6 redirect packets,
2145edab7457Spaveland the variable is meaningful on IPv6 hosts
2146edab7457Spavel.Pq non-router
2147edab7457Spavelonly.
2148edab7457Spavel.It Li icmp6.redirtimeout
2149edab7457SpavelThe variable specifies lifetime of routing entries generated by incoming
2150edab7457SpavelICMPv6 redirect.
2151fb9a6b51Sknakahara.It Li icmp6.reflect_pmtu
2152fb9a6b51SknakaharaA boolean that icmpv6 reflecting uses path MTU discovery or not.
2153fb9a6b51SknakaharaWhen not, icmpv6 reflecting uses IPV6_MINMTU.
21549362ee0dSknakahara.It Li icmp6.dynamic_rt_msg
21559362ee0dSknakaharaA boolean that the kernel sends routing message for RTM_DYNAMIC or not.
21569362ee0dSknakaharaIf set to true, sends such routing message.
2157edab7457Spavel.It Li udp6.do_loopback_cksum
2158edab7457SpavelPerform UDP checksum on loopback.
2159edab7457Spavel.It Li udp6.recvspace
2160edab7457SpavelDefault UDP receive buffer size.
2161edab7457Spavel.It Li udp6.sendspace
2162edab7457SpavelDefault UDP send buffer size.
2163edab7457Spavel.El
2164edab7457Spavel.Pp
2165*d8c86e17SgutteridgeVariables net.inet6.tcp6.* and net.inet6.udp6.* have identical meanings to
2166*d8c86e17Sgutteridgenet.inet.tcp.* and net.inet.udp.*, respectively.
2167edab7457SpavelPlease refer to
2168edab7457Spavel.Li PF_INET
2169edab7457Spavelsection above.
2170edab7457SpavelFor variables net.*.ipsec6, please refer to
2171edab7457Spavel.Xr ipsec 4 .
217217598373Skamil.It Li net.key ( Dv PF_KEY )
2173edab7457SpavelGet or set various global information about the IPsec key management.
2174edab7457SpavelThe third level name is the variable name.
2175edab7457SpavelThe currently defined variable and names are:
2176bcacc711Sjoerg.Bl -column "blockacq_lifetime" "integer" "Changeable" -offset indent
2177aca767b2Swiz.It Sy Variable	Type Ta Sy Changeable
2178edab7457Spavel.It debug	integer	yes
217914e2adbfSchristos.It enabled	integer	yes
218014e2adbfSchristos.It used	integer	no
2181edab7457Spavel.It spi_try	integer	yes
2182edab7457Spavel.It spi_min_value	integer	yes
2183edab7457Spavel.It spi_max_value	integer	yes
2184edab7457Spavel.It larval_lifetime	integer	yes
2185edab7457Spavel.It blockacq_count	integer	yes
2186edab7457Spavel.It blockacq_lifetime	integer	yes
2187edab7457Spavel.It esp_keymin	integer	yes
2188edab7457Spavel.It esp_auth	integer	yes
2189edab7457Spavel.It ah_keymin	integer	yes
21906fda1d8cSknakahara.It allow_different_idtype	boolean	yes
2191edab7457Spavel.El
2192edab7457SpavelThe variables are as follows:
2193edab7457Spavel.Bl -tag -width "123456"
2194edab7457Spavel.It Li debug
2195edab7457SpavelTurn on debugging message from within the kernel.
2196edab7457SpavelThe value is a bitmap, as defined in
2197a0705ff4Smaxv.In netipsec/key_debug.h .
219814e2adbfSchristos.It Li enabled
21992e958a70SchristosControl processing of IPsec control messages.
22002e958a70Schristos.Bl -tag -width indent
22012e958a70Schristos.It 0
22022e958a70SchristosNever allow IPsec processing
22032e958a70Schristos.It 1
22042e958a70SchristosAllow IPsec processing when SPD policies are present.
22052e958a70Schristos.It 2
22062e958a70SchristosForce IPsec processing even when SPD policies are not present.
22072e958a70Schristos.El
220814e2adbfSchristos.It Li used
22099a101e13SeadlerBased on if IPsec is enabled, and SPD rule existence, show if
221014e2adbfSchristosIPsec is being used.
221154c4ab26SabhinavNote that currently once IPsec is being used, it cannot be disabled.
2212edab7457Spavel.It Li spi_try
2213edab7457SpavelThe number of times the kernel will try to obtain an unique SPI
2214edab7457Spavelwhen it generates it from random number generator.
2215edab7457Spavel.It Li spi_min_value
2216edab7457SpavelMinimum SPI value when generating it within the kernel.
2217edab7457Spavel.It Li spi_max_value
2218edab7457SpavelMaximum SPI value when generating it within the kernel.
2219edab7457Spavel.It Li larval_lifetime
2220edab7457SpavelLifetime for LARVAL SAD entries, in seconds.
2221edab7457Spavel.It Li blockacq_count
2222edab7457SpavelNumber of ACQUIRE PF_KEY messages to be blocked after an ACQUIRE message.
2223edab7457SpavelIt avoids flood of ACQUIRE PF_KEY from being sent from the kernel to the
2224edab7457Spavelkey management daemon.
2225edab7457Spavel.It Li blockacq_lifetime
2226edab7457SpavelLifetime of ACQUIRE PF_KEY message.
2227edab7457Spavel.It Li esp_keymin
2228edab7457SpavelMinimum ESP key length, in bits.
2229edab7457SpavelThe value is used when the kernel creates proposal payload
2230edab7457Spavelon ACQUIRE PF_KEY message.
2231edab7457Spavel.It Li esp_auth
2232edab7457SpavelWhether ESP authentication should be used or not.
2233edab7457SpavelNon-zero value indicates that ESP authentication should be used.
2234edab7457SpavelThe value is used when the kernel creates proposal payload
2235edab7457Spavelon ACQUIRE PF_KEY message.
2236edab7457Spavel.It Li ah_keymin
2237edab7457SpavelMinimum AH key length, in bits,
2238edab7457SpavelThe value is used when the kernel creates proposal payload
2239edab7457Spavelon ACQUIRE PF_KEY message.
22406fda1d8cSknakahara.It Li allow_different_idtype
22416fda1d8cSknakaharaA boolean that allow or disallow different identifier types
22426fda1d8cSknakaharaon IDii and IDir.
22436fda1d8cSknakaharaAllowing that can improve interconnectivity to some VPN appliances.
2244edab7457Spavel.El
2245badbfd0aSchristos.It Li net.local ( Dv PF_LOCAL )
2246badbfd0aSchristosGet or set various global information about
2247badbfd0aSchristos.Dv AF_LOCAL
2248badbfd0aSchristostype sockets.
2249badbfd0aSchristosFor some variables, the third level name is the variable name:
2250badbfd0aSchristos.Bl -column "Variable" "integer" "Changeable" -offset indent
2251badbfd0aSchristos.It Sy Variable	Type Ta Sy Changeable
2252badbfd0aSchristos.It inflight	integer	no
2253badbfd0aSchristos.It deferred	integer	no
2254badbfd0aSchristos.El
2255badbfd0aSchristosThe variables are as follows:
2256badbfd0aSchristos.Bl -tag -width "123456"
2257badbfd0aSchristos.It Li inflight
2258badbfd0aSchristosThe number of file descriptors currently passed between processes,
2259badbfd0aSchristos.Qq in flight .
2260badbfd0aSchristos.It Li deferred
2261badbfd0aSchristosThe number of file descriptors passed between processes that have been
2262badbfd0aSchristosdeferred for cleanup by a kernel task.
2263badbfd0aSchristos.El
2264badbfd0aSchristos.Pp
2265badbfd0aSchristosOther variables are specific to a socket type:
2266badbfd0aSchristos.Bl -column "seqpacket" "sendspace" "integer" "Changeable" -offset indent
2267badbfd0aSchristos.It Sy "Socket Type"  	Sy Variable	Type Ta Sy Changeable
2268badbfd0aSchristos.It dgram	pcblist	struct	no
2269badbfd0aSchristos.It dgram	recvspace	integer	yes
2270badbfd0aSchristos.It dgram	sendspace	integer	yes
2271badbfd0aSchristos.It seqpacket	pcblist	struct	no
2272badbfd0aSchristos.It stream	pcblist	struct	no
2273badbfd0aSchristos.It stream	recvspace	integer	yes
2274badbfd0aSchristos.It stream	sendspace	integer	yes
2275badbfd0aSchristos.El
2276badbfd0aSchristosThe variables are as follows:
2277badbfd0aSchristos.Bl -tag -width "123456"
2278badbfd0aSchristos.It Li dgram.pcblist
2279badbfd0aSchristosThe Protocol Control Block list structure for datagram sockets.
2280badbfd0aSchristosParsed by
2281eefb44d3Swiz.Xr netstat 1
2282badbfd0aSchristosor
2283eefb44d3Swiz.Xr sockstat 1 .
2284badbfd0aSchristos.It Li dgram.recvspace
2285badbfd0aSchristosThe default datagram receive buffer size.
2286badbfd0aSchristos.It Li dgram.sendspace
2287badbfd0aSchristosThe default datagram send buffer size.
2288badbfd0aSchristos.It Li seqpacket.pcblist
2289badbfd0aSchristosThe Protocol Control Block list structure for Sequential Packet sockets.
2290badbfd0aSchristosParsed by
2291eefb44d3Swiz.Xr netstat 1
2292badbfd0aSchristosor
2293eefb44d3Swiz.Xr sockstat 1 .
2294badbfd0aSchristos.It Li stream.pcblist
2295badbfd0aSchristosThe Protocol Control Block list structure for stream sockets.
2296badbfd0aSchristosParsed by
2297eefb44d3Swiz.Xr netstat 1
2298badbfd0aSchristosor
2299eefb44d3Swiz.Xr sockstat 1 .
2300badbfd0aSchristos.It Li stream.recvspace
2301badbfd0aSchristosThe default stream receive buffer size.
2302badbfd0aSchristos.It Li stream.sendspace
2303badbfd0aSchristosThe default stream send buffer size.
2304badbfd0aSchristos.El
2305edab7457Spavel.El
2306a0585143Sjruoho.Ss The proc.* subtree
2307edab7457SpavelThe string and integer information available for the
2308edab7457Spavel.Li proc
2309edab7457Spavellevel is detailed below.
2310edab7457SpavelThe changeable column shows whether a process with appropriate
2311edab7457Spavelprivilege may change the value.
2312edab7457SpavelThese values are per-process,
2313edab7457Spaveland as such may change from one process to another.
2314edab7457SpavelWhen a process is created,
2315edab7457Spavelthe default values are inherited from its parent.
2316edab7457SpavelWhen a set-user-ID or set-group-ID binary is executed, the
2317edab7457Spavelvalue of PROC_PID_CORENAME is reset to the system default value.
2318edab7457SpavelThe second level name is either the magic value PROC_CURPROC, which
2319edab7457Spavelpoints to the current process, or the PID of the target process.
2320bcacc711Sjoerg.Bl -column "proc.pid.corename" "string" "not applicable" -offset indent
2321aca767b2Swiz.It Sy Third level name Ta Sy Type Ta Sy Changeable
2322edab7457Spavel.It proc.pid.corename	string	yes
2323edab7457Spavel.It proc.pid.rlimit	node	not applicable
2324edab7457Spavel.It proc.pid.stopfork	int	yes
2325edab7457Spavel.It proc.pid.stopexec	int	yes
2326edab7457Spavel.It proc.pid.stopexit	int	yes
2327d99457bcSpgoyette.It proc.pid.paxflags	int	no
2328edab7457Spavel.El
2329edab7457Spavel.Bl -tag -width "123456"
233017598373Skamil.It Li proc.pid.corename ( Dv PROC_PID_CORENAME )
2331edab7457SpavelThe template used for the core dump file name (see
2332edab7457Spavel.Xr core 5
2333edab7457Spavelfor details).
2334edab7457SpavelThe base name must either be
233510263f69Suwe.Pa core
233610263f69Suweor end with the suffix
233710263f69Suwe.Pa .core
233810263f69Suwe(the super-user may set arbitrary names).
233910263f69SuweBy default it points to
234010263f69Suwe.Dv KERN_DEFCORENAME .
234117598373Skamil.It Li proc.pid.rlimit ( Dv PROC_PID_LIMIT )
2342edab7457SpavelReturn resources limits, as defined for the
2343edab7457Spavel.Xr getrlimit 2
2344edab7457Spaveland
2345edab7457Spavel.Xr setrlimit 2
2346edab7457Spavelsystem calls.
2347edab7457SpavelThe fourth level name is one of:
234810263f69Suwe.Bl -tag -width "123456"
234917598373Skamil.It Li proc.pid.rlimit.cputime ( Dv PROC_PID_LIMIT_CPU )
2350edab7457SpavelThe maximum amount of CPU time (in seconds) to be used by each process.
235117598373Skamil.It Li proc.pid.rlimit.filesize ( Dv PROC_PID_LIMIT_FSIZE )
2352edab7457SpavelThe largest size (in bytes) file that may be created.
235317598373Skamil.It Li proc.pid.rlimit.datasize ( Dv PROC_PID_LIMIT_DATA )
2354edab7457SpavelThe maximum size (in bytes) of the data segment for a process;
2355edab7457Spavelthis defines how far a program may extend its break with the
2356edab7457Spavel.Xr sbrk 2
2357edab7457Spavelsystem call.
235817598373Skamil.It Li proc.pid.rlimit.stacksize ( Dv PROC_PID_LIMIT_STACK )
2359edab7457SpavelThe maximum size (in bytes) of the stack segment for a process;
2360edab7457Spavelthis defines how far a program's stack segment may be extended.
2361edab7457SpavelStack extension is performed automatically by the system.
236217598373Skamil.It Li proc.pid.rlimit.coredumpsize ( Dv PROC_PID_LIMIT_CORE )
2363edab7457SpavelThe largest size (in bytes)
2364edab7457Spavel.Pa core
2365edab7457Spavelfile that may be created.
236617598373Skamil.It Li proc.pid.rlimit.memoryuse ( Dv PROC_PID_LIMIT_RSS )
2367edab7457SpavelThe maximum size (in bytes) to which a process's resident set size may
2368edab7457Spavelgrow.
2369edab7457SpavelThis imposes a limit on the amount of physical memory to be given to
2370edab7457Spavela process; if memory is tight, the system will prefer to take memory
2371edab7457Spavelfrom processes that are exceeding their declared resident set size.
237217598373Skamil.It Li proc.pid.rlimit.memorylocked ( Dv PROC_PID_LIMIT_MEMLOCK )
2373edab7457SpavelThe maximum size (in bytes) which a process may lock into memory
2374edab7457Spavelusing the
2375edab7457Spavel.Xr mlock 2
2376edab7457Spavelfunction.
237717598373Skamil.It Li proc.pid.rlimit.maxproc ( Dv PROC_PID_LIMIT_NPROC )
2378edab7457SpavelThe maximum number of simultaneous processes for this user id.
237917598373Skamil.It Li proc.pid.rlimit.descriptors ( Dv PROC_PID_LIMIT_NOFILE )
2380edab7457SpavelThe maximum number of open files for this process.
238117598373Skamil.It Li proc.pid.rlimit.sbsize ( Dv PROC_PID_LIMIT_SBSIZE )
2382f5d17052SsnjThe maximum size (in bytes) of the socket buffers
2383f5d17052Ssnjset by the
2384f5d17052Ssnj.Xr setsockopt 2
2385f5d17052Ssnj.Dv SO_RCVBUF
2386f5d17052Ssnjand
2387f5d17052Ssnj.Dv SO_SNDBUF
2388f5d17052Ssnjoptions.
238917598373Skamil.It Li proc.pid.rlimit.vmemoryuse ( Dv PROC_PID_LIMIT_AS )
23903867e136SkamilThe maximum size (in bytes) which a process can obtain.
239117598373Skamil.It Li proc.pid.rlimit.maxlwp ( Dv PROC_PID_LIMIT_NTHR )
23923867e136SkamilThe maximum number of threads that cen be created and running at one time in
23933867e136Skamilthe process.
23943867e136SkamilThe first thread of each process is not counted against this.
2395edab7457Spavel.El
2396edab7457Spavel.Pp
2397edab7457SpavelThe fifth level name is one of
239817598373Skamil.Li soft ( Dv PROC_PID_LIMIT_TYPE_SOFT )
239910263f69Suweor
240017598373Skamil.Li hard ( Dv PROC_PID_LIMIT_TYPE_HARD ) ,
2401edab7457Spavelto select respectively the soft or hard limit.
2402edab7457SpavelBoth are of type integer.
240317598373Skamil.It Li proc.pid.stopfork ( Dv PROC_PID_STOPFORK )
2404edab7457SpavelIf non zero, the process' children will be stopped after
2405edab7457Spavel.Xr fork 2
2406edab7457Spavelcalls.
2407d2ec8f88SpgoyetteThe children are created in the SSTOP state and are never scheduled
2408edab7457Spavelfor running before being stopped.
240980e8985aSpgoyetteThis feature enables attaching to a process with a debugger such as
2410edab7457Spavel.Xr gdb 1
241180e8985aSpgoyettebefore the process has the opportunity to actually do anything.
2412edab7457Spavel.Pp
2413edab7457SpavelThis value is inherited by the process's children, and it also
2414d2ec8f88Spgoyetteapplies to emulation specific system calls that fork a new process, such as
2415edab7457Spavel.Fn sproc
2416edab7457Spavelor
2417edab7457Spavel.Fn clone .
241817598373Skamil.It Li proc.pid.stopexec ( Dv PROC_PID_STOPEXEC )
2419d2ec8f88SpgoyetteIf non zero, the process will be stopped on the next
2420edab7457Spavel.Xr exec 3
2421edab7457Spavelcall.
2422edab7457SpavelThe process created by
2423edab7457Spavel.Xr exec 3
2424edab7457Spavelis created in the SSTOP state and is never scheduled for running
2425edab7457Spavelbefore being stopped.
2426d2ec8f88SpgoyetteThis feature enables attaching to a process with a debugger such as
2427edab7457Spavel.Xr gdb 1
242880e8985aSpgoyettebefore the process has the opportunity to actually do anything.
2429edab7457Spavel.Pp
2430edab7457SpavelThis value is inherited by the process's children.
243117598373Skamil.It Li proc.pid.stopexit ( Dv PROC_PID_STOPEXIT )
2432d2ec8f88SpgoyetteIf non zero, the process will be stopped when it has cause to exit,
2433edab7457Spaveleither by way of calling
2434edab7457Spavel.Xr exit 3 ,
2435edab7457Spavel.Xr _exit 2 ,
2436edab7457Spavelor by the receipt of a specific signal.
2437edab7457SpavelThe process is stopped before any of its resources or vm space is
2438d2ec8f88Spgoyettereleased allowing examination of the termination state of the process
2439edab7457Spavelbefore it disappears.
2440edab7457SpavelThis feature can be used to examine the final conditions of the
2441edab7457Spavelprocess's vmspace via
2442edab7457Spavel.Xr pmap 1
2443edab7457Spavelor its resource settings with
2444edab7457Spavel.Xr sysctl 8
2445edab7457Spavelbefore it disappears.
2446edab7457Spavel.Pp
2447edab7457SpavelThis value is also inherited by the process's children.
2448d99457bcSpgoyette.It Li proc.pid.paxflags ( Dv PROC_PID_PAXFLAGS )
2449d99457bcSpgoyetteThis read-only variable returns the current value of the process's pax
2450d99457bcSpgoyetteflags (see
2451d99457bcSpgoyette.Xr paxctl 8 ) .
2452edab7457Spavel.El
245317598373Skamil.Ss The user.* subtree ( Dv CTL_USER )
2454edab7457SpavelThe string and integer information available for the
2455edab7457Spavel.Li user
2456edab7457Spavellevel is detailed below.
2457edab7457SpavelThe changeable column shows whether a process with appropriate
2458edab7457Spavelprivilege may change the value.
2459bcacc711Sjoerg.Bl -column "user.coll_weights_max" "integer" "Changeable" -offset indent
2460aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
2461edab7457Spavel.It user.atexit_max	integer	no
2462edab7457Spavel.It user.bc_base_max	integer	no
2463edab7457Spavel.It user.bc_dim_max	integer	no
2464edab7457Spavel.It user.bc_scale_max	integer	no
2465edab7457Spavel.It user.bc_string_max	integer	no
2466edab7457Spavel.It user.coll_weights_max	integer	no
2467edab7457Spavel.It user.cs_path	string	no
2468edab7457Spavel.It user.expr_nest_max	integer	no
2469edab7457Spavel.It user.line_max	integer	no
2470edab7457Spavel.It user.posix2_c_bind	integer	no
2471edab7457Spavel.It user.posix2_c_dev	integer	no
2472edab7457Spavel.It user.posix2_char_term	integer	no
2473edab7457Spavel.It user.posix2_fort_dev	integer	no
2474edab7457Spavel.It user.posix2_fort_run	integer	no
2475edab7457Spavel.It user.posix2_localedef	integer	no
2476edab7457Spavel.It user.posix2_sw_dev	integer	no
2477edab7457Spavel.It user.posix2_upe	integer	no
2478edab7457Spavel.It user.posix2_version	integer	no
2479edab7457Spavel.It user.re_dup_max	integer	no
2480edab7457Spavel.It user.stream_max	integer	no
2481edab7457Spavel.It user.stream_max	integer	no
2482edab7457Spavel.It user.tzname_max	integer	no
2483edab7457Spavel.El
2484edab7457Spavel.Bl -tag -width "123456"
248517598373Skamil.It Li user.atexit_max ( Dv USER_ATEXIT_MAX )
2486edab7457SpavelThe maximum number of functions that may be registered with
2487edab7457Spavel.Xr atexit 3 .
248817598373Skamil.It Li user.bc_base_max ( Dv USER_BC_BASE_MAX )
2489edab7457SpavelThe maximum ibase/obase values in the
2490edab7457Spavel.Xr bc 1
2491edab7457Spavelutility.
249217598373Skamil.It Li user.bc_dim_max ( Dv USER_BC_DIM_MAX )
2493edab7457SpavelThe maximum array size in the
2494edab7457Spavel.Xr bc 1
2495edab7457Spavelutility.
249617598373Skamil.It Li user.bc_scale_max ( Dv USER_BC_SCALE_MAX )
2497edab7457SpavelThe maximum scale value in the
2498edab7457Spavel.Xr bc 1
2499edab7457Spavelutility.
250017598373Skamil.It Li user.bc_string_max ( Dv USER_BC_STRING_MAX )
2501edab7457SpavelThe maximum string length in the
2502edab7457Spavel.Xr bc 1
2503edab7457Spavelutility.
250417598373Skamil.It Li user.coll_weights_max ( Dv USER_COLL_WEIGHTS_MAX )
2505edab7457SpavelThe maximum number of weights that can be assigned to any entry of
2506edab7457Spavelthe LC_COLLATE order keyword in the locale definition file.
2507edab7457Spavel.It Li user.cs_path ( USER_CS_PATH )
2508edab7457SpavelReturn a value for the
2509edab7457Spavel.Ev PATH
2510edab7457Spavelenvironment variable that finds all the standard utilities.
251117598373Skamil.It Li user.expr_nest_max ( Dv USER_EXPR_NEST_MAX )
2512edab7457SpavelThe maximum number of expressions that can be nested within
2513edab7457Spavelparenthesis by the
2514edab7457Spavel.Xr expr 1
2515edab7457Spavelutility.
251617598373Skamil.It Li user.line_max ( Dv USER_LINE_MAX )
2517edab7457SpavelThe maximum length in bytes of a text-processing utility's input
2518edab7457Spavelline.
251917598373Skamil.It Li user.posix2_char_term ( Dv USER_POSIX2_CHAR_TERM )
2520edab7457SpavelReturn 1 if the system supports at least one terminal type capable of
25215cc9db89Swizall operations described in
25225cc9db89Swiz.St -p1003.2 ,
25235cc9db89Swizotherwise\ 0.
252417598373Skamil.It Li user.posix2_c_bind ( Dv USER_POSIX2_C_BIND )
2525edab7457SpavelReturn 1 if the system's C-language development facilities support the
252610263f69SuweC-Language Bindings Option, otherwise\ 0.
252717598373Skamil.It Li user.posix2_c_dev ( Dv USER_POSIX2_C_DEV )
2528edab7457SpavelReturn 1 if the system supports the C-Language Development Utilities Option,
252910263f69Suweotherwise\ 0.
253017598373Skamil.It Li user.posix2_fort_dev ( Dv USER_POSIX2_FORT_DEV )
2531edab7457SpavelReturn 1 if the system supports the FORTRAN Development Utilities Option,
253210263f69Suweotherwise\ 0.
253317598373Skamil.It Li user.posix2_fort_run ( Dv USER_POSIX2_FORT_RUN )
2534edab7457SpavelReturn 1 if the system supports the FORTRAN Runtime Utilities Option,
253510263f69Suweotherwise\ 0.
253617598373Skamil.It Li user.posix2_localedef ( Dv USER_POSIX2_LOCALEDEF )
253710263f69SuweReturn 1 if the system supports the creation of locales, otherwise\ 0.
253817598373Skamil.It Li user.posix2_sw_dev ( Dv USER_POSIX2_SW_DEV )
2539edab7457SpavelReturn 1 if the system supports the Software Development Utilities Option,
254010263f69Suweotherwise\ 0.
254117598373Skamil.It Li user.posix2_upe ( Dv USER_POSIX2_UPE )
2542edab7457SpavelReturn 1 if the system supports the User Portability Utilities Option,
254310263f69Suweotherwise\ 0.
254417598373Skamil.It Li user.posix2_version ( Dv USER_POSIX2_VERSION )
25455cc9db89SwizThe version of
25465cc9db89Swiz.St -p1003.2
25475cc9db89Swizwith which the system attempts to comply.
254817598373Skamil.It Li user.re_dup_max ( Dv USER_RE_DUP_MAX )
2549edab7457SpavelThe maximum number of repeated occurrences of a regular expression
2550edab7457Spavelpermitted when using interval notation.
255117598373Skamil.It Li user.stream_max ( Dv USER_STREAM_MAX )
2552edab7457SpavelThe minimum maximum number of streams that a process may have open
2553edab7457Spavelat any one time.
255417598373Skamil.It Li user.tzname_max ( Dv USER_TZNAME_MAX )
2555edab7457SpavelThe minimum maximum number of types supported for the name of a
2556edab7457Spaveltimezone.
2557edab7457Spavel.El
255817598373Skamil.Ss The vm.* subtree ( Dv CTL_VM )
2559edab7457SpavelThe string and integer information available for the
2560edab7457Spavel.Li vm
2561edab7457Spavellevel is detailed below.
2562edab7457SpavelThe changeable column shows whether a process with appropriate
2563edab7457Spavelprivilege may change the value.
2564bcacc711Sjoerg.Bl -column "Second level name" "struct uvmexp_sysctl" "Changeable" -offset indent
2565aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
2566edab7457Spavel.It vm.anonmax	int	yes
2567edab7457Spavel.It vm.anonmin	int	yes
2568edab7457Spavel.It vm.bufcache	int	yes
2569edab7457Spavel.It vm.bufmem	int	no
2570edab7457Spavel.It vm.bufmem_hiwater	int	yes
2571edab7457Spavel.It vm.bufmem_lowater	int	yes
2572edab7457Spavel.It vm.execmax	int	yes
2573edab7457Spavel.It vm.execmin	int	yes
2574edab7457Spavel.It vm.filemax	int	yes
2575edab7457Spavel.It vm.filemin	int	yes
2576edab7457Spavel.It vm.loadavg	struct loadavg	no
2577edab7457Spavel.It vm.maxslp	int	no
2578edab7457Spavel.It vm.nkmempages	int	no
2579edab7457Spavel.It vm.uspace	int	no
2580edab7457Spavel.It vm.uvmexp	struct uvmexp	no
2581edab7457Spavel.It vm.uvmexp2	struct uvmexp_sysctl	no
2582edab7457Spavel.It vm.vmmeter	struct vmtotal	no
2583701e13f6Schristos.It vm.proc.map	struct kinfo_vmentry	no
2584001e5ddbSjoerg.It vm.guard_size	unsigned int	no
2585001e5ddbSjoerg.It vm.thread_guard_size	unsigned int	yes
2586f96b491dSriastradh.It vm.swap_encrypt	bool	yes
2587edab7457Spavel.El
2588edab7457Spavel.Bl -tag -width "123456"
258917598373Skamil.It Li vm.anonmax ( Dv VM_ANONMAX )
2590edab7457SpavelThe percentage of physical memory which will be reclaimed
2591edab7457Spavelfrom other types of memory usage to store anonymous application data.
259217598373Skamil.It Li vm.anonmin ( Dv VM_ANONMIN )
2593edab7457SpavelThe percentage of physical memory which will be always be available for
2594edab7457Spavelanonymous application data.
259517598373Skamil.It Li vm.bufcache ( Dv VM_BUFCACHE )
2596edab7457SpavelThe percentage of physical memory which will be available
2597edab7457Spavelfor the buffer cache.
259817598373Skamil.It Li vm.bufmem ( Dv VM_BUFMEM )
2599edab7457SpavelThe amount of kernel memory that is being used by the buffer cache.
260017598373Skamil.It Li vm.bufmem_lowater ( Dv VM_BUFMEM_LOWATER )
2601edab7457SpavelThe minimum amount of kernel memory to reserve for the
2602edab7457Spavelbuffer cache.
260317598373Skamil.It Li vm.bufmem_hiwater ( Dv VM_BUFMEM_HIWATER )
2604edab7457SpavelThe maximum amount of kernel memory to be used for the
2605edab7457Spavelbuffer cache.
260617598373Skamil.It Li vm.execmax ( Dv VM_EXECMAX )
2607edab7457SpavelThe percentage of physical memory which will be reclaimed
2608edab7457Spavelfrom other types of memory usage to store cached executable data.
260917598373Skamil.It Li vm.execmin ( Dv VM_EXECMIN )
2610edab7457SpavelThe percentage of physical memory which will be always be available for
2611edab7457Spavelcached executable data.
261217598373Skamil.It Li vm.filemax ( Dv VM_FILEMAX )
2613edab7457SpavelThe percentage of physical memory which will be reclaimed
2614edab7457Spavelfrom other types of memory usage to store cached file data.
261517598373Skamil.It Li vm.filemin ( Dv VM_FILEMIN )
2616edab7457SpavelThe percentage of physical memory which will be always be available for
2617edab7457Spavelcached file data.
261817598373Skamil.It Li vm.loadavg ( Dv VM_LOADAVG )
2619edab7457SpavelReturn the load average history.
2620edab7457SpavelThe returned data consists of a
262110263f69Suwe.Vt struct loadavg .
262217598373Skamil.It Li vm.maxslp ( Dv VM_MAXSLP )
2623edab7457SpavelThe value of the maxslp kernel global variable.
262417598373Skamil.It Li vm.vmmeter ( Dv VM_METER )
2625edab7457SpavelReturn system wide virtual memory statistics.
2626edab7457SpavelThe returned data consists of a
262710263f69Suwe.Vt struct vmtotal .
26289783f258Sdrochner.It vm.user_va0_disable
262910263f69SuweA flag which controls whether user processes can map virtual address\ 0.
2630701e13f6Schristos.It Li vm.proc.map ( Dv VM_PROC )
2631701e13f6SchristosThe third level is
26329f3dcb26Swiz.Dv VM_PROC_MAP ,
2633701e13f6Schristosthe fourth is the pid of the process to display the vm object entries for, and
2634701e13f6Schristosthe fifth is the size of
2635701e13f6Schristos.Vt struct kinfo_vmentry .
2636701e13f6SchristosReturns an array of
2637701e13f6Schristos.Vt struct kinfo_vmentry
2638701e13f6Schristosobjects.
26394fe11140Sriastradh.It Li vm.ubc_direct Bq Sy "EXPERIMENTAL" Ns No , default off
2640bff033feSjdolecekUse direct map for UBC I/O, avoiding need to map and unmap buffer memory.
2641bff033feSjdolecekSpeeds up operation for fast I/O devices like NVMe, especially
2642bff033feSjdolecekon multi-CPU systems.
2643bff033feSjdolecekOnly available on some architectures.
264417598373Skamil.It Li vm.uspace ( Dv VM_USPACE )
2645edab7457SpavelThe number of bytes allocated for each kernel stack.
264617598373Skamil.It Li vm.uvmexp ( Dv VM_UVMEXP )
2647edab7457SpavelReturn system wide virtual memory statistics.
2648edab7457SpavelThe returned data consists of a
264910263f69Suwe.Vt struct uvmexp .
265017598373Skamil.It Li vm.uvmexp2 ( Dv VM_UVMEXP2 )
2651edab7457SpavelReturn system wide virtual memory statistics.
2652edab7457SpavelThe returned data consists of a
265310263f69Suwe.Vt struct uvmexp_sysctl .
2654001e5ddbSjoerg.It Li vm.guard_size
2655001e5ddbSjoergReturn system wide guard size for the main thread of a program.
2656001e5ddbSjoerg.It Li vm.thread_guard_size
2657001e5ddbSjoergReturn system wide default size for the guard area of all other threads
2658001e5ddbSjoergof a program.
2659d0318bc6Snia.It Li vm.swap_encrypt
2660f96b491dSriastradhIf true, encrypt data while swapped out to disk.
2661f96b491dSriastradh.Pp
2662f96b491dSriastradhEach swap device maintains an independent AES-256 key, generated when
2663f96b491dSriastradhthe first page is swapped to that device.
2664f96b491dSriastradhEach page is swapped independently using AES-CBC, with an
2665f96b491dSriastradhinitialization vector chosen by the encryption under the AES-256 key of
2666f96b491dSriastradhthe little-endian swap slot number padded to 128 bits with zeros.
2667f96b491dSriastradh(This is essentially the
2668f96b491dSriastradh.Xr cgd 4
2669f96b491dSriastradh.Sq encblkno1
2670f96b491dSriastradhmethod.)
2671f96b491dSriastradh.Pp
2672f96b491dSriastradhChanges to
2673f96b491dSriastradh.Li vm.swap_encrypt
2674f96b491dSriastradhonly affect pages of swap newly written out.
2675f96b491dSriastradhTo force encrypting or decrypting all existing swap, or to rekey
2676f96b491dSriastradhpreviously encrypted swap, you can remove the swap devices and re-add
2677f96b491dSriastradhthem with
2678f96b491dSriastradh.Xr swapctl 8 ,
2679f96b491dSriastradhwith the caveat that whatever pages were already written to disk
2680f96b491dSriastradhunencrypted or encrypted with a compromised key may still be written to
2681f96b491dSriastradhdisk afterward.
2682edab7457Spavel.El
268317598373Skamil.Ss The ddb.* subtree ( Dv CTL_DDB )
268405ddae5eSjruohoThe information available for the
2685edab7457Spavel.Li ddb
2686edab7457Spavellevel is detailed below.
2687edab7457SpavelThe changeable column shows whether a process with appropriate
2688edab7457Spavelprivilege may change the value.
2689bcacc711Sjoerg.Bl -column "Second level name" "integer" "Changeable" -offset indent
2690aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
269180722e99Ssevan.It ddb.commandonenter	string	yes
26921c253e45Ssevan.It ddb.dumpstack 	integer	yes
269380722e99Ssevan.It ddb.fromconsole	integer	yes
269480722e99Ssevan.It ddb.lines	integer	yes
2695edab7457Spavel.It ddb.maxoff	integer	yes
269605ddae5eSjruoho.It ddb.maxwidth	integer	yes
2697edab7457Spavel.It ddb.onpanic	integer	yes
26989eb91615Schristos.It ddb.panicstackframes	integer	yes
269980722e99Ssevan.It ddb.radix	integer	yes
270080722e99Ssevan.It ddb.tabstops	integer	yes
270180722e99Ssevan.It ddb.tee_msgbuf	integer	yes
2702edab7457Spavel.El
2703edab7457Spavel.Bl -tag -width "123456"
270480722e99Ssevan.It Li ddb.commandonenter
2705664dbfa4SsevanIf not empty, the string is used as the DDB command to be executed each time
2706664dbfa4SsevanDDB is entered.
27071c253e45Ssevan.It Li ddb.dumpstack
27081c253e45SsevanA value of 1 causes a stack trace to be printed on entering ddb from a panic.
2709c35bf490SwizA value of 0 disables this behaviour.
2710c35bf490SwizThe default value is 1.
271180722e99Ssevan.It Li ddb.fromconsole ( Dv DDBCTL_FROMCONSOLE )
271280722e99SsevanIf not zero, DDB may be entered by sending a break on a serial
271380722e99Ssevanconsole or by a special key sequence on a graphics console.
271480722e99Ssevan.It Li ddb.lines ( Dv DDBCTL_LINES )
271580722e99SsevanNumber of display lines.
271617598373Skamil.It Li ddb.maxoff ( Dv DDBCTL_MAXOFF )
2717edab7457SpavelThe maximum symbol offset.
271817598373Skamil.It Li ddb.maxwidth ( Dv DDBCTL_MAXWIDTH )
271905ddae5eSjruohoThe maximum output line width.
272017598373Skamil.It Li ddb.onpanic ( Dv DDBCTL_ONPANIC )
2721e9fc2b6fSrizIf greater than zero, DDB will be entered if the kernel panics.
27221c253e45SsevanA value of 1 causes the system to enter DDB on panic.
2723e9fc2b6fSrizA value of 0 causes the kernel to attempt to print a stack trace, then
272457d979b3Swizreboot, while a value of \-1 means neither a stack trace will be printed
2725e9fc2b6fSriznor DDB entered.
27269eb91615Schristos.It Li ddb.panicstackframes
27279eb91615SchristosNumber of stack frames to display on panic.
2728d31c8296SwizUseful to avoid scrolling away the interesting frames on a glass tty.
27299eb91615SchristosDefault value is
27309eb91615Schristos.Dv 65535
27319eb91615Schristos(all frames), useful value around
27329eb91615Schristos.Dv 10 .
273380722e99Ssevan.It Li ddb.radix ( Dv DDBCTL_RADIX )
273480722e99SsevanThe input and output radix.
273580722e99Ssevan.It Li ddb.tabstops ( Dv DDBCTL_TABSTOPS )
273680722e99SsevanTab width.
273780722e99Ssevan.It Li ddb.tee_msgbuf
273880722e99SsevanIf not zero, DDB will output also to the kernel message buffer.
2739edab7457Spavel.El
2740edab7457Spavel.Pp
274185227de8SwizSome of these MIB
274205ddae5eSjruohonodes are also available as variables from within the debugger.
2743edab7457SpavelSee
2744edab7457Spavel.Xr ddb 4
2745edab7457Spavelfor more details.
274617598373Skamil.Ss The security.* subtree ( Dv CTL_SECURITY )
2747edab7457SpavelThe
2748edab7457Spavel.Li security
2749edab7457Spavellevel contains various security-related settings for
275050026664Swizthe system.
275191d2b147SjruohoThe available second level names are:
275291d2b147Sjruoho.Bl -column "Second level name" "integer" "Changeable" -offset indent
2753aca767b2Swiz.It Sy Second level name Ta Sy Type Ta Sy Changeable
275491d2b147Sjruoho.It Li security.curtain	integer	yes
275591d2b147Sjruoho.It Li security.models	node	not applicable
275691d2b147Sjruoho.It Li security.pax	node	not applicable
275791d2b147Sjruoho.El
275891d2b147Sjruoho.Pp
275950026664SwizAvailable settings are detailed below.
2760edab7457Spavel.Bl -tag -width "123456"
2761edab7457Spavel.It Li security.curtain
276285227de8SwizIf non-zero, will filter return objects according to the user ID
2763f4bbc3f7Spgoyetterequesting information about them, preventing users from
2764f4bbc3f7Spgoyetteaccessing any objects they do not own.
2765edab7457Spavel.Pp
2766edab7457SpavelAt the moment, it affects
2767edab7457Spavel.Xr ps 1 ,
2768edab7457Spavel.Xr netstat 1
2769edab7457Spavel(for
2770edab7457Spavel.Dv PF_INET ,
2771edab7457Spavel.Dv PF_INET6 ,
2772edab7457Spaveland
2773edab7457Spavel.Dv PF_UNIX
2774edab7457SpavelPCBs), and
2775edab7457Spavel.Xr w 1 .
27762f9fd85bSelad.It Li security.models
27772f9fd85bSelad.Nx
27782f9fd85bSeladsupports pluggable security models.
27790efea177SadEvery security model used, whether if loaded as a module or built with the system,
27802f9fd85bSeladis required to add an entry to this node with at least one element,
27812f9fd85bSelad.Dq name ,
27822f9fd85bSeladindicating the name of the security model.
27832f9fd85bSelad.Pp
27842f9fd85bSeladIn addition to the name, any settings and other information private to the
27852f9fd85bSeladsecurity model will be available under this node.
27862f9fd85bSeladSee
27872f9fd85bSelad.Xr secmodel 9
27882f9fd85bSeladfor more information.
2789edab7457Spavel.It Li security.pax
2790eefb44d3SwizSettings for PaX \(em exploit mitigation features.
27912f9fd85bSeladFor more information on any of the PaX features, please see
27922f9fd85bSelad.Xr paxctl 8
27932f9fd85bSeladand
27940ad14641Sjruoho.Xr security 7 .
279591d2b147SjruohoThe available third and fourth level names are:
279691d2b147Sjruoho.Bl -column "security.pax.segvguard.suspend_timeout" "integer" "Changeable" \
279791d2b147Sjruoho-offset 2n
279891d2b147Sjruoho.It Sy Third and fourth level names Ta Sy Type Ta Sy Changeable
279991d2b147Sjruoho.It Li security.pax.aslr.enabled	integer	yes
280091d2b147Sjruoho.\".It Li security.pax.aslr.exec_len	integer	yes
280191d2b147Sjruoho.It Li security.pax.aslr.global	integer	yes
280291d2b147Sjruoho.\".It Li security.pax.aslr.mmap_len	integer	yes
280391d2b147Sjruoho.\".It Li security.pax.aslr.stack_len	integer	yes
280491d2b147Sjruoho.It Li security.pax.mprotect.enabled	integer	yes
280591d2b147Sjruoho.It Li security.pax.mprotect.global	integer	yes
28063b5bb479Schristos.It Li security.pax.mprotect.ptrace	integer	yes
280791d2b147Sjruoho.It Li security.pax.segvguard.enabled	integer	yes
280891d2b147Sjruoho.It Li security.pax.segvguard.expiry_timeout	integer	yes
280991d2b147Sjruoho.It Li security.pax.segvguard.global	integer	yes
281091d2b147Sjruoho.It Li security.pax.segvguard.max_crashes	integer	yes
281191d2b147Sjruoho.It Li security.pax.segvguard.suspend_timeout	integer	yes
281291d2b147Sjruoho.El
2813edab7457Spavel.Bl -tag -width "123456"
281491d2b147Sjruoho.It Li security.pax.aslr.enabled
2815cc43e61eSeladEnable PaX ASLR (Address Space Layout Randomization).
2816cc43e61eSelad.Pp
2817cc43e61eSeladThe value of this
2818cc43e61eSeladknob must be non-zero for PaX ASLR to be enabled, even if a program is set to
2819cc43e61eSeladexplicit enable.
282091d2b147Sjruoho.\".It Li security.pax.aslr.exec_len
282191d2b147Sjruoho.\" XXX: Undocumented.
2822cc43e61eSelad.It Li security.pax.aslr.global
2823cc43e61eSeladSpecifies the default global policy for programs without an
2824cc43e61eSeladexplicit enable/disable flag.
2825cc43e61eSelad.Pp
2826cc43e61eSeladWhen non-zero, all programs will get PaX ASLR, except those exempted with
2827cc43e61eSelad.Xr paxctl 8 .
2828cc43e61eSeladOtherwise, all programs will not get PaX ASLR, except those specifically
2829cc43e61eSeladmarked as such with
2830cc43e61eSelad.Xr paxctl 8 .
283191d2b147Sjruoho.\".It Li security.pax.aslr.mmap_len
283291d2b147Sjruoho.\" XXX: Undocumented.
283391d2b147Sjruoho.\" .It Li security.pax.aslr.stack_len
283491d2b147Sjruoho.\" XXX: Undocumented.
283591d2b147Sjruoho.It Li security.pax.mprotect.enabled
2836edab7457SpavelEnable PaX MPROTECT restrictions.
2837edab7457Spavel.Pp
2838edab7457SpavelThese are
2839edab7457Spavel.Xr mprotect 2
284050026664Swizrestrictions to better enforce a W^X policy.
284150026664SwizThe value of this
2842edab7457Spavelknob must be non-zero for PaX MPROTECT to be enabled, even if a
2843edab7457Spavelprogram is set to explicit enable.
2844edab7457Spavel.It Li security.pax.mprotect.global
2845edab7457SpavelSpecifies the default global policy for programs without an
2846edab7457Spavelexplicit enable/disable flag.
2847edab7457Spavel.Pp
2848edab7457SpavelWhen non-zero, all programs will get the PaX MPROTECT restrictions,
2849edab7457Spavelexcept those exempted with
28502f9fd85bSelad.Xr paxctl 8 .
2851edab7457SpavelOtherwise, all programs will not get the PaX MPROTECT restrictions,
2852edab7457Spavelexcept those specifically marked as such with
28532f9fd85bSelad.Xr paxctl 8 .
28543b5bb479Schristos.It Li security.pax.mprotect.ptrace
28553b5bb479SchristosThis variable allows
28563b5bb479Schristos.Xr ptrace 2
28573b5bb479Schristosto override PaX MPROTECT permissions.
28583b5bb479SchristosIt can have the following values:
28593b5bb479Schristos.Bl -tag -width XX -compact
28603b5bb479Schristos.It 0
28613b5bb479SchristosDoes not let override any permissions.
28623b5bb479Schristos.It 1
28633b5bb479SchristosDisables PaX MPROTECT from processes that start executing while traced (default).
28643b5bb479Schristos.It 2
28653b5bb479SchristosBypasses PaX MPROTECT for all processes being traced.
28663b5bb479Schristos.El
286791d2b147Sjruoho.It Li security.pax.segvguard.enabled
2868edab7457SpavelEnable PaX Segvguard.
2869edab7457Spavel.Pp
2870edab7457SpavelPaX Segvguard can detect and prevent certain exploitation attempts, where
2871edab7457Spavelan attacker may try for example to brute-force function return addresses
2872edab7457Spavelof respawning daemons.
2873edab7457Spavel.Pp
2874edab7457Spavel.Em Note :
2875edab7457SpavelThe
2876edab7457Spavel.Nx
2877edab7457Spavelinterface and implementation of the Segvguard is still experimental, and may
2878edab7457Spavelchange in future releases.
287991d2b147Sjruoho.It Li security.pax.segvguard.expiry_timeout
288091d2b147SjruohoIf the max number was not reached within this timeout (in seconds), the entry
288191d2b147Sjruohowill expire.
2882edab7457Spavel.It Li security.pax.segvguard.global
2883edab7457SpavelSpecifies the default global policy for programs without an
2884edab7457Spavelexplicit enable/disable flag.
2885edab7457Spavel.Pp
2886edab7457SpavelWhen non-zero, all programs will get the PaX Segvguard,
2887edab7457Spavelexcept those exempted with
28882f9fd85bSelad.Xr paxctl 8 .
288950026664SwizOtherwise, no program will get the PaX Segvguard restrictions,
2890edab7457Spavelexcept those specifically marked as such with
28912f9fd85bSelad.Xr paxctl 8 .
289291d2b147Sjruoho.It Li security.pax.segvguard.max_crashes
289391d2b147SjruohoThe maximum number of segfaults a program can receive before suspension.
2894edab7457Spavel.It Li security.pax.segvguard.suspend_timeout
2895edab7457SpavelNumber of seconds to suspend a user from running a faulting program when the
2896edab7457Spavellimit was exceeded.
2897edab7457Spavel.El
2898edab7457Spavel.El
289917598373Skamil.Ss The vendor.* subtree ( Dv CTL_VENDOR )
2900edab7457SpavelThe
2901edab7457Spavel.Li vendor
2902edab7457Spaveltoplevel name is reserved to be used by vendors who wish to
2903edab7457Spavelhave their own private MIB tree.
2904edab7457SpavelIntended use is to store values under
290501869ca4Swiz.Dq vendor.<yourname>.* .
2906edab7457Spavel.Sh SEE ALSO
2907edab7457Spavel.Xr sysctl 3 ,
2908edab7457Spavel.Xr ipsec 4 ,
2909edab7457Spavel.Xr tcp 4 ,
29100ad14641Sjruoho.Xr security 7 ,
2911edab7457Spavel.Xr sysctl 8
2912edab7457Spavel.Sh HISTORY
2913edab7457SpavelThe
2914edab7457Spavel.Nm
2915edab7457Spavelvariables first appeared in
2916edab7457Spavel.Bx 4.4 .
2917