Ticket #3317: udevadm.8

File udevadm.8, 10.6 KB (added by bdubbs@…, 12 years ago)
Line 
1'\" t
2.TH "UDEVADM" "8" "" "systemd 199" "udevadm"
3.\" -----------------------------------------------------------------
4.\" * Define some portability stuff
5.\" -----------------------------------------------------------------
6.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7.\" http://bugs.debian.org/507673
8.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10.ie \n(.g .ds Aq \(aq
11.el .ds Aq '
12.\" -----------------------------------------------------------------
13.\" * set default formatting
14.\" -----------------------------------------------------------------
15.\" disable hyphenation
16.nh
17.\" disable justification (adjust text to left margin only)
18.ad l
19.\" -----------------------------------------------------------------
20.\" * MAIN CONTENT STARTS HERE *
21.\" -----------------------------------------------------------------
22.SH "NAME"
23udevadm \- udev management tool
24.SH "SYNOPSIS"
25.HP \w'\fBudevadm\fR\ 'u
26\fBudevadm\fR [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
27.HP \w'\fBudevadm\ info\ \fR\fB\fIoptions\fR\fR\ 'u
28\fBudevadm info \fR\fB\fIoptions\fR\fR
29.HP \w'\fBudevadm\ trigger\ \fR\fB[options]\fR\ 'u
30\fBudevadm trigger \fR\fB[options]\fR
31.HP \w'\fBudevadm\ settle\ \fR\fB[options]\fR\ 'u
32\fBudevadm settle \fR\fB[options]\fR
33.HP \w'\fBudevadm\ control\ \fR\fB\fIcommand\fR\fR\ 'u
34\fBudevadm control \fR\fB\fIcommand\fR\fR
35.HP \w'\fBudevadm\ monitor\ \fR\fB[options]\fR\ 'u
36\fBudevadm monitor \fR\fB[options]\fR
37.HP \w'\fBudevadm\ hwdb\ \fR\fB[options]\fR\ 'u
38\fBudevadm hwdb \fR\fB[options]\fR
39.HP \w'\fBudevadm\ test\ \fR\fB[options]\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u
40\fBudevadm test \fR\fB[options]\fR\fB \fR\fB\fIdevpath\fR\fR
41.HP \w'\fBudevadm\ test\-builtin\ \fR\fB[options]\fR\fB\ \fR\fB\fIcommand\fR\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u
42\fBudevadm test\-builtin \fR\fB[options]\fR\fB \fR\fB\fIcommand\fR\fR\fB \fR\fB\fIdevpath\fR\fR
43.SH "DESCRIPTION"
44.PP
45udevadm expects a command and command specific options\&. It controls the runtime behavior of udev, requests kernel events, manages the event queue, and provides simple debugging mechanisms\&.
46.SH "OPTIONS"
47.PP
48\fB\-\-debug\fR
49.RS 4
50Print debug messages to stderr\&.
51.RE
52.PP
53\fB\-\-version\fR
54.RS 4
55Print version number\&.
56.RE
57.PP
58\fB\-\-help\fR
59.RS 4
60Print help text\&.
61.RE
62.SS "udevadm info \fIoptions\fR"
63.PP
64Queries the udev database for device information stored in the udev database\&. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device\&.
65.PP
66\fB\-\-query=\fR\fB\fItype\fR\fR
67.RS 4
68Query the database for specified type of device data\&. It needs the
69\fB\-\-path\fR
70or
71\fB\-\-name\fR
72to identify the specified device\&. Valid queries are:
73\fBname\fR,
74\fBsymlink\fR,
75\fBpath\fR,
76\fBproperty\fR,
77\fBall\fR\&.
78.RE
79.PP
80\fB\-\-path=\fR\fB\fIdevpath\fR\fR
81.RS 4
82The devpath of the device to query\&.
83.RE
84.PP
85\fB\-\-name=\fR\fB\fIfile\fR\fR
86.RS 4
87The name of the device node or a symlink to query
88.RE
89.PP
90\fB\-\-root\fR
91.RS 4
92Print absolute paths in
93\fBname\fR
94or
95\fBsymlink\fR
96query\&.
97.RE
98.PP
99\fB\-\-attribute\-walk\fR
100.RS 4
101Print all sysfs properties of the specified device that can be used in udev rules to match the specified device\&. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules\&.
102.RE
103.PP
104\fB\-\-export\fR
105.RS 4
106Print output as key/value pairs\&. Values are enclosed in single quotes\&.
107.RE
108.PP
109\fB\-\-export\-prefix=\fR\fB\fIname\fR\fR
110.RS 4
111Add a prefix to the key name of exported values\&.
112.RE
113.PP
114\fB\-\-device\-id\-of\-file=\fR\fB\fIfile\fR\fR
115.RS 4
116Print major/minor numbers of the underlying device, where the file lives on\&.
117.RE
118.PP
119\fB\-\-export\-db\fR
120.RS 4
121Export the content of the udev database\&.
122.RE
123.PP
124\fB\-\-cleanup\-db\fR
125.RS 4
126Cleanup the udev database\&.
127.RE
128.PP
129\fB\-\-version\fR
130.RS 4
131Print version\&.
132.RE
133.PP
134\fB\-\-help\fR
135.RS 4
136Print help text\&.
137.RE
138.SS "udevadm trigger [options]"
139.PP
140Request device events from the kernel\&. Primarily used to replay events at system coldplug time\&.
141.PP
142\fB\-\-verbose\fR
143.RS 4
144Print the list of devices which will be triggered\&.
145.RE
146.PP
147\fB\-\-dry\-run\fR
148.RS 4
149Do not actually trigger the event\&.
150.RE
151.PP
152\fB\-\-type=\fR\fB\fItype\fR\fR
153.RS 4
154Trigger a specific type of devices\&. Valid types are:
155\fBdevices\fR,
156\fBsubsystems\fR\&. The default value is
157\fBdevices\fR\&.
158.RE
159.PP
160\fB\-\-action=\fR\fB\fIaction\fR\fR
161.RS 4
162Type of event to be triggered\&. The default value is
163\fBchange\fR\&.
164.RE
165.PP
166\fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR
167.RS 4
168Trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&.
169.RE
170.PP
171\fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR
172.RS 4
173Do not trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&.
174.RE
175.PP
176\fB\-\-attr\-match=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
177.RS 4
178Trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&.
179.RE
180.PP
181\fB\-\-attr\-nomatch=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
182.RS 4
183Do not trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&.
184.RE
185.PP
186\fB\-\-property\-match=\fR\fB\fIproperty\fR\fR\fB=\fR\fB\fIvalue\fR\fR
187.RS 4
188Trigger events for devices with a matching property value\&. This option can be specified multiple times and supports shell style pattern matching\&.
189.RE
190.PP
191\fB\-\-tag\-match=\fR\fB\fIproperty\fR\fR
192.RS 4
193Trigger events for devices with a matching tag\&. This option can be specified multiple times\&.
194.RE
195.PP
196\fB\-\-sysname\-match=\fR\fB\fIname\fR\fR
197.RS 4
198Trigger events for devices with a matching sys device name\&. This option can be specified multiple times and supports shell style pattern matching\&.
199.RE
200.PP
201\fB\-\-parent\-match=\fR\fB\fIsyspath\fR\fR
202.RS 4
203Trigger events for all children of a given device\&.
204.RE
205.SS "udevadm settle [options]"
206.PP
207Watches the udev event queue, and exits if all current events are handled\&.
208.PP
209\fB\-\-timeout=\fR\fB\fIseconds\fR\fR
210.RS 4
211Maximum number of seconds to wait for the event queue to become empty\&. The default value is 120 seconds\&. A value of 0 will check if the queue is empty and always return immediately\&.
212.RE
213.PP
214\fB\-\-seq\-start=\fR\fB\fIseqnum\fR\fR
215.RS 4
216Wait only for events after the given sequence number\&.
217.RE
218.PP
219\fB\-\-seq\-end=\fR\fB\fIseqnum\fR\fR
220.RS 4
221Wait only for events before the given sequence number\&.
222.RE
223.PP
224\fB\-\-exit\-if\-exists=\fR\fB\fIfile\fR\fR
225.RS 4
226Stop waiting if file exists\&.
227.RE
228.PP
229\fB\-\-quiet\fR
230.RS 4
231Do not print any output, like the remaining queue entries when reaching the timeout\&.
232.RE
233.PP
234\fB\-\-help\fR
235.RS 4
236Print help text\&.
237.RE
238.SS "udevadm control \fIcommand\fR"
239.PP
240Modify the internal state of the running udev daemon\&.
241.PP
242\fB\-\-exit\fR
243.RS 4
244Signal and wait for udevd to exit\&.
245.RE
246.PP
247\fB\-\-log\-priority=\fR\fB\fIvalue\fR\fR
248.RS 4
249Set the internal log level of udevd\&. Valid values are the numerical syslog priorities or their textual representations:
250\fBerr\fR,
251\fBinfo\fR
252and
253\fBdebug\fR\&.
254.RE
255.PP
256\fB\-\-stop\-exec\-queue\fR
257.RS 4
258Signal udevd to stop executing new events\&. Incoming events will be queued\&.
259.RE
260.PP
261\fB\-\-start\-exec\-queue\fR
262.RS 4
263Signal udevd to enable the execution of events\&.
264.RE
265.PP
266\fB\-\-reload\fR
267.RS 4
268Signal udevd to reload the rules files and other databases like the kernel module index\&. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events\&.
269.RE
270.PP
271\fB\-\-property=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR
272.RS 4
273Set a global property for all events\&.
274.RE
275.PP
276\fB\-\-children\-max=\fR\fIvalue\fR
277.RS 4
278Set the maximum number of events, udevd will handle at the same time\&.
279.RE
280.PP
281\fB\-\-timeout=\fR\fIseconds\fR
282.RS 4
283The maximum number of seconds to wait for a reply from udevd\&.
284.RE
285.PP
286\fB\-\-help\fR
287.RS 4
288Print help text\&.
289.RE
290.SS "udevadm monitor [options]"
291.PP
292Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\&. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\&.
293.PP
294\fB\-\-kernel\fR
295.RS 4
296Print the kernel uevents\&.
297.RE
298.PP
299\fB\-\-udev\fR
300.RS 4
301Print the udev event after the rule processing\&.
302.RE
303.PP
304\fB\-\-property\fR
305.RS 4
306Also print the properties of the event\&.
307.RE
308.PP
309\fB\-\-subsystem\-match=\fR\fB\fIstring[/string]\fR\fR
310.RS 4
311Filter events by subsystem[/devtype]\&. Only udev events with a matching subsystem value will pass\&.
312.RE
313.PP
314\fB\-\-tag\-match=\fR\fB\fIstring\fR\fR
315.RS 4
316Filter events by property\&. Only udev events with a given tag attached will pass\&.
317.RE
318.PP
319\fB\-\-help\fR
320.RS 4
321Print help text\&.
322.RE
323.SS "udevadm hwdb [options]"
324.PP
325Maintain the hardware database index in
326/etc/udev/hwdb\&.bin\&.
327.PP
328\fB\-\-update\fR
329.RS 4
330Compile the hardware database information located in /usr/lib/udev/hwdb\&.d/, /etc/udev/hwdb\&.d/ and store it in
331/etc/udev/hwdb\&.bin\&. This should be done after any update to the source files; it will not be called automatically\&. The running udev daemon will detect a new database on its own and does not need to be notified about it\&.
332.RE
333.PP
334\fB\-\-test=\fR\fB\fIstring\fR\fR
335.RS 4
336Query the database with a modalias string, and print the retrieved properties\&.
337.RE
338.PP
339\fB\-\-root=\fR\fB\fIstring\fR\fR
340.RS 4
341Alternative root path in the filesystem for reading and writing files\&.
342.RE
343.SS "udevadm test [options] \fIdevpath\fR"
344.PP
345Simulate a udev event run for the given device, and print debug output\&.
346.PP
347\fB\-\-action=\fR\fB\fIstring\fR\fR
348.RS 4
349The action string\&.
350.RE
351.PP
352\fB\-\-subsystem=\fR\fB\fIstring\fR\fR
353.RS 4
354The subsystem string\&.
355.RE
356.PP
357\fB\-\-help\fR
358.RS 4
359Print help text\&.
360.RE
361.SS "udevadm test\-builtin [options] \fIcommand\fR \fIdevpath\fR"
362.PP
363Run a built\-in command for the given device, and print debug output\&.
364.PP
365\fB\-\-help\fR
366.RS 4
367Print help text\&.
368.RE
369.SH "SEE ALSO"
370.PP
371\fBudev\fR(7)
372\fBudevd.service\fR(8)