2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 <refentry id="udevadm">
9 <productname>udev</productname>
13 <refentrytitle>udevadm</refentrytitle>
14 <manvolnum>8</manvolnum>
15 <refmiscinfo class="version"></refmiscinfo>
19 <refname>udevadm</refname><refpurpose>udev management tool</refpurpose>
24 <command>udevadm</command>
25 <arg><option>--debug</option></arg>
26 <arg><option>--version</option></arg>
27 <arg><option>--help</option></arg>
30 <command>udevadm info <replaceable>options</replaceable></command>
33 <command>udevadm trigger <optional>options</optional></command>
36 <command>udevadm settle <optional>options</optional></command>
39 <command>udevadm control <replaceable>command</replaceable></command>
42 <command>udevadm monitor <optional>options</optional></command>
45 <command>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></command>
49 <refsect1><title>Description</title>
50 <para>udevadm expects a command and command specific options. It
51 controls the runtime behavior of udev, requests kernel events,
52 manages the event queue, and provides simple debugging mechanisms.</para>
55 <refsect1><title>OPTIONS</title>
58 <term><option>--debug</option></term>
60 <para>Print debug messages to stderr.</para>
64 <term><option>--version</option></term>
66 <para>Print version number.</para>
70 <term><option>--help</option></term>
72 <para>Print help text.</para>
77 <refsect2><title>udevadm info <replaceable>options</replaceable></title>
78 <para>Queries the udev database for device information
79 stored in the udev database. It can also query the properties
80 of a device from its sysfs representation to help creating udev
81 rules that match this device.</para>
84 <term><option>--query=<replaceable>type</replaceable></option></term>
86 <para>Query the database for specified type of device data. It needs the
87 <option>--path</option> or <option>--name</option> to identify the specified
88 device. Valid queries are:
89 <command>name</command>, <command>symlink</command>, <command>path</command>,
90 <command>property</command>, <command>all</command>.</para>
94 <term><option>--path=<replaceable>devpath</replaceable></option></term>
96 <para>The devpath of the device to query.</para>
100 <term><option>--name=<replaceable>file</replaceable></option></term>
102 <para>The name of the device node or a symlink to query</para>
106 <term><option>--root</option></term>
108 <para>The udev root directory: <filename>/dev</filename>. If used in conjunction
109 with a <command>name</command> or <command>symlink</command> query, the
110 query returns the absolute path including the root directory.</para>
114 <term><option>--run</option></term>
116 <para>The udev runtime directory: <filename>/run/udev</filename>.</para>
120 <term><option>--attribute-walk</option></term>
122 <para>Print all sysfs properties of the specified device that can be used
123 in udev rules to match the specified device. It prints all devices
124 along the chain, up to the root of sysfs that can be used in udev rules.</para>
128 <term><option>--export</option></term>
130 <para>Print output as key/value pairs. Values are enclosed in single quotes.</para>
134 <term><option>--export-prefix=<replaceable>name</replaceable></option></term>
136 <para>Add a prefix to the key name of exported values.</para>
140 <term><option>--device-id-of-file=<replaceable>file</replaceable></option></term>
142 <para>Print major/minor numbers of the underlying device, where the file
147 <term><option>--export-db</option></term>
149 <para>Export the content of the udev database.</para>
153 <term><option>--cleanup-db</option></term>
155 <para>Cleanup the udev database.</para>
159 <term><option>--version</option></term>
161 <para>Print version.</para>
165 <term><option>--help</option></term>
167 <para>Print help text.</para>
173 <refsect2><title>udevadm trigger <optional>options</optional></title>
174 <para>Request device events from the kernel. Primarily used to replay events at system coldplug time.</para>
177 <term><option>--verbose</option></term>
179 <para>Print the list of devices which will be triggered.</para>
183 <term><option>--dry-run</option></term>
185 <para>Do not actually trigger the event.</para>
189 <term><option>--type=<replaceable>type</replaceable></option></term>
191 <para>Trigger a specific type of devices. Valid types are:
192 <command>devices</command>, <command>subsystems</command>.
193 The default value is <command>devices</command>.</para>
197 <term><option>--action=<replaceable>action</replaceable></option></term>
199 <para>Type of event to be triggered. The default value is <command>change</command>.</para>
203 <term><option>--subsystem-match=<replaceable>subsystem</replaceable></option></term>
205 <para>Trigger events for devices which belong to a matching subsystem. This option
206 can be specified multiple times and supports shell style pattern matching.</para>
210 <term><option>--subsystem-nomatch=<replaceable>subsystem</replaceable></option></term>
212 <para>Do not trigger events for devices which belong to a matching subsystem. This option
213 can be specified multiple times and supports shell style pattern matching.</para>
217 <term><option>--attr-match=<replaceable>attribute</replaceable>=<replaceable>value</replaceable></option></term>
219 <para>Trigger events for devices with a matching sysfs attribute. If a value is specified
220 along with the attribute name, the content of the attribute is matched against the given
221 value using shell style pattern matching. If no value is specified, the existence of the
222 sysfs attribute is checked. This option can be specified multiple times.</para>
226 <term><option>--attr-nomatch=<replaceable>attribute</replaceable>=<replaceable>value</replaceable></option></term>
228 <para>Do not trigger events for devices with a matching sysfs attribute. If a value is
229 specified along with the attribute name, the content of the attribute is matched against
230 the given value using shell style pattern matching. If no value is specified, the existence
231 of the sysfs attribute is checked. This option can be specified multiple times.</para>
235 <term><option>--property-match=<replaceable>property</replaceable>=<replaceable>value</replaceable></option></term>
237 <para>Trigger events for devices with a matching property value. This option can be
238 specified multiple times and supports shell style pattern matching.</para>
242 <term><option>--tag-match=<replaceable>property</replaceable></option></term>
244 <para>Trigger events for devices with a matching tag. This option can be
245 specified multiple times.</para>
249 <term><option>--sysname-match=<replaceable>name</replaceable></option></term>
251 <para>Trigger events for devices with a matching sys device name. This option can be
252 specified multiple times and supports shell style pattern matching.</para>
256 <term><option>--parent-match=<replaceable>syspath</replaceable></option></term>
258 <para>Trigger events for all children of a given device.</para>
264 <refsect2><title>udevadm settle <optional>options</optional></title>
265 <para>Watches the udev event queue, and exits if all current events are handled.</para>
268 <term><option>--timeout=<replaceable>seconds</replaceable></option></term>
270 <para>Maximum number of seconds to wait for the event queue to become empty.
271 The default value is 120 seconds. A value of 0 will check if the queue is empty
272 and always return immediately.</para>
276 <term><option>--seq-start=<replaceable>seqnum</replaceable></option></term>
278 <para>Wait only for events after the given sequence number.</para>
282 <term><option>--seq-end=<replaceable>seqnum</replaceable></option></term>
284 <para>Wait only for events before the given sequence number.</para>
288 <term><option>--exit-if-exists=<replaceable>file</replaceable></option></term>
290 <para>Stop waiting if file exists.</para>
294 <term><option>--quiet</option></term>
296 <para>Do not print any output, like the remaining queue entries when reaching the timeout.</para>
300 <term><option>--help</option></term>
302 <para>Print help text.</para>
308 <refsect2><title>udevadm control <replaceable>command</replaceable></title>
309 <para>Modify the internal state of the running udev daemon.</para>
312 <term><option>--exit</option></term>
314 <para>Signal and wait for udevd to exit.</para>
318 <term><option>--log-priority=<replaceable>value</replaceable></option></term>
320 <para>Set the internal log level of udevd. Valid values are the numerical
321 syslog priorities or their textual representations: <option>err</option>,
322 <option>info</option> and <option>debug</option>.</para>
326 <term><option>--stop-exec-queue</option></term>
328 <para>Signal udevd to stop executing new events. Incoming events
329 will be queued.</para>
333 <term><option>--start-exec-queue</option></term>
335 <para>Signal udevd to enable the execution of events.</para>
339 <term><option>--reload-rules</option></term>
341 <para>Signal udevd to reload the rules files.
342 The udev daemon detects changes automatically, this option is
343 usually not needed. Reloading rules does not apply any changes
344 to already existing devices.</para>
348 <term><option>--property=<replaceable>KEY</replaceable>=<replaceable>value</replaceable></option></term>
350 <para>Set a global property for all events.</para>
354 <term><option>--children-max=</option><replaceable>value</replaceable></term>
356 <para>Set the maximum number of events, udevd will handle at the
361 <term><option>--timeout=</option><replaceable>seconds</replaceable></term>
363 <para>The maximum number seonds to wait for a reply from udevd.</para>
367 <term><option>--help</option></term>
369 <para>Print help text.</para>
375 <refsect2><title>udevadm monitor <optional>options</optional></title>
376 <para>Listens to the kernel uevents and events sent out by a udev rule
377 and prints the devpath of the event to the console. It can be used to analyze the
378 event timing, by comparing the timestamps of the kernel uevent and the udev event.
382 <term><option>--kernel</option></term>
384 <para>Print the kernel uevents.</para>
388 <term><option>--udev</option></term>
390 <para>Print the udev event after the rule processing.</para>
394 <term><option>--property</option></term>
396 <para>Also print the properties of the event.</para>
400 <term><option>--subsystem-match=<replaceable>string[/string]</replaceable></option></term>
402 <para>Filter events by subsystem[/devtype]. Only udev events with a matching subsystem value will pass.</para>
406 <term><option>--tag-match=<replaceable>string</replaceable></option></term>
408 <para>Filter events by property. Only udev events with a given tag attached will pass.</para>
412 <term><option>--help</option></term>
414 <para>Print help text.</para>
420 <refsect2><title>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></title>
421 <para>Simulate a udev event run for the given device, and print debug output.</para>
424 <term><option>--action=<replaceable>string</replaceable></option></term>
426 <para>The action string.</para>
430 <term><option>--subsystem=<replaceable>string</replaceable></option></term>
432 <para>The subsystem string.</para>
436 <term><option>--help</option></term>
438 <para>Print help text.</para>
445 <refsect1><title>Author</title>
446 <para>Written by Kay Sievers <email>kay.sievers@vrfy.org</email>.</para>
450 <title>See Also</title>
452 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
455 <refentrytitle>udevd</refentrytitle><manvolnum>8</manvolnum>
456 </citerefentry></para>