2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
11 <date>November 2007</date>
12 <productname>udev</productname>
16 <refentrytitle>udevadm</refentrytitle>
17 <manvolnum>8</manvolnum>
18 <refmiscinfo class="version"></refmiscinfo>
22 <refname>udevadm</refname><refpurpose>udev management tool</refpurpose>
27 <command>udevadm</command>
28 <arg><option>--debug</option></arg>
29 <arg><option>--version</option></arg>
30 <arg><option>--help</option></arg>
33 <command>udevadm info <replaceable>options</replaceable></command>
36 <command>udevadm trigger <optional>options</optional></command>
39 <command>udevadm settle <optional>options</optional></command>
42 <command>udevadm control <replaceable>command</replaceable></command>
45 <command>udevadm monitor <optional>options</optional></command>
48 <command>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></command>
52 <refsect1><title>DESCRIPTION</title>
53 <para>udevadm expects a command and command specific options. It
54 controls the runtime behavior of udev, requests kernel events,
55 manages the event queue, and provides simple debugging mechanisms.</para>
58 <refsect1><title>OPTIONS</title>
61 <term><option>--debug</option></term>
63 <para>Print debug messages to stderr.</para>
67 <term><option>--version</option></term>
69 <para>Print version number.</para>
73 <term><option>--help</option></term>
75 <para>Print help text.</para>
80 <refsect2><title>udevadm info <replaceable>options</replaceable></title>
81 <para>Queries the udev database for device information
82 stored in the udev database. It can also query the properties
83 of a device from its sysfs representation to help creating udev
84 rules that match this device.</para>
87 <term><option>--query=<replaceable>type</replaceable></option></term>
89 <para>Query the database for specified type of device data. It needs the
90 <option>--path</option> or <option>--name</option> to identify the specified
91 device. Valid queries are:
92 <command>name</command>, <command>symlink</command>, <command>path</command>,
93 <command>property</command>, <command>all</command>.</para>
97 <term><option>--path=<replaceable>devpath</replaceable></option></term>
99 <para>The devpath of the device to query.</para>
103 <term><option>--name=<replaceable>file</replaceable></option></term>
105 <para>The name of the device node or a symlink to query</para>
109 <term><option>--root</option></term>
111 <para>The udev root directory: <filename>/dev</filename>. If used in conjunction
112 with a <command>name</command> or <command>symlink</command> query, the
113 query returns the absolute path including the root directory.</para>
117 <term><option>--attribute-walk</option></term>
119 <para>Print all sysfs properties of the specified device that can be used
120 in udev rules to match the specified device. It prints all devices
121 along the chain, up to the root of sysfs that can be used in udev rules.</para>
125 <term><option>--device-id-of-file=<replaceable>file</replaceable></option></term>
127 <para>Print major/minor numbers of the underlying device, where the file
132 <term><option>--export-db</option></term>
134 <para>Export the content of the udev database.</para>
138 <term><option>--version</option></term>
140 <para>Print version.</para>
144 <term><option>--help</option></term>
146 <para>Print help text.</para>
152 <refsect2><title>udevadm trigger <optional>options</optional></title>
153 <para>Request device events from the kernel. Usually used to replay events at system coldplug time.</para>
156 <term><option>--verbose</option></term>
158 <para>Print the list of devices which will be triggered.</para>
162 <term><option>--dry-run</option></term>
164 <para>Do not actually trigger the event.</para>
168 <term><option>--type=<replaceable>type</replaceable></option></term>
170 <para>Trigger a specific type of devices. Valid types are:
171 <command>devices</command>, <command>subsystems</command>, <command>failed</command>.
172 The default value is <command>devices</command>.</para>
176 <term><option>--action=<replaceable>action</replaceable></option></term>
178 <para>Type of event to be triggered. The default value is <command>add</command>.</para>
182 <term><option>--subsystem-match=<replaceable>subsystem</replaceable></option></term>
184 <para>Trigger events for devices which belong to a matching subsystem. This option
185 can be specified multiple times and supports shell style pattern matching.</para>
189 <term><option>--subsystem-nomatch=<replaceable>subsystem</replaceable></option></term>
191 <para>Do not trigger events for devices which belong to a matching subsystem. This option
192 can be specified multiple times and supports shell style pattern matching.</para>
196 <term><option>--attr-match=<replaceable>attribute</replaceable>=<replaceable>value</replaceable></option></term>
198 <para>Trigger events for devices with a matching sysfs attribute. If a value is specified
199 along with the attribute name, the content of the attribute is matched against the given
200 value using shell style pattern matching. If no value is specified, the existence of the
201 sysfs attribute is checked. This option can be specified multiple times.</para>
205 <term><option>--attr-nomatch=<replaceable>attribute</replaceable>=<replaceable>value</replaceable></option></term>
207 <para>Do not trigger events for devices with a matching sysfs attribute. If a value is
208 specified along with the attribute name, the content of the attribute is matched against
209 the given value using shell style pattern matching. If no value is specified, the existence
210 of the sysfs attribute is checked. This option can be specified multiple times.</para>
214 <term><option>--property-match=<replaceable>property</replaceable>=<replaceable>value</replaceable></option></term>
216 <para>Trigger events for devices with a matching property value. This option can be
217 specified multiple times and supports shell style pattern matching.</para>
223 <refsect2><title>udevadm settle <optional>options</optional></title>
224 <para>Watches the udev event queue, and exits if all current events are handled.</para>
227 <term><option>--timeout=<replaceable>seconds</replaceable></option></term>
229 <para>Maximum number of seconds to wait for the event queue to become empty.
230 The default value is 180 seconds. A value of 0 will check if the queue is empty
231 and always return immediately.</para>
235 <term><option>--seq-start=<replaceable>seqnum</replaceable></option></term>
237 <para>Wait only for events after the given sequence number.</para>
241 <term><option>--seq-end=<replaceable>seqnum</replaceable></option></term>
243 <para>Wait only for events before the given sequence number.</para>
247 <term><option>--exit-if-exists=<replaceable>file</replaceable></option></term>
249 <para>Stop waiting if file exists.</para>
253 <term><option>--quiet</option></term>
255 <para>Do not print any output, like the remaining queue entries when reaching the timeout.</para>
259 <term><option>--help</option></term>
261 <para>Print help text.</para>
267 <refsect2><title>udevadm control <replaceable>command</replaceable></title>
268 <para>Modify the internal state of the running udev daemon.</para>
271 <term><option>--log-priority=<replaceable>value</replaceable></option></term>
273 <para>Set the internal log level of udevd. Valid values are the numerical
274 syslog priorities or their textual representations: <option>err</option>,
275 <option>info</option> and <option>debug</option>.</para>
279 <term><option>--stop-exec-queue</option></term>
281 <para>Signal udevd to stop executing new events. Incoming events
282 will be queued.</para>
286 <term><option>--start-exec-queue</option></term>
288 <para>Signal udevd to enable the execution of events.</para>
292 <term><option>--reload-rules</option></term>
294 <para>Signal udevd to reload the rules files.
295 The udev daemon detects changes automatically, this option is
296 usually not needed. Reloading rules does not apply any changes
297 to already existing devices.</para>
301 <term><option>--property=<replaceable>KEY</replaceable>=<replaceable>value</replaceable></option></term>
303 <para>Set a global property for all events.</para>
307 <term><option>--max-childs=</option><replaceable>value</replaceable></term>
309 <para>Set the maximum number of events, udevd will handle at the
314 <term><option>--help</option></term>
316 <para>Print help text.</para>
322 <refsect2><title>udevadm monitor <optional>options</optional></title>
323 <para>Listens to the kernel uevents and events sent out by a udev rule
324 and prints the devpath of the event to the console. It can be used to analyze the
325 event timing, by comparing the timestamps of the kernel uevent and the udev event.
329 <term><option>--kernel</option></term>
331 <para>Print the kernel uevents.</para>
335 <term><option>--udev</option></term>
337 <para>Print the udev event after the rule processing.</para>
341 <term><option>--property</option></term>
343 <para>Also print the properties of the event.</para>
347 <term><option>--help</option></term>
349 <para>Print help text.</para>
355 <refsect2><title>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></title>
356 <para>Simulate a udev event run for the given device, and print debug output.</para>
359 <term><option>--action=<replaceable>string</replaceable></option></term>
361 <para>The action string.</para>
365 <term><option>--subsystem=<replaceable>string</replaceable></option></term>
367 <para>The subsystem string.</para>
371 <term><option>--help</option></term>
373 <para>Print help text.</para>
380 <refsect1><title>AUTHOR</title>
381 <para>Written by Kay Sievers <email>kay.sievers@vrfy.org</email>.</para>
385 <title>SEE ALSO</title>
387 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
390 <refentrytitle>udevd</refentrytitle><manvolnum>8</manvolnum>
391 </citerefentry></para>