]>
Commit | Line | Data |
---|---|---|
9393a877 LP |
1 | <?xml version="1.0"?> |
2 | <!--*-nxml-*--> | |
12b42c76 | 3 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
9393a877 | 4 | <!-- |
572eb058 ZJS |
5 | SPDX-License-Identifier: LGPL-2.1+ |
6 | ||
9393a877 LP |
7 | This file is part of systemd. |
8 | ||
9 | Copyright 2012 Lennart Poettering | |
10 | ||
11 | systemd is free software; you can redistribute it and/or modify it | |
12 | under the terms of the GNU Lesser General Public License as published by | |
13 | the Free Software Foundation; either version 2.1 of the License, or | |
14 | (at your option) any later version. | |
15 | ||
16 | systemd is distributed in the hope that it will be useful, but | |
17 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | Lesser General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU Lesser General Public License | |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
23 | --> | |
14f01575 FS |
24 | <refentry id="systemd-sysctl.service" |
25 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
9393a877 | 26 | |
798d3a52 ZJS |
27 | <refentryinfo> |
28 | <title>systemd-sysctl.service</title> | |
29 | <productname>systemd</productname> | |
9393a877 | 30 | |
798d3a52 ZJS |
31 | <authorgroup> |
32 | <author> | |
33 | <contrib>Developer</contrib> | |
34 | <firstname>Lennart</firstname> | |
35 | <surname>Poettering</surname> | |
36 | <email>lennart@poettering.net</email> | |
37 | </author> | |
38 | </authorgroup> | |
39 | </refentryinfo> | |
9393a877 | 40 | |
798d3a52 ZJS |
41 | <refmeta> |
42 | <refentrytitle>systemd-sysctl.service</refentrytitle> | |
43 | <manvolnum>8</manvolnum> | |
44 | </refmeta> | |
9393a877 | 45 | |
798d3a52 ZJS |
46 | <refnamediv> |
47 | <refname>systemd-sysctl.service</refname> | |
48 | <refname>systemd-sysctl</refname> | |
49 | <refpurpose>Configure kernel parameters at boot</refpurpose> | |
50 | </refnamediv> | |
9393a877 | 51 | |
798d3a52 | 52 | <refsynopsisdiv> |
14f01575 FS |
53 | <cmdsynopsis> |
54 | <command>/usr/lib/systemd/systemd-sysctl</command> | |
55 | <arg choice="opt" rep="repeat">OPTIONS</arg> | |
56 | <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg> | |
57 | </cmdsynopsis> | |
798d3a52 | 58 | <para><filename>systemd-sysctl.service</filename></para> |
798d3a52 | 59 | </refsynopsisdiv> |
9393a877 | 60 | |
798d3a52 ZJS |
61 | <refsect1> |
62 | <title>Description</title> | |
9393a877 | 63 | |
b938cb90 | 64 | <para><filename>systemd-sysctl.service</filename> is an early boot |
798d3a52 | 65 | service that configures |
3ba3a79d | 66 | <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
7382a3cc | 67 | kernel parameters by invoking <command>/usr/lib/systemd/systemd-sysctl</command>.</para> |
9393a877 | 68 | |
7382a3cc ZJS |
69 | <para>When invoked with no arguments, <command>/usr/lib/systemd/systemd-sysctl</command> applies |
70 | all directives from configuration files listed in | |
71 | <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
72 | If one or more filenames are passed on the command line, only the directives in these files are | |
73 | applied.</para> | |
74 | ||
75 | <para>In addition, <option>--prefix=</option> option may be used to limit which sysctl | |
76 | settings are applied.</para> | |
14f01575 | 77 | |
798d3a52 | 78 | <para>See |
2d56bdab | 79 | <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
7382a3cc ZJS |
80 | for information about the configuration of sysctl settings. After sysctl configuration is |
81 | changed on disk, it must be written to the files in <filename>/proc/sys</filename> before it | |
82 | takes effect. It is possible to update specific settings, or simply to reload all configuration, | |
83 | see Examples below.</para> | |
798d3a52 | 84 | </refsect1> |
9393a877 | 85 | |
14f01575 FS |
86 | <refsect1><title>Options</title> |
87 | <variablelist> | |
7382a3cc ZJS |
88 | <varlistentry id='prefix'> |
89 | <term><option>--prefix=</option></term> | |
14f01575 FS |
90 | <listitem> |
91 | <para>Only apply rules with the specified prefix.</para> | |
92 | </listitem> | |
93 | </varlistentry> | |
94 | ||
95 | <xi:include href="standard-options.xml" xpointer="help" /> | |
96 | <xi:include href="standard-options.xml" xpointer="version" /> | |
97 | ||
98 | </variablelist> | |
99 | </refsect1> | |
100 | ||
7382a3cc ZJS |
101 | <refsect1> |
102 | <title>Examples</title> | |
103 | ||
104 | <example> | |
105 | <title>Reset all sysctl settings</title> | |
106 | ||
107 | <programlisting>systemctl restart systemd-sysctl</programlisting> | |
108 | </example> | |
109 | ||
110 | <example> | |
111 | <title>View coredump handler configuration</title> | |
112 | ||
113 | <programlisting># sysctl kernel.core_pattern | |
114 | kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I | |
115 | </programlisting> | |
116 | </example> | |
117 | ||
118 | <example> | |
119 | <title>Update coredump handler configuration</title> | |
120 | ||
121 | <programlisting># /usr/lib/systemd/systemd-sysctl --prefix kernel.core_pattern</programlisting> | |
122 | ||
123 | <para>This searches all the directories listed in | |
124 | <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
125 | for configuration files and writes <filename>/proc/sys/kernel/core_pattern</filename>.</para> | |
126 | </example> | |
127 | ||
128 | <example> | |
129 | <title>Update coredump handler configuration according to a specific file</title> | |
130 | ||
131 | <programlisting># /usr/lib/systemd/systemd-sysctl 50-coredump.conf</programlisting> | |
132 | ||
133 | <para>This applies all the settings found in <filename>50-coredump.conf</filename>. | |
134 | Either <filename>/etc/sysctl.d/50-coredump.conf</filename>, or | |
135 | <filename>/run/sysctl.d/50-coredump.conf</filename>, or | |
136 | <filename>/usr/lib/sysctl.d/50-coredump.conf</filename> will be used, in the order | |
137 | of preference.</para> | |
138 | </example> | |
139 | ||
140 | <para>See | |
141 | <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
142 | for various ways to directly apply sysctl settings.</para> | |
143 | </refsect1> | |
144 | ||
798d3a52 ZJS |
145 | <refsect1> |
146 | <title>See Also</title> | |
147 | <para> | |
148 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
2d56bdab | 149 | <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
3ba3a79d | 150 | <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
798d3a52 ZJS |
151 | </para> |
152 | </refsect1> | |
9393a877 LP |
153 | |
154 | </refentry> |