chiark / gitweb /
rules_generator: add missing write_net_rules unlock
[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 kernel 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           </variablelist>
192         </refsect2>
193
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>
196           <variablelist>
197             <varlistentry>
198               <term><option>--timeout=<replaceable>seconds</replaceable></option></term>
199               <listitem>
200                 <para>Maximum number of seconds to wait for the event queue to become empty.
201                 The default value is 180 seconds.</para>
202               </listitem>
203             </varlistentry>
204             <varlistentry>
205               <term><option>--help</option></term>
206               <listitem>
207                 <para>Print help text.</para>
208               </listitem>
209             </varlistentry>
210           </variablelist>
211         </refsect2>
212
213         <refsect2><title>udevadm control <replaceable>command</replaceable></title>
214           <para>Modify the internal state of the running udev daemon.</para>
215           <variablelist>
216             <varlistentry>
217               <term><option>--log_priority=<replaceable>value</replaceable></option></term>
218               <listitem>
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>
222               </listitem>
223             </varlistentry>
224             <varlistentry>
225               <term><option>--stop_exec_queue</option></term>
226               <listitem>
227                 <para>Signal udevd to stop executing new events. Incoming events
228                 will be queued.</para>
229               </listitem>
230             </varlistentry>
231             <varlistentry>
232               <term><option>--start_exec_queue</option></term>
233               <listitem>
234                 <para>Signal udevd to enable the execution of events.</para>
235               </listitem>
236             </varlistentry>
237             <varlistentry>
238               <term><option>--reload_rules</option></term>
239               <listitem>
240                 <para>Signal udevd to reload the rules from the config.</para>
241               </listitem>
242             </varlistentry>
243             <varlistentry>
244               <term><option>--env <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term>
245               <listitem>
246                 <para>Set global variable.</para>
247               </listitem>
248             </varlistentry>
249             <varlistentry>
250               <term><option>--max_childs</option></term>
251               <listitem>
252                 <para>Set the maximum number of events, udevd will handle at the
253                 same time.</para>
254               </listitem>
255             </varlistentry>
256             <varlistentry>
257               <term><option>--max_childs_running</option></term>
258               <listitem>
259                 <para>Set the maximum number of events, which are allowed to run at the
260                 same time.</para>
261               </listitem>
262             </varlistentry>
263             <varlistentry>
264               <term><option>--help</option></term>
265               <listitem>
266                 <para>Print help text.</para>
267               </listitem>
268             </varlistentry>
269           </variablelist>
270         </refsect2>
271
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.
276           </para>
277           <variablelist>
278             <varlistentry>
279               <term><option>--environment</option></term>
280               <listitem>
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>
283               </listitem>
284             </varlistentry>
285             <varlistentry>
286               <term><option>--kernel</option></term>
287               <listitem>
288                 <para>Print the kernel uevents.</para>
289               </listitem>
290             </varlistentry>
291             <varlistentry>
292               <term><option>--udev</option></term>
293               <listitem>
294                 <para>Print the udev event after the rule processing.</para>
295               </listitem>
296             </varlistentry>
297             <varlistentry>
298               <term><option>--help</option></term>
299               <listitem>
300                 <para>Print help text.</para>
301               </listitem>
302             </varlistentry>
303           </variablelist>
304         </refsect2>
305
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>
309           <variablelist>
310             <varlistentry>
311               <term><option>--action=<replaceable>string</replaceable></option></term>
312               <listitem>
313                 <para>The action string.</para>
314               </listitem>
315             </varlistentry>
316             <varlistentry>
317               <term><option>--subsystem=<replaceable>string</replaceable></option></term>
318               <listitem>
319                 <para>The subsystem string.</para>
320               </listitem>
321             </varlistentry>
322             <varlistentry>
323               <term><option>--force</option></term>
324               <listitem>
325                 <para>Force the creation of a device node or symlink. Usually the test run
326                 prints only debug output.</para>
327               </listitem>
328             </varlistentry>
329             <varlistentry>
330               <term><option>--help</option></term>
331               <listitem>
332                 <para>Print help text.</para>
333               </listitem>
334             </varlistentry>
335           </variablelist>
336         </refsect2>
337
338         <refsect2><title>udevadm version</title>
339           <para>Print version number.</para>
340         </refsect2>
341
342         <refsect2><title>udevadm help</title>
343           <para>Print help text.</para>
344         </refsect2>
345       </refsect1>
346
347       <refsect1><title>AUTHOR</title>
348         <para>Written by Kay Sievers <email>kay.sievers@vrfy.org</email>.</para>
349       </refsect1>
350
351       <refsect1>
352         <title>SEE ALSO</title>
353         <para><citerefentry>
354             <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
355         </citerefentry>
356         <citerefentry>
357             <refentrytitle>udevd</refentrytitle><manvolnum>8</manvolnum>
358         </citerefentry></para>
359       </refsect1>
360     </refentry>
361   </section>
362 </article>