]>
Commit | Line | Data |
---|---|---|
3802a3d3 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
63749b1a | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
225cb03b | 4 | |
f48f7543 ZJS |
5 | <!-- |
6 | SPDX-License-Identifier: LGPL-2.1+ | |
7 | ||
8 | This file is part of systemd. | |
9 | ||
10 | Copyright 2010-2013 Kay Sievers | |
11 | ||
12 | systemd is free software; you can redistribute it and/or modify it | |
13 | under the terms of the GNU Lesser General Public License as published by | |
14 | the Free Software Foundation; either version 2.1 of the License, or | |
15 | (at your option) any later version. | |
16 | ||
17 | systemd is distributed in the hope that it will be useful, but | |
18 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 | Lesser General Public License for more details. | |
21 | ||
22 | You should have received a copy of the GNU Lesser General Public License | |
23 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
24 | --> | |
25 | ||
63749b1a KS |
26 | <refentry id="udevadm"> |
27 | <refentryinfo> | |
225cb03b | 28 | <title>udevadm</title> |
d3a2386d KS |
29 | <productname>systemd</productname> |
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Kay</firstname> | |
34 | <surname>Sievers</surname> | |
35 | <email>kay@vrfy.org</email> | |
36 | </author> | |
37 | </authorgroup> | |
63749b1a | 38 | </refentryinfo> |
225cb03b | 39 | |
63749b1a KS |
40 | <refmeta> |
41 | <refentrytitle>udevadm</refentrytitle> | |
42 | <manvolnum>8</manvolnum> | |
63749b1a | 43 | </refmeta> |
225cb03b | 44 | |
63749b1a KS |
45 | <refnamediv> |
46 | <refname>udevadm</refname><refpurpose>udev management tool</refpurpose> | |
47 | </refnamediv> | |
225cb03b | 48 | |
63749b1a KS |
49 | <refsynopsisdiv> |
50 | <cmdsynopsis> | |
51 | <command>udevadm</command> | |
52 | <arg><option>--debug</option></arg> | |
53 | <arg><option>--version</option></arg> | |
54 | <arg><option>--help</option></arg> | |
55 | </cmdsynopsis> | |
56 | <cmdsynopsis> | |
57 | <command>udevadm info <replaceable>options</replaceable></command> | |
58 | </cmdsynopsis> | |
59 | <cmdsynopsis> | |
60 | <command>udevadm trigger <optional>options</optional></command> | |
61 | </cmdsynopsis> | |
62 | <cmdsynopsis> | |
63 | <command>udevadm settle <optional>options</optional></command> | |
64 | </cmdsynopsis> | |
65 | <cmdsynopsis> | |
66 | <command>udevadm control <replaceable>command</replaceable></command> | |
67 | </cmdsynopsis> | |
68 | <cmdsynopsis> | |
69 | <command>udevadm monitor <optional>options</optional></command> | |
70 | </cmdsynopsis> | |
71 | <cmdsynopsis> | |
72 | <command>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></command> | |
73 | </cmdsynopsis> | |
d7867b31 KS |
74 | <cmdsynopsis> |
75 | <command>udevadm test-builtin <optional>options</optional> <replaceable>command</replaceable> <replaceable>devpath</replaceable></command> | |
76 | </cmdsynopsis> | |
63749b1a | 77 | </refsynopsisdiv> |
225cb03b | 78 | |
63749b1a | 79 | <refsect1><title>Description</title> |
124b48b0 ZJS |
80 | <para><command>udevadm</command> expects a command and command |
81 | specific options. It controls the runtime behavior of | |
82 | <command>systemd-udevd</command>, requests kernel events, manages | |
83 | the event queue, and provides simple debugging mechanisms.</para> | |
63749b1a | 84 | </refsect1> |
225cb03b | 85 | |
80877656 | 86 | <refsect1><title>Options</title> |
63749b1a KS |
87 | <variablelist> |
88 | <varlistentry> | |
89 | <term><option>--debug</option></term> | |
90 | <listitem> | |
6db27428 | 91 | <para>Print debug messages to standard error.</para> |
63749b1a KS |
92 | </listitem> |
93 | </varlistentry> | |
94 | <varlistentry> | |
95 | <term><option>--version</option></term> | |
96 | <listitem> | |
97 | <para>Print version number.</para> | |
98 | </listitem> | |
99 | </varlistentry> | |
100 | <varlistentry> | |
7643ac9a | 101 | <term><option>-h</option></term> |
63749b1a KS |
102 | <term><option>--help</option></term> |
103 | <listitem> | |
104 | <para>Print help text.</para> | |
105 | </listitem> | |
106 | </varlistentry> | |
107 | </variablelist> | |
225cb03b | 108 | |
80877656 ZJS |
109 | <refsect2><title>udevadm info |
110 | <arg choice="opt"><replaceable>options</replaceable></arg> | |
111 | <arg choice="opt"><replaceable>devpath</replaceable>|<replaceable>file</replaceable></arg> | |
112 | </title> | |
113 | ||
63749b1a KS |
114 | <para>Queries the udev database for device information |
115 | stored in the udev database. It can also query the properties | |
116 | of a device from its sysfs representation to help creating udev | |
117 | rules that match this device.</para> | |
118 | <variablelist> | |
119 | <varlistentry> | |
7643ac9a ZJS |
120 | <term><option>-q</option></term> |
121 | <term><option>--query=<replaceable>TYPE</replaceable></option></term> | |
63749b1a | 122 | <listitem> |
72f4d966 | 123 | <para>Query the database for the specified type of device |
124b48b0 | 124 | data. It needs the <option>--path</option> or |
7643ac9a ZJS |
125 | <option>--name</option> to identify the specified device. |
126 | Valid <replaceable>TYPE</replaceable>s are: | |
127 | <constant>name</constant>, <constant>symlink</constant>, | |
128 | <constant>path</constant>, <constant>property</constant>, | |
124b48b0 | 129 | <constant>all</constant>.</para> |
63749b1a KS |
130 | </listitem> |
131 | </varlistentry> | |
132 | <varlistentry> | |
7643ac9a ZJS |
133 | <term><option>-p</option></term> |
134 | <term><option>--path=<replaceable>DEVPATH</replaceable></option></term> | |
63749b1a | 135 | <listitem> |
124b48b0 ZJS |
136 | <para>The <filename>/sys</filename> path of the device to |
137 | query, e.g. | |
138 | <filename><optional>/sys</optional>/class/block/sda</filename>. | |
72f4d966 | 139 | Note that this option usually is not very useful, since |
124b48b0 ZJS |
140 | <command>udev</command> can guess the type of the |
141 | argument, so <command>udevadm | |
142 | --devpath=/class/block/sda</command> is equivalent to | |
143 | <command>udevadm /sys/class/block/sda</command>.</para> | |
63749b1a KS |
144 | </listitem> |
145 | </varlistentry> | |
146 | <varlistentry> | |
7643ac9a ZJS |
147 | <term><option>-n</option></term> |
148 | <term><option>--name=<replaceable>FILE</replaceable></option></term> | |
63749b1a | 149 | <listitem> |
124b48b0 ZJS |
150 | <para>The name of the device node or a symlink to query, |
151 | e.g. <filename><optional>/dev</optional>/sda</filename>. | |
72f4d966 | 152 | Note that this option usually is not very useful, since |
124b48b0 ZJS |
153 | <command>udev</command> can guess the type of the |
154 | argument, so <command>udevadm --name=sda</command> is | |
155 | equivalent to <command>udevadm /dev/sda</command>.</para> | |
63749b1a KS |
156 | </listitem> |
157 | </varlistentry> | |
158 | <varlistentry> | |
7643ac9a | 159 | <term><option>-r</option></term> |
63749b1a KS |
160 | <term><option>--root</option></term> |
161 | <listitem> | |
4f5d327a KS |
162 | <para>Print absolute paths in <command>name</command> or <command>symlink</command> |
163 | query.</para> | |
4ec9c3e7 KS |
164 | </listitem> |
165 | </varlistentry> | |
63749b1a | 166 | <varlistentry> |
7643ac9a | 167 | <term><option>-a</option></term> |
63749b1a KS |
168 | <term><option>--attribute-walk</option></term> |
169 | <listitem> | |
170 | <para>Print all sysfs properties of the specified device that can be used | |
171 | in udev rules to match the specified device. It prints all devices | |
172 | along the chain, up to the root of sysfs that can be used in udev rules.</para> | |
173 | </listitem> | |
174 | </varlistentry> | |
dc1791a9 | 175 | <varlistentry> |
7643ac9a | 176 | <term><option>-x</option></term> |
dc1791a9 KS |
177 | <term><option>--export</option></term> |
178 | <listitem> | |
179 | <para>Print output as key/value pairs. Values are enclosed in single quotes.</para> | |
180 | </listitem> | |
181 | </varlistentry> | |
182 | <varlistentry> | |
7643ac9a ZJS |
183 | <term><option>-P</option></term> |
184 | <term><option>--export-prefix=<replaceable>NAME</replaceable></option></term> | |
dc1791a9 KS |
185 | <listitem> |
186 | <para>Add a prefix to the key name of exported values.</para> | |
187 | </listitem> | |
188 | </varlistentry> | |
63749b1a | 189 | <varlistentry> |
7643ac9a ZJS |
190 | <term><option>-d</option></term> |
191 | <term><option>--device-id-of-file=<replaceable>FILE</replaceable></option></term> | |
63749b1a KS |
192 | <listitem> |
193 | <para>Print major/minor numbers of the underlying device, where the file | |
194 | lives on.</para> | |
195 | </listitem> | |
196 | </varlistentry> | |
197 | <varlistentry> | |
7643ac9a | 198 | <term><option>-e</option></term> |
63749b1a KS |
199 | <term><option>--export-db</option></term> |
200 | <listitem> | |
201 | <para>Export the content of the udev database.</para> | |
202 | </listitem> | |
203 | </varlistentry> | |
9ead6627 | 204 | <varlistentry> |
7643ac9a | 205 | <term><option>-c</option></term> |
9ead6627 KS |
206 | <term><option>--cleanup-db</option></term> |
207 | <listitem> | |
208 | <para>Cleanup the udev database.</para> | |
209 | </listitem> | |
210 | </varlistentry> | |
63749b1a KS |
211 | <varlistentry> |
212 | <term><option>--version</option></term> | |
213 | <listitem> | |
214 | <para>Print version.</para> | |
215 | </listitem> | |
216 | </varlistentry> | |
217 | <varlistentry> | |
7643ac9a | 218 | <term><option>-h</option></term> |
63749b1a KS |
219 | <term><option>--help</option></term> |
220 | <listitem> | |
221 | <para>Print help text.</para> | |
222 | </listitem> | |
223 | </varlistentry> | |
224 | </variablelist> | |
80877656 | 225 | |
b938cb90 | 226 | <para>In addition, an optional positional argument can be used |
80877656 ZJS |
227 | to specify a device name or a sys path. It must start with |
228 | <filename>/dev</filename> or <filename>/sys</filename> | |
229 | respectively.</para> | |
63749b1a | 230 | </refsect2> |
225cb03b | 231 | |
80877656 ZJS |
232 | <refsect2><title>udevadm trigger |
233 | <arg choice="opt"><replaceable>options</replaceable></arg> | |
234 | <arg choice="opt" rep="repeat"><replaceable>devpath</replaceable>|<replaceable>file</replaceable></arg></title> | |
63749b1a KS |
235 | <para>Request device events from the kernel. Primarily used to replay events at system coldplug time.</para> |
236 | <variablelist> | |
237 | <varlistentry> | |
7643ac9a | 238 | <term><option>-v</option></term> |
63749b1a KS |
239 | <term><option>--verbose</option></term> |
240 | <listitem> | |
241 | <para>Print the list of devices which will be triggered.</para> | |
242 | </listitem> | |
243 | </varlistentry> | |
244 | <varlistentry> | |
7643ac9a | 245 | <term><option>-n</option></term> |
63749b1a KS |
246 | <term><option>--dry-run</option></term> |
247 | <listitem> | |
248 | <para>Do not actually trigger the event.</para> | |
249 | </listitem> | |
250 | </varlistentry> | |
251 | <varlistentry> | |
7643ac9a ZJS |
252 | <term><option>-t</option></term> |
253 | <term><option>--type=<replaceable>TYPE</replaceable></option></term> | |
63749b1a KS |
254 | <listitem> |
255 | <para>Trigger a specific type of devices. Valid types are: | |
864fde8a | 256 | <command>devices</command>, <command>subsystems</command>. |
63749b1a KS |
257 | The default value is <command>devices</command>.</para> |
258 | </listitem> | |
259 | </varlistentry> | |
260 | <varlistentry> | |
7643ac9a ZJS |
261 | <term><option>-c</option></term> |
262 | <term><option>--action=<replaceable>ACTION</replaceable></option></term> | |
63749b1a | 263 | <listitem> |
7643ac9a ZJS |
264 | <para>Type of event to be triggered. The default value is |
265 | <command>change</command>.</para> | |
63749b1a KS |
266 | </listitem> |
267 | </varlistentry> | |
268 | <varlistentry> | |
7643ac9a ZJS |
269 | <term><option>-s</option></term> |
270 | <term><option>--subsystem-match=<replaceable>SUBSYSTEM</replaceable></option></term> | |
63749b1a | 271 | <listitem> |
7643ac9a ZJS |
272 | <para>Trigger events for devices which belong to a |
273 | matching subsystem. This option can be specified multiple | |
274 | times and supports shell style pattern matching.</para> | |
63749b1a KS |
275 | </listitem> |
276 | </varlistentry> | |
277 | <varlistentry> | |
7643ac9a ZJS |
278 | <term><option>-S</option></term> |
279 | <term><option>--subsystem-nomatch=<replaceable>SUBSYSTEM</replaceable></option></term> | |
63749b1a KS |
280 | <listitem> |
281 | <para>Do not trigger events for devices which belong to a matching subsystem. This option | |
282 | can be specified multiple times and supports shell style pattern matching.</para> | |
283 | </listitem> | |
284 | </varlistentry> | |
285 | <varlistentry> | |
7643ac9a ZJS |
286 | <term><option>-a</option></term> |
287 | <term><option>--attr-match=<replaceable>ATTRIBUTE</replaceable>=<replaceable>VALUE</replaceable></option></term> | |
63749b1a | 288 | <listitem> |
7643ac9a ZJS |
289 | <para>Trigger events for devices with a matching sysfs |
290 | attribute. If a value is specified along with the | |
291 | attribute name, the content of the attribute is matched | |
292 | against the given value using shell style pattern | |
293 | matching. If no value is specified, the existence of the | |
294 | sysfs attribute is checked. This option can be specified | |
295 | multiple times.</para> | |
63749b1a KS |
296 | </listitem> |
297 | </varlistentry> | |
298 | <varlistentry> | |
7643ac9a ZJS |
299 | <term><option>-A</option></term> |
300 | <term><option>--attr-nomatch=<replaceable>ATTRIBUTE</replaceable>=<replaceable>VALUE</replaceable></option></term> | |
63749b1a | 301 | <listitem> |
7643ac9a ZJS |
302 | <para>Do not trigger events for devices with a matching |
303 | sysfs attribute. If a value is specified along with the | |
304 | attribute name, the content of the attribute is matched | |
305 | against the given value using shell style pattern | |
306 | matching. If no value is specified, the existence of the | |
307 | sysfs attribute is checked. This option can be specified | |
308 | multiple times.</para> | |
63749b1a KS |
309 | </listitem> |
310 | </varlistentry> | |
311 | <varlistentry> | |
7643ac9a ZJS |
312 | <term><option>-p</option></term> |
313 | <term><option>--property-match=<replaceable>PROPERTY</replaceable>=<replaceable>VALUE</replaceable></option></term> | |
63749b1a | 314 | <listitem> |
7643ac9a ZJS |
315 | <para>Trigger events for devices with a matching property |
316 | value. This option can be specified multiple times and | |
317 | supports shell style pattern matching.</para> | |
63749b1a KS |
318 | </listitem> |
319 | </varlistentry> | |
320 | <varlistentry> | |
7643ac9a ZJS |
321 | <term><option>-g</option></term> |
322 | <term><option>--tag-match=<replaceable>PROPERTY</replaceable></option></term> | |
63749b1a | 323 | <listitem> |
7643ac9a ZJS |
324 | <para>Trigger events for devices with a matching tag. This |
325 | option can be specified multiple times.</para> | |
63749b1a KS |
326 | </listitem> |
327 | </varlistentry> | |
328 | <varlistentry> | |
7643ac9a | 329 | <term><option>-y</option></term> |
80877656 | 330 | <term><option>--sysname-match=<replaceable>PATH</replaceable></option></term> |
63749b1a | 331 | <listitem> |
cd9363b1 RS |
332 | <para>Trigger events for devices for which the last component |
333 | (i.e. the filename) of the <filename>/sys</filename> path matches | |
334 | the specified <replaceable>PATH</replaceable>. This option can be | |
335 | specified multiple times and also supports shell style pattern | |
336 | matching.</para> | |
63749b1a KS |
337 | </listitem> |
338 | </varlistentry> | |
80877656 ZJS |
339 | <varlistentry> |
340 | <term><option>--name-match=<replaceable>NAME</replaceable></option></term> | |
341 | <listitem> | |
342 | <para>Trigger events for devices with a matching | |
a8eaaee7 | 343 | device path. This option can be specified multiple |
80877656 ZJS |
344 | times.</para> |
345 | </listitem> | |
346 | </varlistentry> | |
b05211fa | 347 | <varlistentry> |
7643ac9a ZJS |
348 | <term><option>-b</option></term> |
349 | <term><option>--parent-match=<replaceable>SYSPATH</replaceable></option></term> | |
b05211fa | 350 | <listitem> |
7643ac9a ZJS |
351 | <para>Trigger events for all children of a given |
352 | device.</para> | |
353 | </listitem> | |
354 | </varlistentry> | |
355 | <varlistentry> | |
356 | <term><option>-h</option></term> | |
357 | <term><option>--help</option></term> | |
358 | <listitem> | |
359 | <para>Print help text.</para> | |
b05211fa KS |
360 | </listitem> |
361 | </varlistentry> | |
63749b1a | 362 | </variablelist> |
80877656 | 363 | |
b938cb90 | 364 | <para>In addition, optional positional arguments can be used |
80877656 ZJS |
365 | to specify device names or sys paths. They must start with |
366 | <filename>/dev</filename> or <filename>/sys</filename> | |
367 | respectively.</para> | |
63749b1a | 368 | </refsect2> |
225cb03b | 369 | |
80877656 ZJS |
370 | <refsect2><title>udevadm settle |
371 | <arg choice="opt"><replaceable>options</replaceable></arg> | |
372 | </title> | |
63749b1a KS |
373 | <para>Watches the udev event queue, and exits if all current events are handled.</para> |
374 | <variablelist> | |
375 | <varlistentry> | |
7643ac9a ZJS |
376 | <term><option>-t</option></term> |
377 | <term><option>--timeout=<replaceable>SECONDS</replaceable></option></term> | |
63749b1a | 378 | <listitem> |
7643ac9a ZJS |
379 | <para>Maximum number of seconds to wait for the event |
380 | queue to become empty. The default value is 120 seconds. A | |
381 | value of 0 will check if the queue is empty and always | |
382 | return immediately.</para> | |
63749b1a KS |
383 | </listitem> |
384 | </varlistentry> | |
63749b1a | 385 | <varlistentry> |
7643ac9a ZJS |
386 | <term><option>-E</option></term> |
387 | <term><option>--exit-if-exists=<replaceable>FILE</replaceable></option></term> | |
63749b1a KS |
388 | <listitem> |
389 | <para>Stop waiting if file exists.</para> | |
390 | </listitem> | |
391 | </varlistentry> | |
63749b1a | 392 | <varlistentry> |
7643ac9a | 393 | <term><option>-h</option></term> |
63749b1a KS |
394 | <term><option>--help</option></term> |
395 | <listitem> | |
396 | <para>Print help text.</para> | |
397 | </listitem> | |
398 | </varlistentry> | |
399 | </variablelist> | |
400 | </refsect2> | |
225cb03b | 401 | |
63749b1a KS |
402 | <refsect2><title>udevadm control <replaceable>command</replaceable></title> |
403 | <para>Modify the internal state of the running udev daemon.</para> | |
404 | <variablelist> | |
ff2c503d | 405 | <varlistentry> |
bd8420c5 | 406 | <term><option>-e</option></term> |
ff2c503d KS |
407 | <term><option>--exit</option></term> |
408 | <listitem> | |
f13b388f | 409 | <para>Signal and wait for systemd-udevd to exit.</para> |
ff2c503d KS |
410 | </listitem> |
411 | </varlistentry> | |
63749b1a | 412 | <varlistentry> |
7643ac9a | 413 | <term><option>-l</option></term> |
63749b1a KS |
414 | <term><option>--log-priority=<replaceable>value</replaceable></option></term> |
415 | <listitem> | |
e03234a1 ZJS |
416 | <para>Set the internal log level of |
417 | <filename>systemd-udevd</filename>. Valid values are the | |
418 | numerical syslog priorities or their textual | |
419 | representations: <option>emerg</option>, | |
420 | <option>alert</option>, <option>crit</option>, | |
421 | <option>err</option>, <option>warning</option>, | |
422 | <option>notice</option>, <option>info</option>, and | |
423 | <option>debug</option>.</para> | |
63749b1a KS |
424 | </listitem> |
425 | </varlistentry> | |
426 | <varlistentry> | |
7643ac9a | 427 | <term><option>-s</option></term> |
63749b1a KS |
428 | <term><option>--stop-exec-queue</option></term> |
429 | <listitem> | |
f13b388f | 430 | <para>Signal systemd-udevd to stop executing new events. Incoming events |
63749b1a KS |
431 | will be queued.</para> |
432 | </listitem> | |
433 | </varlistentry> | |
434 | <varlistentry> | |
7643ac9a | 435 | <term><option>-S</option></term> |
63749b1a KS |
436 | <term><option>--start-exec-queue</option></term> |
437 | <listitem> | |
f13b388f | 438 | <para>Signal systemd-udevd to enable the execution of events.</para> |
63749b1a KS |
439 | </listitem> |
440 | </varlistentry> | |
441 | <varlistentry> | |
7643ac9a | 442 | <term><option>-R</option></term> |
7c85d636 | 443 | <term><option>--reload</option></term> |
63749b1a | 444 | <listitem> |
f13b388f | 445 | <para>Signal systemd-udevd to reload the rules files and other databases like the kernel |
7c85d636 KS |
446 | module index. Reloading rules and databases does not apply any changes to already |
447 | existing devices; the new configuration will only be applied to new events.</para> | |
63749b1a KS |
448 | </listitem> |
449 | </varlistentry> | |
450 | <varlistentry> | |
7643ac9a | 451 | <term><option>-p</option></term> |
63749b1a KS |
452 | <term><option>--property=<replaceable>KEY</replaceable>=<replaceable>value</replaceable></option></term> |
453 | <listitem> | |
454 | <para>Set a global property for all events.</para> | |
455 | </listitem> | |
456 | </varlistentry> | |
457 | <varlistentry> | |
7643ac9a | 458 | <term><option>-m</option></term> |
87d55ff6 | 459 | <term><option>--children-max=</option><replaceable>value</replaceable></term> |
63749b1a | 460 | <listitem> |
f13b388f | 461 | <para>Set the maximum number of events, systemd-udevd will handle at the |
63749b1a KS |
462 | same time.</para> |
463 | </listitem> | |
464 | </varlistentry> | |
ff2c503d KS |
465 | <varlistentry> |
466 | <term><option>--timeout=</option><replaceable>seconds</replaceable></term> | |
467 | <listitem> | |
7e505069 | 468 | <para>The maximum number of seconds to wait for a reply from systemd-udevd.</para> |
ff2c503d KS |
469 | </listitem> |
470 | </varlistentry> | |
63749b1a | 471 | <varlistentry> |
7643ac9a | 472 | <term><option>-h</option></term> |
63749b1a KS |
473 | <term><option>--help</option></term> |
474 | <listitem> | |
475 | <para>Print help text.</para> | |
476 | </listitem> | |
477 | </varlistentry> | |
478 | </variablelist> | |
479 | </refsect2> | |
225cb03b | 480 | |
80877656 ZJS |
481 | <refsect2><title>udevadm monitor |
482 | <arg choice="opt"><replaceable>options</replaceable></arg> | |
483 | </title> | |
63749b1a KS |
484 | <para>Listens to the kernel uevents and events sent out by a udev rule |
485 | and prints the devpath of the event to the console. It can be used to analyze the | |
486 | event timing, by comparing the timestamps of the kernel uevent and the udev event. | |
487 | </para> | |
488 | <variablelist> | |
489 | <varlistentry> | |
7643ac9a | 490 | <term><option>-k</option></term> |
63749b1a KS |
491 | <term><option>--kernel</option></term> |
492 | <listitem> | |
493 | <para>Print the kernel uevents.</para> | |
494 | </listitem> | |
495 | </varlistentry> | |
496 | <varlistentry> | |
7643ac9a | 497 | <term><option>-u</option></term> |
63749b1a KS |
498 | <term><option>--udev</option></term> |
499 | <listitem> | |
500 | <para>Print the udev event after the rule processing.</para> | |
501 | </listitem> | |
502 | </varlistentry> | |
503 | <varlistentry> | |
7643ac9a | 504 | <term><option>-p</option></term> |
63749b1a KS |
505 | <term><option>--property</option></term> |
506 | <listitem> | |
507 | <para>Also print the properties of the event.</para> | |
508 | </listitem> | |
509 | </varlistentry> | |
510 | <varlistentry> | |
7643ac9a | 511 | <term><option>-s</option></term> |
63749b1a KS |
512 | <term><option>--subsystem-match=<replaceable>string[/string]</replaceable></option></term> |
513 | <listitem> | |
aa9744df | 514 | <para>Filter kernel uevents and udev events by subsystem[/devtype]. Only events with a matching subsystem value will pass.</para> |
63749b1a KS |
515 | </listitem> |
516 | </varlistentry> | |
517 | <varlistentry> | |
7643ac9a | 518 | <term><option>-t</option></term> |
63749b1a KS |
519 | <term><option>--tag-match=<replaceable>string</replaceable></option></term> |
520 | <listitem> | |
aa9744df | 521 | <para>Filter udev events by tag. Only udev events with a given tag attached will pass.</para> |
63749b1a KS |
522 | </listitem> |
523 | </varlistentry> | |
524 | <varlistentry> | |
7643ac9a | 525 | <term><option>-h</option></term> |
63749b1a KS |
526 | <term><option>--help</option></term> |
527 | <listitem> | |
528 | <para>Print help text.</para> | |
529 | </listitem> | |
530 | </varlistentry> | |
531 | </variablelist> | |
532 | </refsect2> | |
225cb03b | 533 | |
80877656 ZJS |
534 | <refsect2><title>udevadm test |
535 | <arg choice="opt"><replaceable>options</replaceable></arg> | |
536 | <arg><replaceable>devpath</replaceable></arg> | |
537 | </title> | |
63749b1a KS |
538 | <para>Simulate a udev event run for the given device, and print debug output.</para> |
539 | <variablelist> | |
540 | <varlistentry> | |
7643ac9a | 541 | <term><option>-a</option></term> |
63749b1a KS |
542 | <term><option>--action=<replaceable>string</replaceable></option></term> |
543 | <listitem> | |
544 | <para>The action string.</para> | |
545 | </listitem> | |
546 | </varlistentry> | |
547 | <varlistentry> | |
7643ac9a | 548 | <term><option>-N</option></term> |
124b48b0 | 549 | <term><option>--resolve-names=<constant>early</constant>|<constant>late</constant>|<constant>never</constant></option></term> |
63749b1a | 550 | <listitem> |
124b48b0 ZJS |
551 | <para>Specify when udevadm should resolve names of users |
552 | and groups. When set to <constant>early</constant> (the | |
72f4d966 JE |
553 | default), names will be resolved when the rules are |
554 | parsed. When set to <constant>late</constant>, names will | |
124b48b0 | 555 | be resolved for every event. When set to |
72f4d966 | 556 | <constant>never</constant>, names will never be resolved |
124b48b0 | 557 | and all devices will be owned by root.</para> |
63749b1a KS |
558 | </listitem> |
559 | </varlistentry> | |
560 | <varlistentry> | |
7643ac9a | 561 | <term><option>-h</option></term> |
63749b1a KS |
562 | <term><option>--help</option></term> |
563 | <listitem> | |
564 | <para>Print help text.</para> | |
565 | </listitem> | |
566 | </varlistentry> | |
567 | </variablelist> | |
568 | </refsect2> | |
d7867b31 | 569 | |
80877656 ZJS |
570 | <refsect2><title>udevadm test-builtin |
571 | <arg choice="opt"><replaceable>options</replaceable></arg> | |
572 | <arg><replaceable>command</replaceable></arg> | |
573 | <arg><replaceable>devpath</replaceable></arg> | |
574 | </title> | |
7643ac9a ZJS |
575 | <para>Run a built-in command <replaceable>COMMAND</replaceable> |
576 | for device <replaceable>DEVPATH</replaceable>, and print debug | |
577 | output.</para> | |
d7867b31 KS |
578 | <variablelist> |
579 | <varlistentry> | |
7643ac9a | 580 | <term><option>-h</option></term> |
d7867b31 KS |
581 | <term><option>--help</option></term> |
582 | <listitem> | |
583 | <para>Print help text.</para> | |
584 | </listitem> | |
585 | </varlistentry> | |
586 | </variablelist> | |
587 | </refsect2> | |
63749b1a | 588 | </refsect1> |
225cb03b | 589 | |
63749b1a KS |
590 | <refsect1> |
591 | <title>See Also</title> | |
592 | <para><citerefentry> | |
593 | <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum> | |
7d06ef0a | 594 | </citerefentry>, |
63749b1a | 595 | <citerefentry> |
b79f817b | 596 | <refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum> |
63749b1a KS |
597 | </citerefentry></para> |
598 | </refsect1> | |
599 | </refentry> |