chiark / gitweb /
udevadm: merge all udev tools into a single binary
[elogind.git] / udevadm.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <article>
6   <section>
7     <title>udevadm</title>
8     <refentry>
9       <refentryinfo>
10         <title>udevd</title>
11         <date>November 2007</date>
12         <productname>udev</productname>
13       </refentryinfo>
14
15       <refmeta>
16         <refentrytitle>udevadm</refentrytitle>
17         <manvolnum>8</manvolnum>
18         <refmiscinfo class="version"></refmiscinfo>
19       </refmeta>
20
21       <refnamediv>
22         <refname>udevadm</refname><refpurpose>udev management tool</refpurpose>
23       </refnamediv>
24
25       <refsynopsisdiv>
26         <cmdsynopsis>
27           <command>udevadm info <optional>options</optional></command>
28         </cmdsynopsis>
29         <cmdsynopsis>
30           <command>udevadm trigger <optional>options</optional></command>
31         </cmdsynopsis>
32         <cmdsynopsis>
33           <command>udevadm settle <optional>options</optional></command>
34         </cmdsynopsis>
35         <cmdsynopsis>
36           <command>udevadm control <optional>options</optional> <replaceable>instruction</replaceable></command>
37         </cmdsynopsis>
38         <cmdsynopsis>
39           <command>udevadm monitor <optional>options</optional></command>
40         </cmdsynopsis>
41         <cmdsynopsis>
42           <command>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></command>
43         </cmdsynopsis>
44         <cmdsynopsis>
45           <command>udevadm version</command>
46         </cmdsynopsis>
47         <cmdsynopsis>
48           <command>udevadm help</command>
49         </cmdsynopsis>
50       </refsynopsisdiv>
51
52       <refsect1><title>DESCRIPTION</title>
53         <para>udevadm expects a command and command specific options.  It
54         controls the runtime behavior of udev, request kernel events,
55         manages the event queue, and provides simple debugging mechanisms.</para>
56       </refsect1>
57
58       <refsect1><title>OPTIONS</title>
59
60         <refsect2><title>udevadm info</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>
65           <variablelist>
66             <varlistentry>
67               <term><option>--query=<replaceable>type</replaceable></option></term>
68               <listitem>
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>
74               </listitem>
75             </varlistentry>
76             <varlistentry>
77               <term><option>--path=<replaceable>devpath</replaceable></option></term>
78               <listitem>
79                 <para>The devpath of the device to query.</para>
80               </listitem>
81             </varlistentry>
82             <varlistentry>
83               <term><option>--name=<replaceable>node</replaceable></option></term>
84               <listitem>
85                 <para>The name of the device node or a symlink to query</para>
86               </listitem>
87             </varlistentry>
88             <varlistentry>
89               <term><option>--root</option></term>
90               <listitem>
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>
94               </listitem>
95             </varlistentry>
96             <varlistentry>
97               <term><option>--attribute-walk</option></term>
98               <listitem>
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>
102               </listitem>
103             </varlistentry>
104             <varlistentry>
105               <term><option>--export-db</option></term>
106               <listitem>
107                 <para>Export the content of the udev database.</para>
108               </listitem>
109             </varlistentry>
110             <varlistentry>
111               <term><option>--version</option></term>
112               <listitem>
113                 <para>Print version.</para>
114               </listitem>
115             </varlistentry>
116             <varlistentry>
117               <term><option>--help</option></term>
118               <listitem>
119                 <para>Print help text.</para>
120               </listitem>
121             </varlistentry>
122           </variablelist>
123         </refsect2>
124
125         <refsect2><title>udevadm trigger</title>
126           <para>Request kernel device uevents, usually used to replay events at system coldplug.</para>
127           <variablelist>
128             <varlistentry>
129               <term><option>--verbose</option></term>
130               <listitem>
131                 <para>Print the list of devices which will be triggered.</para>
132               </listitem>
133             </varlistentry>
134             <varlistentry>
135               <term><option>--dry-run</option></term>
136               <listitem>
137                 <para>Do not actually trigger the event.</para>
138               </listitem>
139             </varlistentry>
140             <varlistentry>
141               <term><option>--retry-failed</option></term>
142               <listitem>
143                 <para>Trigger only the events which are failed during a previous run.</para>
144               </listitem>
145             </varlistentry>
146             <varlistentry>
147               <term><option>--action=<replaceable>action</replaceable></option></term>
148               <listitem>
149                 <para>Type of event to be triggered. The default value is "add".</para>
150               </listitem>
151             </varlistentry>
152             <varlistentry>
153               <term><option>--subsystem-match=<replaceable>subsystem</replaceable></option></term>
154               <listitem>
155                 <para>Trigger events for devices which belong to a matching subsystem. This option
156                 can be specified multiple times and supports shell style pattern matching.</para>
157               </listitem>
158             </varlistentry>
159             <varlistentry>
160               <term><option>--subsystem-nomatch=<replaceable>subsystem</replaceable></option></term>
161               <listitem>
162                 <para>Do not 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>
164               </listitem>
165             </varlistentry>
166             <varlistentry>
167               <term><option>--attr-match=<replaceable>attribute=value</replaceable></option></term>
168               <listitem>
169                 <para>Trigger events for devices with a matching sysfs attribute. If a value is specified
170                 along with the attribute name, the content of the attribute is matched against the given
171                 value using shell style pattern matching. If no value is specified, the existence of the
172                 sysfs attribute is checked. This option can be specified multiple times.</para>
173               </listitem>
174             </varlistentry>
175             <varlistentry>
176               <term><option>--attr-nomatch<replaceable>attribute=value</replaceable></option></term>
177               <listitem>
178                 <para>Do not trigger events for devices with a matching sysfs attribute. If a value is
179                 specified along with the attribute name, the content of the attribute is matched against
180                 the given value using shell style pattern matching. If no value is specified, the existence
181                 of the sysfs attribute is checked. This option can be specified multiple times.</para>
182               </listitem>
183             </varlistentry>
184           </variablelist>
185         </refsect2>
186
187         <refsect2><title>udevadm settle</title>
188           <para>Watches the udev event queue, and exits if all current events are handled.</para>
189           <variablelist>
190             <varlistentry>
191               <term><option>--timeout=<replaceable>seconds</replaceable></option></term>
192               <listitem>
193                 <para>Maximum seconds to wait for the queue to become empty.</para>
194               </listitem>
195             </varlistentry>
196             <varlistentry>
197               <term><option>--help</option></term>
198               <listitem>
199                 <para>Print help text.</para>
200               </listitem>
201             </varlistentry>
202           </variablelist>
203         </refsect2>
204
205         <refsect2><title>udevadm control <replaceable>instruction</replaceable></title>
206           <para>Modify the internal state of the running udev daemon.</para>
207           <variablelist>
208             <varlistentry>
209               <term><option>log_priority=<replaceable>value</replaceable></option></term>
210               <listitem>
211                 <para>Set the internal log level of udevd. Valid values are the numerical
212                 syslog priorities or their textual representations: <option>err</option>,
213                 <option>info</option> and <option>debug</option>.</para>
214               </listitem>
215             </varlistentry>
216             <varlistentry>
217               <term><option>stop_exec_queue</option></term>
218               <listitem>
219                 <para>Signal udevd to stop executing new events. Incoming events
220                 will be queued.</para>
221               </listitem>
222             </varlistentry>
223             <varlistentry>
224               <term><option>start_exec_queue</option></term>
225               <listitem>
226                 <para>Signal udevd to enable the execution of events.</para>
227               </listitem>
228             </varlistentry>
229             <varlistentry>
230               <term><option>reload_rules</option></term>
231               <listitem>
232                 <para>Signal udevd to reload the rules from the config.</para>
233               </listitem>
234             </varlistentry>
235             <varlistentry>
236               <term><option>env <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term>
237               <listitem>
238                 <para>Set global variable.</para>
239               </listitem>
240             </varlistentry>
241             <varlistentry>
242               <term><option>max_childs</option></term>
243               <listitem>
244                 <para>Set the maximum number of events, udevd will handle at the
245                 same time.</para>
246               </listitem>
247             </varlistentry>
248             <varlistentry>
249               <term><option>max_childs_running</option></term>
250               <listitem>
251                 <para>Set the maximum number of events, which are allowed to run at the
252                 same time.</para>
253               </listitem>
254             </varlistentry>
255             <varlistentry>
256               <term><option>help</option></term>
257               <listitem>
258                 <para>Print help text.</para>
259               </listitem>
260             </varlistentry>
261           </variablelist>
262         </refsect2>
263
264         <refsect2><title>udevadm monitor</title>
265           <para>Listens to the kernel uevents and events sent out by a udev rule
266           and prints the devpath of the event to the console. It can be used to analyze the
267           event timing, by comparing the timestamps of the kernel uevent and the udev event.
268           </para>
269           <variablelist>
270             <varlistentry>
271               <term><option>--environment</option></term>
272               <listitem>
273                 <para>Print the complete environment for all events. Can be used to compare the
274                 kernel supplied and the udev added environment values.</para>
275               </listitem>
276             </varlistentry>
277             <varlistentry>
278               <term><option>--kernel</option></term>
279               <listitem>
280                 <para>Print the kernel uevents.</para>
281               </listitem>
282             </varlistentry>
283             <varlistentry>
284               <term><option>--udev</option></term>
285               <listitem>
286                 <para>Print the udev event after the rule processing.</para>
287               </listitem>
288             </varlistentry>
289             <varlistentry>
290               <term><option>--help</option></term>
291               <listitem>
292                 <para>Print help text.</para>
293               </listitem>
294             </varlistentry>
295           </variablelist>
296         </refsect2>
297
298         <refsect2><title>udevadm test</title>
299           <para>Simulate a udev event run for the given device, and print out debug
300           output. Unless forced to, no device node or symlink will be created.</para>
301           <variablelist>
302             <varlistentry>
303               <term><option>--action=<replaceable>string</replaceable></option></term>
304               <listitem>
305                 <para>The action string.</para>
306               </listitem>
307             </varlistentry>
308             <varlistentry>
309               <term><option>--subsystem=<replaceable>string</replaceable></option></term>
310               <listitem>
311                 <para>The subsystem string.</para>
312               </listitem>
313             </varlistentry>
314             <varlistentry>
315               <term><option>--force</option></term>
316               <listitem>
317                 <para>Force the creation of a device node or symlink. Usually the test run
318                 prints only debug output.</para>
319               </listitem>
320             </varlistentry>
321             <varlistentry>
322               <term><option>--help</option></term>
323               <listitem>
324                 <para>Print help text.</para>
325               </listitem>
326             </varlistentry>
327           </variablelist>
328         </refsect2>
329
330         <refsect2><title>udevadm version</title>
331           <para>Print version number.</para>
332         </refsect2>
333
334         <refsect2><title>udevadm help</title>
335           <para>Print help text.</para>
336         </refsect2>
337       </refsect1>
338
339       <refsect1><title>AUTHOR</title>
340         <para>Written by Kay Sievers <email>kay.sievers@vrfy.org</email>.</para>
341       </refsect1>
342
343       <refsect1>
344         <title>SEE ALSO</title>
345         <para><citerefentry>
346             <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
347         </citerefentry>
348         <citerefentry>
349             <refentrytitle>udevd</refentrytitle><manvolnum>8</manvolnum>
350         </citerefentry></para>
351       </refsect1>
352     </refentry>
353   </section>
354 </article>