chiark / gitweb /
add substitution in MODE= field
[elogind.git] / udevadm.8
1 .\"     Title: udevadm
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4 .\"      Date: November 2007
5 .\"    Manual: udevadm
6 .\"    Source: udev
7 .\"
8 .TH "UDEVADM" "8" "November 2007" "udev" "udevadm"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 udevadm - udev management tool
15 .SH "SYNOPSIS"
16 .HP 21
17 \fBudevadm info \fR\fB[options]\fR
18 .HP 24
19 \fBudevadm trigger \fR\fB[options]\fR
20 .HP 23
21 \fBudevadm settle \fR\fB[options]\fR
22 .HP 36
23 \fBudevadm control \fR\fB[options]\fR\fB \fR\fB\fIinstruction\fR\fR
24 .HP 24
25 \fBudevadm monitor \fR\fB[options]\fR
26 .HP 29
27 \fBudevadm test \fR\fB[options]\fR\fB \fR\fB\fIdevpath\fR\fR
28 .HP 16
29 \fBudevadm version\fR
30 .HP 13
31 \fBudevadm help\fR
32 .SH "DESCRIPTION"
33 .PP
34 udevadm 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\.
35 .SH "OPTIONS"
36 .SS "udevadm info \fIoptions\fR"
37 .PP
38 Queries 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\.
39 .PP
40 \fB\-\-query=\fR\fB\fItype\fR\fR
41 .RS 4
42 Query the database for specified type of device data\. It needs the
43 \fB\-\-path\fR
44 or
45 \fB\-\-name\fR
46 to identify the specified device\. Valid queries are:
47 \fBname\fR,
48 \fBsymlink\fR,
49 \fBpath\fR,
50 \fBenv\fR,
51 \fBall\fR\.
52 .RE
53 .PP
54 \fB\-\-path=\fR\fB\fIdevpath\fR\fR
55 .RS 4
56 The devpath of the device to query\.
57 .RE
58 .PP
59 \fB\-\-name=\fR\fB\fIfile\fR\fR
60 .RS 4
61 The name of the device node or a symlink to query
62 .RE
63 .PP
64 \fB\-\-root\fR
65 .RS 4
66 The udev root directory:
67 \fI/dev\fR\. If used in conjunction with a
68 \fBname\fR
69 or
70 \fBsymlink\fR
71 query, the query returns the absolute path including the root directory\.
72 .RE
73 .PP
74 \fB\-\-attribute\-walk\fR
75 .RS 4
76 Print 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\.
77 .RE
78 .PP
79 \fB\-\-device\-id\-of\-file=\fR\fB\fIfile\fR\fR
80 .RS 4
81 Print major/minor numbers of the underlying device, where the file lives on\.
82 .RE
83 .PP
84 \fB\-\-export\-db\fR
85 .RS 4
86 Export the content of the udev database\.
87 .RE
88 .PP
89 \fB\-\-version\fR
90 .RS 4
91 Print version\.
92 .RE
93 .PP
94 \fB\-\-help\fR
95 .RS 4
96 Print help text\.
97 .RE
98 .SS "udevadm trigger [options]"
99 .PP
100 Request device uevents, usually used to replay events at system coldplug\.
101 .PP
102 \fB\-\-verbose\fR
103 .RS 4
104 Print the list of devices which will be triggered\.
105 .RE
106 .PP
107 \fB\-\-dry\-run\fR
108 .RS 4
109 Do not actually trigger the event\.
110 .RE
111 .PP
112 \fB\-\-retry\-failed\fR
113 .RS 4
114 Trigger only the events which are failed during a previous run\.
115 .RE
116 .PP
117 \fB\-\-action=\fR\fB\fIaction\fR\fR
118 .RS 4
119 Type of event to be triggered\. The default value is "add"\.
120 .RE
121 .PP
122 \fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR
123 .RS 4
124 Trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\.
125 .RE
126 .PP
127 \fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR
128 .RS 4
129 Do not trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\.
130 .RE
131 .PP
132 \fB\-\-attr\-match=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
133 .RS 4
134 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\.
135 .RE
136 .PP
137 \fB\-\-attr\-nomatch=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
138 .RS 4
139 Do 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\.
140 .RE
141 .PP
142 \fB\-\-socket=\fR\fB\fIpath\fR\fR
143 .RS 4
144 Pass the synthesized events to the specified socket, instead of triggering a global kernel event\. All available event values will be send in the same format the kernel sends an uevent, or
145 \fBRUN+="socket:\fR\fB\fIpath\fR\fR\fB"\fR
146 sends a message\. If the first character of the specified path is an @ character, an abstract namespace socket is used, instead of an existing socket file\.
147 .RE
148 .PP
149 \fB\-\-env=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR
150 .RS 4
151 Pass an additional environemt key to the event\. This works only with the \-\-socket option\.
152 .RE
153 .SS "udevadm settle [options]"
154 .PP
155 Watches the udev event queue, and exits if all current events are handled\.
156 .PP
157 \fB\-\-timeout=\fR\fB\fIseconds\fR\fR
158 .RS 4
159 Maximum number of seconds to wait for the event queue to become empty\. The default value is 180 seconds\.
160 .RE
161 .PP
162 \fB\-\-help\fR
163 .RS 4
164 Print help text\.
165 .RE
166 .SS "udevadm control \fIcommand\fR"
167 .PP
168 Modify the internal state of the running udev daemon\.
169 .PP
170 \fB\-\-log_priority=\fR\fB\fIvalue\fR\fR
171 .RS 4
172 Set the internal log level of udevd\. Valid values are the numerical syslog priorities or their textual representations:
173 \fBerr\fR,
174 \fBinfo\fR
175 and
176 \fBdebug\fR\.
177 .RE
178 .PP
179 \fB\-\-stop_exec_queue\fR
180 .RS 4
181 Signal udevd to stop executing new events\. Incoming events will be queued\.
182 .RE
183 .PP
184 \fB\-\-start_exec_queue\fR
185 .RS 4
186 Signal udevd to enable the execution of events\.
187 .RE
188 .PP
189 \fB\-\-reload_rules\fR
190 .RS 4
191 Signal udevd to reload the rules from the config\.
192 .RE
193 .PP
194 \fB\-\-env=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR
195 .RS 4
196 Set global variable\.
197 .RE
198 .PP
199 \fB\-\-max_childs=\fR\fIvalue\fR
200 .RS 4
201 Set the maximum number of events, udevd will handle at the same time\.
202 .RE
203 .PP
204 \fB\-\-max_childs_running=\fR\fB\fIvalue\fR\fR
205 .RS 4
206 Set the maximum number of events, which are allowed to run at the same time\.
207 .RE
208 .PP
209 \fB\-\-help\fR
210 .RS 4
211 Print help text\.
212 .RE
213 .SS "udevadm monitor [options]"
214 .PP
215 Listens 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\.
216 .PP
217 \fB\-\-environment\fR
218 .RS 4
219 Print the complete environment for all events\. Can be used to compare the kernel supplied and the udev added environment values\.
220 .RE
221 .PP
222 \fB\-\-kernel\fR
223 .RS 4
224 Print the kernel uevents\.
225 .RE
226 .PP
227 \fB\-\-udev\fR
228 .RS 4
229 Print the udev event after the rule processing\.
230 .RE
231 .PP
232 \fB\-\-help\fR
233 .RS 4
234 Print help text\.
235 .RE
236 .SS "udevadm test [options] \fIdevpath\fR"
237 .PP
238 Simulate a udev event run for the given device, and print out debug output\. Unless forced to, no device node or symlink will be created\.
239 .PP
240 \fB\-\-action=\fR\fB\fIstring\fR\fR
241 .RS 4
242 The action string\.
243 .RE
244 .PP
245 \fB\-\-subsystem=\fR\fB\fIstring\fR\fR
246 .RS 4
247 The subsystem string\.
248 .RE
249 .PP
250 \fB\-\-force\fR
251 .RS 4
252 Force the creation of a device node or symlink\. Usually the test run prints only debug output\.
253 .RE
254 .PP
255 \fB\-\-help\fR
256 .RS 4
257 Print help text\.
258 .RE
259 .SS "udevadm version"
260 .PP
261 Print version number\.
262 .SS "udevadm help"
263 .PP
264 Print help text\.
265 .SH "AUTHOR"
266 .PP
267 Written by Kay Sievers
268 <kay\.sievers@vrfy\.org>\.
269 .SH "SEE ALSO"
270 .PP
271 \fBudev\fR(7)
272 \fBudevd\fR(8)