1UDEVADM(8)                          udevadm                         UDEVADM(8)
2
3
4

NAME

6       udevadm - udev management tool
7

SYNOPSIS

9       udevadm [--debug] [--version] [--help]
10
11       udevadm info [options] [devpath]
12
13       udevadm trigger [options] [devpath]
14
15       udevadm settle [options]
16
17       udevadm control option
18
19       udevadm monitor [options]
20
21       udevadm test [options] devpath
22
23       udevadm test-builtin [options] command devpath
24

DESCRIPTION

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

OPTIONS

31       -d, --debug
32           Print debug messages to standard error. This option is implied in
33           udevadm test and udevadm test-builtin commands.
34
35       -h, --help
36           Print a short help text and exit.
37
38   udevadm info [options] [devpath|file|unit...]
39       Query the udev database for device information.
40
41       Positional arguments should be used to specify one or more devices.
42       Each one may be a device name (in which case it must start with /dev/),
43       a sys path (in which case it must start with /sys/), or a systemd
44       device unit name (in which case it must end with ".device", see
45       systemd.device(5)).
46
47       -q, --query=TYPE
48           Query the database for the specified type of device data. Valid
49           TYPEs are: name, symlink, path, property, all.
50
51       --property=NAME
52           When showing device properties using the --query=property option,
53           limit display to properties specified in the argument. The argument
54           should be a comma-separated list of property names. If not
55           specified, all known properties are shown.
56
57       --value
58           When showing device properties using the --query=property option,
59           print only their values, and skip the property name and "=".
60
61           Cannot be used together with -x/--export or -P/--export-prefix.
62
63       -p, --path=DEVPATH
64           The /sys/ path of the device to query, e.g.
65           [/sys/]/class/block/sda. This option is an alternative to the
66           positional argument with a /sys/ prefix.  udevadm info
67           --path=/class/block/sda is equivalent to udevadm info
68           /sys/class/block/sda.
69
70       -n, --name=FILE
71           The name of the device node or a symlink to query, e.g.
72           [/dev/]/sda. This option is an alternative to the positional
73           argument with a /dev/ prefix.  udevadm info --name=sda is
74           equivalent to udevadm info /dev/sda.
75
76       -r, --root
77           Print absolute paths in name or symlink query.
78
79       -a, --attribute-walk
80           Print all sysfs properties of the specified device that can be used
81           in udev rules to match the specified device. It prints all devices
82           along the chain, up to the root of sysfs that can be used in udev
83           rules.
84
85       -x, --export
86           Print output as key/value pairs. Values are enclosed in single
87           quotes. This takes effects only when --query=property or
88           --device-id-of-file=FILE is specified.
89
90       -P, --export-prefix=NAME
91           Add a prefix to the key name of exported values. This implies
92           --export.
93
94       -d, --device-id-of-file=FILE
95           Print major/minor numbers of the underlying device, where the file
96           lives on. If this is specified, all positional arguments are
97           ignored.
98
99       -e, --export-db
100           Export the content of the udev database.
101
102       -c, --cleanup-db
103           Cleanup the udev database.
104
105       -w[SECONDS], --wait-for-initialization[=SECONDS]
106           Wait for device to be initialized. If argument SECONDS is not
107           specified, the default is to wait forever.
108
109       -h, --help
110           Print a short help text and exit.
111
112       The generated output shows the current device database entry in a terse
113       format. Each line shown is prefixed with one of the following
114       characters:
115
116       Table 1. udevadm info output prefixes
117       ┌───────┬─────────────────────────┐
118Prefix Meaning                 
119       ├───────┼─────────────────────────┤
120       │"P:"   │ Device path in /sys/    │
121       ├───────┼─────────────────────────┤
122       │"N:"   │ Kernel device node name │
123       ├───────┼─────────────────────────┤
124       │"L:"   │ Device node symlink     │
125       │       │ priority                │
126       ├───────┼─────────────────────────┤
127       │"S:"   │ Device node symlink     │
128       ├───────┼─────────────────────────┤
129       │"E:"   │ Device property         │
130       └───────┴─────────────────────────┘
131
132   udevadm trigger [options] [devpath|file|unit]
133       Request device events from the kernel. Primarily used to replay events
134       at system coldplug time.
135
136       Takes device specifications as positional arguments. See the
137       description of info above.
138
139       -v, --verbose
140           Print the list of devices which will be triggered.
141
142       -n, --dry-run
143           Do not actually trigger the event.
144
145       -q, --quiet
146           Suppress error logging in triggering events.
147
148       -t, --type=TYPE
149           Trigger a specific type of devices. Valid types are: devices,
150           subsystems. The default value is devices.
151
152       -c, --action=ACTION
153           Type of event to be triggered. Possible actions are "add",
154           "remove", "change", "move", "online", "offline", "bind", and
155           "unbind". Also, the special value "help" can be used to list the
156           possible actions. The default value is "change".
157
158       -s, --subsystem-match=SUBSYSTEM
159           Trigger events for devices which belong to a matching subsystem.
160           This option supports shell style pattern matching. When this option
161           is specified more than once, then each matching result is ORed,
162           that is, all the devices in each subsystem are triggered.
163
164       -S, --subsystem-nomatch=SUBSYSTEM
165           Do not trigger events for devices which belong to a matching
166           subsystem. This option supports shell style pattern matching. When
167           this option is specified more than once, then each matching result
168           is ANDed, that is, devices which do not match all specified
169           subsystems are triggered.
170
171       -a, --attr-match=ATTRIBUTE=VALUE
172           Trigger events for devices with a matching sysfs attribute. If a
173           value is specified along with the attribute name, the content of
174           the attribute is matched against the given value using shell style
175           pattern matching. If no value is specified, the existence of the
176           sysfs attribute is checked. When this option is specified multiple
177           times, then each matching result is ANDed, that is, only devices
178           which have all specified attributes are triggered.
179
180       -A, --attr-nomatch=ATTRIBUTE=VALUE
181           Do not trigger events for devices with a matching sysfs attribute.
182           If a value is specified along with the attribute name, the content
183           of the attribute is matched against the given value using shell
184           style pattern matching. If no value is specified, the existence of
185           the sysfs attribute is checked. When this option is specified
186           multiple times, then each matching result is ANDed, that is, only
187           devices which have none of the specified attributes are triggered.
188
189       -p, --property-match=PROPERTY=VALUE
190           Trigger events for devices with a matching property value. This
191           option supports shell style pattern matching. When this option is
192           specified more than once, then each matching result is ORed, that
193           is, devices which have one of the specified properties are
194           triggered.
195
196       -g, --tag-match=TAG
197           Trigger events for devices with a matching tag. When this option is
198           specified multiple times, then each matching result is ANDed, that
199           is, devices which have all specified tags are triggered.
200
201       -y, --sysname-match=NAME
202           Trigger events for devices for which the last component (i.e. the
203           filename) of the /sys/ path matches the specified PATH. This option
204           supports shell style pattern matching. When this option is
205           specified more than once, then each matching result is ORed, that
206           is, all devices which have any of the specified NAME are triggered.
207
208       --name-match=NAME
209           Trigger events for devices with a matching device path. When this
210           option is specified more than once, then each matching result is
211           ORed, that is, all specified devices are triggered.
212
213       -b, --parent-match=SYSPATH
214           Trigger events for all children of a given device. When this option
215           is specified more than once, then each matching result is ORed,
216           that is, all children of each specified device are triggered.
217
218       -w, --settle
219           Apart from triggering events, also waits for those events to
220           finish. Note that this is different from calling udevadm settle.
221           udevadm settle waits for all events to finish. This option only
222           waits for events triggered by the same command to finish.
223
224       --uuid
225           Trigger the synthetic device events, and associate a randomized
226           UUID with each. These UUIDs are printed to standard output, one
227           line for each event. These UUIDs are included in the uevent
228           environment block (in the "SYNTH_UUID=" property) and may be used
229           to track delivery of the generated events.
230
231       --wait-daemon[=SECONDS]
232           Before triggering uevents, wait for systemd-udevd daemon to be
233           initialized. Optionally takes timeout value. Default timeout is 5
234           seconds. This is equivalent to invoke invoking udevadm control
235           --ping before udevadm trigger.
236
237       -h, --help
238           Print a short help text and exit.
239
240       In addition, optional positional arguments can be used to specify
241       device names or sys paths. They must start with /dev/ or /sys/
242       respectively.
243
244   udevadm settle [options]
245       Watches the udev event queue, and exits if all current events are
246       handled.
247
248       -t, --timeout=SECONDS
249           Maximum number of seconds to wait for the event queue to become
250           empty. The default value is 120 seconds. A value of 0 will check if
251           the queue is empty and always return immediately. A non-zero value
252           will return an exit code of 0 if queue became empty before timeout
253           was reached, non-zero otherwise.
254
255       -E, --exit-if-exists=FILE
256           Stop waiting if file exists.
257
258       -h, --help
259           Print a short help text and exit.
260
261       See systemd-udev-settle.service(8) for more information.
262
263   udevadm control option
264       Modify the internal state of the running udev daemon.
265
266       -e, --exit
267           Signal and wait for systemd-udevd to exit. No option except for
268           --timeout can be specified after this option. Note that
269           systemd-udevd.service contains Restart=always and so as a result,
270           this option restarts systemd-udevd. If you want to stop
271           systemd-udevd.service, please use the following:
272
273               systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service
274
275
276       -l, --log-level=value
277           Set the internal log level of systemd-udevd. Valid values are the
278           numerical syslog priorities or their textual representations:
279           emerg, alert, crit, err, warning, notice, info, and debug.
280
281       -s, --stop-exec-queue
282           Signal systemd-udevd to stop executing new events. Incoming events
283           will be queued.
284
285       -S, --start-exec-queue
286           Signal systemd-udevd to enable the execution of events.
287
288       -R, --reload
289           Signal systemd-udevd to reload the rules files and other databases
290           like the kernel module index. Reloading rules and databases does
291           not apply any changes to already existing devices; the new
292           configuration will only be applied to new events.
293
294       -p, --property=KEY=value
295           Set a global property for all events.
296
297       -m, --children-max=value
298           Set the maximum number of events, systemd-udevd will handle at the
299           same time.
300
301       --ping
302           Send a ping message to systemd-udevd and wait for the reply. This
303           may be useful to check that systemd-udevd daemon is running.
304
305       -t, --timeout=seconds
306           The maximum number of seconds to wait for a reply from
307           systemd-udevd.
308
309       -h, --help
310           Print a short help text and exit.
311
312   udevadm monitor [options]
313       Listens to the kernel uevents and events sent out by a udev rule and
314       prints the devpath of the event to the console. It can be used to
315       analyze the event timing, by comparing the timestamps of the kernel
316       uevent and the udev event.
317
318       -k, --kernel
319           Print the kernel uevents.
320
321       -u, --udev
322           Print the udev event after the rule processing.
323
324       -p, --property
325           Also print the properties of the event.
326
327       -s, --subsystem-match=string[/string]
328           Filter kernel uevents and udev events by subsystem[/devtype]. Only
329           events with a matching subsystem value will pass. When this option
330           is specified more than once, then each matching result is ORed,
331           that is, all devices in the specified subsystems are monitored.
332
333       -t, --tag-match=string
334           Filter udev events by tag. Only udev events with a given tag
335           attached will pass. When this option is specified more than once,
336           then each matching result is ORed, that is, devices which have one
337           of the specified tags are monitored.
338
339       -h, --help
340           Print a short help text and exit.
341
342   udevadm test [options] [devpath]
343       Simulate a udev event run for the given device, and print debug output.
344
345       -a, --action=ACTION
346           Type of event to be simulated. Possible actions are "add",
347           "remove", "change", "move", "online", "offline", "bind", and
348           "unbind". Also, the special value "help" can be used to list the
349           possible actions. The default value is "add".
350
351       -N, --resolve-names=early|late|never
352           Specify when udevadm should resolve names of users and groups. When
353           set to early (the default), names will be resolved when the rules
354           are parsed. When set to late, names will be resolved for every
355           event. When set to never, names will never be resolved and all
356           devices will be owned by root.
357
358       -h, --help
359           Print a short help text and exit.
360
361   udevadm test-builtin [options] [command] [devpath]
362       Run a built-in command COMMAND for device DEVPATH, and print debug
363       output.
364
365       -a, --action=ACTION
366           Type of event to be simulated. Possible actions are "add",
367           "remove", "change", "move", "online", "offline", "bind", and
368           "unbind". Also, the special value "help" can be used to list the
369           possible actions. The default value is "add".
370
371       -h, --help
372           Print a short help text and exit.
373

SEE ALSO

375       udev(7), systemd-udevd.service(8)
376
377
378
379systemd 250                                                         UDEVADM(8)
Impressum