Sun Jun 18 18:16:40 2023 UTC ()
sysctl(7): Note nodev,nosuid requirement for user-mounted fs.

While here, tidy up language and markup a smidge.


(riastradh)
diff -r1.164 -r1.165 src/share/man/man7/sysctl.7

cvs diff -r1.164 -r1.165 src/share/man/man7/sysctl.7 (switch to unified diff)

--- src/share/man/man7/sysctl.7 2023/05/29 23:30:47 1.164
+++ src/share/man/man7/sysctl.7 2023/06/18 18:16:40 1.165
@@ -1,1150 +1,1161 @@ @@ -1,1150 +1,1161 @@
1.\" $NetBSD: sysctl.7,v 1.164 2023/05/29 23:30:47 gutteridge Exp $ 1.\" $NetBSD: sysctl.7,v 1.165 2023/06/18 18:16:40 riastradh Exp $
2.\" 2.\"
3.\" Copyright (c) 1993 3.\" Copyright (c) 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
15.\" may be used to endorse or promote products derived from this software 15.\" may be used to endorse or promote products derived from this software
16.\" without specific prior written permission. 16.\" without specific prior written permission.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 30.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
31.\" 31.\"
32.Dd May 29, 2023 32.Dd May 29, 2023
33.Dt SYSCTL 7 33.Dt SYSCTL 7
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm sysctl 36.Nm sysctl
37.Nd system information variables 37.Nd system information variables
38.Sh DESCRIPTION 38.Sh DESCRIPTION
39The 39The
40.Xr sysctl 3 40.Xr sysctl 3
41library function and the 41library function and the
42.Xr sysctl 8 42.Xr sysctl 8
43utility are used to get and set values of system variables, maintained 43utility are used to get and set values of system variables, maintained
44by the kernel. 44by the kernel.
45The variables are organized in a tree and identified by a sequence of 45The variables are organized in a tree and identified by a sequence of
46numbers, conventionally separated by dots with the topmost identifier 46numbers, conventionally separated by dots with the topmost identifier
47at the left side. 47at the left side.
48The numbers have corresponding text names. 48The numbers have corresponding text names.
49The 49The
50.Xr sysctlnametomib 3 50.Xr sysctlnametomib 3
51function or the 51function or the
52.Fl M 52.Fl M
53argument to the 53argument to the
54.Xr sysctl 8 54.Xr sysctl 8
55utility can be used to convert the text representation to the 55utility can be used to convert the text representation to the
56numeric one. 56numeric one.
57.Pp 57.Pp
58The individual sysctl variables are described below, both the textual 58The individual sysctl variables are described below, both the textual
59and numeric form where applicable. 59and numeric form where applicable.
60The textual names can be used as argument to the 60The textual names can be used as argument to the
61.Xr sysctl 8 61.Xr sysctl 8
62utility and in the file 62utility and in the file
63.Pa /etc/sysctl.conf . 63.Pa /etc/sysctl.conf .
64The numeric names are usually defined as preprocessor constants and 64The numeric names are usually defined as preprocessor constants and
65are intended for use by programs. 65are intended for use by programs.
66Every such constant expands to one integer, which identifies the 66Every such constant expands to one integer, which identifies the
67sysctl variable relative to the upper level of the tree. 67sysctl variable relative to the upper level of the tree.
68See the 68See the
69.Xr sysctl 3 69.Xr sysctl 3
70manual page for programming examples. 70manual page for programming examples.
71.Ss Top level names 71.Ss Top level names
72The top level names are defined with a 72The top level names are defined with a
73.Va CTL_ 73.Va CTL_
74prefix in 74prefix in
75.In sys/sysctl.h , 75.In sys/sysctl.h ,
76and are as follows. 76and are as follows.
77The next and subsequent levels down are found in the include files 77The next and subsequent levels down are found in the include files
78listed here, and described in separate sections below. 78listed here, and described in separate sections below.
79.Bl -column "security" ".Dv CTL_SECURITY" ".In uvm/uvm_param.h" "High kernel limits" 79.Bl -column "security" ".Dv CTL_SECURITY" ".In uvm/uvm_param.h" "High kernel limits"
80.It Sy Name Ta Sy Constant Ta Sy Next level names Ta Sy Description 80.It Sy Name Ta Sy Constant Ta Sy Next level names Ta Sy Description
81.It kern Ta Dv CTL_KERN Ta In sys/sysctl.h Ta High kernel limits 81.It kern Ta Dv CTL_KERN Ta In sys/sysctl.h Ta High kernel limits
82.It vm Ta Dv CTL_VM Ta In uvm/uvm_param.h Ta Virtual memory 82.It vm Ta Dv CTL_VM Ta In uvm/uvm_param.h Ta Virtual memory
83.It vfs Ta Dv CTL_VFS Ta In sys/mount.h Ta Filesystem 83.It vfs Ta Dv CTL_VFS Ta In sys/mount.h Ta Filesystem
84.It net Ta Dv CTL_NET Ta In sys/socket.h Ta Networking 84.It net Ta Dv CTL_NET Ta In sys/socket.h Ta Networking
85.It debug Ta Dv CTL_DEBUG Ta In sys/sysctl.h Ta Debugging 85.It debug Ta Dv CTL_DEBUG Ta In sys/sysctl.h Ta Debugging
86.It hw Ta Dv CTL_HW Ta In sys/sysctl.h Ta Generic CPU, I/O 86.It hw Ta Dv CTL_HW Ta In sys/sysctl.h Ta Generic CPU, I/O
87.It machdep Ta Dv CTL_MACHDEP Ta In sys/sysctl.h Ta Machine dependent 87.It machdep Ta Dv CTL_MACHDEP Ta In sys/sysctl.h Ta Machine dependent
88.It user Ta Dv CTL_USER Ta In sys/sysctl.h Ta User-level 88.It user Ta Dv CTL_USER Ta In sys/sysctl.h Ta User-level
89.It ddb Ta Dv CTL_DDB Ta In sys/sysctl.h Ta In-kernel debugger 89.It ddb Ta Dv CTL_DDB Ta In sys/sysctl.h Ta In-kernel debugger
90.It proc Ta Dv CTL_PROC Ta In sys/sysctl.h Ta Per-process 90.It proc Ta Dv CTL_PROC Ta In sys/sysctl.h Ta Per-process
91.It vendor Ta Dv CTL_VENDOR Ta ? Ta Vendor specific 91.It vendor Ta Dv CTL_VENDOR Ta ? Ta Vendor specific
92.It emul Ta Dv CTL_EMUL Ta In sys/sysctl.h Ta Emulation settings 92.It emul Ta Dv CTL_EMUL Ta In sys/sysctl.h Ta Emulation settings
93.It security Ta Dv CTL_SECURITY Ta In sys/sysctl.h Ta Security settings 93.It security Ta Dv CTL_SECURITY Ta In sys/sysctl.h Ta Security settings
94.El 94.El
95.Ss The debug.* subtree 95.Ss The debug.* subtree
96The debugging variables vary from system to system. 96The debugging variables vary from system to system.
97A debugging variable may be added or deleted without need to recompile 97A debugging variable may be added or deleted without need to recompile
98.Nm 98.Nm
99to know about it. 99to know about it.
100Each time it runs, 100Each time it runs,
101.Nm 101.Nm
102gets the list of debugging variables from the kernel and 102gets the list of debugging variables from the kernel and
103displays their current values. 103displays their current values.
104The system defines twenty 104The system defines twenty
105.Vt ( struct ctldebug ) 105.Vt ( struct ctldebug )
106variables named 106variables named
107.Dv debug0 107.Dv debug0
108through 108through
109.Dv debug19 . 109.Dv debug19 .
110They are declared as separate variables so that they can be 110They are declared as separate variables so that they can be
111individually initialized at the location of their associated variable. 111individually initialized at the location of their associated variable.
112The loader prevents multiple use of the same variable by issuing errors 112The loader prevents multiple use of the same variable by issuing errors
113if a variable is initialized in more than one place. 113if a variable is initialized in more than one place.
114For example, to export the variable 114For example, to export the variable
115.Va dospecialcheck 115.Va dospecialcheck
116as a debugging variable, the following declaration would be used: 116as a debugging variable, the following declaration would be used:
117.Pp 117.Pp
118.Bd -literal -offset indent -compact 118.Bd -literal -offset indent -compact
119int dospecialcheck = 1; 119int dospecialcheck = 1;
120struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck }; 120struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck };
121.Ed 121.Ed
122.Pp 122.Pp
123Note that the dynamic implementation of 123Note that the dynamic implementation of
124.Nm 124.Nm
125currently in use largely makes this particular 125currently in use largely makes this particular
126.Nm 126.Nm
127interface obsolete. 127interface obsolete.
128See 128See
129.Xr sysctl 8 129.Xr sysctl 8
130.\" and 130.\" and
131.\" .Xr sysctl 9 131.\" .Xr sysctl 9
132for more information. 132for more information.
133.Ss The vfs.* subtree 133.Ss The vfs.* subtree
134A distinguished second level name, 134A distinguished second level name,
135.Li vfs.generic ( Dv VFS_GENERIC ) , 135.Li vfs.generic ( Dv VFS_GENERIC ) ,
136is used to get general information about all file systems. 136is used to get general information about all file systems.
137It has the following third level identifiers: 137It has the following third level identifiers:
138.Bl -tag -width "123456" 138.Bl -tag -width "123456"
139.It Li vfs.generic.maxtypenum ( Dv VFS_MAXTYPENUM ) 139.It Li vfs.generic.maxtypenum ( Dv VFS_MAXTYPENUM )
140The highest valid file system type number. 140The highest valid file system type number.
141.It Li vfs.generic.conf ( Dv VFS_CONF ) 141.It Li vfs.generic.conf ( Dv VFS_CONF )
142Returns configuration information about the file system type given as a fourth 142Returns configuration information about the file system type given as a fourth
143level identifier. 143level identifier.
144.It Li vfs.generic.usermount ( Dv VFS_USERMOUNT ) 144.It Li vfs.generic.usermount ( Dv VFS_USERMOUNT )
145Determines if non superuser mounts are allowed, defaults to 145Controls whether users other than the super-user can mount file
146.Dv 0 . 146systems.
 147Defaults to
 148.Li 0 ,
 149so only the super-user can mount file systems.
 150.Pp
 151File systems mounted by unprivileged users must be mounted with the
 152.Li nodev
 153and
 154.Li nosuid
 155.Xr mount 8
 156options.
147.It Li vfs.generic.magiclinks ( Dv VFS_MAGICLINKS ) 157.It Li vfs.generic.magiclinks ( Dv VFS_MAGICLINKS )
148Controls if expansion of variables is going to be performed on pathnames 158Controls whether expansion of variables is going to be performed on
149or not. 159pathnames or not.
150Defaults to no variable expansion, 160Defaults to
151.Dv 0 . 161.Li 0 ,
 162no variable expansion.
