2012-05-31 14:00:34 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--*-nxml-*-->
|
2019-03-14 13:40:58 +00:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
2020-11-09 04:23:58 +00:00
|
|
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
2015-11-13 12:52:06 +00:00
|
|
|
<refentry id="systemd-sysctl.service"
|
|
|
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<refentryinfo>
|
|
|
|
<title>systemd-sysctl.service</title>
|
|
|
|
<productname>systemd</productname>
|
|
|
|
</refentryinfo>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>systemd-sysctl.service</refentrytitle>
|
|
|
|
<manvolnum>8</manvolnum>
|
|
|
|
</refmeta>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>systemd-sysctl.service</refname>
|
|
|
|
<refname>systemd-sysctl</refname>
|
|
|
|
<refpurpose>Configure kernel parameters at boot</refpurpose>
|
|
|
|
</refnamediv>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<refsynopsisdiv>
|
2015-11-13 12:52:06 +00:00
|
|
|
<cmdsynopsis>
|
|
|
|
<command>/usr/lib/systemd/systemd-sysctl</command>
|
|
|
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
|
|
|
<arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg>
|
|
|
|
</cmdsynopsis>
|
2015-02-04 02:14:13 +00:00
|
|
|
<para><filename>systemd-sysctl.service</filename></para>
|
|
|
|
</refsynopsisdiv>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2014-08-03 05:11:12 +00:00
|
|
|
<para><filename>systemd-sysctl.service</filename> is an early boot
|
2015-02-04 02:14:13 +00:00
|
|
|
service that configures
|
2015-03-14 02:22:39 +00:00
|
|
|
<citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
2016-04-02 15:05:11 +00:00
|
|
|
kernel parameters by invoking <command>/usr/lib/systemd/systemd-sysctl</command>.</para>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2016-04-02 15:05:11 +00:00
|
|
|
<para>When invoked with no arguments, <command>/usr/lib/systemd/systemd-sysctl</command> applies
|
|
|
|
all directives from configuration files listed in
|
|
|
|
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
|
|
|
If one or more filenames are passed on the command line, only the directives in these files are
|
|
|
|
applied.</para>
|
|
|
|
|
|
|
|
<para>In addition, <option>--prefix=</option> option may be used to limit which sysctl
|
|
|
|
settings are applied.</para>
|
2015-11-13 12:52:06 +00:00
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<para>See
|
2017-08-22 04:26:09 +00:00
|
|
|
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
2016-04-02 15:05:11 +00:00
|
|
|
for information about the configuration of sysctl settings. After sysctl configuration is
|
2020-10-05 16:08:21 +00:00
|
|
|
changed on disk, it must be written to the files in <filename>/proc/sys/</filename> before it
|
2016-04-02 15:05:11 +00:00
|
|
|
takes effect. It is possible to update specific settings, or simply to reload all configuration,
|
|
|
|
see Examples below.</para>
|
2015-02-04 02:14:13 +00:00
|
|
|
</refsect1>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
2015-11-13 12:52:06 +00:00
|
|
|
<refsect1><title>Options</title>
|
|
|
|
<variablelist>
|
2016-04-02 15:05:11 +00:00
|
|
|
<varlistentry id='prefix'>
|
|
|
|
<term><option>--prefix=</option></term>
|
2015-11-13 12:52:06 +00:00
|
|
|
<listitem>
|
|
|
|
<para>Only apply rules with the specified prefix.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2022-07-22 15:18:15 +00:00
|
|
|
<varlistentry id='strict'>
|
|
|
|
<term><option>--strict=</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Always return non-zero exit code on failure (including invalid sysctl variable
|
|
|
|
name and insufficient permissions), unless the sysctl variable name is prefixed with a "-"
|
|
|
|
character.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2015-11-13 12:52:06 +00:00
|
|
|
|
2018-04-26 19:08:53 +00:00
|
|
|
<xi:include href="standard-options.xml" xpointer="cat-config" />
|
2018-06-12 13:37:53 +00:00
|
|
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
2015-11-13 12:52:06 +00:00
|
|
|
<xi:include href="standard-options.xml" xpointer="help" />
|
|
|
|
<xi:include href="standard-options.xml" xpointer="version" />
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2022-07-14 11:41:37 +00:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Credentials</title>
|
|
|
|
|
|
|
|
<para><command>systemd-sysctl</command> supports the service credentials logic as implemented by
|
|
|
|
<varname>LoadCredential=</varname>/<varname>SetCredential=</varname> (see
|
|
|
|
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
|
|
|
|
details). The following credentials are used when passed in:</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>sysctl.extra</literal></term>
|
|
|
|
|
|
|
|
<listitem><para>The contents of this credential may contain additional lines to operate on. The
|
2022-07-13 09:06:04 +00:00
|
|
|
credential contents should follow the same format as any other <filename>sysctl.d/</filename> drop-in
|
|
|
|
configuration file. If this credential is passed it is processed after all of the drop-in files read
|
|
|
|
from the file system. The settings configured in the credential hence take precedence over those in
|
|
|
|
the file system.</para></listitem>
|
2022-07-14 11:41:37 +00:00
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Note that by default the <filename>systemd-sysctl.service</filename> unit file is set up to inherit
|
|
|
|
the <literal>sysctl.extra</literal> credential from the service manager.</para>
|
|
|
|
</refsect1>
|
2015-11-13 12:52:06 +00:00
|
|
|
|
2016-04-02 15:05:11 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<example>
|
|
|
|
<title>Reset all sysctl settings</title>
|
|
|
|
|
|
|
|
<programlisting>systemctl restart systemd-sysctl</programlisting>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
<example>
|
|
|
|
<title>View coredump handler configuration</title>
|
|
|
|
|
|
|
|
<programlisting># sysctl kernel.core_pattern
|
|
|
|
kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
<example>
|
|
|
|
<title>Update coredump handler configuration</title>
|
|
|
|
|
|
|
|
<programlisting># /usr/lib/systemd/systemd-sysctl --prefix kernel.core_pattern</programlisting>
|
|
|
|
|
|
|
|
<para>This searches all the directories listed in
|
|
|
|
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
|
|
for configuration files and writes <filename>/proc/sys/kernel/core_pattern</filename>.</para>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
<example>
|
|
|
|
<title>Update coredump handler configuration according to a specific file</title>
|
|
|
|
|
|
|
|
<programlisting># /usr/lib/systemd/systemd-sysctl 50-coredump.conf</programlisting>
|
|
|
|
|
|
|
|
<para>This applies all the settings found in <filename>50-coredump.conf</filename>.
|
|
|
|
Either <filename>/etc/sysctl.d/50-coredump.conf</filename>, or
|
|
|
|
<filename>/run/sysctl.d/50-coredump.conf</filename>, or
|
|
|
|
<filename>/usr/lib/sysctl.d/50-coredump.conf</filename> will be used, in the order
|
|
|
|
of preference.</para>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
<para>See
|
|
|
|
<citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
|
|
for various ways to directly apply sysctl settings.</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2015-02-04 02:14:13 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
2017-08-22 04:26:09 +00:00
|
|
|
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
2022-07-14 16:04:01 +00:00
|
|
|
<citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
2015-02-04 02:14:13 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2012-05-31 14:00:34 +00:00
|
|
|
|
|
|
|
</refentry>
|