1UDEVADM(8) udevadm UDEVADM(8)
2
3
4
6 udevadm - udev management tool
7
9 udevadm [--debug] [--version] [--help]
10
11 udevadm info options
12
13 udevadm trigger [options]
14
15 udevadm settle [options]
16
17 udevadm control command
18
19 udevadm monitor [options]
20
21 udevadm test [options] devpath
22
23 udevadm test-builtin [options] command devpath
24
26 udevadm expects a command and command specific options. It controls the
27 runtime behavior of systemd-udevd, requests kernel events, manages the
28 event queue, and provides simple debugging mechanisms.
29
31 --debug
32 Print debug messages to standard error.
33
34 --version
35 Print version number.
36
37 -h, --help
38 Print help text.
39
40 udevadm info [options] [devpath|file]
41 Queries the udev database for device information stored in the udev
42 database. It can also query the properties of a device from its sysfs
43 representation to help creating udev rules that match this device.
44
45 -q, --query=TYPE
46 Query the database for the specified type of device data. It needs
47 the --path or --name to identify the specified device. Valid TYPEs
48 are: name, symlink, path, property, all.
49
50 -p, --path=DEVPATH
51 The /sys path of the device to query, e.g. [/sys]/class/block/sda.
52 Note that this option usually is not very useful, since udev can
53 guess the type of the argument, so udevadm
54 --devpath=/class/block/sda is equivalent to udevadm
55 /sys/class/block/sda.
56
57 -n, --name=FILE
58 The name of the device node or a symlink to query, e.g.
59 [/dev]/sda. Note that this option usually is not very useful, since
60 udev can guess the type of the argument, so udevadm --name=sda is
61 equivalent to udevadm /dev/sda.
62
63 -r, --root
64 Print absolute paths in name or symlink query.
65
66 -a, --attribute-walk
67 Print all sysfs properties of the specified device that can be used
68 in udev rules to match the specified device. It prints all devices
69 along the chain, up to the root of sysfs that can be used in udev
70 rules.
71
72 -x, --export
73 Print output as key/value pairs. Values are enclosed in single
74 quotes.
75
76 -P, --export-prefix=NAME
77 Add a prefix to the key name of exported values.
78
79 -d, --device-id-of-file=FILE
80 Print major/minor numbers of the underlying device, where the file
81 lives on.
82
83 -e, --export-db
84 Export the content of the udev database.
85
86 -c, --cleanup-db
87 Cleanup the udev database.
88
89 -h, --help
90 Print help text.
91
92 In addition an optional positional argument can be used to specify a
93 device name or a sys path. It must start with /dev or /sys
94 respectively.
95
96 udevadm trigger [options] [devpath|file...]
97 Request device events from the kernel. Primarily used to replay events
98 at system coldplug time.
99
100 -v, --verbose
101 Print the list of devices which will be triggered.
102
103 -n, --dry-run
104 Do not actually trigger the event.
105
106 -t, --type=TYPE
107 Trigger a specific type of devices. Valid types are: devices,
108 subsystems. The default value is devices.
109
110 -c, --action=ACTION
111 Type of event to be triggered. The default value is change.
112
113 -s, --subsystem-match=SUBSYSTEM
114 Trigger events for devices which belong to a matching subsystem.
115 This option can be specified multiple times and supports shell
116 style pattern matching.
117
118 -S, --subsystem-nomatch=SUBSYSTEM
119 Do not trigger events for devices which belong to a matching
120 subsystem. This option can be specified multiple times and supports
121 shell style pattern matching.
122
123 -a, --attr-match=ATTRIBUTE=VALUE
124 Trigger events for devices with a matching sysfs attribute. If a
125 value is specified along with the attribute name, the content of
126 the attribute is matched against the given value using shell style
127 pattern matching. If no value is specified, the existence of the
128 sysfs attribute is checked. This option can be specified multiple
129 times.
130
131 -A, --attr-nomatch=ATTRIBUTE=VALUE
132 Do not trigger events for devices with a matching sysfs attribute.
133 If a value is specified along with the attribute name, the content
134 of the attribute is matched against the given value using shell
135 style pattern matching. If no value is specified, the existence of
136 the sysfs attribute is checked. This option can be specified
137 multiple times.
138
139 -p, --property-match=PROPERTY=VALUE
140 Trigger events for devices with a matching property value. This
141 option can be specified multiple times and supports shell style
142 pattern matching.
143
144 -g, --tag-match=PROPERTY
145 Trigger events for devices with a matching tag. This option can be
146 specified multiple times.
147
148 -y, --sysname-match=PATH
149 Trigger events for devices with a matching sys device path. This
150 option can be specified multiple times and supports shell style
151 pattern matching.
152
153 --name-match=NAME
154 Trigger events for devices with a matching device path. This
155 options can be specified multiple times.
156
157 -b, --parent-match=SYSPATH
158 Trigger events for all children of a given device.
159
160 -h, --help
161 Print help text.
162
163 In addition optional positional arguments can be used to specify device
164 names or sys paths. They must start with /dev or /sys respectively.
165
166 udevadm settle [options]
167 Watches the udev event queue, and exits if all current events are
168 handled.
169
170 -t, --timeout=SECONDS
171 Maximum number of seconds to wait for the event queue to become
172 empty. The default value is 120 seconds. A value of 0 will check if
173 the queue is empty and always return immediately.
174
175 -E, --exit-if-exists=FILE
176 Stop waiting if file exists.
177
178 -h, --help
179 Print help text.
180
181 udevadm control command
182 Modify the internal state of the running udev daemon.
183
184 -e, --exit
185 Signal and wait for systemd-udevd to exit.
186
187 -l, --log-priority=value
188 Set the internal log level of systemd-udevd. Valid values are the
189 numerical syslog priorities or their textual representations:
190 emerg, alert, crit, err, warning, notice, info, and debug.
191
192 -s, --stop-exec-queue
193 Signal systemd-udevd to stop executing new events. Incoming events
194 will be queued.
195
196 -S, --start-exec-queue
197 Signal systemd-udevd to enable the execution of events.
198
199 -R, --reload
200 Signal systemd-udevd to reload the rules files and other databases
201 like the kernel module index. Reloading rules and databases does
202 not apply any changes to already existing devices; the new
203 configuration will only be applied to new events.
204
205 -p, --property=KEY=value
206 Set a global property for all events.
207
208 -m, --children-max=value
209 Set the maximum number of events, systemd-udevd will handle at the
210 same time.
211
212 --timeout=seconds
213 The maximum number of seconds to wait for a reply from
214 systemd-udevd.
215
216 -h, --help
217 Print help text.
218
219 udevadm monitor [options]
220 Listens to the kernel uevents and events sent out by a udev rule and
221 prints the devpath of the event to the console. It can be used to
222 analyze the event timing, by comparing the timestamps of the kernel
223 uevent and the udev event.
224
225 -k, --kernel
226 Print the kernel uevents.
227
228 -u, --udev
229 Print the udev event after the rule processing.
230
231 -p, --property
232 Also print the properties of the event.
233
234 -s, --subsystem-match=string[/string]
235 Filter events by subsystem[/devtype]. Only udev events with a
236 matching subsystem value will pass.
237
238 -t, --tag-match=string
239 Filter events by property. Only udev events with a given tag
240 attached will pass.
241
242 -h, --help
243 Print help text.
244
245 udevadm test [options] [devpath]
246 Simulate a udev event run for the given device, and print debug output.
247
248 -a, --action=string
249 The action string.
250
251 -N, --resolve-names=early|late|never
252 Specify when udevadm should resolve names of users and groups. When
253 set to early (the default), names will be resolved when the rules
254 are parsed. When set to late, names will be resolved for every
255 event. When set to never, names will never be resolved and all
256 devices will be owned by root.
257
258 -h, --help
259 Print help text.
260
261 udevadm test-builtin [options] [command] [devpath]
262 Run a built-in command COMMAND for device DEVPATH, and print debug
263 output.
264
265 -h, --help
266 Print help text.
267
269 udev(7), systemd-udevd.service(8)
270
271
272
273systemd 219 UDEVADM(8)