xref: /netbsd-src/lib/libc/gen/sysctl.3 (revision ce0bb6e8d2e560ecacbe865a848624f94498063b)
1.\"	$NetBSD: sysctl.3,v 1.5 1995/02/25 08:51:47 cgd Exp $
2.\"
3.\" Copyright (c) 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"	@(#)sysctl.3	8.1 (Berkeley) 6/4/93
35.\"
36.Dd "June 4, 1993"
37.Dt SYSCTL 3
38.Os
39.Sh NAME
40.Nm sysctl
41.Nd get or set system information
42.Sh SYNOPSIS
43.Fd #include <sys/sysctl.h>
44.Ft int
45.Fn sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
46.Sh DESCRIPTION
47The
48.Nm sysctl
49function retrieves system information and allows processes with
50appropriate privileges to set system information.
51The information available from
52.Nm sysctl
53consists of integers, strings, and tables.
54Information may be retrieved and set from the command interface
55using the
56.Xr sysctl 8
57utility.
58.Pp
59Unless explicitly noted below,
60.Nm sysctl
61returns a consistent snapshot of the data requested.
62Consistency is obtained by locking the destination
63buffer into memory so that the data may be copied out without blocking.
64Calls to
65.Nm sysctl
66are serialized to avoid deadlock.
67.Pp
68The state is described using a ``Management Information Base'' (MIB)
69style name, listed in
70.Fa name ,
71which is a
72.Fa namelen
73length array of integers.
74.Pp
75The information is copied into the buffer specified by
76.Fa oldp .
77The size of the buffer is given by the location specified by
78.Fa oldlenp
79before the call,
80and that location gives the amount of data copied after a successful call.
81If the amount of data available is greater
82than the size of the buffer supplied,
83the call supplies as much data as fits in the buffer provided
84and returns with the error code ENOMEM.
85If the old value is not desired,
86.Fa oldp
87and
88.Fa oldlenp
89should be set to NULL.
90.Pp
91The size of the available data can be determined by calling
92.Nm sysctl
93with a NULL parameter for
94.Fa oldp .
95The size of the available data will be returned in the location pointed to by
96.Fa oldlenp .
97For some operations, the amount of space may change often.
98For these operations,
99the system attempts to round up so that the returned size is
100large enough for a call to return the data shortly thereafter.
101.Pp
102To set a new value,
103.Fa newp
104is set to point to a buffer of length
105.Fa newlen
106from which the requested value is to be taken.
107If a new value is not to be set,
108.Fa newp
109should be set to NULL and
110.Fa newlen
111set to 0.
112.Pp
113The top level names are defined with a CTL_ prefix in
114.Pa <sys/sysctl.h> ,
115and are as follows.
116The next and subsequent levels down are found in the include files
117listed here, and described in separate sections below.
118.Pp
119.Bl -column CTLXMACHDEPXXX "Next level namesXXXXXX" -offset indent
120.It Sy Pa Name	Next level names	Description
121.It CTL\_DEBUG	sys/sysctl.h	Debugging
122.It CTL\_FS	sys/sysctl.h	File system
123.It CTL\_HW	sys/sysctl.h	Generic CPU, I/O
124.It CTL\_KERN	sys/sysctl.h	High kernel limits
125.It CTL\_MACHDEP	sys/sysctl.h	Machine dependent
126.It CTL\_NET	sys/socket.h	Networking
127.It CTL\_USER	sys/sysctl.h	User-level
128.It CTL\_VM	vm/vm_param.h	Virtual memory
129.El
130.Pp
131For example, the following retrieves the maximum number of processes allowed
132in the system:
133.Bd -literal -offset indent -compact
134int mib[2], maxproc;
135size_t len;
136.sp
137mib[0] = CTL_KERN;
138mib[1] = KERN_MAXPROC;
139len = sizeof(maxproc);
140sysctl(mib, 2, &maxproc, &len, NULL, 0);
141.Ed
142.sp
143To retrieve the standard search path for the system utilities:
144.Bd -literal -offset indent -compact
145int mib[2];
146size_t len;
147char *p;
148.sp
149mib[0] = CTL_USER;
150mib[1] = USER_CS_PATH;
151sysctl(mib, 2, NULL, &len, NULL, 0);
152p = malloc(len);
153sysctl(mib, 2, p, &len, NULL, 0);
154.Ed
155.Sh CTL_DEBUG
156The debugging variables vary from system to system.
157A debugging variable may be added or deleted without need to recompile
158.Nm sysctl
159to know about it.
160Each time it runs,
161.Nm sysctl
162gets the list of debugging variables from the kernel and
163displays their current values.
164The system defines twenty
165.Ns ( Va struct ctldebug )
166variables named
167.Nm debug0
168through
169.Nm debug19 .
170They are declared as separate variables so that they can be
171individually initialized at the location of their associated variable.
172The loader prevents multiple use of the same variable by issuing errors
173if a variable is initialized in more than one place.
174For example, to export the variable
175.Nm dospecialcheck
176as a debugging variable, the following declaration would be used:
177.Bd -literal -offset indent -compact
178int dospecialcheck = 1;
179struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck };
180.Ed
181.Sh CTL_FS
182There are currently no second level names for the file system.
183.Sh CTL_HW
184The string and integer information available for the CTL_HW level
185is detailed below.
186The changeable column shows whether a process with appropriate
187privilege may change the value.
188.Bl -column "Second level nameXXXXXX" integerXXX -offset indent
189.It Sy Pa Second level name	Type	Changeable
190.It HW\_MACHINE	string	no
191.It HW\_MODEL	string	no
192.It HW\_NCPU	integer	no
193.It HW\_BYTEORDER	integer	no
194.It HW\_PHYSMEM	integer	no
195.It HW\_USERMEM	integer	no
196.It HW\_PAGESIZE	integer	no
197.\".It HW\_DISKNAMES	integer	no
198.\".It HW\_DISKSTATS	integer	no
199.El
200.Pp
201.Bl -tag -width "123456"
202.It Li HW_MACHINE
203The machine class.
204.It Li HW_MODEL
205The machine model
206.It Li HW_NCPU
207The number of cpus.
208.It Li HW_BYTEORDER
209The byteorder (4,321, or 1,234).
210.It Li HW_PHYSMEM
211The bytes of physical memory.
212.It Li HW_USERMEM
213The bytes of non-kernel memory.
214.It Li HW_PAGESIZE
215The software page size.
216.\".It Fa HW_DISKNAMES
217.\".It Fa HW_DISKSTATS
218.El
219.Sh CTL_KERN
220The string and integer information available for the CTL_KERN level
221is detailed below.
222The changeable column shows whether a process with appropriate
223privilege may change the value.
224The types of data currently available are process information,
225system vnodes, the open file entries, routing table entries,
226virtual memory statistics, load average history, and clock rate
227information.
228.Bl -column "KERNXCHOWNXRESTRICTEDXXX" "struct clockrateXXX" -offset indent
229.It Sy Pa Second level name	Type	Changeable
230.It KERN\_ARGMAX	integer	no
231.It KERN\_BOOTTIME	struct timeval	no
232.It KERN\_CHOWN\_RESTRICTED	integer	no
233.It KERN\_CLOCKRATE	struct clockinfo	no
234.It KERN\_DOMAINNAME	string	yes
235.It KERN\_FILE	struct file	no
236.It KERN\_HOSTID	integer	yes
237.It KERN\_HOSTNAME	string	yes
238.It KERN\_JOB\_CONTROL	integer	no
239.It KERN\_LINK\_MAX	integer	no
240.It KERN\_MAXFILES	integer	yes
241.It KERN\_MAXPARTITIONS	integer	no
242.It KERN\_MAXPROC	integer	yes
243.It KERN\_MAXVNODES	integer	yes
244.It KERN\_MAX\_CANON	integer	no
245.It KERN\_MAX\_INPUT	integer	no
246.It KERN\_NAME\_MAX	integer	no
247.It KERN\_NGROUPS	integer	no
248.It KERN\_NO\_TRUNC	integer	no
249.It KERN\_OSRELEASE	string	no
250.It KERN\_OSREV	integer	no
251.It KERN\_OSTYPE	string	no
252.It KERN\_PATH\_MAX	integer	no
253.It KERN\_PIPE\_BUF	integer	no
254.It KERN\_POSIX1	integer	no
255.It KERN\_PROC	struct proc	no
256.It KERN\_PROF	node	not applicable
257.It KERN\_SAVED\_IDS	integer	no
258.It KERN\_SECURELVL	integer	raise only
259.It KERN\_VDISABLE	integer	no
260.It KERN\_VERSION	string	no
261.It KERN\_VNODE	struct vnode	no
262.El
263.Pp
264.Bl -tag -width "123456"
265.It Li KERN_ARGMAX
266The maximum bytes of argument to
267.Xr exec 2 .
268.It Li KERN_BOOTTIME
269A
270.Va struct timeval
271structure is returned.
272This structure contains the time that the system was booted.
273.It Li KERN_CHOWN_RESTRICTED
274Return 1 if appropriate privileges are required for the
275.Xr chown 2
276system call, otherwise 0.
277.It Li KERN_CLOCKRATE
278A
279.Va struct clockinfo
280structure is returned.
281This structure contains the clock, statistics clock and profiling clock
282frequencies, the number of micro-seconds per hz tick, and the clock
283skew rate.
284.It Li KERN_DOMAINNAME
285Get or set the YP domain name.
286.It Li KERN_FILE
287Return the entire file table.
288The returned data consists of a single
289.Va struct filehead
290followed by an array of
291.Va struct file ,
292whose size depends on the current number of such objects in the system.
293.It Li KERN_HOSTID
294Get or set the host id.
295.It Li KERN_HOSTNAME
296Get or set the hostname.
297.It Li KERN_JOB_CONTROL
298Return 1 if job control is available on this system, otherwise 0.
299.It Li KERN_LINK_MAX
300The maximum file link count.
301.It Li KERN_MAXFILES
302The maximum number of open files that may be open in the system.
303.It Li KERN_MAXPARTITIONS
304The maximum number of partitions allowed per disk.
305.It Li KERN_MAXPROC
306The maximum number of simultaneous processes the system will allow.
307.It Li KERN_MAXVNODES
308The maximum number of vnodes available on the system.
309.It Li KERN_MAX_CANON
310The maximum number of bytes in terminal canonical input line.
311.It Li KERN_MAX_INPUT
312The minimum maximum number of bytes for which space is available in
313a terminal input queue.
314.It Li KERN_NAME_MAX
315The maximum number of bytes in a file name.
316.It Li KERN_NGROUPS
317The maximum number of supplemental groups.
318.It Li KERN_NO_TRUNC
319Return 1 if file names longer than KERN_NAME_MAX are truncated.
320.It Li KERN_OSRELEASE
321The system release string.
322.It Li KERN_OSREV
323The system revision string.
324.It Li KERN_OSTYPE
325The system type string.
326.It Li KERN_PATH_MAX
327The maximum number of bytes in a pathname.
328.It Li KERN_PIPE_BUF
329The maximum number of bytes which will be written atomically to a pipe.
330.It Li KERN_POSIX1
331The version of ISO/IEC 9945 (POSIX 1003.1) with which the system
332attempts to comply.
333.It Li KERN_PROC
334Return the entire process table, or a subset of it.
335An array of
336.Va struct kinfo_proc
337structures is returned,
338whose size depends on the current number of such objects in the system.
339The third and fourth level names are as follows:
340.Bl -column "Third level nameXXXXXX" "Fourth level is:XXXXXX" -offset indent
341.It Pa Third level name	Fourth level is:
342.It KERN\_PROC\_ALL	None
343.It KERN\_PROC\_PID	A process ID
344.It KERN\_PROC\_PGRP	A process group
345.It KERN\_PROC\_TTY	A tty device
346.It KERN\_PROC\_UID	A user ID
347.It KERN\_PROC\_RUID	A real user ID
348.El
349.It Li KERN_PROF
350Return profiling information about the kernel.
351If the kernel is not compiled for profiling,
352attempts to retrieve any of the KERN_PROF values will
353fail with EOPNOTSUPP.
354The third level names for the string and integer profiling information
355is detailed below.
356The changeable column shows whether a process with appropriate
357privilege may change the value.
358.Bl -column "GPROFXGMONPARAMXXX" "struct gmonparamXXX" -offset indent
359.It Sy Pa Third level name	Type	Changeable
360.It GPROF\_STATE	integer	yes
361.It GPROF\_COUNT	u_short[\|]	yes
362.It GPROF\_FROMS	u_short[\|]	yes
363.It GPROF\_TOS	struct tostruct	yes
364.It GPROF\_GMONPARAM	struct gmonparam	no
365.El
366.Pp
367The variables are as follows:
368.Bl -tag -width "123456"
369.It Li GPROF_STATE
370Returns GMON_PROF_ON or GMON_PROF_OFF to show that profiling
371is running or stopped.
372.It Li GPROF_COUNT
373Array of statistical program counter counts.
374.It Li GPROF_FROMS
375Array indexed by program counter of call-from points.
376.It Li GPROF_TOS
377Array of
378.Va struct tostruct
379describing destination of calls and their counts.
380.It Li GPROF_GMONPARAM
381Structure giving the sizes of the above arrays.
382.El
383.It Li KERN_SAVED_IDS
384Returns 1 if saved set-group and saved set-user ID is available.
385.It Li KERN_SECURELVL
386The system security level.
387This level may be raised by processes with appropriate privilege.
388It may only be lowered by process 1.
389.It Li KERN_VDISABLE
390Returns the terminal character disabling value.
391.It Li KERN_VERSION
392The system version string.
393.It Li KERN_VNODE
394Return the entire vnode table.
395Note, the vnode table is not necessarily a consistent snapshot of
396the system.
397The returned data consists of an array whose size depends on the
398current number of such objects in the system.
399Each element of the array contains the kernel address of a vnode
400.Va struct vnode *
401followed by the vnode itself
402.Va struct vnode .
403.El
404.Sh CTL_MACHDEP
405The set of variables defined is architecture dependent.
406Most architectures define at least the following variables.
407.Bl -column "CONSOLE_DEVICEXXX" "integerXXX" -offset indent
408.It Sy Pa Second level name	Type	Changeable
409.It Li CPU_CONSDEV	dev_t	no
410.El
411.Sh CTL_NET
412The string and integer information available for the CTL_NET level
413is detailed below.
414The changeable column shows whether a process with appropriate
415privilege may change the value.
416.Bl -column "Second level nameXXXXXX" "routing messagesXXX" -offset indent
417.It Sy Pa Second level name	Type	Changeable
418.It PF\_ROUTE	routing messages	no
419.It PF\_INET	internet values	yes
420.El
421.Pp
422.Bl -tag -width "123456"
423.It Li PF_ROUTE
424Return the entire routing table or a subset of it.
425The data is returned as a sequence of routing messages (see
426.Xr route 4
427for the header file, format and meaning).
428The length of each message is contained in the message header.
429.Pp
430The third level name is a protocol number, which is currently always 0.
431The fourth level name is an address family, which may be set to 0 to
432select all address families.
433The fifth and sixth level names are as follows:
434.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent
435.It Pa Fifth level name	Sixth level is:
436.It NET\_RT\_FLAGS	rtflags
437.It NET\_RT\_DUMP	None
438.It NET\_RT\_IFLIST	None
439.El
440.It Li PF_INET
441Get or set various global information about the internet protocols.
442The third level name is the protocol.
443The fourth level name is the variable name.
444The currently defined protocols and names are:
445.Bl -column "Protocol nameXXXXXX" "Variable nameXXX" "integerXXX" -offset indent
446.It Pa Protocol name	Variable name	Type	Changeable
447.It ip	forwarding	integer	yes
448.It ip	redirect	integer	yes
449.It ip	ttl	integer	yes
450.It icmp	maskrepl	integer	yes
451.It udp	checksum	integer	yes
452.El
453.Pp
454The variables are as follows:
455.Bl -tag -width "123456"
456.It Li ip.forwarding
457Returns 1 when IP forwarding is enabled for the host,
458meaning that the host is acting as a router.
459.It Li ip.redirect
460Returns 1 when ICMP redirects may be sent by the host.
461This option is ignored unless the host is routing IP packets,
462and should normally be enabled on all systems.
463.It Li ip.ttl
464The maximum time-to-live (hop count) value for an IP packet sourced by
465the system.
466This value applies to normal transport protocols, not to ICMP.
467.It Li icmp.maskrepl
468Returns 1 if ICMP network mask requests are to be answered.
469.It Li udp.checksum
470Returns 1 when UDP checksums are being computed and checked.
471Disabling UDP checksums is strongly discouraged.
472.El
473.Sh CTL_USER
474The string and integer information available for the CTL_USER level
475is detailed below.
476The changeable column shows whether a process with appropriate
477privilege may change the value.
478.Bl -column "USER_COLL_WEIGHTS_MAXXXX" "integerXXX" -offset indent
479.It Sy Pa Second level name	Type	Changeable
480.It USER\_BC\_BASE\_MAX	integer	no
481.It USER\_BC\_DIM\_MAX	integer	no
482.It USER\_BC\_SCALE\_MAX	integer	no
483.It USER\_BC\_STRING\_MAX	integer	no
484.It USER\_COLL\_WEIGHTS\_MAX	integer	no
485.It USER\_CS\_PATH	string	no
486.It USER\_EXPR\_NEST\_MAX	integer	no
487.It USER\_LINE\_MAX	integer	no
488.It USER\_POSIX2\_CHAR\_TERM	integer	no
489.It USER\_POSIX2\_C\_BIND	integer	no
490.It USER\_POSIX2\_C\_DEV	integer	no
491.It USER\_POSIX2\_FORT\_DEV	integer	no
492.It USER\_POSIX2\_FORT\_RUN	integer	no
493.It USER\_POSIX2\_LOCALEDEF	integer	no
494.It USER\_POSIX2\_SW\_DEV	integer	no
495.It USER\_POSIX2\_UPE	integer	no
496.It USER\_POSIX2\_VERSION	integer	no
497.It USER\_RE\_DUP\_MAX	integer	no
498.It USER\_STREAM\_MAX	integer	no
499.It USER\_TZNAME\_MAX	integer	no
500.El
501.Bl -tag -width "123456"
502.Pp
503.It Li USER_BC_BASE_MAX
504The maximum ibase/obase values in the
505.Xr bc 1
506utility.
507.It Li USER_BC_DIM_MAX
508The maximum array size in the
509.Xr bc 1
510utility.
511.It Li USER_BC_SCALE_MAX
512The maximum scale value in the
513.Xr bc 1
514utility.
515.It Li USER_BC_STRING_MAX
516The maximum string length in the
517.Xr bc 1
518utility.
519.It Li USER_COLL_WEIGHTS_MAX
520The maximum number of weights that can be assigned to any entry of
521the LC_COLLATE order keyword in the locale definition file.
522.It Li USER_CS_PATH
523Return a value for the
524.Ev PATH
525environment variable that finds all the standard utilities.
526.It Li USER_EXPR_NEST_MAX
527The maximum number of expressions that can be nested within
528parenthesis by the
529.Xr expr 1
530utility.
531.It Li USER_LINE_MAX
532The maximum length in bytes of a text-processing utility's input
533line.
534.It Li USER_POSIX2_CHAR_TERM
535Return 1 if the system supports at least one terminal type capable of
536all operations described in POSIX 1003.2, otherwise 0.
537.It Li USER_POSIX2_C_BIND
538Return 1 if the system's C-language development facilities support the
539C-Language Bindings Option, otherwise 0.
540.It Li USER_POSIX2_C_DEV
541Return 1 if the system supports the C-Language Development Utilities Option,
542otherwise 0.
543.It Li USER_POSIX2_FORT_DEV
544Return 1 if the system supports the FORTRAN Development Utilities Option,
545otherwise 0.
546.It Li USER_POSIX2_FORT_RUN
547Return 1 if the system supports the FORTRAN Runtime Utilities Option,
548otherwise 0.
549.It Li USER_POSIX2_LOCALEDEF
550Return 1 if the system supports the creation of locales, otherwise 0.
551.It Li USER_POSIX2_SW_DEV
552Return 1 if the system supports the Software Development Utilities Option,
553otherwise 0.
554.It Li USER_POSIX2_UPE
555Return 1 if the system supports the User Portability Utilities Option,
556otherwise 0.
557.It Li USER_POSIX2_VERSION
558The version of POSIX 1003.2 with which the system attempts to comply.
559.It Li USER_RE_DUP_MAX
560The maximum number of repeated occurrences of a regular expression
561permitted when using interval notation.
562.It Li USER_STREAM_MAX
563The minimum maximum number of streams that a process may have open
564at any one time.
565.It Li USER_TZNAME_MAX
566The minimum maximum number of types supported for the name of a
567timezone.
568.El
569.Sh CTL_VM
570The string and integer information available for the CTL_VM level
571is detailed below.
572The changeable column shows whether a process with appropriate
573privilege may change the value.
574.Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent
575.It Sy Pa Second level name	Type	Changeable
576.It VM\_LOADAVG	struct loadavg	no
577.It VM\_METER	struct vmtotal	no
578.El
579.Pp
580.Bl -tag -width "123456"
581.It Li VM_LOADAVG
582Return the load average history.
583The returned data consists of a
584.Va struct loadavg .
585.It Li VM_METER
586Return the system wide virtual memory statistics.
587The returned data consists of a
588.Va struct vmtotal .
589.El
590.Sh RETURN VALUES
591If the call to
592.Nm sysctl
593is successful, 0 is returned.
594Otherwise \-1 is returned and
595.Va errno
596is set appropriately.
597.Sh ERRORS
598The following errors may be reported:
599.Bl -tag -width Er
600.It Bq Er EFAULT
601The buffer
602.Fa name ,
603.Fa oldp ,
604.Fa newp ,
605or length pointer
606.Fa oldlenp
607contains an invalid address.
608.It Bq Er EINVAL
609The
610.Fa name
611array is less than two or greater than CTL_MAXNAME.
612.It Bq Er EINVAL
613A non-null
614.Fa newp
615is given and its specified length in
616.Fa newlen
617is too large or too small.
618.It Bq Er ENOMEM
619The length pointed to by
620.Fa oldlenp
621is too short to hold the requested value.
622.It Bq Er ENOTDIR
623The
624.Fa name
625array specifies an intermediate rather than terminal name.
626.It Bq Er EOPNOTSUPP
627The
628.Fa name
629array specifies a value that is unknown.
630.It Bq Er EPERM
631An attempt is made to set a read-only value.
632.It Bq Er EPERM
633A process without appropriate privilege attempts to set a value.
634.El
635.Sh FILES
636.Bl -tag -width <netinet/icmpXvar.h> -compact
637.It Pa <sys/sysctl.h>
638definitions for top level identifiers, second level kernel and hardware
639identifiers, and user level identifiers
640.It Pa <sys/socket.h>
641definitions for second level network identifiers
642.It Pa <sys/gmon.h>
643definitions for third level profiling identifiers
644.It Pa <vm/vm_param.h>
645definitions for second level virtual memory identifiers
646.It Pa <netinet/in.h>
647definitions for third level Internet identifiers and
648fourth level IP identifiers
649.It Pa <netinet/icmp_var.h>
650definitions for fourth level ICMP identifiers
651.It Pa <netinet/udp_var.h>
652definitions for fourth level UDP identifiers
653.El
654.Sh SEE ALSO
655.Xr sysctl 8
656.Sh HISTORY
657The
658.Nm sysctl
659function first appeared in 4.4BSD.
660