158f0484fSRodney W. Grimes.\" Copyright (c) 1993 258f0484fSRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 358f0484fSRodney W. Grimes.\" 458f0484fSRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 558f0484fSRodney W. Grimes.\" modification, are permitted provided that the following conditions 658f0484fSRodney W. Grimes.\" are met: 758f0484fSRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 858f0484fSRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 958f0484fSRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 1058f0484fSRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 1158f0484fSRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 1258f0484fSRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 1358f0484fSRodney W. Grimes.\" must display the following acknowledgement: 1458f0484fSRodney W. Grimes.\" This product includes software developed by the University of 1558f0484fSRodney W. Grimes.\" California, Berkeley and its contributors. 1658f0484fSRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 1758f0484fSRodney W. Grimes.\" may be used to endorse or promote products derived from this software 1858f0484fSRodney W. Grimes.\" without specific prior written permission. 1958f0484fSRodney W. Grimes.\" 2058f0484fSRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2158f0484fSRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2258f0484fSRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2358f0484fSRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2458f0484fSRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2558f0484fSRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2658f0484fSRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2758f0484fSRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2858f0484fSRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2958f0484fSRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3058f0484fSRodney W. Grimes.\" SUCH DAMAGE. 3158f0484fSRodney W. Grimes.\" 320014b4c0SPeter Wemm.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 337f3dea24SPeter Wemm.\" $FreeBSD$ 3458f0484fSRodney W. Grimes.\" 35681e5e7aSSteve Price.Dd May 9, 1995 3658f0484fSRodney W. Grimes.Dt SYSCTL 3 3758f0484fSRodney W. Grimes.Os 3858f0484fSRodney W. Grimes.Sh NAME 39dd1d7d1fSPeter Wemm.Nm sysctl , 40dd1d7d1fSPeter Wemm.Nm sysctlbyname 4158f0484fSRodney W. Grimes.Nd get or set system information 4258f0484fSRodney W. Grimes.Sh SYNOPSIS 4349f94c2dSPoul-Henning Kamp.Fd #include <sys/types.h> 4458f0484fSRodney W. Grimes.Fd #include <sys/sysctl.h> 4558f0484fSRodney W. Grimes.Ft int 4658f0484fSRodney W. Grimes.Fn sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen" 4704b7c947SBruce Evans.Ft int 48dd1d7d1fSPeter Wemm.Fn sysctlbyname "const char *name" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen" 4958f0484fSRodney W. Grimes.Sh DESCRIPTION 5058f0484fSRodney W. GrimesThe 51bf5a138eSMike Pritchard.Fn sysctl 5258f0484fSRodney W. Grimesfunction retrieves system information and allows processes with 5358f0484fSRodney W. Grimesappropriate privileges to set system information. 5458f0484fSRodney W. GrimesThe information available from 55bf5a138eSMike Pritchard.Fn sysctl 5658f0484fSRodney W. Grimesconsists of integers, strings, and tables. 5758f0484fSRodney W. GrimesInformation may be retrieved and set from the command interface 5858f0484fSRodney W. Grimesusing the 59e1f4e80cSMike Pritchard.Xr sysctl 8 6058f0484fSRodney W. Grimesutility. 6158f0484fSRodney W. Grimes.Pp 6258f0484fSRodney W. GrimesUnless explicitly noted below, 63bf5a138eSMike Pritchard.Fn sysctl 6458f0484fSRodney W. Grimesreturns a consistent snapshot of the data requested. 6558f0484fSRodney W. GrimesConsistency is obtained by locking the destination 6658f0484fSRodney W. Grimesbuffer into memory so that the data may be copied out without blocking. 6758f0484fSRodney W. GrimesCalls to 68bf5a138eSMike Pritchard.Fn sysctl 6958f0484fSRodney W. Grimesare serialized to avoid deadlock. 7058f0484fSRodney W. Grimes.Pp 7158f0484fSRodney W. GrimesThe state is described using a ``Management Information Base'' (MIB) 7258f0484fSRodney W. Grimesstyle name, listed in 7358f0484fSRodney W. Grimes.Fa name , 7458f0484fSRodney W. Grimeswhich is a 7558f0484fSRodney W. Grimes.Fa namelen 7658f0484fSRodney W. Grimeslength array of integers. 7758f0484fSRodney W. Grimes.Pp 78dd1d7d1fSPeter WemmThe 79dd1d7d1fSPeter Wemm.Fn sysctlbyname 80c6d6e772SAlexey Zelkinfunction accepts an ASCII representation of the name and internally 81dd1d7d1fSPeter Wemmlooks up the integer name vector. Apart from that, it behaves the same 82dd1d7d1fSPeter Wemmas the standard 83dd1d7d1fSPeter Wemm.Fn sysctl 84dd1d7d1fSPeter Wemmfunction. 85dd1d7d1fSPeter Wemm.Pp 8658f0484fSRodney W. GrimesThe information is copied into the buffer specified by 8758f0484fSRodney W. Grimes.Fa oldp . 8858f0484fSRodney W. GrimesThe size of the buffer is given by the location specified by 8958f0484fSRodney W. Grimes.Fa oldlenp 9058f0484fSRodney W. Grimesbefore the call, 91b1f6a5fbSBruce Evansand that location gives the amount of data copied after a successful call 92b1f6a5fbSBruce Evansand after a call that returns with the error code ENOMEM. 9358f0484fSRodney W. GrimesIf the amount of data available is greater 9458f0484fSRodney W. Grimesthan the size of the buffer supplied, 9558f0484fSRodney W. Grimesthe call supplies as much data as fits in the buffer provided 9658f0484fSRodney W. Grimesand returns with the error code ENOMEM. 9758f0484fSRodney W. GrimesIf the old value is not desired, 9858f0484fSRodney W. Grimes.Fa oldp 9958f0484fSRodney W. Grimesand 10058f0484fSRodney W. Grimes.Fa oldlenp 10158f0484fSRodney W. Grimesshould be set to NULL. 10258f0484fSRodney W. Grimes.Pp 10358f0484fSRodney W. GrimesThe size of the available data can be determined by calling 104bf5a138eSMike Pritchard.Fn sysctl 10558f0484fSRodney W. Grimeswith a NULL parameter for 10658f0484fSRodney W. Grimes.Fa oldp . 10758f0484fSRodney W. GrimesThe size of the available data will be returned in the location pointed to by 10858f0484fSRodney W. Grimes.Fa oldlenp . 10958f0484fSRodney W. GrimesFor some operations, the amount of space may change often. 11058f0484fSRodney W. GrimesFor these operations, 11158f0484fSRodney W. Grimesthe system attempts to round up so that the returned size is 11258f0484fSRodney W. Grimeslarge enough for a call to return the data shortly thereafter. 11358f0484fSRodney W. Grimes.Pp 11458f0484fSRodney W. GrimesTo set a new value, 11558f0484fSRodney W. Grimes.Fa newp 11658f0484fSRodney W. Grimesis set to point to a buffer of length 11758f0484fSRodney W. Grimes.Fa newlen 11858f0484fSRodney W. Grimesfrom which the requested value is to be taken. 11958f0484fSRodney W. GrimesIf a new value is not to be set, 12058f0484fSRodney W. Grimes.Fa newp 12158f0484fSRodney W. Grimesshould be set to NULL and 12258f0484fSRodney W. Grimes.Fa newlen 12358f0484fSRodney W. Grimesset to 0. 12458f0484fSRodney W. Grimes.Pp 12558f0484fSRodney W. GrimesThe top level names are defined with a CTL_ prefix in 12658f0484fSRodney W. Grimes.Pa <sys/sysctl.h> , 12758f0484fSRodney W. Grimesand are as follows. 12858f0484fSRodney W. GrimesThe next and subsequent levels down are found in the include files 12958f0484fSRodney W. Grimeslisted here, and described in separate sections below. 13058f0484fSRodney W. Grimes.Pp 13158f0484fSRodney W. Grimes.Bl -column CTLXMACHDEPXXX "Next level namesXXXXXX" -offset indent 13258f0484fSRodney W. Grimes.It Sy Pa Name Next level names Description 13358f0484fSRodney W. Grimes.It CTL\_DEBUG sys/sysctl.h Debugging 1340014b4c0SPeter Wemm.It CTL\_VFS sys/mount.h Filesystem 13558f0484fSRodney W. Grimes.It CTL\_HW sys/sysctl.h Generic CPU, I/O 13658f0484fSRodney W. Grimes.It CTL\_KERN sys/sysctl.h High kernel limits 13758f0484fSRodney W. Grimes.It CTL\_MACHDEP sys/sysctl.h Machine dependent 13858f0484fSRodney W. Grimes.It CTL\_NET sys/socket.h Networking 13958f0484fSRodney W. Grimes.It CTL\_USER sys/sysctl.h User-level 14058f0484fSRodney W. Grimes.It CTL\_VM vm/vm_param.h Virtual memory 14158f0484fSRodney W. Grimes.El 14258f0484fSRodney W. Grimes.Pp 14358f0484fSRodney W. GrimesFor example, the following retrieves the maximum number of processes allowed 14458f0484fSRodney W. Grimesin the system: 145c492ccdbSMike Pritchard.Pp 14658f0484fSRodney W. Grimes.Bd -literal -offset indent -compact 14758f0484fSRodney W. Grimesint mib[2], maxproc; 14858f0484fSRodney W. Grimessize_t len; 149c492ccdbSMike Pritchard 15058f0484fSRodney W. Grimesmib[0] = CTL_KERN; 15158f0484fSRodney W. Grimesmib[1] = KERN_MAXPROC; 15258f0484fSRodney W. Grimeslen = sizeof(maxproc); 15358f0484fSRodney W. Grimessysctl(mib, 2, &maxproc, &len, NULL, 0); 15458f0484fSRodney W. Grimes.Ed 155c492ccdbSMike Pritchard.Pp 15658f0484fSRodney W. GrimesTo retrieve the standard search path for the system utilities: 157c492ccdbSMike Pritchard.Pp 15858f0484fSRodney W. Grimes.Bd -literal -offset indent -compact 15958f0484fSRodney W. Grimesint mib[2]; 16058f0484fSRodney W. Grimessize_t len; 16158f0484fSRodney W. Grimeschar *p; 162c492ccdbSMike Pritchard 16358f0484fSRodney W. Grimesmib[0] = CTL_USER; 16458f0484fSRodney W. Grimesmib[1] = USER_CS_PATH; 16558f0484fSRodney W. Grimessysctl(mib, 2, NULL, &len, NULL, 0); 16658f0484fSRodney W. Grimesp = malloc(len); 16758f0484fSRodney W. Grimessysctl(mib, 2, p, &len, NULL, 0); 16858f0484fSRodney W. Grimes.Ed 16958f0484fSRodney W. Grimes.Sh CTL_DEBUG 17058f0484fSRodney W. GrimesThe debugging variables vary from system to system. 17158f0484fSRodney W. GrimesA debugging variable may be added or deleted without need to recompile 172bf5a138eSMike Pritchard.Fn sysctl 17358f0484fSRodney W. Grimesto know about it. 17458f0484fSRodney W. GrimesEach time it runs, 175bf5a138eSMike Pritchard.Fn sysctl 17658f0484fSRodney W. Grimesgets the list of debugging variables from the kernel and 17758f0484fSRodney W. Grimesdisplays their current values. 17858f0484fSRodney W. GrimesThe system defines twenty 17958f0484fSRodney W. Grimes.Ns ( Va struct ctldebug ) 18058f0484fSRodney W. Grimesvariables named 18158f0484fSRodney W. Grimes.Nm debug0 18258f0484fSRodney W. Grimesthrough 18358f0484fSRodney W. Grimes.Nm debug19 . 18458f0484fSRodney W. GrimesThey are declared as separate variables so that they can be 18558f0484fSRodney W. Grimesindividually initialized at the location of their associated variable. 18658f0484fSRodney W. GrimesThe loader prevents multiple use of the same variable by issuing errors 18758f0484fSRodney W. Grimesif a variable is initialized in more than one place. 18858f0484fSRodney W. GrimesFor example, to export the variable 18958f0484fSRodney W. Grimes.Nm dospecialcheck 19058f0484fSRodney W. Grimesas a debugging variable, the following declaration would be used: 19158f0484fSRodney W. Grimes.Bd -literal -offset indent -compact 19258f0484fSRodney W. Grimesint dospecialcheck = 1; 19358f0484fSRodney W. Grimesstruct ctldebug debug5 = { "dospecialcheck", &dospecialcheck }; 19458f0484fSRodney W. Grimes.Ed 1954b10cdbcSJeffrey Hsu.Sh CTL_VFS 1960014b4c0SPeter WemmA distinguished second level name, VFS_GENERIC, 1970014b4c0SPeter Wemmis used to get general information about all filesystems. 1980014b4c0SPeter WemmOne of its third level identifiers is VFS_MAXTYPENUM 1990014b4c0SPeter Wemmthat gives the highest valid filesystem type number. 2000014b4c0SPeter WemmIts other third level identifier is VFS_CONF that 2010014b4c0SPeter Wemmreturns configuration information about the filesystem 2020014b4c0SPeter Wemmtype given as a fourth level identifier (see 2030014b4c0SPeter Wemm.Xr getvfsbyname 3 2040014b4c0SPeter Wemmas an example of its use). 2050014b4c0SPeter WemmThe remaining second level identifiers are the 2060014b4c0SPeter Wemmfilesystem type number returned by a 2070014b4c0SPeter Wemm.Xr statfs 2 2080014b4c0SPeter Wemmcall or from VFS_CONF. 2090014b4c0SPeter WemmThe third level identifiers available for each filesystem 2100014b4c0SPeter Wemmare given in the header file that defines the mount 2110014b4c0SPeter Wemmargument structure for that filesystem. 21258f0484fSRodney W. Grimes.Sh CTL_HW 21358f0484fSRodney W. GrimesThe string and integer information available for the CTL_HW level 21458f0484fSRodney W. Grimesis detailed below. 21558f0484fSRodney W. GrimesThe changeable column shows whether a process with appropriate 21658f0484fSRodney W. Grimesprivilege may change the value. 21758f0484fSRodney W. Grimes.Bl -column "Second level nameXXXXXX" integerXXX -offset indent 21858f0484fSRodney W. Grimes.It Sy Pa Second level name Type Changeable 21958f0484fSRodney W. Grimes.It HW\_MACHINE string no 22058f0484fSRodney W. Grimes.It HW\_MODEL string no 22158f0484fSRodney W. Grimes.It HW\_NCPU integer no 22258f0484fSRodney W. Grimes.It HW\_BYTEORDER integer no 22358f0484fSRodney W. Grimes.It HW\_PHYSMEM integer no 22458f0484fSRodney W. Grimes.It HW\_USERMEM integer no 22558f0484fSRodney W. Grimes.It HW\_PAGESIZE integer no 22638c429d5SBruce Evans.It HW\_FLOATINGPOINT integer no 22701f770e8SKATO Takenori.It HW\_MACHINE\_ARCH string no 22858f0484fSRodney W. Grimes.\".It HW\_DISKNAMES integer no 22958f0484fSRodney W. Grimes.\".It HW\_DISKSTATS integer no 23058f0484fSRodney W. Grimes.El 23158f0484fSRodney W. Grimes.Pp 23258f0484fSRodney W. Grimes.Bl -tag -width "123456" 23358f0484fSRodney W. Grimes.It Li HW_MACHINE 23458f0484fSRodney W. GrimesThe machine class. 23558f0484fSRodney W. Grimes.It Li HW_MODEL 23658f0484fSRodney W. GrimesThe machine model 23758f0484fSRodney W. Grimes.It Li HW_NCPU 23858f0484fSRodney W. GrimesThe number of cpus. 2390014b4c0SPeter Wemm.ne 1i 24058f0484fSRodney W. Grimes.It Li HW_BYTEORDER 24158f0484fSRodney W. GrimesThe byteorder (4,321, or 1,234). 24258f0484fSRodney W. Grimes.It Li HW_PHYSMEM 24358f0484fSRodney W. GrimesThe bytes of physical memory. 24458f0484fSRodney W. Grimes.It Li HW_USERMEM 24558f0484fSRodney W. GrimesThe bytes of non-kernel memory. 24658f0484fSRodney W. Grimes.It Li HW_PAGESIZE 24758f0484fSRodney W. GrimesThe software page size. 24838c429d5SBruce Evans.It Li HW_FLOATINGPOINT 24938c429d5SBruce EvansNonzero if the floating point support is in hardware. 25001f770e8SKATO Takenori.It Li HW_MACHINE_ARCH 25101f770e8SKATO TakenoriThe machine dependent architecture type. 25258f0484fSRodney W. Grimes.\".It Fa HW_DISKNAMES 25358f0484fSRodney W. Grimes.\".It Fa HW_DISKSTATS 25458f0484fSRodney W. Grimes.El 25558f0484fSRodney W. Grimes.Sh CTL_KERN 25658f0484fSRodney W. GrimesThe string and integer information available for the CTL_KERN level 25758f0484fSRodney W. Grimesis detailed below. 25858f0484fSRodney W. GrimesThe changeable column shows whether a process with appropriate 25958f0484fSRodney W. Grimesprivilege may change the value. 26058f0484fSRodney W. GrimesThe types of data currently available are process information, 26158f0484fSRodney W. Grimessystem vnodes, the open file entries, routing table entries, 26258f0484fSRodney W. Grimesvirtual memory statistics, load average history, and clock rate 26358f0484fSRodney W. Grimesinformation. 26438c429d5SBruce Evans.Bl -column "KERNXMAXFILESPERPROCXXX" "struct clockrateXXX" -offset indent 26558f0484fSRodney W. Grimes.It Sy Pa Second level name Type Changeable 26658f0484fSRodney W. Grimes.It KERN\_ARGMAX integer no 26738c429d5SBruce Evans.It KERN\_BOOTFILE string yes 26858f0484fSRodney W. Grimes.It KERN\_BOOTTIME struct timeval no 26958f0484fSRodney W. Grimes.It KERN\_CLOCKRATE struct clockinfo no 27058f0484fSRodney W. Grimes.It KERN\_FILE struct file no 27158f0484fSRodney W. Grimes.It KERN\_HOSTID integer yes 27258f0484fSRodney W. Grimes.It KERN\_HOSTNAME string yes 27358f0484fSRodney W. Grimes.It KERN\_JOB\_CONTROL integer no 27458f0484fSRodney W. Grimes.It KERN\_MAXFILES integer yes 27538c429d5SBruce Evans.It KERN\_MAXFILESPERPROC integer yes 2767669e901SJoseph Koshy.It KERN\_MAXPROC integer no 27738c429d5SBruce Evans.It KERN\_MAXPROCPERUID integer yes 27858f0484fSRodney W. Grimes.It KERN\_MAXVNODES integer yes 27958f0484fSRodney W. Grimes.It KERN\_NGROUPS integer no 28038c429d5SBruce Evans.It KERN\_NISDOMAINNAME string yes 28138c429d5SBruce Evans.It KERN\_OSRELDATE integer no 28258f0484fSRodney W. Grimes.It KERN\_OSRELEASE string no 28358f0484fSRodney W. Grimes.It KERN\_OSREV integer no 28458f0484fSRodney W. Grimes.It KERN\_OSTYPE string no 28558f0484fSRodney W. Grimes.It KERN\_POSIX1 integer no 28658f0484fSRodney W. Grimes.It KERN\_PROC struct proc no 28758f0484fSRodney W. Grimes.It KERN\_PROF node not applicable 28858f0484fSRodney W. Grimes.It KERN\_SAVED\_IDS integer no 28958f0484fSRodney W. Grimes.It KERN\_SECURELVL integer raise only 29038c429d5SBruce Evans.It KERN\_UPDATEINTERVAL integer no 29158f0484fSRodney W. Grimes.It KERN\_VERSION string no 29258f0484fSRodney W. Grimes.It KERN\_VNODE struct vnode no 29358f0484fSRodney W. Grimes.El 2940014b4c0SPeter Wemm.ne 1i 29558f0484fSRodney W. Grimes.Pp 29658f0484fSRodney W. Grimes.Bl -tag -width "123456" 29758f0484fSRodney W. Grimes.It Li KERN_ARGMAX 29858f0484fSRodney W. GrimesThe maximum bytes of argument to 299e1f4e80cSMike Pritchard.Xr execve 2 . 30038c429d5SBruce Evans.It Li KERN_BOOTFILE 30138c429d5SBruce EvansThe full pathname of the file from which the kernel was loaded. 30258f0484fSRodney W. Grimes.It Li KERN_BOOTTIME 30358f0484fSRodney W. GrimesA 30458f0484fSRodney W. Grimes.Va struct timeval 30558f0484fSRodney W. Grimesstructure is returned. 30658f0484fSRodney W. GrimesThis structure contains the time that the system was booted. 30758f0484fSRodney W. Grimes.It Li KERN_CLOCKRATE 30858f0484fSRodney W. GrimesA 30958f0484fSRodney W. Grimes.Va struct clockinfo 31058f0484fSRodney W. Grimesstructure is returned. 31158f0484fSRodney W. GrimesThis structure contains the clock, statistics clock and profiling clock 312127feebeSJohn Hayfrequencies, the number of micro-seconds per hz tick and the skew rate. 31358f0484fSRodney W. Grimes.It Li KERN_FILE 31458f0484fSRodney W. GrimesReturn the entire file table. 31558f0484fSRodney W. GrimesThe returned data consists of a single 31658f0484fSRodney W. Grimes.Va struct filehead 31758f0484fSRodney W. Grimesfollowed by an array of 31858f0484fSRodney W. Grimes.Va struct file , 31958f0484fSRodney W. Grimeswhose size depends on the current number of such objects in the system. 32058f0484fSRodney W. Grimes.It Li KERN_HOSTID 32158f0484fSRodney W. GrimesGet or set the host id. 32258f0484fSRodney W. Grimes.It Li KERN_HOSTNAME 32358f0484fSRodney W. GrimesGet or set the hostname. 32458f0484fSRodney W. Grimes.It Li KERN_JOB_CONTROL 32558f0484fSRodney W. GrimesReturn 1 if job control is available on this system, otherwise 0. 32658f0484fSRodney W. Grimes.It Li KERN_MAXFILES 32738c429d5SBruce EvansThe maximum number of files that may be open in the system. 32838c429d5SBruce Evans.It Li KERN_MAXFILESPERPROC 32938c429d5SBruce EvansThe maximum number of files that may be open for a single process. 33038c429d5SBruce EvansThis limit only applies to processes with an effective uid of nonzero 33138c429d5SBruce Evansat the time of the open request. 33238c429d5SBruce EvansFiles that have already been opened are not affected if the limit 33338c429d5SBruce Evansor the effective uid is changed. 33458f0484fSRodney W. Grimes.It Li KERN_MAXPROC 33538c429d5SBruce EvansThe maximum number of concurrent processes the system will allow. 33638c429d5SBruce Evans.It Li KERN_MAXPROCPERUID 33738c429d5SBruce EvansThe maximum number of concurrent processes the system will allow 33838c429d5SBruce Evansfor a single effective uid. 33938c429d5SBruce EvansThis limit only applies to processes with an effective uid of nonzero 34038c429d5SBruce Evansat the time of a fork request. 34138c429d5SBruce EvansProcesses that have already been started are not affected if the limit 34238c429d5SBruce Evansis changed. 34358f0484fSRodney W. Grimes.It Li KERN_MAXVNODES 34458f0484fSRodney W. GrimesThe maximum number of vnodes available on the system. 34558f0484fSRodney W. Grimes.It Li KERN_NGROUPS 34658f0484fSRodney W. GrimesThe maximum number of supplemental groups. 34738c429d5SBruce Evans.It Li KERN_NISDOMAINNAME 34838c429d5SBruce EvansThe name of the current YP/NIS domain. 34938c429d5SBruce Evans.It Li KERN_OSRELDATE 35038c429d5SBruce EvansThe system release date in YYYYMM format 35138c429d5SBruce Evans(January 1996 is encoded as 199601). 35258f0484fSRodney W. Grimes.It Li KERN_OSRELEASE 35358f0484fSRodney W. GrimesThe system release string. 35458f0484fSRodney W. Grimes.It Li KERN_OSREV 35558f0484fSRodney W. GrimesThe system revision string. 35658f0484fSRodney W. Grimes.It Li KERN_OSTYPE 35758f0484fSRodney W. GrimesThe system type string. 35858f0484fSRodney W. Grimes.It Li KERN_POSIX1 35958f0484fSRodney W. GrimesThe version of ISO/IEC 9945 (POSIX 1003.1) with which the system 36058f0484fSRodney W. Grimesattempts to comply. 36158f0484fSRodney W. Grimes.It Li KERN_PROC 36258f0484fSRodney W. GrimesReturn the entire process table, or a subset of it. 36358f0484fSRodney W. GrimesAn array of 36458f0484fSRodney W. Grimes.Va struct kinfo_proc 36558f0484fSRodney W. Grimesstructures is returned, 36658f0484fSRodney W. Grimeswhose size depends on the current number of such objects in the system. 36758f0484fSRodney W. GrimesThe third and fourth level names are as follows: 36858f0484fSRodney W. Grimes.Bl -column "Third level nameXXXXXX" "Fourth level is:XXXXXX" -offset indent 36958f0484fSRodney W. Grimes.It Pa Third level name Fourth level is: 37058f0484fSRodney W. Grimes.It KERN\_PROC\_ALL None 37158f0484fSRodney W. Grimes.It KERN\_PROC\_PID A process ID 37258f0484fSRodney W. Grimes.It KERN\_PROC\_PGRP A process group 37358f0484fSRodney W. Grimes.It KERN\_PROC\_TTY A tty device 37458f0484fSRodney W. Grimes.It KERN\_PROC\_UID A user ID 37558f0484fSRodney W. Grimes.It KERN\_PROC\_RUID A real user ID 37658f0484fSRodney W. Grimes.El 37758f0484fSRodney W. Grimes.It Li KERN_PROF 37858f0484fSRodney W. GrimesReturn profiling information about the kernel. 37958f0484fSRodney W. GrimesIf the kernel is not compiled for profiling, 38058f0484fSRodney W. Grimesattempts to retrieve any of the KERN_PROF values will 38158f0484fSRodney W. Grimesfail with EOPNOTSUPP. 38258f0484fSRodney W. GrimesThe third level names for the string and integer profiling information 38358f0484fSRodney W. Grimesis detailed below. 38458f0484fSRodney W. GrimesThe changeable column shows whether a process with appropriate 38558f0484fSRodney W. Grimesprivilege may change the value. 38658f0484fSRodney W. Grimes.Bl -column "GPROFXGMONPARAMXXX" "struct gmonparamXXX" -offset indent 38758f0484fSRodney W. Grimes.It Sy Pa Third level name Type Changeable 38858f0484fSRodney W. Grimes.It GPROF\_STATE integer yes 38958f0484fSRodney W. Grimes.It GPROF\_COUNT u_short[\|] yes 39058f0484fSRodney W. Grimes.It GPROF\_FROMS u_short[\|] yes 39158f0484fSRodney W. Grimes.It GPROF\_TOS struct tostruct yes 39258f0484fSRodney W. Grimes.It GPROF\_GMONPARAM struct gmonparam no 39358f0484fSRodney W. Grimes.El 39458f0484fSRodney W. Grimes.Pp 39558f0484fSRodney W. GrimesThe variables are as follows: 39658f0484fSRodney W. Grimes.Bl -tag -width "123456" 39758f0484fSRodney W. Grimes.It Li GPROF_STATE 39858f0484fSRodney W. GrimesReturns GMON_PROF_ON or GMON_PROF_OFF to show that profiling 39958f0484fSRodney W. Grimesis running or stopped. 40058f0484fSRodney W. Grimes.It Li GPROF_COUNT 40158f0484fSRodney W. GrimesArray of statistical program counter counts. 40258f0484fSRodney W. Grimes.It Li GPROF_FROMS 40358f0484fSRodney W. GrimesArray indexed by program counter of call-from points. 40458f0484fSRodney W. Grimes.It Li GPROF_TOS 40558f0484fSRodney W. GrimesArray of 40658f0484fSRodney W. Grimes.Va struct tostruct 40758f0484fSRodney W. Grimesdescribing destination of calls and their counts. 40858f0484fSRodney W. Grimes.It Li GPROF_GMONPARAM 40958f0484fSRodney W. GrimesStructure giving the sizes of the above arrays. 41058f0484fSRodney W. Grimes.El 4110014b4c0SPeter Wemm.ne 1i 41258f0484fSRodney W. Grimes.It Li KERN_SAVED_IDS 41358f0484fSRodney W. GrimesReturns 1 if saved set-group and saved set-user ID is available. 41458f0484fSRodney W. Grimes.It Li KERN_SECURELVL 41558f0484fSRodney W. GrimesThe system security level. 41658f0484fSRodney W. GrimesThis level may be raised by processes with appropriate privilege. 417b697833cSGuy HelmerIt may not be lowered. 41858f0484fSRodney W. Grimes.It Li KERN_VERSION 41958f0484fSRodney W. GrimesThe system version string. 42058f0484fSRodney W. Grimes.It Li KERN_VNODE 42158f0484fSRodney W. GrimesReturn the entire vnode table. 42258f0484fSRodney W. GrimesNote, the vnode table is not necessarily a consistent snapshot of 42358f0484fSRodney W. Grimesthe system. 42458f0484fSRodney W. GrimesThe returned data consists of an array whose size depends on the 42558f0484fSRodney W. Grimescurrent number of such objects in the system. 42658f0484fSRodney W. GrimesEach element of the array contains the kernel address of a vnode 42758f0484fSRodney W. Grimes.Va struct vnode * 42858f0484fSRodney W. Grimesfollowed by the vnode itself 42958f0484fSRodney W. Grimes.Va struct vnode . 43038c429d5SBruce Evans.It Li KERN_UPDATEINTERVAL 43138c429d5SBruce EvansThe interval between 43238c429d5SBruce Evans.Xr sync 2 43338c429d5SBruce Evanscalls in the 43438c429d5SBruce Evans.Xr update 4 43538c429d5SBruce Evansprocess. 43658f0484fSRodney W. Grimes.El 43758f0484fSRodney W. Grimes.Sh CTL_MACHDEP 43858f0484fSRodney W. GrimesThe set of variables defined is architecture dependent. 43938c429d5SBruce EvansThe following variables are defined for the i386 architecture. 44038c429d5SBruce Evans.Bl -column "CONSOLE_DEVICEXXX" "struct bootinfoXXX" -offset indent 44158f0484fSRodney W. Grimes.It Sy Pa Second level name Type Changeable 44258f0484fSRodney W. Grimes.It Li CPU_CONSDEV dev_t no 443fb46136eSAndrey A. Chernov.It Li CPU_ADJKERNTZ int yes 444fb46136eSAndrey A. Chernov.It Li CPU_DISRTCSET int yes 44538c429d5SBruce Evans.It Li CPU_BOOTINFO struct bootinfo no 44638c429d5SBruce Evans.It Li CPU_WALLCLOCK int yes 44758f0484fSRodney W. Grimes.El 44858f0484fSRodney W. Grimes.Sh CTL_NET 44958f0484fSRodney W. GrimesThe string and integer information available for the CTL_NET level 45058f0484fSRodney W. Grimesis detailed below. 45158f0484fSRodney W. GrimesThe changeable column shows whether a process with appropriate 45258f0484fSRodney W. Grimesprivilege may change the value. 45358f0484fSRodney W. Grimes.Bl -column "Second level nameXXXXXX" "routing messagesXXX" -offset indent 45458f0484fSRodney W. Grimes.It Sy Pa Second level name Type Changeable 45558f0484fSRodney W. Grimes.It PF\_ROUTE routing messages no 4561522ff5bSJun-ichiro itojun Hagino.It PF\_INET IPv4 values yes 4571522ff5bSJun-ichiro itojun Hagino.It PF\_INET6 IPv6 values yes 45858f0484fSRodney W. Grimes.El 45958f0484fSRodney W. Grimes.Pp 46058f0484fSRodney W. Grimes.Bl -tag -width "123456" 46158f0484fSRodney W. Grimes.It Li PF_ROUTE 46258f0484fSRodney W. GrimesReturn the entire routing table or a subset of it. 46358f0484fSRodney W. GrimesThe data is returned as a sequence of routing messages (see 46458f0484fSRodney W. Grimes.Xr route 4 46558f0484fSRodney W. Grimesfor the header file, format and meaning). 46658f0484fSRodney W. GrimesThe length of each message is contained in the message header. 46758f0484fSRodney W. Grimes.Pp 46858f0484fSRodney W. GrimesThe third level name is a protocol number, which is currently always 0. 46958f0484fSRodney W. GrimesThe fourth level name is an address family, which may be set to 0 to 47058f0484fSRodney W. Grimesselect all address families. 47158f0484fSRodney W. GrimesThe fifth and sixth level names are as follows: 47258f0484fSRodney W. Grimes.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent 47358f0484fSRodney W. Grimes.It Pa Fifth level name Sixth level is: 47458f0484fSRodney W. Grimes.It NET\_RT\_FLAGS rtflags 47558f0484fSRodney W. Grimes.It NET\_RT\_DUMP None 47658f0484fSRodney W. Grimes.It NET\_RT\_IFLIST None 47758f0484fSRodney W. Grimes.El 47858f0484fSRodney W. Grimes.It Li PF_INET 4791522ff5bSJun-ichiro itojun HaginoGet or set various global information about the IPv4 4801522ff5bSJun-ichiro itojun Hagino.Pq Internet Protocol version 4 . 48158f0484fSRodney W. GrimesThe third level name is the protocol. 48258f0484fSRodney W. GrimesThe fourth level name is the variable name. 48358f0484fSRodney W. GrimesThe currently defined protocols and names are: 4840014b4c0SPeter Wemm.ne 1i 48561a4defdSJoseph Koshy.Bl -column ProtocolXX VariableXX TypeXX ChangeableXX 48661a4defdSJoseph Koshy.It Pa Protocol Variable Type Changeable 4870a843f2aSJoseph Koshy.It icmp bmcastecho integer yes 4880a843f2aSJoseph Koshy.It icmp maskrepl integer yes 48958f0484fSRodney W. Grimes.It ip forwarding integer yes 49058f0484fSRodney W. Grimes.It ip redirect integer yes 49158f0484fSRodney W. Grimes.It ip ttl integer yes 49258f0484fSRodney W. Grimes.It udp checksum integer yes 49358f0484fSRodney W. Grimes.El 49458f0484fSRodney W. Grimes.Pp 49558f0484fSRodney W. GrimesThe variables are as follows: 49658f0484fSRodney W. Grimes.Bl -tag -width "123456" 4970a843f2aSJoseph Koshy.It Li icmp.bmcastecho 4980a843f2aSJoseph KoshyReturns 1 if an ICMP echo request to a broadcast or multicast address is 4990a843f2aSJoseph Koshyto be answered. 5000a843f2aSJoseph Koshy.It Li icmp.maskrepl 5010a843f2aSJoseph KoshyReturns 1 if ICMP network mask requests are to be answered. 50258f0484fSRodney W. Grimes.It Li ip.forwarding 50358f0484fSRodney W. GrimesReturns 1 when IP forwarding is enabled for the host, 50458f0484fSRodney W. Grimesmeaning that the host is acting as a router. 50558f0484fSRodney W. Grimes.It Li ip.redirect 50658f0484fSRodney W. GrimesReturns 1 when ICMP redirects may be sent by the host. 50758f0484fSRodney W. GrimesThis option is ignored unless the host is routing IP packets, 50858f0484fSRodney W. Grimesand should normally be enabled on all systems. 50958f0484fSRodney W. Grimes.It Li ip.ttl 51058f0484fSRodney W. GrimesThe maximum time-to-live (hop count) value for an IP packet sourced by 51158f0484fSRodney W. Grimesthe system. 51258f0484fSRodney W. GrimesThis value applies to normal transport protocols, not to ICMP. 51358f0484fSRodney W. Grimes.It Li udp.checksum 51458f0484fSRodney W. GrimesReturns 1 when UDP checksums are being computed and checked. 51558f0484fSRodney W. GrimesDisabling UDP checksums is strongly discouraged. 5161522ff5bSJun-ichiro itojun Hagino.Pp 5171522ff5bSJun-ichiro itojun HaginoFor variables net.*.ipsec, please refer to 5181522ff5bSJun-ichiro itojun Hagino.Xr ipsec 4 . 5191522ff5bSJun-ichiro itojun Hagino.El 5201522ff5bSJun-ichiro itojun Hagino.It Li PF_INET6 5211522ff5bSJun-ichiro itojun HaginoGet or set various global information about the IPv6 5221522ff5bSJun-ichiro itojun Hagino.Pq Internet Protocol version 6 . 5231522ff5bSJun-ichiro itojun HaginoThe third level name is the protocol. 5241522ff5bSJun-ichiro itojun HaginoThe fourth level name is the variable name. 5251522ff5bSJun-ichiro itojun HaginoThe currently defined protocols and names are: 5261522ff5bSJun-ichiro itojun Hagino.Bl -column ProtocolXX nd6_useloopbackXX TypeXX ChangeableXX 5271522ff5bSJun-ichiro itojun Hagino.It Pa Protocol Variable Type Changeable 5281522ff5bSJun-ichiro itojun Hagino.It ip6 forwarding integer yes 5291522ff5bSJun-ichiro itojun Hagino.It ip6 redirect integer yes 5301522ff5bSJun-ichiro itojun Hagino.It ip6 hlim integer yes 5311522ff5bSJun-ichiro itojun Hagino.It ip6 maxfragpackets integer yes 5321522ff5bSJun-ichiro itojun Hagino.It ip6 accept_rtadv integer yes 5331522ff5bSJun-ichiro itojun Hagino.It ip6 keepfaith integer yes 5341522ff5bSJun-ichiro itojun Hagino.It ip6 log_interval integer yes 5351522ff5bSJun-ichiro itojun Hagino.It ip6 hdrnestlimit integer yes 5361522ff5bSJun-ichiro itojun Hagino.It ip6 dad_count integer yes 5371522ff5bSJun-ichiro itojun Hagino.It ip6 auto_flowlabel integer yes 5381522ff5bSJun-ichiro itojun Hagino.It ip6 defmcasthlim integer yes 5391522ff5bSJun-ichiro itojun Hagino.It ip6 gif_hlim integer yes 5401522ff5bSJun-ichiro itojun Hagino.It ip6 kame_version string no 5411522ff5bSJun-ichiro itojun Hagino.It ip6 use_deprecated integer yes 5421522ff5bSJun-ichiro itojun Hagino.It ip6 rr_prune integer yes 5431522ff5bSJun-ichiro itojun Hagino.It ip6 mapped_addr integer yes 5441522ff5bSJun-ichiro itojun Hagino.It icmp6 rediraccept integer yes 5451522ff5bSJun-ichiro itojun Hagino.It icmp6 redirtimeout integer yes 5461522ff5bSJun-ichiro itojun Hagino.It icmp6 errratelimit integer yes 5471522ff5bSJun-ichiro itojun Hagino.It icmp6 nd6_prune integer yes 5481522ff5bSJun-ichiro itojun Hagino.It icmp6 nd6_delay integer yes 5491522ff5bSJun-ichiro itojun Hagino.It icmp6 nd6_umaxtries integer yes 5501522ff5bSJun-ichiro itojun Hagino.It icmp6 nd6_mmaxtries integer yes 5511522ff5bSJun-ichiro itojun Hagino.It icmp6 nd6_useloopback integer yes 5521522ff5bSJun-ichiro itojun Hagino.It icmp6 nd6_proxyall integer yes 5531522ff5bSJun-ichiro itojun Hagino.El 5541522ff5bSJun-ichiro itojun Hagino.Pp 5551522ff5bSJun-ichiro itojun HaginoThe variables are as follows: 5561522ff5bSJun-ichiro itojun Hagino.Bl -tag -width "123456" 5571522ff5bSJun-ichiro itojun Hagino.It Li ip6.forwarding 5581522ff5bSJun-ichiro itojun HaginoReturns 1 when IPv6 forwarding is enabled for the node, 5591522ff5bSJun-ichiro itojun Haginomeaning that the node is acting as a router. 5601522ff5bSJun-ichiro itojun Hagino.It Li ip6.redirect 5611522ff5bSJun-ichiro itojun HaginoReturns 1 when ICMPv6 redirects may be sent by the node. 5621522ff5bSJun-ichiro itojun HaginoThis option is ignored unless the node is routing IP packets, 5631522ff5bSJun-ichiro itojun Haginoand should normally be enabled on all systems. 5641522ff5bSJun-ichiro itojun Hagino.It Li ip6.hlim 5651522ff5bSJun-ichiro itojun HaginoThe default hop limit value for an IPv6 unicast packet sourced by the node. 5661522ff5bSJun-ichiro itojun HaginoThis value applies to all the transport protocols on top of IPv6. 5671522ff5bSJun-ichiro itojun HaginoThere are APIs to override the value. 5681522ff5bSJun-ichiro itojun Hagino.\", as documented in 5691522ff5bSJun-ichiro itojun Hagino.\".Xr ip6 4 . 5701522ff5bSJun-ichiro itojun Hagino.It Li ip6.maxfragpackets 5711522ff5bSJun-ichiro itojun HaginoThe maximum number of fragmented packets the node will accept. 5721522ff5bSJun-ichiro itojun Hagino0 means that the node will not accept any fragmented packets. 5731522ff5bSJun-ichiro itojun Hagino-1 means that the node will accept as many fragmented packets as it receives. 5741522ff5bSJun-ichiro itojun HaginoThe flag is provided basically for avoiding possible DoS attacks. 5751522ff5bSJun-ichiro itojun Hagino.It Li ip6.accept_rtadv 5761522ff5bSJun-ichiro itojun HaginoIf set to non-zero, the node will accept ICMPv6 router advertisement packets 5771522ff5bSJun-ichiro itojun Haginoand autoconfigures address prefixes and default routers. 5781522ff5bSJun-ichiro itojun HaginoThe node must be a host 5791522ff5bSJun-ichiro itojun Hagino.Pq not a router 5801522ff5bSJun-ichiro itojun Haginofor the option to be meaningful. 5811522ff5bSJun-ichiro itojun Hagino.It Li ip6.keepfaith 5821522ff5bSJun-ichiro itojun HaginoIf set to non-zero, it enables 5831522ff5bSJun-ichiro itojun Hagino.Dq FAITH 5841522ff5bSJun-ichiro itojun HaginoTCP relay IPv6-to-IPv4 translator code in the kernel. 5851522ff5bSJun-ichiro itojun HaginoRefer 5861522ff5bSJun-ichiro itojun Hagino.Xr faith 4 5871522ff5bSJun-ichiro itojun Haginoand 5881522ff5bSJun-ichiro itojun Hagino.Xr faithd 8 5891522ff5bSJun-ichiro itojun Haginofor detail. 5901522ff5bSJun-ichiro itojun Hagino.It Li ip6.log_interval 5911522ff5bSJun-ichiro itojun HaginoThe variable controls amount of logs generated by IPv6 packet 5921522ff5bSJun-ichiro itojun Haginoforwarding engine, by seting interval between log output 5931522ff5bSJun-ichiro itojun Hagino.Pq in seconds . 5941522ff5bSJun-ichiro itojun Hagino.It Li ip6.hdrnestlimit 5951522ff5bSJun-ichiro itojun HaginoThe number of IPv6 extension headers permitted on incoming IPv6 packets. 5961522ff5bSJun-ichiro itojun HaginoIf set to 0, the node will accept as many extension headers as possible. 5971522ff5bSJun-ichiro itojun Hagino.It Li ip6.dad_count 5981522ff5bSJun-ichiro itojun HaginoThe variable cofigures number of IPv6 DAD 5991522ff5bSJun-ichiro itojun Hagino.Pq duplicated address detection 6001522ff5bSJun-ichiro itojun Haginoprobe packets. 6011522ff5bSJun-ichiro itojun HaginoThe packets will be generated when IPv6 interface addresses are configured. 6021522ff5bSJun-ichiro itojun Hagino.It Li ip6.auto_flowlabel 6031522ff5bSJun-ichiro itojun HaginoOn connected transport protocol packets, 6041522ff5bSJun-ichiro itojun Haginofill IPv6 flowlabel field to help intermediate routers to identify packet flows. 6051522ff5bSJun-ichiro itojun Hagino.It Li ip6.defmcasthlim 6061522ff5bSJun-ichiro itojun HaginoThe default hop limit value for an IPv6 multicast packet sourced by the node. 6071522ff5bSJun-ichiro itojun HaginoThis value applies to all the transport protocols on top of IPv6. 6081522ff5bSJun-ichiro itojun HaginoThere are APIs to override the value. 6091522ff5bSJun-ichiro itojun Hagino.\", as documented in 6101522ff5bSJun-ichiro itojun Hagino.\".Xr ip6 4 . 6111522ff5bSJun-ichiro itojun Hagino.It Li ip6.gif_hlim 6121522ff5bSJun-ichiro itojun HaginoThe maximum hop limit value for an IPv6 packet generated by 6131522ff5bSJun-ichiro itojun Hagino.Xr gif 4 6141522ff5bSJun-ichiro itojun Haginotunnel interface. 6151522ff5bSJun-ichiro itojun Hagino.It Li ip6.kame_version 6161522ff5bSJun-ichiro itojun HaginoThe string identifies the version of KAME IPv6 stack implemented in the kernel. 6171522ff5bSJun-ichiro itojun Hagino.It Li ip6.use_deprecated 6181522ff5bSJun-ichiro itojun HaginoThe variable controls use of deprecated address, specified in RFC2462 5.5.4. 6191522ff5bSJun-ichiro itojun Hagino.It Li ip6.rr_prune 6201522ff5bSJun-ichiro itojun HaginoThe variable specifies interval between IPv6 router renumbering prefix 6211522ff5bSJun-ichiro itojun Haginobabysitting, in seconds. 6221522ff5bSJun-ichiro itojun Hagino.It Li ip6.mapped_addr 6231522ff5bSJun-ichiro itojun HaginoThe variable controls use of IPv4 mapped address on AF_INET6 sockets. 6241522ff5bSJun-ichiro itojun Hagino.It Li icmp6.rediraccept 6251522ff5bSJun-ichiro itojun HaginoIf set to non-zero, the host will accept ICMPv6 redirect packets. 6261522ff5bSJun-ichiro itojun HaginoNote that IPv6 routers will never accept ICMPv6 redirect packets, 6271522ff5bSJun-ichiro itojun Haginoand the variable is meaningful on IPv6 hosts 6281522ff5bSJun-ichiro itojun Hagino.Pq non-router 6291522ff5bSJun-ichiro itojun Haginoonly. 6301522ff5bSJun-ichiro itojun Hagino.It Li icmp6.redirtimeout 6311522ff5bSJun-ichiro itojun HaginoThe variable specifies lifetime of routing entries generated by incoming 6321522ff5bSJun-ichiro itojun HaginoICMPv6 redirect. 6331522ff5bSJun-ichiro itojun Hagino.It Li icmp6.errratelimit 6341522ff5bSJun-ichiro itojun HaginoThe variable specifies minimum interval between ICMPv6 error messages, 6351522ff5bSJun-ichiro itojun Haginoin microseconds. 6361522ff5bSJun-ichiro itojun Hagino.It Li icmp6.nd6_prune 6371522ff5bSJun-ichiro itojun HaginoThe variable specifies interval between IPv6 neighbor cache babysitting, 6381522ff5bSJun-ichiro itojun Haginoin seconds. 6391522ff5bSJun-ichiro itojun Hagino.It Li icmp6.nd6_delay 6401522ff5bSJun-ichiro itojun HaginoThe variable specifies 6411522ff5bSJun-ichiro itojun Hagino.Dv DELAY_FIRST_PROBE_TIME 6421522ff5bSJun-ichiro itojun Haginotiming constant in IPv6 neighbor discovery specification 6431522ff5bSJun-ichiro itojun Hagino.Pq RFC2461 , 6441522ff5bSJun-ichiro itojun Haginoin seconds. 6451522ff5bSJun-ichiro itojun Hagino.It Li icmp6.nd6_umaxtries 6461522ff5bSJun-ichiro itojun HaginoThe variable specifies 6471522ff5bSJun-ichiro itojun Hagino.Dv MAX_UNICAST_SOLICIT 6481522ff5bSJun-ichiro itojun Haginoconstant in IPv6 neighbor discovery specification 6491522ff5bSJun-ichiro itojun Hagino.Pq RFC2461 . 6501522ff5bSJun-ichiro itojun Hagino.It Li icmp6.nd6_mmaxtries 6511522ff5bSJun-ichiro itojun HaginoThe variable specifies 6521522ff5bSJun-ichiro itojun Hagino.Dv MAX_MULTICAST_SOLICIT 6531522ff5bSJun-ichiro itojun Haginoconstant in IPv6 neighbor discovery specification 6541522ff5bSJun-ichiro itojun Hagino.Pq RFC2461 . 6551522ff5bSJun-ichiro itojun Hagino.It Li icmp6.nd6_useloopback 6561522ff5bSJun-ichiro itojun HaginoIf set to non-zero, kernel IPv6 stack will use loopback interface for 6571522ff5bSJun-ichiro itojun Haginolocal traffic. 6581522ff5bSJun-ichiro itojun Hagino.It Li icmp6.nd6_proxyall 6591522ff5bSJun-ichiro itojun HaginoThe variable enables proxy neighbor advertisements. 6601522ff5bSJun-ichiro itojun Hagino.El 6611522ff5bSJun-ichiro itojun Hagino.Pp 6621522ff5bSJun-ichiro itojun HaginoFor variables net.*.ipsec6, please refer to 6631522ff5bSJun-ichiro itojun Hagino.Xr ipsec 4 . 66458f0484fSRodney W. Grimes.El 66558f0484fSRodney W. Grimes.Sh CTL_USER 66658f0484fSRodney W. GrimesThe string and integer information available for the CTL_USER level 66758f0484fSRodney W. Grimesis detailed below. 66858f0484fSRodney W. GrimesThe changeable column shows whether a process with appropriate 66958f0484fSRodney W. Grimesprivilege may change the value. 67058f0484fSRodney W. Grimes.Bl -column "USER_COLL_WEIGHTS_MAXXXX" "integerXXX" -offset indent 67158f0484fSRodney W. Grimes.It Sy Pa Second level name Type Changeable 67258f0484fSRodney W. Grimes.It USER\_BC\_BASE\_MAX integer no 67358f0484fSRodney W. Grimes.It USER\_BC\_DIM\_MAX integer no 67458f0484fSRodney W. Grimes.It USER\_BC\_SCALE\_MAX integer no 67558f0484fSRodney W. Grimes.It USER\_BC\_STRING\_MAX integer no 67658f0484fSRodney W. Grimes.It USER\_COLL\_WEIGHTS\_MAX integer no 67758f0484fSRodney W. Grimes.It USER\_CS\_PATH string no 67858f0484fSRodney W. Grimes.It USER\_EXPR\_NEST\_MAX integer no 67958f0484fSRodney W. Grimes.It USER\_LINE\_MAX integer no 68058f0484fSRodney W. Grimes.It USER\_POSIX2\_CHAR\_TERM integer no 68158f0484fSRodney W. Grimes.It USER\_POSIX2\_C\_BIND integer no 68258f0484fSRodney W. Grimes.It USER\_POSIX2\_C\_DEV integer no 68358f0484fSRodney W. Grimes.It USER\_POSIX2\_FORT\_DEV integer no 68458f0484fSRodney W. Grimes.It USER\_POSIX2\_FORT\_RUN integer no 68558f0484fSRodney W. Grimes.It USER\_POSIX2\_LOCALEDEF integer no 68658f0484fSRodney W. Grimes.It USER\_POSIX2\_SW\_DEV integer no 68758f0484fSRodney W. Grimes.It USER\_POSIX2\_UPE integer no 68858f0484fSRodney W. Grimes.It USER\_POSIX2\_VERSION integer no 68958f0484fSRodney W. Grimes.It USER\_RE\_DUP\_MAX integer no 69058f0484fSRodney W. Grimes.It USER\_STREAM\_MAX integer no 69158f0484fSRodney W. Grimes.It USER\_TZNAME\_MAX integer no 69258f0484fSRodney W. Grimes.El 69358f0484fSRodney W. Grimes.Bl -tag -width "123456" 69458f0484fSRodney W. Grimes.Pp 69558f0484fSRodney W. Grimes.It Li USER_BC_BASE_MAX 69658f0484fSRodney W. GrimesThe maximum ibase/obase values in the 69758f0484fSRodney W. Grimes.Xr bc 1 69858f0484fSRodney W. Grimesutility. 69958f0484fSRodney W. Grimes.It Li USER_BC_DIM_MAX 70058f0484fSRodney W. GrimesThe maximum array size in the 70158f0484fSRodney W. Grimes.Xr bc 1 70258f0484fSRodney W. Grimesutility. 70358f0484fSRodney W. Grimes.It Li USER_BC_SCALE_MAX 70458f0484fSRodney W. GrimesThe maximum scale value in the 70558f0484fSRodney W. Grimes.Xr bc 1 70658f0484fSRodney W. Grimesutility. 70758f0484fSRodney W. Grimes.It Li USER_BC_STRING_MAX 70858f0484fSRodney W. GrimesThe maximum string length in the 70958f0484fSRodney W. Grimes.Xr bc 1 71058f0484fSRodney W. Grimesutility. 71158f0484fSRodney W. Grimes.It Li USER_COLL_WEIGHTS_MAX 71258f0484fSRodney W. GrimesThe maximum number of weights that can be assigned to any entry of 71358f0484fSRodney W. Grimesthe LC_COLLATE order keyword in the locale definition file. 71458f0484fSRodney W. Grimes.It Li USER_CS_PATH 71558f0484fSRodney W. GrimesReturn a value for the 71658f0484fSRodney W. Grimes.Ev PATH 71758f0484fSRodney W. Grimesenvironment variable that finds all the standard utilities. 71858f0484fSRodney W. Grimes.It Li USER_EXPR_NEST_MAX 71958f0484fSRodney W. GrimesThe maximum number of expressions that can be nested within 72058f0484fSRodney W. Grimesparenthesis by the 72158f0484fSRodney W. Grimes.Xr expr 1 72258f0484fSRodney W. Grimesutility. 72358f0484fSRodney W. Grimes.It Li USER_LINE_MAX 72458f0484fSRodney W. GrimesThe maximum length in bytes of a text-processing utility's input 72558f0484fSRodney W. Grimesline. 72658f0484fSRodney W. Grimes.It Li USER_POSIX2_CHAR_TERM 72758f0484fSRodney W. GrimesReturn 1 if the system supports at least one terminal type capable of 72858f0484fSRodney W. Grimesall operations described in POSIX 1003.2, otherwise 0. 72958f0484fSRodney W. Grimes.It Li USER_POSIX2_C_BIND 73058f0484fSRodney W. GrimesReturn 1 if the system's C-language development facilities support the 73158f0484fSRodney W. GrimesC-Language Bindings Option, otherwise 0. 73258f0484fSRodney W. Grimes.It Li USER_POSIX2_C_DEV 73358f0484fSRodney W. GrimesReturn 1 if the system supports the C-Language Development Utilities Option, 73458f0484fSRodney W. Grimesotherwise 0. 73558f0484fSRodney W. Grimes.It Li USER_POSIX2_FORT_DEV 73658f0484fSRodney W. GrimesReturn 1 if the system supports the FORTRAN Development Utilities Option, 73758f0484fSRodney W. Grimesotherwise 0. 73858f0484fSRodney W. Grimes.It Li USER_POSIX2_FORT_RUN 73958f0484fSRodney W. GrimesReturn 1 if the system supports the FORTRAN Runtime Utilities Option, 74058f0484fSRodney W. Grimesotherwise 0. 74158f0484fSRodney W. Grimes.It Li USER_POSIX2_LOCALEDEF 74258f0484fSRodney W. GrimesReturn 1 if the system supports the creation of locales, otherwise 0. 74358f0484fSRodney W. Grimes.It Li USER_POSIX2_SW_DEV 74458f0484fSRodney W. GrimesReturn 1 if the system supports the Software Development Utilities Option, 74558f0484fSRodney W. Grimesotherwise 0. 74658f0484fSRodney W. Grimes.It Li USER_POSIX2_UPE 74758f0484fSRodney W. GrimesReturn 1 if the system supports the User Portability Utilities Option, 74858f0484fSRodney W. Grimesotherwise 0. 74958f0484fSRodney W. Grimes.It Li USER_POSIX2_VERSION 75058f0484fSRodney W. GrimesThe version of POSIX 1003.2 with which the system attempts to comply. 75158f0484fSRodney W. Grimes.It Li USER_RE_DUP_MAX 75258f0484fSRodney W. GrimesThe maximum number of repeated occurrences of a regular expression 75358f0484fSRodney W. Grimespermitted when using interval notation. 7540014b4c0SPeter Wemm.ne 1i 75558f0484fSRodney W. Grimes.It Li USER_STREAM_MAX 75658f0484fSRodney W. GrimesThe minimum maximum number of streams that a process may have open 75758f0484fSRodney W. Grimesat any one time. 75858f0484fSRodney W. Grimes.It Li USER_TZNAME_MAX 75958f0484fSRodney W. GrimesThe minimum maximum number of types supported for the name of a 76058f0484fSRodney W. Grimestimezone. 76158f0484fSRodney W. Grimes.El 76258f0484fSRodney W. Grimes.Sh CTL_VM 76358f0484fSRodney W. GrimesThe string and integer information available for the CTL_VM level 76458f0484fSRodney W. Grimesis detailed below. 76558f0484fSRodney W. GrimesThe changeable column shows whether a process with appropriate 76658f0484fSRodney W. Grimesprivilege may change the value. 76758f0484fSRodney W. Grimes.Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent 76858f0484fSRodney W. Grimes.It Sy Pa Second level name Type Changeable 76958f0484fSRodney W. Grimes.It VM\_LOADAVG struct loadavg no 77058f0484fSRodney W. Grimes.It VM\_METER struct vmtotal no 771b697833cSGuy Helmer.It VM\_PAGEOUT\_ALGORITHM integer yes 772b697833cSGuy Helmer.It VM\_SWAPPING\_ENABLED integer maybe 773b697833cSGuy Helmer.It VM\_V\_CACHE\_MAX integer yes 774b697833cSGuy Helmer.It VM\_V\_CACHE\_MIN integer yes 775b697833cSGuy Helmer.It VM\_V\_FREE\_MIN integer yes 776b697833cSGuy Helmer.It VM\_V\_FREE\_RESERVED integer yes 777b697833cSGuy Helmer.It VM\_V\_FREE\_TARGET integer yes 778b697833cSGuy Helmer.It VM\_V\_INACTIVE\_TARGET integer yes 779b697833cSGuy Helmer.It VM\_V\_PAGEOUT\_FREE\_MIN integer yes 78058f0484fSRodney W. Grimes.El 78158f0484fSRodney W. Grimes.Pp 78258f0484fSRodney W. Grimes.Bl -tag -width "123456" 78358f0484fSRodney W. Grimes.It Li VM_LOADAVG 78458f0484fSRodney W. GrimesReturn the load average history. 78558f0484fSRodney W. GrimesThe returned data consists of a 78658f0484fSRodney W. Grimes.Va struct loadavg . 78758f0484fSRodney W. Grimes.It Li VM_METER 78858f0484fSRodney W. GrimesReturn the system wide virtual memory statistics. 78958f0484fSRodney W. GrimesThe returned data consists of a 79058f0484fSRodney W. Grimes.Va struct vmtotal . 791b697833cSGuy Helmer.It Li VM_PAGEOUT_ALGORITHM 792b697833cSGuy Helmer0 if the statistics-based page management algorithm is in use 793b697833cSGuy Helmeror 1 if the near-LRU algorithm is in use. 794b697833cSGuy Helmer.It Li VM_SWAPPING_ENABLED 795b697833cSGuy Helmer1 if process swapping is enabled or 0 if disabled. This variable is 796b697833cSGuy Helmerpermanently set to 0 if the kernel was built with swapping disabled. 797b697833cSGuy Helmer.It Li VM_V_CACHE_MAX 798b697833cSGuy HelmerMaximum desired size of the cache queue. 799b697833cSGuy Helmer.It Li VM_V_CACHE_MIN 800b697833cSGuy HelmerMinimum desired size of the cache queue. If the cache queue size 801b697833cSGuy Helmerfalls very far below this value, the pageout daemon is awakened. 802b697833cSGuy Helmer.It Li VM_V_FREE_MIN 803b697833cSGuy HelmerMinimum amount of memory (cache memory plus free memory) 804b697833cSGuy Helmerrequired to be available before a process waiting on memory will be 805b697833cSGuy Helmerawakened. 806b697833cSGuy Helmer.It Li VM_V_FREE_RESERVED 807b697833cSGuy HelmerProcesses will awaken the pageout daemon and wait for memory if the 808b697833cSGuy Helmernumber of free and cached pages drops below this value. 809b697833cSGuy Helmer.It Li VM_V_FREE_TARGET 810b697833cSGuy HelmerThe total amount of free memory (including cache memory) that the 811b697833cSGuy Helmerpageout daemon tries to maintain. 812b697833cSGuy Helmer.It Li VM_V_INACTIVE_TARGET 813b697833cSGuy HelmerThe desired number of inactive pages that the pageout daemon should 814b697833cSGuy Helmerachieve when it runs. Inactive pages can be quickly inserted into 815b697833cSGuy Helmerprocess address space when needed. 816b697833cSGuy Helmer.It Li VM_V_PAGEOUT_FREE_MIN 817b697833cSGuy HelmerIf the amount of free and cache memory falls below this value, the 818b697833cSGuy Helmerpageout daemon will enter "memory conserving mode" to avoid deadlock. 81958f0484fSRodney W. Grimes.El 82058f0484fSRodney W. Grimes.Sh RETURN VALUES 821bf5a138eSMike Pritchard.Fn sysctl 822eec1dbe6SDag-Erling Smørgravand 823eec1dbe6SDag-Erling Smørgrav.Fn sysctlbyname 824eec1dbe6SDag-Erling Smørgravreturn 0 when successful. 82558f0484fSRodney W. GrimesOtherwise \-1 is returned and 82658f0484fSRodney W. Grimes.Va errno 82758f0484fSRodney W. Grimesis set appropriately. 82858f0484fSRodney W. Grimes.Sh ERRORS 82958f0484fSRodney W. GrimesThe following errors may be reported: 83058f0484fSRodney W. Grimes.Bl -tag -width Er 83158f0484fSRodney W. Grimes.It Bq Er EFAULT 83258f0484fSRodney W. GrimesThe buffer 83358f0484fSRodney W. Grimes.Fa name , 83458f0484fSRodney W. Grimes.Fa oldp , 83558f0484fSRodney W. Grimes.Fa newp , 83658f0484fSRodney W. Grimesor length pointer 83758f0484fSRodney W. Grimes.Fa oldlenp 83858f0484fSRodney W. Grimescontains an invalid address. 83958f0484fSRodney W. Grimes.It Bq Er EINVAL 84058f0484fSRodney W. GrimesThe 84158f0484fSRodney W. Grimes.Fa name 84258f0484fSRodney W. Grimesarray is less than two or greater than CTL_MAXNAME. 84358f0484fSRodney W. Grimes.It Bq Er EINVAL 84458f0484fSRodney W. GrimesA non-null 84558f0484fSRodney W. Grimes.Fa newp 84658f0484fSRodney W. Grimesis given and its specified length in 84758f0484fSRodney W. Grimes.Fa newlen 84858f0484fSRodney W. Grimesis too large or too small. 84958f0484fSRodney W. Grimes.It Bq Er ENOMEM 85058f0484fSRodney W. GrimesThe length pointed to by 85158f0484fSRodney W. Grimes.Fa oldlenp 85258f0484fSRodney W. Grimesis too short to hold the requested value. 85358f0484fSRodney W. Grimes.It Bq Er ENOTDIR 85458f0484fSRodney W. GrimesThe 85558f0484fSRodney W. Grimes.Fa name 85658f0484fSRodney W. Grimesarray specifies an intermediate rather than terminal name. 857226420a4SBrian Feldman.It Bq Er EISDIR 858226420a4SBrian FeldmanThe 859226420a4SBrian Feldman.Fa name 860226420a4SBrian Feldmanarray specifies a terminal name, but the actual name is not terminal. 86158f0484fSRodney W. Grimes.It Bq Er EOPNOTSUPP 86258f0484fSRodney W. GrimesThe 86358f0484fSRodney W. Grimes.Fa name 86458f0484fSRodney W. Grimesarray specifies a value that is unknown. 86558f0484fSRodney W. Grimes.It Bq Er EPERM 86658f0484fSRodney W. GrimesAn attempt is made to set a read-only value. 86758f0484fSRodney W. Grimes.It Bq Er EPERM 86858f0484fSRodney W. GrimesA process without appropriate privilege attempts to set a value. 86958f0484fSRodney W. Grimes.El 87058f0484fSRodney W. Grimes.Sh FILES 87158f0484fSRodney W. Grimes.Bl -tag -width <netinet/icmpXvar.h> -compact 87258f0484fSRodney W. Grimes.It Pa <sys/sysctl.h> 87358f0484fSRodney W. Grimesdefinitions for top level identifiers, second level kernel and hardware 87458f0484fSRodney W. Grimesidentifiers, and user level identifiers 87558f0484fSRodney W. Grimes.It Pa <sys/socket.h> 87658f0484fSRodney W. Grimesdefinitions for second level network identifiers 87758f0484fSRodney W. Grimes.It Pa <sys/gmon.h> 87858f0484fSRodney W. Grimesdefinitions for third level profiling identifiers 87958f0484fSRodney W. Grimes.It Pa <vm/vm_param.h> 88058f0484fSRodney W. Grimesdefinitions for second level virtual memory identifiers 88158f0484fSRodney W. Grimes.It Pa <netinet/in.h> 8821522ff5bSJun-ichiro itojun Haginodefinitions for third level IPv4/IPv6 identifiers and 8831522ff5bSJun-ichiro itojun Haginofourth level IPv4/v6 identifiers 88458f0484fSRodney W. Grimes.It Pa <netinet/icmp_var.h> 88558f0484fSRodney W. Grimesdefinitions for fourth level ICMP identifiers 8861522ff5bSJun-ichiro itojun Hagino.It Pa <netinet/icmp6.h> 8871522ff5bSJun-ichiro itojun Haginodefinitions for fourth level ICMPv6 identifiers 88858f0484fSRodney W. Grimes.It Pa <netinet/udp_var.h> 88958f0484fSRodney W. Grimesdefinitions for fourth level UDP identifiers 89058f0484fSRodney W. Grimes.El 89158f0484fSRodney W. Grimes.Sh SEE ALSO 89238cf6319SEivind Eklund.Xr sysconf 3 , 893f5a78334SJoseph Koshy.Xr sysctl 8 89458f0484fSRodney W. Grimes.Sh HISTORY 89558f0484fSRodney W. GrimesThe 896bf5a138eSMike Pritchard.Fn sysctl 8977bdf80e5SMike Pritchardfunction first appeared in 8987bdf80e5SMike Pritchard.Bx 4.4 . 899