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       -p, --path=DEVPATH
52           The /sys path of the device to query, e.g.  [/sys]/class/block/sda.
53           This option is an alternative to the positional argument with a
54           /sys/ prefix.  udevadm info --path=/class/block/sda is equivalent
55           to udevadm info /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. This option is an alternative to the positional
60           argument with a /dev/ prefix.  udevadm info --name=sda is
61           equivalent to udevadm info /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. This takes effects only when --query=property or
75           --device-id-of-file=FILE is specified.
76
77       -P, --export-prefix=NAME
78           Add a prefix to the key name of exported values. This implies
79           --export.
80
81       -d, --device-id-of-file=FILE
82           Print major/minor numbers of the underlying device, where the file
83           lives on. If this is specified, all positional arguments are
84           ignored.
85
86       -e, --export-db
87           Export the content of the udev database.
88
89       -c, --cleanup-db
90           Cleanup the udev database.
91
92       -w[SECONDS], --wait-for-initialization[=SECONDS]
93           Wait for device to be initialized. If argument SECONDS is not
94           specified, the default is to wait forever.
95
96       -h, --help
97           Print a short help text and exit.
98
99   udevadm trigger [options] [devpath|file|unit]
100       Request device events from the kernel. Primarily used to replay events
101       at system coldplug time.
102
103       Takes device specifications as positional arguments. See the
104       description of info above.
105
106       -v, --verbose
107           Print the list of devices which will be triggered.
108
109       -n, --dry-run
110           Do not actually trigger the event.
111
112       -t, --type=TYPE
113           Trigger a specific type of devices. Valid types are: devices,
114           subsystems. The default value is devices.
115
116       -c, --action=ACTION
117           Type of event to be triggered. Possible actions are "add",
118           "remove", "change", "move", "online", "offline", "bind", and
119           "unbind". Also, the special value "help" can be used to list the
120           possible actions. The default value is "change".
121
122       -s, --subsystem-match=SUBSYSTEM
123           Trigger events for devices which belong to a matching subsystem.
124           This option supports shell style pattern matching. When this option
125           is specified more than once, then each matching result is ORed,
126           that is, all the devices in each subsystem are triggered.
127
128       -S, --subsystem-nomatch=SUBSYSTEM
129           Do not trigger events for devices which belong to a matching
130           subsystem. This option supports shell style pattern matching. When
131           this option is specified more than once, then each matching result
132           is ANDed, that is, devices which do not match all specified
133           subsystems are triggered.
134
135       -a, --attr-match=ATTRIBUTE=VALUE
136           Trigger events for devices with a matching sysfs attribute. If a
137           value is specified along with the attribute name, the content of
138           the attribute is matched against the given value using shell style
139           pattern matching. If no value is specified, the existence of the
140           sysfs attribute is checked. When this option is specified multiple
141           times, then each matching result is ANDed, that is, only devices
142           which have all specified attributes are triggered.
143
144       -A, --attr-nomatch=ATTRIBUTE=VALUE
145           Do not trigger events for devices with a matching sysfs attribute.
146           If a value is specified along with the attribute name, the content
147           of the attribute is matched against the given value using shell
148           style pattern matching. If no value is specified, the existence of
149           the sysfs attribute is checked. When this option is specified
150           multiple times, then each matching result is ANDed, that is, only
151           devices which have none of the specified attributes are triggered.
152
153       -p, --property-match=PROPERTY=VALUE
154           Trigger events for devices with a matching property value. This
155           option supports shell style pattern matching. When this option is
156           specified more than once, then each matching result is ORed, that
157           is, devices which have one of the specified properties are
158           triggered.
159
160       -g, --tag-match=PROPERTY
161           Trigger events for devices with a matching tag. When this option is
162           specified multiple times, then each matching result is ANDed, that
163           is, devices which have all specified tags are triggered.
164
165       -y, --sysname-match=NAME
166           Trigger events for devices for which the last component (i.e. the
167           filename) of the /sys path matches the specified PATH. This option
168           supports shell style pattern matching. When this option is
169           specified more than once, then each matching result is ORed, that
170           is, all devices which have any of the specified NAME are triggered.
171
172       --name-match=NAME
173           Trigger events for devices with a matching device path. When this
174           option is specified more than once, then each matching result is
175           ORed, that is, all specified devices are triggered.
176
177       -b, --parent-match=SYSPATH
178           Trigger events for all children of a given device. When this option
179           is specified more than once, then each matching result is ORed,
180           that is, all children of each specified device are triggered.
181
182       -w, --settle
183           Apart from triggering events, also waits for those events to
184           finish. Note that this is different from calling udevadm settle.
185           udevadm settle waits for all events to finish. This option only
186           waits for events triggered by the same command to finish.
187
188       --wait-daemon[=SECONDS]
189           Before triggering uevents, wait for systemd-udevd daemon to be
190           initialized. Optionally takes timeout value. Default timeout is 5
191           seconds. This is equivalent to invoke invoking udevadm control
192           --ping before udevadm trigger.
193
194       -h, --help
195           Print a short help text and exit.
196
197       In addition, optional positional arguments can be used to specify
198       device names or sys paths. They must start with /dev or /sys
199       respectively.
200
201   udevadm settle [options]
202       Watches the udev event queue, and exits if all current events are
203       handled.
204
205       -t, --timeout=SECONDS
206           Maximum number of seconds to wait for the event queue to become
207           empty. The default value is 120 seconds. A value of 0 will check if
208           the queue is empty and always return immediately.
209
210       -E, --exit-if-exists=FILE
211           Stop waiting if file exists.
212
213       -h, --help
214           Print a short help text and exit.
215
216       See systemd-udev-settle.service(8) for more information.
217
218   udevadm control option
219       Modify the internal state of the running udev daemon.
220
221       -e, --exit
222           Signal and wait for systemd-udevd to exit. No option except for
223           --timeout can be specified after this option. Note that
224           systemd-udevd.service contains Restart=always and so as a result,
225           this option restarts systemd-udevd. If you want to stop
226           systemd-udevd.service, please use the following:
227
228               systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service
229
230
231       -l, --log-priority=value
232           Set the internal log level of systemd-udevd. Valid values are the
233           numerical syslog priorities or their textual representations:
234           emerg, alert, crit, err, warning, notice, info, and debug.
235
236       -s, --stop-exec-queue
237           Signal systemd-udevd to stop executing new events. Incoming events
238           will be queued.
239
240       -S, --start-exec-queue
241           Signal systemd-udevd to enable the execution of events.
242
243       -R, --reload
244           Signal systemd-udevd to reload the rules files and other databases
245           like the kernel module index. Reloading rules and databases does
246           not apply any changes to already existing devices; the new
247           configuration will only be applied to new events.
248
249       -p, --property=KEY=value
250           Set a global property for all events.
251
252       -m, --children-max=value
253           Set the maximum number of events, systemd-udevd will handle at the
254           same time.
255
256       --ping
257           Send a ping message to systemd-udevd and wait for the reply. This
258           may be useful to check that systemd-udevd daemon is running.
259
260       -t, --timeout=seconds
261           The maximum number of seconds to wait for a reply from
262           systemd-udevd.
263
264       -h, --help
265           Print a short help text and exit.
266
267   udevadm monitor [options]
268       Listens to the kernel uevents and events sent out by a udev rule and
269       prints the devpath of the event to the console. It can be used to
270       analyze the event timing, by comparing the timestamps of the kernel
271       uevent and the udev event.
272
273       -k, --kernel
274           Print the kernel uevents.
275
276       -u, --udev
277           Print the udev event after the rule processing.
278
279       -p, --property
280           Also print the properties of the event.
281
282       -s, --subsystem-match=string[/string]
283           Filter kernel uevents and udev events by subsystem[/devtype]. Only
284           events with a matching subsystem value will pass. When this option
285           is specified more than once, then each matching result is ORed,
286           that is, all devices in the specified subsystems are monitored.
287
288       -t, --tag-match=string
289           Filter udev events by tag. Only udev events with a given tag
290           attached will pass. When this option is specified more than once,
291           then each matching result is ORed, that is, devices which have one
292           of the specified tags are monitored.
293
294       -h, --help
295           Print a short help text and exit.
296
297   udevadm test [options] [devpath]
298       Simulate a udev event run for the given device, and print debug output.
299
300       -a, --action=ACTION
301           Type of event to be simulated. Possible actions are "add",
302           "remove", "change", "move", "online", "offline", "bind", and
303           "unbind". Also, the special value "help" can be used to list the
304           possible actions. The default value is "add".
305
306       -N, --resolve-names=early|late|never
307           Specify when udevadm should resolve names of users and groups. When
308           set to early (the default), names will be resolved when the rules
309           are parsed. When set to late, names will be resolved for every
310           event. When set to never, names will never be resolved and all
311           devices will be owned by root.
312
313       -h, --help
314           Print a short help text and exit.
315
316   udevadm test-builtin [options] [command] [devpath]
317       Run a built-in command COMMAND for device DEVPATH, and print debug
318       output.
319
320       -h, --help
321           Print a short help text and exit.
322

SEE ALSO

324       udev(7), systemd-udevd.service(8)
325
326
327
328systemd 245                                                         UDEVADM(8)
Impressum