xref: /freebsd/share/man/man5/sysctl.conf.5 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
13a9d037bSChris Costello.\" Copyright (c) 1999 Chris Costello <chris@FreeBSD.org>
23a9d037bSChris Costello.\" All rights reserved.
33a9d037bSChris Costello.\"
43a9d037bSChris Costello.\" Redistribution and use in source and binary forms, with or without
53a9d037bSChris Costello.\" modification, are permitted provided that the following conditions
63a9d037bSChris Costello.\" are met:
73a9d037bSChris Costello.\" 1. Redistributions of source code must retain the above copyright
83a9d037bSChris Costello.\"    notice, this list of conditions and the following disclaimer.
93a9d037bSChris Costello.\" 2. Redistributions in binary form must reproduce the above copyright
103a9d037bSChris Costello.\"    notice, this list of conditions and the following disclaimer in the
113a9d037bSChris Costello.\"    documentation and/or other materials provided with the distribution.
123a9d037bSChris Costello.\"
133a9d037bSChris Costello.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
143a9d037bSChris Costello.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
153a9d037bSChris Costello.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
163a9d037bSChris Costello.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
173a9d037bSChris Costello.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
183a9d037bSChris Costello.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
193a9d037bSChris Costello.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
203a9d037bSChris Costello.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
213a9d037bSChris Costello.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
223a9d037bSChris Costello.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
233a9d037bSChris Costello.\" SUCH DAMAGE.
243a9d037bSChris Costello.\"
25383ccaa4SMateusz Piotrowski.Dd June 30, 2022
263a9d037bSChris Costello.Dt SYSCTL.CONF 5
273d45e180SRuslan Ermilov.Os
283a9d037bSChris Costello.Sh NAME
293a9d037bSChris Costello.Nm sysctl.conf
30eb083802SRuslan Ermilov.Nd kernel state defaults
313a9d037bSChris Costello.Sh DESCRIPTION
323a9d037bSChris CostelloThe
333a9d037bSChris Costello.Pa /etc/sysctl.conf
343a9d037bSChris Costellofile is read in when the system goes into multi-user mode to set default
355203edcdSRuslan Ermilovsettings for the kernel.
365203edcdSRuslan ErmilovThe
373a9d037bSChris Costello.Pa /etc/sysctl.conf
3856218bf7SMateusz Piotrowskifile is in the format of the
397e7cdfa0SYaroslav Tykhiy.Xr sysctl 8
4056218bf7SMateusz Piotrowskicommand, i.e.,
413a9d037bSChris Costello.Bd -literal -offset indent
423a9d037bSChris Costellosysctl_mib=value
433a9d037bSChris Costello.Ed
4464304d8cSChris Costello.Pp
4564304d8cSChris CostelloComments are denoted by a
4664304d8cSChris Costello.Dq #
475203edcdSRuslan Ermilovat the beginning of a line.
485203edcdSRuslan ErmilovComments can also exist at the end of a line,
4964304d8cSChris Costelloas seen in the
5064304d8cSChris Costello.Sx EXAMPLES
510438e9beSMateusz Piotrowskisection, below.
5209267cc1SDoug Rabson.Pp
5309267cc1SDoug RabsonFor kernel modules loaded via
5409267cc1SDoug Rabson.Xr rc.subr 8
5509267cc1SDoug Rabsonsystem,
5609267cc1SDoug Rabsonadditional module-specific settings can be applied
5709267cc1SDoug Rabsonby adding a file in the same format named
58*5ac2a874SDoug Rabson.Pf /etc/sysctl.kld.d/<module name>.conf .
593a9d037bSChris Costello.Sh FILES
60383ccaa4SMateusz Piotrowski.Bl -tag -width /etc/rc.d/sysctl_lastload -compact
61383ccaa4SMateusz Piotrowski.It Pa /etc/rc.d/sysctl
62383ccaa4SMateusz Piotrowski.Xr rc 8
63383ccaa4SMateusz Piotrowskiscript which processes
64383ccaa4SMateusz Piotrowski.Nm
65383ccaa4SMateusz Piotrowskiearly on in the process of transitioning to multi-user mode.
66383ccaa4SMateusz Piotrowski.It Pa /etc/rc.d/sysctl_lastload
67383ccaa4SMateusz Piotrowski.Xr rc 8
68383ccaa4SMateusz Piotrowskiscript which processes
69383ccaa4SMateusz Piotrowski.Nm
70383ccaa4SMateusz Piotrowskishortly before the system reaches the multi-user mode.
713a9d037bSChris Costello.It Pa /etc/sysctl.conf
723a9d037bSChris CostelloInitial settings for
733a9d037bSChris Costello.Xr sysctl 8 .
7446c99528SGordon Bergling.It Pa /etc/sysctl.conf.local
7546c99528SGordon BerglingMachine-specific settings for sites with a common
7646c99528SGordon Bergling.Pa /etc/sysctl.conf .
77*5ac2a874SDoug Rabson.It Pa /etc/sysctl.kld.d
7809267cc1SDoug RabsonModule specific settings for kernel modules loaded via
7909267cc1SDoug Rabson.Xr rc.subr 8 .
803136363fSRuslan Ermilov.El
81a9f5209eSRuslan Ermilov.Sh EXAMPLES
82c9686721SRobert WatsonTo turn off logging of programs that exit due to fatal signals you may use
833a9d037bSChris Costelloa configuration like
843a9d037bSChris Costello.Bd -literal -offset indent
85c9686721SRobert Watson# Configure logging.
8656218bf7SMateusz Piotrowskikern.logsigexit=0	# Do not log fatal signal exits (e.g., sig 11)
873a9d037bSChris Costello.Ed
883a9d037bSChris Costello.Sh SEE ALSO
893a9d037bSChris Costello.Xr rc.conf 5 ,
903a9d037bSChris Costello.Xr rc 8 ,
91eb894267SRuslan Ermilov.Xr sysctl 8
924679b313SDavid E. O'Brien.Sh HISTORY
934679b313SDavid E. O'BrienThe
944679b313SDavid E. O'Brien.Nm
954679b313SDavid E. O'Brienfile appeared in
964679b313SDavid E. O'Brien.Fx 4.0 .
97c9686721SRobert Watson.Sh BUGS
98c9686721SRobert WatsonIf loadable kernel modules are used to introduce additional kernel
99a9f5209eSRuslan Ermilovfunctionality and sysctls to manage that functionality,
100a9f5209eSRuslan Ermilov.Nm
101a9f5209eSRuslan Ermilovmay be processed too early in the boot process to set those sysctls.
102383ccaa4SMateusz PiotrowskiPlease consult
103383ccaa4SMateusz Piotrowski.Xr rcorder 8
104383ccaa4SMateusz Piotrowskito learn more about the ordering of
105383ccaa4SMateusz Piotrowski.Xr rc 8
106383ccaa4SMateusz Piotrowskiscripts.
107