152Variables are of the form 163Variables are of the form
153.Li @name 164.Li @name
154and the variables supported are described in 165and the variables supported are described in
155.Xr symlink 7 166.Xr symlink 7
156under 167under
157.Dq "MAGIC SYMLINKS" . 168.Dq "MAGIC SYMLINKS" .
158.El 169.El
159.Pp 170.Pp
160A second level name for controlling the 171A second level name for controlling the
161.Xr wapbl 4 172.Xr wapbl 4
162(Write Ahead Physical Block Logging file system journaling) 173(Write Ahead Physical Block Logging file system journaling)
163capabilities with the following third level identifiers: 174capabilities with the following third level identifiers:
164.Bl -tag -width "123456" 175.Bl -tag -width "123456"
165.It Li vfs.wapbl.flush_disk_cache 176.It Li vfs.wapbl.flush_disk_cache
166Controls whether to attempt to flush the disk cache on each commit. 177Controls whether to attempt to flush the disk cache on each commit.
167It defaults to 1 and it should always be on to ensure integrity 178It defaults to 1 and it should always be on to ensure integrity
168of file system metadata in the event of a power loss. 179of file system metadata in the event of a power loss.
169For slow disks, turning it off can improve performance. 180For slow disks, turning it off can improve performance.
170.It Li vfs.wapbl.verbose_commit 181.It Li vfs.wapbl.verbose_commit
171For each transaction log commit, print the number of bytes written 182For each transaction log commit, print the number of bytes written
172and the time it took to commit as seconds.nanoseconds. 183and the time it took to commit as seconds.nanoseconds.
173.El 184.El
174.Pp 185.Pp
175The remaining second level identifiers are the file system names, identified 186The remaining second level identifiers are the file system names, identified
176by the type number returned by a 187by the type number returned by a
177.Xr statvfs 2 188.Xr statvfs 2
178call or from 189call or from
179.Li vfs.generic.conf . 190.Li vfs.generic.conf .
180.Pp 191.Pp
181The third level identifiers available for each file system 192The third level identifiers available for each file system
182are given in the header file that defines the mount 193are given in the header file that defines the mount
183argument structure for that file system. 194argument structure for that file system.
184.Ss The hw.* subtree 195.Ss The hw.* subtree
185The string and integer information available for the 196The string and integer information available for the
186.Li hw 197.Li hw
187level is detailed below. 198level is detailed below.
188The changeable column shows whether a process with appropriate 199The changeable column shows whether a process with appropriate
189privilege may change the value. 200privilege may change the value.
190.Bl -column "hw.machine_arch" "integer" "Changeable" -offset indent 201.Bl -column "hw.machine_arch" "integer" "Changeable" -offset indent
191.It Sy Second level name Ta Sy Type Ta Sy Changeable 202.It Sy Second level name Ta Sy Type Ta Sy Changeable
192.It hw.alignbytes integer no 203.It hw.alignbytes integer no
193.It hw.byteorder integer no 204.It hw.byteorder integer no
194.It hw.cnmagic string yes 205.It hw.cnmagic string yes
195.It hw.disknames string no 206.It hw.disknames string no
196.It hw.diskstats struct no 207.It hw.diskstats struct no
197.It hw.machine string no 208.It hw.machine string no
198.It hw.machine_arch string no 209.It hw.machine_arch string no
199.It hw.model string no 210.It hw.model string no
200.It hw.ncpu integer no 211.It hw.ncpu integer no
201.It hw.ncpuonline integer no 212.It hw.ncpuonline integer no
202.It hw.pagesize integer no 213.It hw.pagesize integer no
203.It hw.physmem integer no 214.It hw.physmem integer no
204.It hw.physmem64 quad no 215.It hw.physmem64 quad no
205.It hw.usermem integer no 216.It hw.usermem integer no
206.It hw.usermem64 quad no 217.It hw.usermem64 quad no
207.El 218.El
208.Bl -tag -width "123456" 219.Bl -tag -width "123456"
209.It Li hw.alignbytes ( Dv HW_ALIGNBYTES ) 220.It Li hw.alignbytes ( Dv HW_ALIGNBYTES )
210Alignment constraint for all possible data types. 221Alignment constraint for all possible data types.
211This shows the value 222This shows the value
212.Dv ALIGNBYTES 223.Dv ALIGNBYTES
213in 224in
214.In machine/param.h , 225.In machine/param.h ,
215at the kernel compilation time. 226at the kernel compilation time.
216.It Li hw.byteorder ( Dv HW_BYTEORDER ) 227.It Li hw.byteorder ( Dv HW_BYTEORDER )
217The byteorder (4321, or 1234). 228The byteorder (4321, or 1234).
218.It Li hw.cnmagic ( Dv HW_CNMAGIC ) 229.It Li hw.cnmagic ( Dv HW_CNMAGIC )
219The console magic key sequence. 230The console magic key sequence.
220.It Li hw.disknames ( Dv HW_DISKNAMES ) 231.It Li hw.disknames ( Dv HW_DISKNAMES )
221The list of (space separated) disk device names on the system. 232The list of (space separated) disk device names on the system.
222.It Li hw.iostatnames ( Dv HW_IOSTATNAMES ) 233.It Li hw.iostatnames ( Dv HW_IOSTATNAMES )
223A space separated list of devices that will have I/O statistics 234A space separated list of devices that will have I/O statistics
224collected on them. 235collected on them.
225.It Li hw.iostats ( Dv HW_IOSTATS ) 236.It Li hw.iostats ( Dv HW_IOSTATS )
226Return statistical information on the NFS mounts, disk and tape 237Return statistical information on the NFS mounts, disk and tape
227devices on the system. 238devices on the system.
228An array of 239An array of
229.Vt struct io_sysctl 240.Vt struct io_sysctl
230structures is returned, 241structures is returned,
231whose size depends on the current number of such objects in the system. 242whose size depends on the current number of such objects in the system.
232The third level name is the size of the 243The third level name is the size of the
233.Vt struct io_sysctl . 244.Vt struct io_sysctl .
234The type of object can be determined by examining the 245The type of object can be determined by examining the
235.Va type 246.Va type
236element of 247element of
237.Vt struct io_sysctl . 248.Vt struct io_sysctl .
238Which can be 249Which can be
239.Dv IOSTAT_DISK 250.Dv IOSTAT_DISK
240(disk drive), 251(disk drive),
241.Dv IOSTAT_TAPE 252.Dv IOSTAT_TAPE
242(tape drive), or 253(tape drive), or
243.Dv IOSTAT_NFS 254.Dv IOSTAT_NFS
244(NFS mount). 255(NFS mount).
245.It Li hw.machine ( Dv HW_MACHINE ) 256.It Li hw.machine ( Dv HW_MACHINE )
246The machine class. 257The machine class.
247.It Li hw.machine_arch ( Dv HW_MACHINE_ARCH ) 258.It Li hw.machine_arch ( Dv HW_MACHINE_ARCH )
248The machine CPU class. 259The machine CPU class.
249.It Li hw.model ( Dv HW_MODEL ) 260.It Li hw.model ( Dv HW_MODEL )
250The machine model. 261The machine model.
251.It Li hw.ncpu ( Dv HW_NCPU ) 262.It Li hw.ncpu ( Dv HW_NCPU )
252The number of CPUs configured. 263The number of CPUs configured.
253.It Li hw.ncpuonline ( Dv HW_NCPUONLINE ) 264.It Li hw.ncpuonline ( Dv HW_NCPUONLINE )
254The number of CPUs online. 265The number of CPUs online.
255.It Li hw.pagesize ( Dv HW_PAGESIZE ) 266.It Li hw.pagesize ( Dv HW_PAGESIZE )
256The software page size. 267The software page size.
257.It Li hw.physmem ( Dv HW_PHYSMEM ) 268.It Li hw.physmem ( Dv HW_PHYSMEM )
258The bytes of physical memory as a 32-bit integer. 269The bytes of physical memory as a 32-bit integer.
259.It Li hw.physmem64 ( Dv HW_PHYSMEM64 ) 270.It Li hw.physmem64 ( Dv HW_PHYSMEM64 )
260The bytes of physical memory as a 64-bit integer. 271The bytes of physical memory as a 64-bit integer.
261.It Li hw.usermem ( Dv HW_USERMEM ) 272.It Li hw.usermem ( Dv HW_USERMEM )
262The bytes of non-kernel memory as a 32-bit integer. 273The bytes of non-kernel memory as a 32-bit integer.
263.It Li hw.usermem64 ( Dv HW_USERMEM64 ) 274.It Li hw.usermem64 ( Dv HW_USERMEM64 )
264The bytes of non-kernel memory as a 64-bit integer. 275The bytes of non-kernel memory as a 64-bit integer.
265.El 276.El
266.Ss The kern.* subtree 277.Ss The kern.* subtree
267This subtree includes data generally related to the kernel. 278This subtree includes data generally related to the kernel.
268The string and integer information available for the 279The string and integer information available for the
269.Li kern 280.Li kern
270level is detailed below. 281level is detailed below.
271The changeable column shows whether a process with appropriate 282The changeable column shows whether a process with appropriate
272privilege may change the value. 283privilege may change the value.
273.Bl -column "kern.posix_reader_writer_locks" \ 284.Bl -column "kern.posix_reader_writer_locks" \
274"struct kinfo_drivers" "not applicable" 285"struct kinfo_drivers" "not applicable"
275.It Sy Second level name Ta Sy Type Ta Sy Changeable 286.It Sy Second level name Ta Sy Type Ta Sy Changeable
276.It kern.aio_listio_max integer yes 287.It kern.aio_listio_max integer yes
277.It kern.aio_max integer yes 288.It kern.aio_max integer yes
278.It kern.arandom integer no 289.It kern.arandom integer no
279.It kern.argmax integer no 290.It kern.argmax integer no
280.It kern.boothowto integer no 291.It kern.boothowto integer no
281.It kern.boottime struct timespec no 292.It kern.boottime struct timespec no
282.It kern.buildinfo string no 293.It kern.buildinfo string no
283.\".It kern.bufq node not applicable 294.\".It kern.bufq node not applicable
284.It kern.ccpu integer no 295.It kern.ccpu integer no
285.It kern.clockrate struct clockinfo no 296.It kern.clockrate struct clockinfo no
286.It kern.consdev integer no 297.It kern.consdev integer no
287.It kern.coredump node not applicable 298.It kern.coredump node not applicable
288.It kern.cp_id struct no 299.It kern.cp_id struct no
289.It kern.cp_time uint64_t[\|] no 300.It kern.cp_time uint64_t[\|] no
290.It kern.cryptodevallowsoft integer yes 301.It kern.cryptodevallowsoft integer yes
291.It kern.defcorename string yes 302.It kern.defcorename string yes
292.It kern.detachall integer yes 303.It kern.detachall integer yes
293.It kern.domainname string yes 304.It kern.domainname string yes
294.It kern.drivers struct kinfo_drivers no 305.It kern.drivers struct kinfo_drivers no
295.It kern.dump_on_panic integer yes 306.It kern.dump_on_panic integer yes
296.It kern.expose_address integer yes 307.It kern.expose_address integer yes
297.It kern.file struct file no 308.It kern.file struct file no
298.It kern.forkfsleep integer yes 309.It kern.forkfsleep integer yes
299.It kern.fscale integer no 310.It kern.fscale integer no
300.It kern.fsync integer no 311.It kern.fsync integer no
301.It kern.hardclock_ticks integer no 312.It kern.hardclock_ticks integer no
302.It kern.hostid integer yes 313.It kern.hostid integer yes
303.It kern.hostname string yes 314.It kern.hostname string yes
304.It kern.iov_max integer no 315.It kern.iov_max integer no
305.It kern.ipc node not applicable 316.It kern.ipc node not applicable
306.It kern.job_control integer no 317.It kern.job_control integer no
307.It kern.labeloffset integer no 318.It kern.labeloffset integer no
308.It kern.labelsector integer no 319.It kern.labelsector integer no
309.It kern.login_name_max integer no 320.It kern.login_name_max integer no
310.It kern.logsigexit integer yes 321.It kern.logsigexit integer yes
311.It kern.lwp struct kinfo_lwp yes 322.It kern.lwp struct kinfo_lwp yes
312.It kern.mapped_files integer no 323.It kern.mapped_files integer no
313.It kern.maxfiles integer yes 324.It kern.maxfiles integer yes
314.It kern.maxlwp integer yes 325.It kern.maxlwp integer yes
315.It kern.maxpartitions integer no 326.It kern.maxpartitions integer no
316.It kern.maxphys integer no 327.It kern.maxphys integer no
317.It kern.maxproc integer yes 328.It kern.maxproc integer yes
318.It kern.maxptys integer yes 329.It kern.maxptys integer yes
319.It kern.maxvnodes integer yes 330.It kern.maxvnodes integer yes
320.It kern.messages integer yes 331.It kern.messages integer yes
321.It kern.mbuf node not applicable 332.It kern.mbuf node not applicable
322.It kern.memlock integer no 333.It kern.memlock integer no
323.It kern.memlock_range integer no 334.It kern.memlock_range integer no
324.It kern.memory_protection integer no 335.It kern.memory_protection integer no
325.It kern.module node not applicable 336.It kern.module node not applicable
326.It kern.monotonic_clock integer no 337.It kern.monotonic_clock integer no
327.It kern.mqueue node not applicable 338.It kern.mqueue node not applicable
328.It kern.msgbuf integer no 339.It kern.msgbuf integer no
329.It kern.msgbufsize integer no 340.It kern.msgbufsize integer no
330.It kern.ngroups integer no 341.It kern.ngroups integer no
331.\".It kern.no_sa_support integer yes 342.\".It kern.no_sa_support integer yes
332.It kern.ntptime struct ntptimeval no 343.It kern.ntptime struct ntptimeval no
333.It kern.osrelease string no 344.It kern.osrelease string no
334.It kern.osrevision integer no 345.It kern.osrevision integer no
335.It kern.ostype string no 346.It kern.ostype string no
336.\".It kern.panic_now integer yes 347.\".It kern.panic_now integer yes
337.It kern.pipe node not applicable 348.It kern.pipe node not applicable
338.It kern.pool struct pool_sysctl no 349.It kern.pool struct pool_sysctl no
339.\" .It kern.posix node not applicable 350.\" .It kern.posix node not applicable
340.It kern.posix1version integer no 351.It kern.posix1version integer no
341.It kern.posix_aio integer no 352.It kern.posix_aio integer no
342.It kern.posix_barriers integer no 353.It kern.posix_barriers integer no
343.It kern.posix_reader_writer_locks integer no 354.It kern.posix_reader_writer_locks integer no
344.\".It kern.posix_sched integer yes 355.\".It kern.posix_sched integer yes
345.It kern.posix_semaphores integer no 356.It kern.posix_semaphores integer no
346.It kern.posix_spin_locks integer no 357.It kern.posix_spin_locks integer no
347.It kern.posix_threads integer no 358.It kern.posix_threads integer no
348.It kern.posix_timers integer no 359.It kern.posix_timers integer no
349.It kern.proc struct kinfo_proc no 360.It kern.proc struct kinfo_proc no
350.It kern.proc2 struct kinfo_proc2 no 361.It kern.proc2 struct kinfo_proc2 no
351.It kern.proc_args string no 362.It kern.proc_args string no
352.It kern.profiling node not applicable 363.It kern.profiling node not applicable
353.\".It kern.pset node not applicable 364.\".It kern.pset node not applicable
354.It kern.rawpartition integer no 365.It kern.rawpartition integer no
355.It kern.root_device string no 366.It kern.root_device string no
356.It kern.root_partition integer no 367.It kern.root_partition integer no
357.It kern.rtc_offset integer yes 368.It kern.rtc_offset integer yes
358.It kern.saved_ids integer no 369.It kern.saved_ids integer no
359.It kern.sbmax integer yes 370.It kern.sbmax integer yes
360.It kern.sched node not applicable 371.It kern.sched node not applicable
361.It kern.securelevel integer raise only 372.It kern.securelevel integer raise only
362.It kern.sofixedbuf boolean yes 373.It kern.sofixedbuf boolean yes
363.It kern.somaxkva integer yes 374.It kern.somaxkva integer yes
364.It kern.sooptions integer yes 375.It kern.sooptions integer yes
365.It kern.synchronized_io integer no 376.It kern.synchronized_io integer no
366.It kern.timecounter node not applicable 377.It kern.timecounter node not applicable
367.It kern.timex struct no 378.It kern.timex struct no
368.It kern.tkstat node not applicable 379.It kern.tkstat node not applicable
369.It kern.tty node not applicable 380.It kern.tty node not applicable
370.It kern.urandom integer no 381.It kern.urandom integer no
371.It kern.usercrypto integer yes 382.It kern.usercrypto integer yes
372.It kern.userasymcrypto integer yes 383.It kern.userasymcrypto integer yes
373.It kern.veriexec node not applicable 384.It kern.veriexec node not applicable
374.It kern.version string no 385.It kern.version string no
375.It kern.vnode struct vnode no 386.It kern.vnode struct vnode no
376.El 387.El
377.Bl -tag -width "123456" 388.Bl -tag -width "123456"
378.It Li kern.aio_listio_max 389.It Li kern.aio_listio_max
379The maximum number of asynchronous I/O operations in a single list 390The maximum number of asynchronous I/O operations in a single list
380I/O call. 391I/O call.
381Like with all variables related to 392Like with all variables related to
382.Xr aio 3 , 393.Xr aio 3 ,
383the variable may be created and removed dynamically 394the variable may be created and removed dynamically
384upon loading or unloading the corresponding kernel module. 395upon loading or unloading the corresponding kernel module.
385.It Li kern.aio_max 396.It Li kern.aio_max
386The maximum number of asynchronous I/O operations. 397The maximum number of asynchronous I/O operations.
387.It Li kern.arandom ( Dv KERN_ARND ) 398.It Li kern.arandom ( Dv KERN_ARND )
388Returns independent uniformly distributed bytes at random each time, as 399Returns independent uniformly distributed bytes at random each time, as
389many as requested up to 256, derived from the system entropy pool; see 400many as requested up to 256, derived from the system entropy pool; see
390.Xr rnd 4 . 401.Xr rnd 4 .
391.Pp 402.Pp
392Reading 403Reading
393.Li kern.arandom 404.Li kern.arandom
394is equivalent to reading up to 256 bytes at a time from 405is equivalent to reading up to 256 bytes at a time from
395.Pa /dev/urandom : 406.Pa /dev/urandom :
396reading 407reading
397.Li kern.arandom 408.Li kern.arandom
398never blocks, and once the system entropy pool has full entropy, output 409never blocks, and once the system entropy pool has full entropy, output
399subsequently read from 410subsequently read from
400.Li kern.arandom 411.Li kern.arandom
401is fit for use as cryptographic key material. 412is fit for use as cryptographic key material.
402For example, the 413For example, the
403.Xr arc4random 3 414.Xr arc4random 3
404library routine uses 415library routine uses
405.Li kern.arandom 416.Li kern.arandom
406internally to seed a cryptographic pseudorandom number generator. 417internally to seed a cryptographic pseudorandom number generator.
407.It Li kern.argmax ( Dv KERN_ARGMAX ) 418.It Li kern.argmax ( Dv KERN_ARGMAX )
408The maximum bytes of argument to 419The maximum bytes of argument to
409.Xr execve 2 . 420.Xr execve 2 .
410.It Li kern.boothowto 421.It Li kern.boothowto
411Flags passed from the boot loader; see 422Flags passed from the boot loader; see
412.Xr reboot 2 423.Xr reboot 2
413for the meanings of the flags. 424for the meanings of the flags.
414.It Li kern.boottime ( Dv KERN_BOOTTIME ) 425.It Li kern.boottime ( Dv KERN_BOOTTIME )
415A 426A
416.Vt struct timespec 427.Vt struct timespec
417structure is returned. 428structure is returned.
418This structure contains the time that the system was booted. 429This structure contains the time that the system was booted.
419That time is defined (for this purpose) to be the time at 430That time is defined (for this purpose) to be the time at
420which the kernel first started accumulating clock ticks. 431which the kernel first started accumulating clock ticks.
421.It Li kern.bufq 432.It Li kern.bufq
422This variable contains information on the 433This variable contains information on the
423.Xr bufq 9 434.Xr bufq 9
424subsystem. 435subsystem.
425Currently, the only third level name implemented is 436Currently, the only third level name implemented is
426.Dv kern.bufq.strategies 437.Dv kern.bufq.strategies
427which provides a list of buffer queue strategies currently available. 438which provides a list of buffer queue strategies currently available.
428.It Li kern.buildinfo 439.It Li kern.buildinfo
429When the kernel is built, the build environment may optionally provide 440When the kernel is built, the build environment may optionally provide
430arbitrary information to be stored in this variable. 441arbitrary information to be stored in this variable.
431.It Li kern.ccpu ( Dv KERN_CCPU ) 442.It Li kern.ccpu ( Dv KERN_CCPU )
432The scheduler exponential decay value. 443The scheduler exponential decay value.
433.It Li kern.clockrate ( Dv KERN_CLOCKRATE ) 444.It Li kern.clockrate ( Dv KERN_CLOCKRATE )
434A 445A
435.Vt struct clockinfo 446.Vt struct clockinfo
436structure is returned. 447structure is returned.
437This structure contains the clock, statistics clock and profiling clock 448This structure contains the clock, statistics clock and profiling clock
438frequencies, the number of micro-seconds per hz tick, and the clock 449frequencies, the number of micro-seconds per hz tick, and the clock
439skew rate. 450skew rate.
440Refer to 451Refer to
441.Xr hz 9 452.Xr hz 9
442for additional details. 453for additional details.
443.It Li kern.consdev ( Dv KERN_CONSDEV ) 454.It Li kern.consdev ( Dv KERN_CONSDEV )
444Console device. 455Console device.
445.It Li kern.coredump 456.It Li kern.coredump
446Settings related to set-id processes coredumps. 457Settings related to set-id processes coredumps.
447By default, set-id processes do not dump core in situations where 458By default, set-id processes do not dump core in situations where
448other processes would. 459other processes would.
449The settings in this node allows an administrator to change this 460The settings in this node allows an administrator to change this
450behavior. 461behavior.
451.Pp 462.Pp
452The third level name is 463The third level name is
453.Dv kern.coredump.setid 464.Dv kern.coredump.setid
454and fourth level variables are described below. 465and fourth level variables are described below.
455.Bl -column "kern.coredump.setid.group" "integer" "Changeable" -offset indent 466.Bl -column "kern.coredump.setid.group" "integer" "Changeable" -offset indent
456.It Sy Fourth level name Ta Sy Type Ta Sy Changeable 467.It Sy Fourth level name Ta Sy Type Ta Sy Changeable
457.It kern.coredump.setid.dump integer yes 468.It kern.coredump.setid.dump integer yes
458.It kern.coredump.setid.group integer yes 469.It kern.coredump.setid.group integer yes
459.It kern.coredump.setid.mode integer yes 470.It kern.coredump.setid.mode integer yes
460.It kern.coredump.setid.owner integer yes 471.It kern.coredump.setid.owner integer yes
461.It kern.coredump.setid.path string yes 472.It kern.coredump.setid.path string yes
462.El 473.El
463.Bl -tag -width "123456" 474.Bl -tag -width "123456"
464.It Li kern.coredump.setid.dump 475.It Li kern.coredump.setid.dump
465If non-zero, set-id processes will dump core. 476If non-zero, set-id processes will dump core.
466.It Li kern.coredump.setid.group 477.It Li kern.coredump.setid.group
467The group-id for the set-id processes' coredump. 478The group-id for the set-id processes' coredump.
468.It Li kern.coredump.setid.mode 479.It Li kern.coredump.setid.mode
469The mode for the set-id processes' coredump. 480The mode for the set-id processes' coredump.
470See 481See
471.Xr chmod 1 . 482.Xr chmod 1 .
472.It Li kern.coredump.setid.owner 483.It Li kern.coredump.setid.owner
473The user-id that will be used as the owner of the set-id processes' 484The user-id that will be used as the owner of the set-id processes'
474coredump. 485coredump.
475.It Li kern.coredump.setid.path 486.It Li kern.coredump.setid.path
476The path to which set-id processes' coredumps will be saved to. 487The path to which set-id processes' coredumps will be saved to.
477Same syntax as kern.defcorename. 488Same syntax as kern.defcorename.
478.El 489.El
479.It Li kern.cp_id ( Dv KERN_CP_ID ) 490.It Li kern.cp_id ( Dv KERN_CP_ID )
480Mapping of CPU number to CPU id. 491Mapping of CPU number to CPU id.
481.It Li kern.cp_time ( Dv KERN_CP_TIME ) 492.It Li kern.cp_time ( Dv KERN_CP_TIME )
482Returns an array of 493Returns an array of
483.Dv CPUSTATES 494.Dv CPUSTATES
484.Vt uint64_t Ns s . 495.Vt uint64_t Ns s .
485This array contains the 496This array contains the
486number of clock ticks spent in different CPU states. 497number of clock ticks spent in different CPU states.
487On multi-processor systems, the sum across all CPUs is returned unless 498On multi-processor systems, the sum across all CPUs is returned unless
488appropriate space is given for one data set for each CPU. 499appropriate space is given for one data set for each CPU.
489Data for a specific CPU can also be obtained by adding the number of the 500Data for a specific CPU can also be obtained by adding the number of the
490CPU at the end of the MIB, enlarging it by one. 501CPU at the end of the MIB, enlarging it by one.
491.It Li kern.cryptodevallowsoft 502.It Li kern.cryptodevallowsoft
492This variable controls userland access to hardware versus software transforms 503This variable controls userland access to hardware versus software transforms
493in the 504in the
494.Xr crypto 4 505.Xr crypto 4
495system. 506system.
496The available values are as follows: 507The available values are as follows:
497.Bl -tag -width XX0 -offset indent 508.Bl -tag -width XX0 -offset indent
498.It Dv < 0 509.It Dv < 0
499Always force userlevel requests to use software transforms. 510Always force userlevel requests to use software transforms.
500.It Dv = 0 511.It Dv = 0
501If present, use hardware and grant userlevel requests for 512If present, use hardware and grant userlevel requests for
502non-accelerated transforms (handling the latter in software). 513non-accelerated transforms (handling the latter in software).
503.It Dv > 0 514.It Dv > 0
504Allow user requests only for transforms which are hardware-accelerated. 515Allow user requests only for transforms which are hardware-accelerated.
505.El 516.El
506.It Li kern.defcorename ( Dv KERN_DEFCORENAME ) 517.It Li kern.defcorename ( Dv KERN_DEFCORENAME )
507Default template for the name of core dump files (see also 518Default template for the name of core dump files (see also
508.Li proc.pid.corename 519.Li proc.pid.corename
509in the per-process variables 520in the per-process variables
510.Li proc.* , 521.Li proc.* ,
511and 522and
512.Xr core 5 523.Xr core 5
513for format of this template). 524for format of this template).
514The default value is 525The default value is
515.Pa %n.core 526.Pa %n.core
516and can be changed with the kernel configuration option 527and can be changed with the kernel configuration option
517.Cd options DEFCORENAME 528.Cd options DEFCORENAME
518(see 529(see
519.Xr options 4 530.Xr options 4
520). 531).
521.It Li kern.detachall 532.It Li kern.detachall
522Detach all devices at shutdown. 533Detach all devices at shutdown.
523.It Li kern.domainname ( Dv KERN_DOMAINNAME ) 534.It Li kern.domainname ( Dv KERN_DOMAINNAME )
524Get or set the YP domain name. 535Get or set the YP domain name.
525.It Li kern.drivers ( Dv KERN_DRIVERS ) 536.It Li kern.drivers ( Dv KERN_DRIVERS )
526Return an array of 537Return an array of
527.Vt struct kinfo_drivers 538.Vt struct kinfo_drivers
528that contains the name and major device numbers of all the device drivers 539that contains the name and major device numbers of all the device drivers
529in the current kernel. 540in the current kernel.
530The 541The
531.Va d_name 542.Va d_name
532field is always a NUL terminated string. 543field is always a NUL terminated string.
533The 544The
534.Va d_bmajor 545.Va d_bmajor
535field will be set to \-1 if the driver doesn't have a block device. 546field will be set to \-1 if the driver doesn't have a block device.
536.It Li kern.expose_address 547.It Li kern.expose_address
537Expose kernel addresses in 548Expose kernel addresses in
538.Xr sysctl 3 549.Xr sysctl 3
539calls used by 550calls used by
540.Xr fstat 1 551.Xr fstat 1
541and 552and
542.Xr sockstat 1 . 553.Xr sockstat 1 .
543If it is set to 554If it is set to
544.Dv 0 555.Dv 0
545access is not allowed. 556access is not allowed.
546If it is set to 557If it is set to
547.Dv 1 558.Dv 1
548then only processes that have opened 559then only processes that have opened
549.Pa /dev/kmem 560.Pa /dev/kmem
550can have access. 561can have access.
551If it is set to 562If it is set to
552.Dv 2 563.Dv 2
553every process is allowed. 564every process is allowed.
554Defaults to 565Defaults to
555.Dv 0 566.Dv 0
556for 567for
557.Dv KASLR 568.Dv KASLR
558kernels 569kernels
559and 570and
560.Dv 1 571.Dv 1
561otherwise. 572otherwise.
562Allowing general access renders KASLR ineffective; allowing only kmem 573Allowing general access renders KASLR ineffective; allowing only kmem
563accessing programs weakens KASLR if those programs can be subverted 574accessing programs weakens KASLR if those programs can be subverted
564to leak the addresses. 575to leak the addresses.
565.It Li kern.dump_on_panic ( Dv KERN_DUMP_ON_PANIC ) 576.It Li kern.dump_on_panic ( Dv KERN_DUMP_ON_PANIC )
566Perform a crash dump on system 577Perform a crash dump on system
567.Xr panic 9 . 578.Xr panic 9 .
568.It Li kern.file ( Dv KERN_FILE ) 579.It Li kern.file ( Dv KERN_FILE )
569Return the entire file table. 580Return the entire file table.
570The returned data consists of a single 581The returned data consists of a single
571.Vt struct filelist 582.Vt struct filelist
572followed by an array of 583followed by an array of
573.Vt struct file , 584.Vt struct file ,
574whose size depends on the current number of such objects in the system. 585whose size depends on the current number of such objects in the system.
575.It Li kern.forkfsleep ( Dv KERN_FORKFSLEEP ) 586.It Li kern.forkfsleep ( Dv KERN_FORKFSLEEP )
576If 587If
577.Xr fork 2 588.Xr fork 2
578system call fails due to limit on number of processes (either 589system call fails due to limit on number of processes (either
579the global maxproc limit or user's one), wait for this many 590the global maxproc limit or user's one), wait for this many
580milliseconds before returning 591milliseconds before returning
581.Er EAGAIN 592.Er EAGAIN
582error to process. 593error to process.
583Useful to keep heavily forking runaway processes in bay. 594Useful to keep heavily forking runaway processes in bay.
584Default zero (no sleep). 595Default zero (no sleep).
585Maximum is 20 seconds. 596Maximum is 20 seconds.
586.It Li kern.fscale ( Dv KERN_FSCALE ) 597.It Li kern.fscale ( Dv KERN_FSCALE )
587The kernel fixed-point scale factor. 598The kernel fixed-point scale factor.
588.It Li kern.fsync ( Dv KERN_FSYNC ) 599.It Li kern.fsync ( Dv KERN_FSYNC )
589Return 1 if the 600Return 1 if the
590.St -p1003.1b-93 601.St -p1003.1b-93
591File Synchronization Option is available 602File Synchronization Option is available
592on this system, 603on this system,
593otherwise\ 0. 604otherwise\ 0.
594.It Li kern.hardclock_ticks ( Dv KERN_HARDCLOCK_TICKS ) 605.It Li kern.hardclock_ticks ( Dv KERN_HARDCLOCK_TICKS )
595Returns the number of 606Returns the number of
596.Xr hardclock 9 607.Xr hardclock 9
597ticks. 608ticks.
598.It Li kern.hist 609.It Li kern.hist
599This variable contains kernel history data if the kernel was 610This variable contains kernel history data if the kernel was
600configured for any of the options 611configured for any of the options
601.Dv UVHMIST , 612.Dv UVHMIST ,
602.Dv USB_DEBUG , 613.Dv USB_DEBUG ,
603.Dv BIOHIST , 614.Dv BIOHIST ,
604or 615or
605.Dv SCDEBUG . 616.Dv SCDEBUG .
606(See 617(See
607.Xr options 4 618.Xr options 4
608for more details.) 619for more details.)
609The third-level names correspond to each available history table. 620The third-level names correspond to each available history table.
610The values of the history tables are in an internal format, and can be 621The values of the history tables are in an internal format, and can be
611decoded by the 622decoded by the
612.Xr vmstat 1 623.Xr vmstat 1
613utility's 624utility's
614.Fl U 625.Fl U
615and 626and
616.Fl u 627.Fl u
617options; 628options;
618the 629the
619.Fl l 630.Fl l
620option can be used to see which tables are available. 631option can be used to see which tables are available.
621.It Li kern.hostid ( Dv KERN_HOSTID ) 632.It Li kern.hostid ( Dv KERN_HOSTID )
622Get or set the host identifier. 633Get or set the host identifier.
623This is aimed to replace the legacy 634This is aimed to replace the legacy
624.Xr gethostid 3 635.Xr gethostid 3
625and 636and
626.Xr sethostid 3 637.Xr sethostid 3
627system calls. 638system calls.
628.It Li kern.hostname ( Dv KERN_HOSTNAME ) 639.It Li kern.hostname ( Dv KERN_HOSTNAME )
629Get or set the 640Get or set the
630.Xr hostname 1 . 641.Xr hostname 1 .
631.It Li kern.iov_max ( Dv KERN_IOV_MAX ) 642.It Li kern.iov_max ( Dv KERN_IOV_MAX )
632Return the maximum number of 643Return the maximum number of
633.Vt iovec 644.Vt iovec
634structures that a process has available for use with 645structures that a process has available for use with
635.Xr preadv 2 , 646.Xr preadv 2 ,
636.Xr pwritev 2 , 647.Xr pwritev 2 ,
637.Xr readv 2 , 648.Xr readv 2 ,
638.Xr recvmsg 2 , 649.Xr recvmsg 2 ,
639.Xr sendmsg 2 650.Xr sendmsg 2
640and 651and
641.Xr writev 2 . 652.Xr writev 2 .
642.It Li kern.ipc ( Dv KERN_SYSVIPC ) 653.It Li kern.ipc ( Dv KERN_SYSVIPC )
643Return information about the SysV IPC parameters. 654Return information about the SysV IPC parameters.
644The third level names for the ipc variables are detailed below. 655The third level names for the ipc variables are detailed below.
645.Bl -column "kern.ipc.shm_use_phys" "integer" "Changeable" -offset indent 656.Bl -column "kern.ipc.shm_use_phys" "integer" "Changeable" -offset indent
646.It Sy Third level name Ta Sy Type Ta Sy Changeable 657.It Sy Third level name Ta Sy Type Ta Sy Changeable
647.It kern.ipc.sysvmsg integer no 658.It kern.ipc.sysvmsg integer no
648.It kern.ipc.sysvsem integer no 659.It kern.ipc.sysvsem integer no
649.It kern.ipc.sysvshm integer no 660.It kern.ipc.sysvshm integer no
650.It kern.ipc.sysvipc_info struct no 661.It kern.ipc.sysvipc_info struct no
651.It kern.ipc.shmmax integer yes 662.It kern.ipc.shmmax integer yes
652.It kern.ipc.shmmni integer yes 663.It kern.ipc.shmmni integer yes
653.It kern.ipc.shmseg integer yes 664.It kern.ipc.shmseg integer yes
654.It kern.ipc.shmmaxpgs integer yes 665.It kern.ipc.shmmaxpgs integer yes
655.It kern.ipc.shm_use_phys integer yes 666.It kern.ipc.shm_use_phys integer yes
656.It kern.ipc.msgmni integer yes 667.It kern.ipc.msgmni integer yes
657.It kern.ipc.msgseg integer yes 668.It kern.ipc.msgseg integer yes
658.It kern.ipc.semmni integer yes 669.It kern.ipc.semmni integer yes
659.It kern.ipc.semmns integer yes 670.It kern.ipc.semmns integer yes
660.It kern.ipc.semmnu integer yes 671.It kern.ipc.semmnu integer yes
661.El 672.El
662.Bl -tag -width "123456" 673.Bl -tag -width "123456"
663.It Li kern.ipc.sysvmsg ( Dv KERN_SYSVIPC_MSG ) 674.It Li kern.ipc.sysvmsg ( Dv KERN_SYSVIPC_MSG )
664Returns 1 if System V style message queue functionality is available 675Returns 1 if System V style message queue functionality is available
665on this system, 676on this system,
666otherwise\ 0. 677otherwise\ 0.
667.It Li kern.ipc.sysvsem ( Dv KERN_SYSVIPC_SEM ) 678.It Li kern.ipc.sysvsem ( Dv KERN_SYSVIPC_SEM )
668Returns 1 if System V style semaphore functionality is available 679Returns 1 if System V style semaphore functionality is available
669on this system, 680on this system,
670otherwise\ 0. 681otherwise\ 0.
671.It Li kern.ipc.sysvshm ( Dv KERN_SYSVIPC_SHM ) 682.It Li kern.ipc.sysvshm ( Dv KERN_SYSVIPC_SHM )
672Returns 1 if System V style share memory functionality is available 683Returns 1 if System V style share memory functionality is available
673on this system, 684on this system,
674otherwise\ 0. 685otherwise\ 0.
675.It Li kern.ipc.sysvipc_info ( Dv KERN_SYSVIPC_INFO ) 686.It Li kern.ipc.sysvipc_info ( Dv KERN_SYSVIPC_INFO )
676Return System V style IPC configuration and run-time information. 687Return System V style IPC configuration and run-time information.
677The fourth level name selects the System V style IPC facility. 688The fourth level name selects the System V style IPC facility.
678.Bl -column "KERN_SYSVIPC_MSG_INFO" "struct shm_sysctl_info" -offset indent 689.Bl -column "KERN_SYSVIPC_MSG_INFO" "struct shm_sysctl_info" -offset indent
679.It Sy Fourth level name Ta Sy Type 690.It Sy Fourth level name Ta Sy Type
680.It KERN_SYSVIPC_MSG_INFO struct msg_sysctl_info 691.It KERN_SYSVIPC_MSG_INFO struct msg_sysctl_info
681.It KERN_SYSVIPC_SEM_INFO struct sem_sysctl_info 692.It KERN_SYSVIPC_SEM_INFO struct sem_sysctl_info
682.It KERN_SYSVIPC_SHM_INFO struct shm_sysctl_info 693.It KERN_SYSVIPC_SHM_INFO struct shm_sysctl_info
683.El 694.El
684.Bl -tag -width "123456" 695.Bl -tag -width "123456"
685.It Li KERN_SYSVIPC_MSG_INFO 696.It Li KERN_SYSVIPC_MSG_INFO
686Return information on the System V style message facility. 697Return information on the System V style message facility.
687The 698The
688.Sy msg_sysctl_info 699.Sy msg_sysctl_info
689structure is defined in 700structure is defined in
690.In sys/msg.h . 701.In sys/msg.h .
691.It Li KERN_SYSVIPC_SEM_INFO 702.It Li KERN_SYSVIPC_SEM_INFO
692Return information on the System V style semaphore facility. 703Return information on the System V style semaphore facility.
693The 704The
694.Sy sem_sysctl_info 705.Sy sem_sysctl_info
695structure is defined in 706structure is defined in
696.In sys/sem.h . 707.In sys/sem.h .
697.It Li KERN_SYSVIPC_SHM_INFO 708.It Li KERN_SYSVIPC_SHM_INFO
698Return information on the System V style shared memory facility. 709Return information on the System V style shared memory facility.
699The 710The
700.Sy shm_sysctl_info 711.Sy shm_sysctl_info
701structure is defined in 712structure is defined in
702.In sys/shm.h . 713.In sys/shm.h .
703.El 714.El
704.It Li kern.ipc.shmmax ( Dv KERN_SYSVIPC_SHMMAX ) 715.It Li kern.ipc.shmmax ( Dv KERN_SYSVIPC_SHMMAX )
705Max shared memory segment size in bytes. 716Max shared memory segment size in bytes.
706.It Li kern.ipc.shmmni ( Dv KERN_SYSVIPC_SHMMNI ) 717.It Li kern.ipc.shmmni ( Dv KERN_SYSVIPC_SHMMNI )
707Max number of shared memory identifiers. 718Max number of shared memory identifiers.
708.It Li kern.ipc.shmseg ( Dv KERN_SYSVIPC_SHMSEG ) 719.It Li kern.ipc.shmseg ( Dv KERN_SYSVIPC_SHMSEG )
709Max shared memory segments per process. 720Max shared memory segments per process.
710.It Li kern.ipc.shmmaxpgs ( Dv KERN_SYSVIPC_SHMMAXPGS ) 721.It Li kern.ipc.shmmaxpgs ( Dv KERN_SYSVIPC_SHMMAXPGS )
711Max amount of shared memory in pages. 722Max amount of shared memory in pages.
712.It Li kern.ipc.shm_use_phys ( Dv KERN_SYSVIPC_SHMUSEPHYS ) 723.It Li kern.ipc.shm_use_phys ( Dv KERN_SYSVIPC_SHMUSEPHYS )
713Locking of shared memory in physical memory. 724Locking of shared memory in physical memory.
714If 0, memory can be swapped 725If 0, memory can be swapped
715out, otherwise it will be locked in physical memory. 726out, otherwise it will be locked in physical memory.
716.It Li kern.ipc.msgmni 727.It Li kern.ipc.msgmni
717Max number of message queue identifiers. 728Max number of message queue identifiers.
718.It Li kern.ipc.msgseg 729.It Li kern.ipc.msgseg
719Max number of number of message segments. 730Max number of number of message segments.
720.It Li kern.ipc.semmni 731.It Li kern.ipc.semmni
721Max number of number of semaphore identifiers. 732Max number of number of semaphore identifiers.
722.It Li kern.ipc.semmns 733.It Li kern.ipc.semmns
723Max number of number of semaphores in system. 734Max number of number of semaphores in system.
724.It Li kern.ipc.semmnu 735.It Li kern.ipc.semmnu
725Max number of undo structures in system. 736Max number of undo structures in system.
726.El 737.El
727.It Li kern.job_control ( Dv KERN_JOB_CONTROL ) 738.It Li kern.job_control ( Dv KERN_JOB_CONTROL )
728Return 1 if job control is available on this system, otherwise\ 0. 739Return 1 if job control is available on this system, otherwise\ 0.
729.It Li kern.labeloffset ( Dv KERN_LABELOFFSET ) 740.It Li kern.labeloffset ( Dv KERN_LABELOFFSET )
730The offset within the sector specified by 741The offset within the sector specified by
731.Dv KERN_LABELSECTOR 742.Dv KERN_LABELSECTOR
732of the 743of the
733.Xr disklabel 5 . 744.Xr disklabel 5 .
734.It Li kern.labelsector ( Dv KERN_LABELSECTOR ) 745.It Li kern.labelsector ( Dv KERN_LABELSECTOR )
735The sector number containing the 746The sector number containing the
736.Xr disklabel 5 . 747.Xr disklabel 5 .
737.It Li kern.login_name_max ( Dv KERN_LOGIN_NAME_MAX ) 748.It Li kern.login_name_max ( Dv KERN_LOGIN_NAME_MAX )
738The size of the storage required for a login name, in bytes, 749The size of the storage required for a login name, in bytes,
739including the terminating NUL. 750including the terminating NUL.
740.It Li kern.logsigexit ( Dv KERN_LOGSIGEXIT ) 751.It Li kern.logsigexit ( Dv KERN_LOGSIGEXIT )
741If this flag is non-zero, the kernel will 752If this flag is non-zero, the kernel will
742.Xr log 9 753.Xr log 9
743all process exits due to signals which create a 754all process exits due to signals which create a
744.Xr core 5 755.Xr core 5
745file, and whether the coredump was created. 756file, and whether the coredump was created.
746.It Li kern.lwp ( Dv KERN_LWP ) 757.It Li kern.lwp ( Dv KERN_LWP )
747Returns information about the current light-weight process. 758Returns information about the current light-weight process.
748The 759The
749.Sy kinfo_lwp 760.Sy kinfo_lwp
750structure is defined in 761structure is defined in
751.In sys/sysctl.h . 762.In sys/sysctl.h .
752.It Li kern.mapped_files ( Dv KERN_MAPPED_FILES ) 763.It Li kern.mapped_files ( Dv KERN_MAPPED_FILES )
753Returns 1 if the 764Returns 1 if the
754.St -p1003.1b-93 765.St -p1003.1b-93
755Memory Mapped Files Option is available on this system, 766Memory Mapped Files Option is available on this system,
756otherwise\ 0. 767otherwise\ 0.
757.It Li kern.maxfiles ( Dv KERN_MAXFILES ) 768.It Li kern.maxfiles ( Dv KERN_MAXFILES )
758The maximum number of open files that may be open in the system. 769The maximum number of open files that may be open in the system.
759This also controls the maximum file locks per unprivileged user 770This also controls the maximum file locks per unprivileged user
760enforced by 771enforced by
761.Xr fcntl 2 772.Xr fcntl 2
762and 773and
763.Xr flock 2 . 774.Xr flock 2 .
764.It Li kern.maxpartitions ( Dv KERN_MAXPARTITIONS ) 775.It Li kern.maxpartitions ( Dv KERN_MAXPARTITIONS )
765The maximum number of partitions allowed per disk. 776The maximum number of partitions allowed per disk.
766.It Li kern.maxlwp 777.It Li kern.maxlwp
767The maximum number of Lightweight Processes (threads) the system allows 778The maximum number of Lightweight Processes (threads) the system allows
768per uid. 779per uid.
769.It Li kern.maxphys ( Dv KERN_MAXPHYS ) 780.It Li kern.maxphys ( Dv KERN_MAXPHYS )
770Maximum raw I/O transfer size. 781Maximum raw I/O transfer size.
771.It Li kern.maxproc ( Dv KERN_MAXPROC ) 782.It Li kern.maxproc ( Dv KERN_MAXPROC )
772The maximum number of simultaneous processes the system will allow. 783The maximum number of simultaneous processes the system will allow.
773.It Li kern.maxptys ( Dv KERN_MAXPTYS ) 784.It Li kern.maxptys ( Dv KERN_MAXPTYS )
774The maximum number of pseudo terminals. 785The maximum number of pseudo terminals.
775This value can be both raised and lowered, though it cannot 786This value can be both raised and lowered, though it cannot
776be set lower than number of currently used ptys. 787be set lower than number of currently used ptys.
777See also 788See also
778.Xr pty 4 . 789.Xr pty 4 .
779.It Li kern.maxvnodes ( Dv KERN_MAXVNODES ) 790.It Li kern.maxvnodes ( Dv KERN_MAXVNODES )
780The maximum number of vnodes available on the system. 791The maximum number of vnodes available on the system.
781This cannot be lowered below the number of currently active vnodes. 792This cannot be lowered below the number of currently active vnodes.
782.It Li kern.mbuf ( Dv KERN_MBUF ) 793.It Li kern.mbuf ( Dv KERN_MBUF )
783Return information about the mbuf control variables. 794Return information about the mbuf control variables.
784Mbufs are data structures which store network packets and other data 795Mbufs are data structures which store network packets and other data
785structures in the networking code, see 796structures in the networking code, see
786.Xr mbuf 9 . 797.Xr mbuf 9 .
787The third level names for the mbuf variables are detailed below. 798The third level names for the mbuf variables are detailed below.
788The changeable column shows whether a process with appropriate 799The changeable column shows whether a process with appropriate
789privilege may change the value. 800privilege may change the value.
790.Bl -column "kern.mbuf.nmbclusters_limit" "integer" "Changeable" -offset indent 801.Bl -column "kern.mbuf.nmbclusters_limit" "integer" "Changeable" -offset indent
791.It Sy Third level name Ta Sy Type Ta Sy Changeable 802.It Sy Third level name Ta Sy Type Ta Sy Changeable
792.\" XXX Changeable? really? 803.\" XXX Changeable? really?
793.It kern.mbuf.mblowat integer yes 804.It kern.mbuf.mblowat integer yes
794.It kern.mbuf.mclbytes integer yes 805.It kern.mbuf.mclbytes integer yes
795.It kern.mbuf.mcllowat integer yes 806.It kern.mbuf.mcllowat integer yes
796.It kern.mbuf.msize integer yes 807.It kern.mbuf.msize integer yes
797.It kern.mbuf.nmbclusters integer yes 808.It kern.mbuf.nmbclusters integer yes
798.It kern.mbuf.nmbclusters_limit integer no 809.It kern.mbuf.nmbclusters_limit integer no
799.El 810.El
800.Pp 811.Pp
801The variables are as follows: 812The variables are as follows:
802.Bl -tag -width "123456" 813.Bl -tag -width "123456"
803.It Li kern.mbuf.mblowat ( Dv MBUF_MBLOWAT ) 814.It Li kern.mbuf.mblowat ( Dv MBUF_MBLOWAT )
804The mbuf low water mark. 815The mbuf low water mark.
805.It Li kern.mbuf.mclbytes ( Dv MBUF_MCLBYTES ) 816.It Li kern.mbuf.mclbytes ( Dv MBUF_MCLBYTES )
806The mbuf cluster size. 817The mbuf cluster size.
807.It Li kern.mbuf.mcllowat ( Dv MBUF_MCLLOWAT ) 818.It Li kern.mbuf.mcllowat ( Dv MBUF_MCLLOWAT )
808The mbuf cluster low water mark. 819The mbuf cluster low water mark.
809.It Li kern.mbuf.msize ( Dv MBUF_MSIZE ) 820.It Li kern.mbuf.msize ( Dv MBUF_MSIZE )
810The mbuf base size. 821The mbuf base size.
811.It Li kern.mbuf.nmbclusters ( Dv MBUF_NMBCLUSTERS ) 822.It Li kern.mbuf.nmbclusters ( Dv MBUF_NMBCLUSTERS )
812The limit on the number of mbuf clusters. 823The limit on the number of mbuf clusters.
813The variable can only be increased, and only increased on machines with 824The variable can only be increased, and only increased on machines with
814direct-mapped pool pages. 825direct-mapped pool pages.
815.It Li kern.mbuf.nmbclusters_limit ( Dv MBUF_NMBCLUSTERS_LIMIT ) 826.It Li kern.mbuf.nmbclusters_limit ( Dv MBUF_NMBCLUSTERS_LIMIT )
816The limit of nmbclusters. 827The limit of nmbclusters.
817.El 828.El
818.It Li kern.memlock ( Dv KERN_MEMLOCK ) 829.It Li kern.memlock ( Dv KERN_MEMLOCK )
819Returns 1 if the 830Returns 1 if the
820.St -p1003.1b-93 831.St -p1003.1b-93
821Process Memory Locking Option is available on this system, 832Process Memory Locking Option is available on this system,
822otherwise\ 0. 833otherwise\ 0.
823.It Li kern.memlock_range ( Dv KERN_MEMLOCK_RANGE ) 834.It Li kern.memlock_range ( Dv KERN_MEMLOCK_RANGE )
824Returns 1 if the 835Returns 1 if the
825.St -p1003.1b-93 836.St -p1003.1b-93
826Range Memory Locking Option is available on this system, 837Range Memory Locking Option is available on this system,
827otherwise\ 0. 838otherwise\ 0.
828.It Li kern.memory_protection ( Dv KERN_MEMORY_PROTECTION ) 839.It Li kern.memory_protection ( Dv KERN_MEMORY_PROTECTION )
829Returns 1 if the 840Returns 1 if the
830.St -p1003.1b-93 841.St -p1003.1b-93
831Memory Protection Option is available on this system, 842Memory Protection Option is available on this system,
832otherwise\ 0. 843otherwise\ 0.
833.It Li kern.messages 844.It Li kern.messages
834Kernel console message verbosity. 845Kernel console message verbosity.
835See 846See
836.Aq Pa sys/reboot.h 847.Aq Pa sys/reboot.h
837.Bl -column "verbosity" "setting" -offset indent 848.Bl -column "verbosity" "setting" -offset indent
838.It Sy Value Ta Sy Verbosity Ta Sy sys/reboot.h equivalent 849.It Sy Value Ta Sy Verbosity Ta Sy sys/reboot.h equivalent
839.It 0 Ta Silent Ta Sy AB_SILENT 850.It 0 Ta Silent Ta Sy AB_SILENT
840.It 1 Ta Quiet Ta Sy AB_QUIET 851.It 1 Ta Quiet Ta Sy AB_QUIET
841.It 2 Ta Normal Ta Sy AB_NORMAL 852.It 2 Ta Normal Ta Sy AB_NORMAL
842.It 3 Ta Verbose Ta Sy AB_VERBOSE 853.It 3 Ta Verbose Ta Sy AB_VERBOSE
843.It 4 Ta Debug Ta Sy AB_DEBUG 854.It 4 Ta Debug Ta Sy AB_DEBUG
844.El 855.El
845.It Li kern.module 856.It Li kern.module
846Settings related to kernel modules. 857Settings related to kernel modules.
847The third level names for the settings are described below. 858The third level names for the settings are described below.
848.Bl -column "kern.module.autounload_unsafe" "integer" "Changeable" -offset indent 859.Bl -column "kern.module.autounload_unsafe" "integer" "Changeable" -offset indent
849.It Sy Third level name Ta Sy Type Ta Sy Changeable 860.It Sy Third level name Ta Sy Type Ta Sy Changeable
850.It kern.module.autoload integer yes 861.It kern.module.autoload integer yes
851.It kern.module.autounload_unsafe integer yes 862.It kern.module.autounload_unsafe integer yes
852.It kern.module.autotime integer yes 863.It kern.module.autotime integer yes
853.It kern.module.verbose boolean yes 864.It kern.module.verbose boolean yes
854.El 865.El
855.Pp 866.Pp
856The variables are as follows: 867The variables are as follows:
857.Bl -tag -width 6n 868.Bl -tag -width 6n
858.It Li kern.module.autoload 869.It Li kern.module.autoload
859A boolean that controls whether kernel modules are loaded automatically. 870A boolean that controls whether kernel modules are loaded automatically.
860See 871See
861.Xr module 7 872.Xr module 7
862for details. 873for details.
863.It Li kern.module.autounload_unsafe 874.It Li kern.module.autounload_unsafe
864A boolean that controls whether the kernel will autounload modules that 875A boolean that controls whether the kernel will autounload modules that
865were automatically loaded and have not been audited for autounload. 876were automatically loaded and have not been audited for autounload.
866.Pp 877.Pp
867By default, only modules that have been audited will be autounloaded, 878By default, only modules that have been audited will be autounloaded,
868and only if they were autoloaded to begin with. 879and only if they were autoloaded to begin with.
869.It Li kern.module.autotime 880.It Li kern.module.autotime
870An integer that controls the delay before an attempt is made to 881An integer that controls the delay before an attempt is made to
871automatically unload a module that was auto-loaded. 882automatically unload a module that was auto-loaded.
872Setting this value to zero disables the auto-unload function. 883Setting this value to zero disables the auto-unload function.
873.It Li kern.module.verbose 884.It Li kern.module.verbose
874A boolean that enables or disables verbose 885A boolean that enables or disables verbose
875debug messages related to kernel modules. 886debug messages related to kernel modules.
876.El 887.El
877.It Li kern.monotonic_clock ( Dv KERN_MONOTONIC_CLOCK ) 888.It Li kern.monotonic_clock ( Dv KERN_MONOTONIC_CLOCK )
878Returns the standard version the implementation of the 889Returns the standard version the implementation of the
879.St -p1003.1b-93 890.St -p1003.1b-93
880Monotonic Clock Option conforms to, 891Monotonic Clock Option conforms to,
881otherwise\ 0. 892otherwise\ 0.
882.It Li kern.mqueue 893.It Li kern.mqueue
883Settings related to POSIX message queues; see 894Settings related to POSIX message queues; see
884.Xr mqueue 3 . 895.Xr mqueue 3 .
885This node is created dynamically when 896This node is created dynamically when
886the corresponding kernel module is loaded. 897the corresponding kernel module is loaded.
887The third level names for the settings are described below. 898The third level names for the settings are described below.
888.Bl -column "kern.mqueue.mq_max_msgsize" "integer" "Changeable" -offset indent 899.Bl -column "kern.mqueue.mq_max_msgsize" "integer" "Changeable" -offset indent
889.It Sy Third level name Ta Sy Type Ta Sy Changeable 900.It Sy Third level name Ta Sy Type Ta Sy Changeable
890.It kern.mqueue.mq_open_max integer yes 901.It kern.mqueue.mq_open_max integer yes
891.It kern.mqueue.mq_prio_max integer yes 902.It kern.mqueue.mq_prio_max integer yes
892.It kern.mqueue.mq_max_msgsize integer yes 903.It kern.mqueue.mq_max_msgsize integer yes
893.It kern.mqueue.mq_def_maxmsg integer yes 904.It kern.mqueue.mq_def_maxmsg integer yes
894.It kern.mqueue.mq_max_maxmsg integer yes 905.It kern.mqueue.mq_max_maxmsg integer yes
895.El 906.El
896.Pp 907.Pp
897The variables are: 908The variables are:
898.Bl -tag -width "123456" 909.Bl -tag -width "123456"
899.It Li kern.mqueue.mq_open_max 910.It Li kern.mqueue.mq_open_max
900The maximum number of message queue descriptors any single process can open. 911The maximum number of message queue descriptors any single process can open.
901.It Li kern.mqueue.mq_prio_max 912.It Li kern.mqueue.mq_prio_max
902The maximum priority of a message. 913The maximum priority of a message.
903.It Li kern.mqueue.mq_max_msgsize 914.It Li kern.mqueue.mq_max_msgsize
904The maximum size of a message in a message queue. 915The maximum size of a message in a message queue.
905.It Li kern.mqueue.mq_def_maxmsg 916.It Li kern.mqueue.mq_def_maxmsg
906The default maximum message count. 917The default maximum message count.
907.It Li kern.mqueue.mq_max_maxmsg 918.It Li kern.mqueue.mq_max_maxmsg
908The maximum number of messages in a message queue. 919The maximum number of messages in a message queue.
909.El 920.El
910.It Li kern.msgbuf ( Dv KERN_MSGBUF ) 921.It Li kern.msgbuf ( Dv KERN_MSGBUF )
911The kernel message buffer, rotated so that the head of the circular kernel 922The kernel message buffer, rotated so that the head of the circular kernel
912message buffer is at the start of the returned data. 923message buffer is at the start of the returned data.
913The returned data may contain NUL bytes. 924The returned data may contain NUL bytes.
914.It Li kern.msgbufsize ( Dv KERN_MSGBUFSIZE ) 925.It Li kern.msgbufsize ( Dv KERN_MSGBUFSIZE )
915The maximum number of characters that the kernel message buffer can hold. 926The maximum number of characters that the kernel message buffer can hold.
916.It Li kern.ngroups ( Dv KERN_NGROUPS ) 927.It Li kern.ngroups ( Dv KERN_NGROUPS )
917The maximum number of supplemental groups. 928The maximum number of supplemental groups.
918.\" .It Li kern.no_sa_support 929.\" .It Li kern.no_sa_support
919.\" XXX: Undocumented. 930.\" XXX: Undocumented.
920.It Li kern.ntptime ( Dv KERN_NTPTIME ) 931.It Li kern.ntptime ( Dv KERN_NTPTIME )
921A 932A
922.Vt struct ntptimeval 933.Vt struct ntptimeval
923structure is returned. 934structure is returned.
924This structure contains data used by the 935This structure contains data used by the
925.Xr ntpd 8 936.Xr ntpd 8
926program. 937program.
927.It Li kern.osrelease ( Dv KERN_OSRELEASE ) 938.It Li kern.osrelease ( Dv KERN_OSRELEASE )
928The system release string. 939The system release string.
929.It Li kern.osrevision ( Dv KERN_OSREV ) 940.It Li kern.osrevision ( Dv KERN_OSREV )
930The system revision, expressed as an integer. 941The system revision, expressed as an integer.
931.It Li kern.ostype ( Dv KERN_OSTYPE ) 942.It Li kern.ostype ( Dv KERN_OSTYPE )
932The system type string. 943The system type string.
933.\".It Li kern.panic_now 944.\".It Li kern.panic_now
934.\" XXX: Undocumented. 945.\" XXX: Undocumented.
935.It Li kern.pipe ( Dv KERN_PIPE ) 946.It Li kern.pipe ( Dv KERN_PIPE )
936Pipe settings. 947Pipe settings.
937The third level names for the integer pipe settings is detailed below. 948The third level names for the integer pipe settings is detailed below.
938The changeable column shows whether a process with appropriate 949The changeable column shows whether a process with appropriate
939privilege may change the value. 950privilege may change the value.
940.Bl -column "kern.pipe.maxbigpipes" "integer" "Changeable" -offset indent 951.Bl -column "kern.pipe.maxbigpipes" "integer" "Changeable" -offset indent
941.It Sy Third level name Ta Sy Type Ta Sy Changeable 952.It Sy Third level name Ta Sy Type Ta Sy Changeable
942.It kern.pipe.kvasiz integer yes 953.It kern.pipe.kvasiz integer yes
943.It kern.pipe.maxbigpipes integer yes 954.It kern.pipe.maxbigpipes integer yes
944.It kern.pipe.maxkvasz integer yes 955.It kern.pipe.maxkvasz integer yes
945.It kern.pipe.limitkva integer yes 956.It kern.pipe.limitkva integer yes
946.It kern.pipe.nbigpipes integer yes 957.It kern.pipe.nbigpipes integer yes
947.El 958.El
948.Pp 959.Pp
949The variables are as follows: 960The variables are as follows:
950.Bl -tag -width "123456" 961.Bl -tag -width "123456"
951.It Li kern.pipe.kvasiz ( Dv KERN_PIPE_KVASIZ ) 962.It Li kern.pipe.kvasiz ( Dv KERN_PIPE_KVASIZ )
952Amount of kernel memory consumed by pipe buffers. 963Amount of kernel memory consumed by pipe buffers.
953.It Li kern.pipe.maxbigpipes ( Dv KERN_PIPE_MAXBIGPIPES ) 964.It Li kern.pipe.maxbigpipes ( Dv KERN_PIPE_MAXBIGPIPES )
954Maximum number of 965Maximum number of
955.Dq big 966.Dq big
956pipes. 967pipes.
957.It Li kern.pipe.maxkvasz ( Dv KERN_PIPE_MAXKVASZ ) 968.It Li kern.pipe.maxkvasz ( Dv KERN_PIPE_MAXKVASZ )
958Maximum amount of kernel memory to be used for pipes. 969Maximum amount of kernel memory to be used for pipes.
959.It Li kern.pipe.limitkva ( Dv KERN_PIPE_LIMITKVA ) 970.It Li kern.pipe.limitkva ( Dv KERN_PIPE_LIMITKVA )
960Limit for direct transfers via page loan. 971Limit for direct transfers via page loan.
961.It Li kern.pipe.nbigpipes ( Dv KERN_PIPE_NBIGPIPES ) 972.It Li kern.pipe.nbigpipes ( Dv KERN_PIPE_NBIGPIPES )
962Number of 973Number of
963.Dq big 974.Dq big
964pipes. 975pipes.
965.El 976.El
966.It Li kern.pool 977.It Li kern.pool
967Provides statistics about the 978Provides statistics about the
968.Xr pool 9 979.Xr pool 9
969and 980and
970.Xr pool_cache 9 981.Xr pool_cache 9
971subsystems. 982subsystems.
972.\" XXX: Undocumented .It Li kern.posix ( ? ) 983.\" XXX: Undocumented .It Li kern.posix ( ? )
973.\" This is a node in which the only variable is semmax. 984.\" This is a node in which the only variable is semmax.
974.It Li kern.posix1version ( Dv KERN_POSIX1 ) 985.It Li kern.posix1version ( Dv KERN_POSIX1 )
975The version of ISO/IEC 9945 986The version of ISO/IEC 9945
976.Pq St -p1003.1 987.Pq St -p1003.1
977with which the system attempts to comply. 988with which the system attempts to comply.
978.It Li kern.posix_aio 989.It Li kern.posix_aio
979The version of 990The version of
980.St -p1003.1 991.St -p1003.1
981and its Asynchronous I/O option to which the system attempts to conform. 992and its Asynchronous I/O option to which the system attempts to conform.
982.It Li kern.posix_barriers ( Dv KERN_POSIX_BARRIERS ) 993.It Li kern.posix_barriers ( Dv KERN_POSIX_BARRIERS )
983The version of 994The version of
984.St -p1003.1 995.St -p1003.1
985and its 996and its
986Barriers 997Barriers
987option to which the system attempts to conform, 998option to which the system attempts to conform,
988otherwise\ 0. 999otherwise\ 0.
989.It Li kern.posix_reader_writer_locks ( Dv KERN_POSIX_READER_WRITER_LOCKS ) 1000.It Li kern.posix_reader_writer_locks ( Dv KERN_POSIX_READER_WRITER_LOCKS )
990The version of 1001The version of
991.St -p1003.1 1002.St -p1003.1
992and its 1003and its
993Read-Write Locks 1004Read-Write Locks
994option to which the system attempts to conform, 1005option to which the system attempts to conform,
995otherwise\ 0. 1006otherwise\ 0.
996.\".It Li kern.posix_sched 1007.\".It Li kern.posix_sched
997.\" XXX: Undocumented. 1008.\" XXX: Undocumented.
998.It Li kern.posix_semaphores ( Dv KERN_POSIX_SEMAPHORES ) 1009.It Li kern.posix_semaphores ( Dv KERN_POSIX_SEMAPHORES )
999The version of 1010The version of
1000.St -p1003.1 1011.St -p1003.1
1001and its 1012and its
1002Semaphores 1013Semaphores
1003option to which the system attempts to conform, 1014option to which the system attempts to conform,
1004otherwise\ 0. 1015otherwise\ 0.
1005.It Li kern.posix_spin_locks ( Dv KERN_POSIX_SPIN_LOCKS ) 1016.It Li kern.posix_spin_locks ( Dv KERN_POSIX_SPIN_LOCKS )
1006The version of 1017The version of
1007.St -p1003.1 1018.St -p1003.1
1008and its 1019and its
1009Spin Locks 1020Spin Locks
1010option to which the system attempts to conform, 1021option to which the system attempts to conform,
1011otherwise\ 0. 1022otherwise\ 0.
1012.It Li kern.posix_threads ( Dv KERN_POSIX_THREADS ) 1023.It Li kern.posix_threads ( Dv KERN_POSIX_THREADS )
1013The version of 1024The version of
1014.St -p1003.1 1025.St -p1003.1
1015and its 1026and its
1016Threads 1027Threads
1017option to which the system attempts to conform, 1028option to which the system attempts to conform,
1018otherwise\ 0. 1029otherwise\ 0.
1019.It Li kern.posix_timers ( Dv KERN_POSIX_TIMERS ) 1030.It Li kern.posix_timers ( Dv KERN_POSIX_TIMERS )
1020The version of 1031The version of
1021.St -p1003.1 1032.St -p1003.1
1022and its 1033and its
1023Timers 1034Timers
1024option to which the system attempts to conform, 1035option to which the system attempts to conform,
1025otherwise\ 0. 1036otherwise\ 0.
1026.It Li kern.proc ( Dv KERN_PROC ) 1037.It Li kern.proc ( Dv KERN_PROC )
1027Return the entire process table, or a subset of it. 1038Return the entire process table, or a subset of it.
1028An array of 1039An array of
1029.Vt struct kinfo_proc 1040.Vt struct kinfo_proc
1030structures is returned, 1041structures is returned,
1031whose size depends on the current number of such objects in the system. 1042whose size depends on the current number of such objects in the system.
1032The third and fourth level numeric names are as follows: 1043The third and fourth level numeric names are as follows:
1033.Bl -column "KERN_PROC_SESSION" "Fourth level is:" -offset indent 1044.Bl -column "KERN_PROC_SESSION" "Fourth level is:" -offset indent
1034.It Sy Third level name Ta Sy Fourth level is : 1045.It Sy Third level name Ta Sy Fourth level is :
1035.It KERN_PROC_ALL None 1046.It KERN_PROC_ALL None
1036.It KERN_PROC_GID A group ID 1047.It KERN_PROC_GID A group ID
1037.It KERN_PROC_PID A process ID 1048.It KERN_PROC_PID A process ID
1038.It KERN_PROC_PGRP A process group 1049.It KERN_PROC_PGRP A process group
1039.It KERN_PROC_RGID A real group ID 1050.It KERN_PROC_RGID A real group ID
1040.It KERN_PROC_RUID A real user ID 1051.It KERN_PROC_RUID A real user ID
1041.It KERN_PROC_SESSION A session ID 1052.It KERN_PROC_SESSION A session ID
1042.It KERN_PROC_TTY A tty device 1053.It KERN_PROC_TTY A tty device
1043.It KERN_PROC_UID A user ID 1054.It KERN_PROC_UID A user ID
1044.El 1055.El
1045.It Li kern.proc2 ( Dv KERN_PROC2 ) 1056.It Li kern.proc2 ( Dv KERN_PROC2 )
1046As for 1057As for
1047.Dv KERN_PROC , 1058.Dv KERN_PROC ,
1048but an array of 1059but an array of
1049.Vt struct kinfo_proc2 1060.Vt struct kinfo_proc2
1050structures are returned. 1061structures are returned.
1051The fifth level name is the size of the 1062The fifth level name is the size of the
1052.Vt struct kinfo_proc2 1063.Vt struct kinfo_proc2
1053and the sixth level name is the number of structures to return. 1064and the sixth level name is the number of structures to return.
1054.It Li kern.proc_args ( Dv KERN_PROC_ARGS ) 1065.It Li kern.proc_args ( Dv KERN_PROC_ARGS )
1055Return the argv or environment strings (or the number thereof) 1066Return the argv or environment strings (or the number thereof)
1056of a process. 1067of a process.
1057Multiple strings are returned separated by NUL characters. 1068Multiple strings are returned separated by NUL characters.
1058The third level name is the process ID. 1069The third level name is the process ID.
1059The fourth level name is as follows: 1070The fourth level name is as follows:
1060.Bl -column "KERN_PROG_PATHNAME" "The full pathname of the executable" -offset indent 1071.Bl -column "KERN_PROG_PATHNAME" "The full pathname of the executable" -offset indent
1061.It Dv KERN_PROC_ARGV The argv strings 1072.It Dv KERN_PROC_ARGV The argv strings
1062.It Dv KERN_PROC_ENV The environ strings 1073.It Dv KERN_PROC_ENV The environ strings
1063.It Dv KERN_PROC_NARGV The number of argv strings 1074.It Dv KERN_PROC_NARGV The number of argv strings
1064.It Dv KERN_PROC_NENV The number of environ strings 1075.It Dv KERN_PROC_NENV The number of environ strings
1065.It Dv KERN_PROC_PATHNAME The full pathname of the executable 1076.It Dv KERN_PROC_PATHNAME The full pathname of the executable
1066.It Dv KERN_PROC_CWD The current working directory 1077.It Dv KERN_PROC_CWD The current working directory
1067.El 1078.El
1068.It Li kern.profiling ( Dv KERN_PROF ) 1079.It Li kern.profiling ( Dv KERN_PROF )
1069Return profiling information about the kernel. 1080Return profiling information about the kernel.
1070If the kernel is not compiled for profiling, 1081If the kernel is not compiled for profiling,
1071attempts to retrieve any of the 1082attempts to retrieve any of the
1072.Dv KERN_PROF 1083.Dv KERN_PROF
1073values will fail with 1084values will fail with
1074.Er EOPNOTSUPP . 1085.Er EOPNOTSUPP .
1075The third level names for the string and integer profiling information 1086The third level names for the string and integer profiling information
1076is detailed below. 1087is detailed below.
1077The changeable column shows whether a process with appropriate 1088The changeable column shows whether a process with appropriate
1078privilege may change the value. 1089privilege may change the value.
1079.Bl -column "kern.profiling.gmonparam" "struct gmonparam" "Changeable" -offset indent 1090.Bl -column "kern.profiling.gmonparam" "struct gmonparam" "Changeable" -offset indent
1080.It Sy Third level name Ta Sy Type Ta Sy Changeable 1091.It Sy Third level name Ta Sy Type Ta Sy Changeable
1081.It kern.profiling.count u_short[\|] yes 1092.It kern.profiling.count u_short[\|] yes
1082.It kern.profiling.froms u_short[\|] yes 1093.It kern.profiling.froms u_short[\|] yes
1083.It kern.profiling.gmonparam struct gmonparam no 1094.It kern.profiling.gmonparam struct gmonparam no
1084.It kern.profiling.state integer yes 1095.It kern.profiling.state integer yes
1085.It kern.profiling.tos struct tostruct yes 1096.It kern.profiling.tos struct tostruct yes
1086.El 1097.El
1087.Pp 1098.Pp
1088The variables are as follows: 1099The variables are as follows:
1089.Bl -tag -width "123456" 1100.Bl -tag -width "123456"
1090.It Li kern.profiling.count ( Dv GPROF_COUNT ) 1101.It Li kern.profiling.count ( Dv GPROF_COUNT )
1091Array of statistical program counter counts. 1102Array of statistical program counter counts.
1092.It Li kern.profiling.froms ( Dv GPROF_FROMS ) 1103.It Li kern.profiling.froms ( Dv GPROF_FROMS )
1093Array indexed by program counter of call-from points. 1104Array indexed by program counter of call-from points.
1094.It Li kern.profiling.gmonparams ( Dv GPROF_GMONPARAM ) 1105.It Li kern.profiling.gmonparams ( Dv GPROF_GMONPARAM )
1095Structure giving the sizes of the above arrays. 1106Structure giving the sizes of the above arrays.
1096.It Li kern.profiling.state ( Dv GPROF_STATE ) 1107.It Li kern.profiling.state ( Dv GPROF_STATE )
1097Profiling state. 1108Profiling state.
1098If set to 1109If set to
1099.Dv GMON_PROF_ON , 1110.Dv GMON_PROF_ON ,
1100starts profiling. 1111starts profiling.
1101If set to 1112If set to
1102.Dv GMON_PROF_OFF , 1113.Dv GMON_PROF_OFF ,
1103stops profiling. 1114stops profiling.
1104.It Li kern.profiling.tos ( Dv GPROF_TOS ) 1115.It Li kern.profiling.tos ( Dv GPROF_TOS )
1105Array of 1116Array of
1106.Vt struct tostruct 1117.Vt struct tostruct
1107describing destination of calls and their counts. 1118describing destination of calls and their counts.
1108.El 1119.El
1109.\" .It Li kern.pset 1120.\" .It Li kern.pset
1110.\" XXX: Undocumented. 1121.\" XXX: Undocumented.
1111.It Li kern.rawpartition ( Dv KERN_RAWPARTITION ) 1122.It Li kern.rawpartition ( Dv KERN_RAWPARTITION )
1112The raw partition of a disk (a == 0). 1123The raw partition of a disk (a == 0).
1113.It Li kern.root_device ( Dv KERN_ROOT_DEVICE ) 1124.It Li kern.root_device ( Dv KERN_ROOT_DEVICE )
1114The name of the root device (e.g., 1125The name of the root device (e.g.,
1115.Dq wd0 ) . 1126.Dq wd0 ) .
1116.It Li kern.root_partition ( Dv KERN_ROOT_PARTITION ) 1127.It Li kern.root_partition ( Dv KERN_ROOT_PARTITION )
1117The root partition on the root device (a == 0). 1128The root partition on the root device (a == 0).
1118.It Li kern.rtc_offset ( Dv KERN_RTC_OFFSET ) 1129.It Li kern.rtc_offset ( Dv KERN_RTC_OFFSET )
1119Return the offset of real time clock from UTC in minutes. 1130Return the offset of real time clock from UTC in minutes.
1120.It Li kern.saved_ids ( Dv KERN_SAVED_IDS ) 1131.It Li kern.saved_ids ( Dv KERN_SAVED_IDS )
1121Returns 1 if saved set-group and saved set-user ID is available. 1132Returns 1 if saved set-group and saved set-user ID is available.
1122.It Li kern.sbmax ( Dv KERN_SBMAX ) 1133.It Li kern.sbmax ( Dv KERN_SBMAX )
1123Maximum socket buffer size in bytes. 1134Maximum socket buffer size in bytes.
1124.It Li kern.securelevel ( Dv KERN_SECURELVL ) 1135.It Li kern.securelevel ( Dv KERN_SECURELVL )
1125See 1136See
1126.Xr secmodel_securelevel 9 . 1137.Xr secmodel_securelevel 9 .
1127.It Li kern.sched ( dynamic ) 1138.It Li kern.sched ( dynamic )
1128Influence the scheduling of LWPs, their priorisation and how they are 1139Influence the scheduling of LWPs, their priorisation and how they are
1129distributed on and moved between CPUs. 1140distributed on and moved between CPUs.
1130.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent 1141.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent
1131.It Sy Third level name Sy Type Sy Changeable 1142.It Sy Third level name Sy Type Sy Changeable
1132.It kern.sched.cacheht_time integer yes 1143.It kern.sched.cacheht_time integer yes
1133.It kern.sched.balance_period integer yes 1144.It kern.sched.balance_period integer yes
1134.It kern.sched.average_weight integer yes 1145.It kern.sched.average_weight integer yes
1135.It kern.sched.min_catch integer yes 1146.It kern.sched.min_catch integer yes
1136.It kern.sched.timesoftints integer yes 1147.It kern.sched.timesoftints integer yes
1137.It kern.sched.kpreempt_pri integer yes 1148.It kern.sched.kpreempt_pri integer yes
1138.It kern.sched.upreempt_pri integer yes 1149.It kern.sched.upreempt_pri integer yes
1139.It kern.sched.maxts integer yes 1150.It kern.sched.maxts integer yes
1140.It kern.sched.mints integer yes 1151.It kern.sched.mints integer yes
1141.It kern.sched.name string no 1152.It kern.sched.name string no
1142.It kern.sched.rtts integer no 1153.It kern.sched.rtts integer no
1143.It kern.sched.pri_min integer no 1154.It kern.sched.pri_min integer no
1144.It kern.sched.pri_max integer no 1155.It kern.sched.pri_max integer no
1145.El 1156.El
1146.Pp 1157.Pp
1147The variables are as follows: 1158The variables are as follows:
1148.Bl -tag -width "123456" 1159.Bl -tag -width "123456"
1149.It Li kern.sched.cacheht_time ( dynamic ) 1160.It Li kern.sched.cacheht_time ( dynamic )
1150Cache hotness time in which a LWP is kept on one particular CPU 1161Cache hotness time in which a LWP is kept on one particular CPU