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 info <optional>options</optional></command>
30 <command>udevadm trigger <optional>options</optional></command>
33 <command>udevadm settle <optional>options</optional></command>
36 <command>udevadm control <optional>options</optional> <replaceable>instruction</replaceable></command>
39 <command>udevadm monitor <optional>options</optional></command>
42 <command>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></command>
45 <command>udevadm version</command>
48 <command>udevadm help</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>
60 <refsect2><title>udevadm info <replaceable>options</replaceable></title>
61 <para>Queries the udev database for device information
62 stored in the udev database. It can also query the properties
63 of a device from its sysfs representation to help creating udev
64 rules that match this device.</para>
67 <term><option>--query=<replaceable>type</replaceable></option></term>
69 <para>Query the database for specified type of device data. It needs the
70 <option>--path</option> or <option>--name</option> to identify the specified
71 device. Valid queries are:
72 <command>name</command>, <command>symlink</command>, <command>path</command>,
73 <command>env</command>, <command>all</command>.</para>
77 <term><option>--path=<replaceable>devpath</replaceable></option></term>
79 <para>The devpath of the device to query.</para>
83 <term><option>--name=<replaceable>file</replaceable></option></term>
85 <para>The name of the device node or a symlink to query</para>
89 <term><option>--root</option></term>
91 <para>The udev root directory: <filename>/dev</filename>. If used in conjunction
92 with a <command>name</command> or <command>symlink</command> query, the
93 query returns the absolute path including the root directory.</para>
97 <term><option>--attribute-walk</option></term>
99 <para>Print all sysfs properties of the specified device that can be used
100 in udev rules to match the specified device. It prints all devices
101 along the chain, up to the root of sysfs that can be used in udev rules.</para>
105 <term><option>--device-id-of-file=<replaceable>file</replaceable></option></term>
107 <para>Print major/minor numbers of the underlying device, where the file
112 <term><option>--export-db</option></term>
114 <para>Export the content of the udev database.</para>
118 <term><option>--version</option></term>
120 <para>Print version.</para>
124 <term><option>--help</option></term>
126 <para>Print help text.</para>
132 <refsect2><title>udevadm trigger <optional>options</optional></title>
133 <para>Request kernel device uevents, usually used to replay events at system coldplug.</para>
136 <term><option>--verbose</option></term>
138 <para>Print the list of devices which will be triggered.</para>
142 <term><option>--dry-run</option></term>
144 <para>Do not actually trigger the event.</para>
148 <term><option>--retry-failed</option></term>
150 <para>Trigger only the events which are failed during a previous run.</para>
154 <term><option>--action=<replaceable>action</replaceable></option></term>
156 <para>Type of event to be triggered. The default value is "add".</para>
160 <term><option>--subsystem-match=<replaceable>subsystem</replaceable></option></term>
162 <para>Trigger events for devices which belong to a matching subsystem. This option
163 can be specified multiple times and supports shell style pattern matching.</para>
167 <term><option>--subsystem-nomatch=<replaceable>subsystem</replaceable></option></term>
169 <para>Do not trigger events for devices which belong to a matching subsystem. This option
170 can be specified multiple times and supports shell style pattern matching.</para>
174 <term><option>--attr-match=<replaceable>attribute=value</replaceable></option></term>
176 <para>Trigger events for devices with a matching sysfs attribute. If a value is specified
177 along with the attribute name, the content of the attribute is matched against the given
178 value using shell style pattern matching. If no value is specified, the existence of the
179 sysfs attribute is checked. This option can be specified multiple times.</para>
183 <term><option>--attr-nomatch<replaceable>attribute=value</replaceable></option></term>
185 <para>Do not trigger events for devices with a matching sysfs attribute. If a value is
186 specified along with the attribute name, the content of the attribute is matched against
187 the given value using shell style pattern matching. If no value is specified, the existence
188 of the sysfs attribute is checked. This option can be specified multiple times.</para>
194 <refsect2><title>udevadm settle <optional>options</optional></title>
195 <para>Watches the udev event queue, and exits if all current events are handled.</para>
198 <term><option>--timeout=<replaceable>seconds</replaceable></option></term>
200 <para>Maximum number of seconds to wait for the event queue to become empty.
201 The default value is 180 seconds.</para>
205 <term><option>--help</option></term>
207 <para>Print help text.</para>
213 <refsect2><title>udevadm control <replaceable>command</replaceable></title>
214 <para>Modify the internal state of the running udev daemon.</para>
217 <term><option>--log_priority=<replaceable>value</replaceable></option></term>
219 <para>Set the internal log level of udevd. Valid values are the numerical
220 syslog priorities or their textual representations: <option>err</option>,
221 <option>info</option> and <option>debug</option>.</para>
225 <term><option>--stop_exec_queue</option></term>
227 <para>Signal udevd to stop executing new events. Incoming events
228 will be queued.</para>
232 <term><option>--start_exec_queue</option></term>
234 <para>Signal udevd to enable the execution of events.</para>
238 <term><option>--reload_rules</option></term>
240 <para>Signal udevd to reload the rules from the config.</para>
244 <term><option>--env <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term>
246 <para>Set global variable.</para>
250 <term><option>--max_childs</option></term>
252 <para>Set the maximum number of events, udevd will handle at the
257 <term><option>--max_childs_running</option></term>
259 <para>Set the maximum number of events, which are allowed to run at the
264 <term><option>--help</option></term>
266 <para>Print help text.</para>
272 <refsect2><title>udevadm monitor <optional>options</optional></title>
273 <para>Listens to the kernel uevents and events sent out by a udev rule
274 and prints the devpath of the event to the console. It can be used to analyze the
275 event timing, by comparing the timestamps of the kernel uevent and the udev event.
279 <term><option>--environment</option></term>
281 <para>Print the complete environment for all events. Can be used to compare the
282 kernel supplied and the udev added environment values.</para>
286 <term><option>--kernel</option></term>
288 <para>Print the kernel uevents.</para>
292 <term><option>--udev</option></term>
294 <para>Print the udev event after the rule processing.</para>
298 <term><option>--help</option></term>
300 <para>Print help text.</para>
306 <refsect2><title>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></title>
307 <para>Simulate a udev event run for the given device, and print out debug
308 output. Unless forced to, no device node or symlink will be created.</para>
311 <term><option>--action=<replaceable>string</replaceable></option></term>
313 <para>The action string.</para>
317 <term><option>--subsystem=<replaceable>string</replaceable></option></term>
319 <para>The subsystem string.</para>
323 <term><option>--force</option></term>
325 <para>Force the creation of a device node or symlink. Usually the test run
326 prints only debug output.</para>
330 <term><option>--help</option></term>
332 <para>Print help text.</para>
338 <refsect2><title>udevadm version</title>
339 <para>Print version number.</para>
342 <refsect2><title>udevadm help</title>
343 <para>Print help text.</para>
347 <refsect1><title>AUTHOR</title>
348 <para>Written by Kay Sievers <email>kay.sievers@vrfy.org</email>.</para>
352 <title>SEE ALSO</title>
354 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
357 <refentrytitle>udevd</refentrytitle><manvolnum>8</manvolnum>
358 </citerefentry></para>