chiark / gitweb /
121c1401d6850a1ff0bdb6f5c15ea598e78add12
[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, requests 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 <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>
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>file</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>--device-id-of-file=<replaceable>file</replaceable></option></term>
106               <listitem>
107                 <para>Print major/minor numbers of the underlying device, where the file
108                 lives on.</para>
109               </listitem>
110             </varlistentry>
111             <varlistentry>
112               <term><option>--export-db</option></term>
113               <listitem>
114                 <para>Export the content of the udev database.</para>
115               </listitem>
116             </varlistentry>
117             <varlistentry>
118               <term><option>--version</option></term>
119               <listitem>
120                 <para>Print version.</para>
121               </listitem>
122             </varlistentry>
123             <varlistentry>
124               <term><option>--help</option></term>
125               <listitem>
126                 <para>Print help text.</para>
127               </listitem>
128             </varlistentry>
129           </variablelist>
130         </refsect2>
131
132         <refsect2><title>udevadm trigger <optional>options</optional></title>
133           <para>Request device uevents, usually used to replay events at system coldplug.</para>
134           <variablelist>
135             <varlistentry>
136               <term><option>--verbose</option></term>
137               <listitem>
138                 <para>Print the list of devices which will be triggered.</para>
139               </listitem>
140             </varlistentry>
141             <varlistentry>
142               <term><option>--dry-run</option></term>
143               <listitem>
144                 <para>Do not actually trigger the event.</para>
145               </listitem>
146             </varlistentry>
147             <varlistentry>
148               <term><option>--retry-failed</option></term>
149               <listitem>
150                 <para>Trigger only the events which are failed during a previous run.</para>
151               </listitem>
152             </varlistentry>
153             <varlistentry>
154               <term><option>--action=<replaceable>action</replaceable></option></term>
155               <listitem>
156                 <para>Type of event to be triggered. The default value is "add".</para>
157               </listitem>
158             </varlistentry>
159             <varlistentry>
160               <term><option>--subsystem-match=<replaceable>subsystem</replaceable></option></term>
161               <listitem>
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>
164               </listitem>
165             </varlistentry>
166             <varlistentry>
167               <term><option>--subsystem-nomatch=<replaceable>subsystem</replaceable></option></term>
168               <listitem>
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>
171               </listitem>
172             </varlistentry>
173             <varlistentry>
174               <term><option>--attr-match=<replaceable>attribute=value</replaceable></option></term>
175               <listitem>
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>
180               </listitem>
181             </varlistentry>
182             <varlistentry>
183               <term><option>--attr-nomatch<replaceable>attribute=value</replaceable></option></term>
184               <listitem>
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>
189               </listitem>
190             </varlistentry>
191             <varlistentry>
192               <term><option>--socket<replaceable>path</replaceable></option></term>
193               <listitem>
194                 <para>Pass the synthesized events to the specified socket, instead of triggering
195                 a global kernel event. All available event values will be send in the same format
196                 the kernel sends an uevent, or <option>RUN+="socket:<replaceable>path</replaceable>"</option>
197                 sends a message. If the first character of the specified path is an @ character,
198                 an abstract namespace socket is used, instead of an existing socket file.</para>
199               </listitem>
200             </varlistentry>
201           </variablelist>
202         </refsect2>
203
204         <refsect2><title>udevadm settle <optional>options</optional></title>
205           <para>Watches the udev event queue, and exits if all current events are handled.</para>
206           <variablelist>
207             <varlistentry>
208               <term><option>--timeout=<replaceable>seconds</replaceable></option></term>
209               <listitem>
210                 <para>Maximum number of seconds to wait for the event queue to become empty.
211                 The default value is 180 seconds.</para>
212               </listitem>
213             </varlistentry>
214             <varlistentry>
215               <term><option>--help</option></term>
216               <listitem>
217                 <para>Print help text.</para>
218               </listitem>
219             </varlistentry>
220           </variablelist>
221         </refsect2>
222
223         <refsect2><title>udevadm control <replaceable>command</replaceable></title>
224           <para>Modify the internal state of the running udev daemon.</para>
225           <variablelist>
226             <varlistentry>
227               <term><option>--log_priority=<replaceable>value</replaceable></option></term>
228               <listitem>
229                 <para>Set the internal log level of udevd. Valid values are the numerical
230                 syslog priorities or their textual representations: <option>err</option>,
231                 <option>info</option> and <option>debug</option>.</para>
232               </listitem>
233             </varlistentry>
234             <varlistentry>
235               <term><option>--stop_exec_queue</option></term>
236               <listitem>
237                 <para>Signal udevd to stop executing new events. Incoming events
238                 will be queued.</para>
239               </listitem>
240             </varlistentry>
241             <varlistentry>
242               <term><option>--start_exec_queue</option></term>
243               <listitem>
244                 <para>Signal udevd to enable the execution of events.</para>
245               </listitem>
246             </varlistentry>
247             <varlistentry>
248               <term><option>--reload_rules</option></term>
249               <listitem>
250                 <para>Signal udevd to reload the rules from the config.</para>
251               </listitem>
252             </varlistentry>
253             <varlistentry>
254               <term><option>--env <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term>
255               <listitem>
256                 <para>Set global variable.</para>
257               </listitem>
258             </varlistentry>
259             <varlistentry>
260               <term><option>--max_childs</option></term>
261               <listitem>
262                 <para>Set the maximum number of events, udevd will handle at the
263                 same time.</para>
264               </listitem>
265             </varlistentry>
266             <varlistentry>
267               <term><option>--max_childs_running</option></term>
268               <listitem>
269                 <para>Set the maximum number of events, which are allowed to run at the
270                 same time.</para>
271               </listitem>
272             </varlistentry>
273             <varlistentry>
274               <term><option>--help</option></term>
275               <listitem>
276                 <para>Print help text.</para>
277               </listitem>
278             </varlistentry>
279           </variablelist>
280         </refsect2>
281
282         <refsect2><title>udevadm monitor <optional>options</optional></title>
283           <para>Listens to the kernel uevents and events sent out by a udev rule
284           and prints the devpath of the event to the console. It can be used to analyze the
285           event timing, by comparing the timestamps of the kernel uevent and the udev event.
286           </para>
287           <variablelist>
288             <varlistentry>
289               <term><option>--environment</option></term>
290               <listitem>
291                 <para>Print the complete environment for all events. Can be used to compare the
292                 kernel supplied and the udev added environment values.</para>
293               </listitem>
294             </varlistentry>
295             <varlistentry>
296               <term><option>--kernel</option></term>
297               <listitem>
298                 <para>Print the kernel uevents.</para>
299               </listitem>
300             </varlistentry>
301             <varlistentry>
302               <term><option>--udev</option></term>
303               <listitem>
304                 <para>Print the udev event after the rule processing.</para>
305               </listitem>
306             </varlistentry>
307             <varlistentry>
308               <term><option>--help</option></term>
309               <listitem>
310                 <para>Print help text.</para>
311               </listitem>
312             </varlistentry>
313           </variablelist>
314         </refsect2>
315
316         <refsect2><title>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></title>
317           <para>Simulate a udev event run for the given device, and print out debug
318           output. Unless forced to, no device node or symlink will be created.</para>
319           <variablelist>
320             <varlistentry>
321               <term><option>--action=<replaceable>string</replaceable></option></term>
322               <listitem>
323                 <para>The action string.</para>
324               </listitem>
325             </varlistentry>
326             <varlistentry>
327               <term><option>--subsystem=<replaceable>string</replaceable></option></term>
328               <listitem>
329                 <para>The subsystem string.</para>
330               </listitem>
331             </varlistentry>
332             <varlistentry>
333               <term><option>--force</option></term>
334               <listitem>
335                 <para>Force the creation of a device node or symlink. Usually the test run
336                 prints only debug output.</para>
337               </listitem>
338             </varlistentry>
339             <varlistentry>
340               <term><option>--help</option></term>
341               <listitem>
342                 <para>Print help text.</para>
343               </listitem>
344             </varlistentry>
345           </variablelist>
346         </refsect2>
347
348         <refsect2><title>udevadm version</title>
349           <para>Print version number.</para>
350         </refsect2>
351
352         <refsect2><title>udevadm help</title>
353           <para>Print help text.</para>
354         </refsect2>
355       </refsect1>
356
357       <refsect1><title>AUTHOR</title>
358         <para>Written by Kay Sievers <email>kay.sievers@vrfy.org</email>.</para>
359       </refsect1>
360
361       <refsect1>
362         <title>SEE ALSO</title>
363         <para><citerefentry>
364             <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
365         </citerefentry>
366         <citerefentry>
367             <refentrytitle>udevd</refentrytitle><manvolnum>8</manvolnum>
368         </citerefentry></para>
369       </refsect1>
370     </refentry>
371   </section>
372 </article>