3 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 This file is part of systemd.
7 Copyright 2012 Lennart Poettering
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 <refentry id=
"systemd-sysctl.service"
23 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
26 <title>systemd-sysctl.service
</title>
27 <productname>systemd
</productname>
31 <contrib>Developer
</contrib>
32 <firstname>Lennart
</firstname>
33 <surname>Poettering
</surname>
34 <email>lennart@poettering.net
</email>
40 <refentrytitle>systemd-sysctl.service
</refentrytitle>
41 <manvolnum>8</manvolnum>
45 <refname>systemd-sysctl.service
</refname>
46 <refname>systemd-sysctl
</refname>
47 <refpurpose>Configure kernel parameters at boot
</refpurpose>
52 <command>/usr/lib/systemd/systemd-sysctl
</command>
53 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
54 <arg choice=
"opt" rep=
"repeat"><replaceable>CONFIGFILE
</replaceable></arg>
56 <para><filename>systemd-sysctl.service
</filename></para>
60 <title>Description
</title>
62 <para><filename>systemd-sysctl.service
</filename> is an early boot
63 service that configures
64 <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
65 kernel parameters by invoking
<command>/usr/lib/systemd/systemd-sysctl
</command>.
</para>
67 <para>When invoked with no arguments,
<command>/usr/lib/systemd/systemd-sysctl
</command> applies
68 all directives from configuration files listed in
69 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
70 If one or more filenames are passed on the command line, only the directives in these files are
73 <para>In addition,
<option>--prefix=
</option> option may be used to limit which sysctl
74 settings are applied.
</para>
77 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
78 for information about the configuration of sysctl settings. After sysctl configuration is
79 changed on disk, it must be written to the files in
<filename>/proc/sys
</filename> before it
80 takes effect. It is possible to update specific settings, or simply to reload all configuration,
81 see Examples below.
</para>
84 <refsect1><title>Options
</title>
86 <varlistentry id='prefix'
>
87 <term><option>--prefix=
</option></term>
89 <para>Only apply rules with the specified prefix.
</para>
93 <xi:include href=
"standard-options.xml" xpointer=
"help" />
94 <xi:include href=
"standard-options.xml" xpointer=
"version" />
100 <title>Examples
</title>
103 <title>Reset all sysctl settings
</title>
105 <programlisting>systemctl restart systemd-sysctl
</programlisting>
109 <title>View coredump handler configuration
</title>
111 <programlisting># sysctl kernel.core_pattern
112 kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I
117 <title>Update coredump handler configuration
</title>
119 <programlisting># /usr/lib/systemd/systemd-sysctl --prefix kernel.core_pattern
</programlisting>
121 <para>This searches all the directories listed in
122 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
123 for configuration files and writes
<filename>/proc/sys/kernel/core_pattern
</filename>.
</para>
127 <title>Update coredump handler configuration according to a specific file
</title>
129 <programlisting># /usr/lib/systemd/systemd-sysctl
50-coredump.conf
</programlisting>
131 <para>This applies all the settings found in
<filename>50-coredump.conf
</filename>.
132 Either
<filename>/etc/sysctl.d/
50-coredump.conf
</filename>, or
133 <filename>/run/sysctl.d/
50-coredump.conf
</filename>, or
134 <filename>/usr/lib/sysctl.d/
50-coredump.conf
</filename> will be used, in the order
135 of preference.
</para>
139 <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
140 for various ways to directly apply sysctl settings.
</para>
144 <title>See Also
</title>
146 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
147 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
148 <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,