]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-udevd.service.xml
tree-wide: use "_" rather than "-" as separator in kernel cmdline options
[thirdparty/systemd.git] / man / systemd-udevd.service.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="systemd-udevd.service"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd-udevd.service</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd-udevd.service</refentrytitle>
16 <manvolnum>8</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd-udevd.service</refname>
21 <refname>systemd-udevd-control.socket</refname>
22 <refname>systemd-udevd-kernel.socket</refname>
23 <refname>systemd-udevd</refname>
24 <refpurpose>Device event managing daemon</refpurpose>
25 </refnamediv>
26
27 <refsynopsisdiv>
28 <para><filename>systemd-udevd.service</filename></para>
29 <para><filename>systemd-udevd-control.socket</filename></para>
30 <para><filename>systemd-udevd-kernel.socket</filename></para>
31
32 <cmdsynopsis>
33 <command>/usr/lib/systemd/systemd-udevd</command>
34 <arg><option>--daemon</option></arg>
35 <arg><option>--debug</option></arg>
36 <arg><option>--children-max=</option></arg>
37 <arg><option>--exec-delay=</option></arg>
38 <arg><option>--event-timeout=</option></arg>
39 <arg><option>--resolve-names=early|late|never</option></arg>
40 <arg><option>--version</option></arg>
41 <arg><option>--help</option></arg>
42 </cmdsynopsis>
43
44 </refsynopsisdiv>
45
46 <refsect1><title>Description</title>
47 <para><command>systemd-udevd</command> listens to kernel uevents.
48 For every event, systemd-udevd executes matching instructions
49 specified in udev rules. See <citerefentry>
50 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
51 </citerefentry>.</para>
52
53 <para>The behavior of the daemon can be configured using
54 <citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
55 its command line options, environment variables, and on the kernel
56 command line, or changed dynamically with <command>udevadm
57 control</command>.
58 </para>
59 </refsect1>
60
61 <refsect1><title>Options</title>
62 <variablelist>
63 <varlistentry>
64 <term><option>-d</option></term>
65 <term><option>--daemon</option></term>
66 <listitem>
67 <para>Detach and run in the background.</para>
68
69 <xi:include href="version-info.xml" xpointer="v186"/>
70 </listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><option>-D</option></term>
75 <term><option>--debug</option></term>
76 <listitem>
77 <para>Print debug messages to standard error.</para>
78
79 <xi:include href="version-info.xml" xpointer="v186"/>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><option>-c</option></term>
85 <term><option>--children-max=</option></term>
86 <listitem>
87 <para>Limit the number of events executed in parallel.</para>
88
89 <xi:include href="version-info.xml" xpointer="v186"/>
90 </listitem>
91 </varlistentry>
92
93 <varlistentry>
94 <term><option>-e</option></term>
95 <term><option>--exec-delay=</option></term>
96 <listitem>
97 <para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname>
98 parameter by the given number of seconds. This option
99 might be useful when debugging system crashes during
100 coldplug caused by loading non-working kernel
101 modules.</para>
102
103 <xi:include href="version-info.xml" xpointer="v186"/>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term><option>-t</option></term>
109 <term><option>--event-timeout=</option></term>
110 <listitem>
111 <para>Set the number of seconds to wait for events to finish. After
112 this time, the event will be terminated. The default is 180 seconds.</para>
113
114 <xi:include href="version-info.xml" xpointer="v216"/>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term><option>-s</option></term>
120 <term><option>--timeout-signal=</option></term>
121 <listitem>
122 <para>Set the signal which <filename>systemd-udevd</filename> will send to
123 forked off processes after reaching event timeout. The setting can be overridden
124 at boot time with the kernel command line option
125 <varname>udev.timeout_signal=</varname>. Setting to <constant>SIGABRT</constant>
126 may be helpful in order to debug worker timeouts. Defaults to
127 <constant>SIGKILL</constant>. Note that setting the option on the command line
128 overrides the setting from the configuration file.
129 </para>
130
131 <xi:include href="version-info.xml" xpointer="v246"/>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry>
136 <term><option>-N</option></term>
137 <term><option>--resolve-names=</option></term>
138 <listitem>
139 <para>Specify when systemd-udevd should resolve names of users and groups.
140 When set to <option>early</option> (the default), names will be
141 resolved when the rules are parsed. When set to
142 <option>late</option>, names will be resolved for every event.
143 When set to <option>never</option>, names will never be resolved
144 and all devices will be owned by root.</para>
145
146 <xi:include href="version-info.xml" xpointer="v186"/>
147 </listitem>
148 </varlistentry>
149
150 <xi:include href="standard-options.xml" xpointer="help" />
151 <xi:include href="standard-options.xml" xpointer="version" />
152 </variablelist>
153 </refsect1>
154
155 <refsect1><title>Kernel command line</title>
156 <variablelist class='kernel-commandline-options'>
157 <para>Parameters prefixed with "rd." will be read when <command>systemd-udevd</command> is used in an
158 initrd, those without will be processed both in the initrd and on the host.</para>
159 <varlistentry>
160 <term><varname>udev.log_level=</varname></term>
161 <term><varname>rd.udev.log_level=</varname></term>
162 <listitem>
163 <para>Set the log level.</para>
164
165 <xi:include href="version-info.xml" xpointer="v247"/>
166 </listitem>
167 </varlistentry>
168 <varlistentry>
169 <term><varname>udev.children_max=</varname></term>
170 <term><varname>rd.udev.children_max=</varname></term>
171 <listitem>
172 <para>Limit the number of events executed in parallel.</para>
173
174 <xi:include href="version-info.xml" xpointer="v186"/>
175 </listitem>
176 </varlistentry>
177 <varlistentry>
178 <term><varname>udev.exec_delay=</varname></term>
179 <term><varname>rd.udev.exec_delay=</varname></term>
180 <listitem>
181 <para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname> parameter by the given
182 number of seconds. This option might be useful when
183 debugging system crashes during coldplug caused by loading
184 non-working kernel modules.</para>
185
186 <xi:include href="version-info.xml" xpointer="v186"/>
187 </listitem>
188 </varlistentry>
189 <varlistentry>
190 <term><varname>udev.event_timeout=</varname></term>
191 <term><varname>rd.udev.event_timeout=</varname></term>
192 <listitem>
193 <para>Wait for events to finish up to the given number
194 of seconds. This option might be useful if events are
195 terminated due to kernel drivers taking too long to initialize.</para>
196
197 <xi:include href="version-info.xml" xpointer="v216"/>
198 </listitem>
199 </varlistentry>
200 <varlistentry>
201 <term><varname>udev.timeout_signal=</varname></term>
202 <term><varname>rd.udev.timeout_signal=</varname></term>
203 <listitem>
204 <para>Specifies a signal that <filename>systemd-udevd</filename> will send to
205 workers on timeout. Note that kernel command line option overrides both the
206 setting in the configuration file and the one on the program command line.</para>
207
208 <xi:include href="version-info.xml" xpointer="v246"/>
209 </listitem>
210 </varlistentry>
211 <varlistentry>
212 <term><varname>udev.blockdev_read_only</varname></term>
213 <term><varname>rd.udev.blockdev_read_only</varname></term>
214 <listitem>
215 <para>If specified, mark all physical block devices read-only as they appear. Synthetic block
216 devices (such as loopback block devices or device mapper devices) are left as they are. This is
217 useful to guarantee that the contents of physical block devices remains unmodified during runtime,
218 for example to implement fully stateless systems, for testing or for recovery situations where
219 corrupted file systems shall not be corrupted further through accidental modification.</para>
220
221 <para>A block device may be marked writable again by issuing the <command>blockdev
222 --setrw</command> command, see <citerefentry
223 project='man-pages'><refentrytitle>blockdev</refentrytitle><manvolnum>8</manvolnum></citerefentry>
224 for details.</para>
225
226 <xi:include href="version-info.xml" xpointer="v246"/>
227 </listitem>
228 </varlistentry>
229 <varlistentry>
230 <term><varname>net.ifnames=</varname></term>
231 <listitem>
232 <para>Network interfaces are renamed to give them predictable names
233 when possible. It is enabled by default; specifying 0 disables it.</para>
234
235 <xi:include href="version-info.xml" xpointer="v199"/>
236 </listitem>
237 </varlistentry>
238 <varlistentry>
239 <term><varname>net.naming_scheme=</varname></term>
240 <listitem>
241 <para>Network interfaces are renamed to give them predictable names when possible (unless
242 <varname>net.ifnames=0</varname> is specified, see above). With this kernel command line option it
243 is possible to pick a specific version of this algorithm and override the default chosen at
244 compilation time. Expects one of the naming scheme identifiers listed in
245 <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
246 or <literal>latest</literal> to select the latest scheme known (to this particular version of
247 <filename>systemd-udevd.service</filename>).</para>
248
249 <para>Note that selecting a specific scheme is not sufficient to fully stabilize interface naming:
250 the naming is generally derived from driver attributes exposed by the kernel. As the kernel is
251 updated, previously missing attributes <filename>systemd-udevd.service</filename> is checking might
252 appear, which affects older name derivation algorithms, too.</para>
253
254 <xi:include href="version-info.xml" xpointer="v240"/>
255 </listitem>
256 </varlistentry>
257 <varlistentry>
258 <term><varname>net.ifname_policy=<replaceable>policy1</replaceable>[,<replaceable>policy2</replaceable>,…][,<replaceable>MAC</replaceable>]</varname></term>
259 <listitem>
260 <para>Specifies naming policies applied when renaming network interfaces. Takes a list of
261 policies and an optional MAC address separated with comma. Each policy value must be one of
262 the policies understood by the <varname>NamePolicy=</varname> setting in .link files, e.g.
263 <literal>onboard</literal> or <literal>path</literal>. See
264 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
265 for more details. When the MAC address is specified, the policies are applied to the
266 interface which has the address. When no MAC address is specified, the policies are applied
267 to all interfaces. This kernel command line argument can be specified multiple times.</para>
268
269 <para>This argument is not directly read by <command>systemd-udevd</command>, but is instead
270 converted to a .link file by
271 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
272 For this argument to take effect, <filename>systemd-network-generator.service</filename> must be
273 enabled.</para>
274
275 <para>Example:
276 <programlisting>net.ifname_policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab
277 net.ifname_policy=keep,kernel,path,slot,onboard,mac</programlisting>
278 This is mostly equivalent to creating the following .link files:
279 <programlisting># 91-name-policy-with-mac.link
280 [Match]
281 MACAddress=01:23:45:67:89:ab
282
283 [Link]
284 NamePolicy=keep kernel path slot onboard
285 AlternativeNamePolicy=path slot onboard</programlisting>
286 and
287 <programlisting># 92-name-policy-for-all.link
288 [Match]
289 OriginalName=*
290
291 [Link]
292 NamePolicy=keep kernel path slot onboard mac
293 AlternativeNamePolicy=path slot onboard mac</programlisting>
294 </para>
295
296 <xi:include href="version-info.xml" xpointer="v250"/>
297 </listitem>
298 </varlistentry>
299 </variablelist>
300 <!-- when adding entries here, consider also adding them in kernel-command-line.xml -->
301 </refsect1>
302
303 <refsect1>
304 <title>See Also</title>
305 <para><simplelist type="inline">
306 <member><citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
307 <member><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
308 <member><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
309 </simplelist></para>
310 </refsect1>
311 </refentry>