blob: 80fd51ddfc309186a7fd1c092c84b385ea574f2c [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>udevadm</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"/></head><body><div class="refentry" title="udevadm"><a id="udevadm"/><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>udevadm — udev management tool</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">udevadm</code> [<code class="option">--debug</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div><div class="cmdsynopsis"><p><code class="command">udevadm info <em class="replaceable"><code>options</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm trigger [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm settle [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm control <em class="replaceable"><code>command</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm monitor [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm test [<span class="optional">options</span>] <em class="replaceable"><code>devpath</code></em></code> </p></div></div><div class="refsect1" title="Description"><a id="id310298"/><h2>Description</h2><p>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.</p></div><div class="refsect1" title="OPTIONS"><a id="id276431"/><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--debug</code></span></dt><dd><p>Print debug messages to stderr.</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>Print version number.</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help text.</p></dd></dl></div><div class="refsect2" title="udevadm info options"><a id="id276488"/><h3>udevadm info <em class="replaceable"><code>options</code></em></h3><p>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.</p><div class="variablelist"><dl><dt><span class="term"><code class="option">--query=<em class="replaceable"><code>type</code></em></code></span></dt><dd><p>Query the database for specified type of device data. It needs the
<code class="option">--path</code> or <code class="option">--name</code> to identify the specified
device. Valid queries are:
<span class="command"><strong>name</strong></span>, <span class="command"><strong>symlink</strong></span>, <span class="command"><strong>path</strong></span>,
<span class="command"><strong>property</strong></span>, <span class="command"><strong>all</strong></span>.</p></dd><dt><span class="term"><code class="option">--path=<em class="replaceable"><code>devpath</code></em></code></span></dt><dd><p>The devpath of the device to query.</p></dd><dt><span class="term"><code class="option">--name=<em class="replaceable"><code>file</code></em></code></span></dt><dd><p>The name of the device node or a symlink to query</p></dd><dt><span class="term"><code class="option">--root</code></span></dt><dd><p>The udev root directory: <code class="filename">/dev</code>. If used in conjunction
with a <span class="command"><strong>name</strong></span> or <span class="command"><strong>symlink</strong></span> query, the
query returns the absolute path including the root directory.</p></dd><dt><span class="term"><code class="option">--attribute-walk</code></span></dt><dd><p>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.</p></dd><dt><span class="term"><code class="option">--export</code></span></dt><dd><p>Print output as key/value pairs. Values are enclosed in single quotes.</p></dd><dt><span class="term"><code class="option">--export-prefix=<em class="replaceable"><code>name</code></em></code></span></dt><dd><p>Add a prefix to the key name of exported values.</p></dd><dt><span class="term"><code class="option">--device-id-of-file=<em class="replaceable"><code>file</code></em></code></span></dt><dd><p>Print major/minor numbers of the underlying device, where the file
lives on.</p></dd><dt><span class="term"><code class="option">--export-db</code></span></dt><dd><p>Export the content of the udev database.</p></dd><dt><span class="term"><code class="option">--convert-db</code></span></dt><dd><p>Convert the database of an earlier udev version to the current format. This
is only useful on udev version upgrades, where the content of the old database might
be needed for the running system, and it is not sufficient for it, to be re-created
with the next bootup.</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>Print version.</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2" title="udevadm trigger [options]"><a id="id319399"/><h3>udevadm trigger [<span class="optional">options</span>]</h3><p>Request device events from the kernel. Primarily used to replay events at system coldplug time.</p><div class="variablelist"><dl><dt><span class="term"><code class="option">--verbose</code></span></dt><dd><p>Print the list of devices which will be triggered.</p></dd><dt><span class="term"><code class="option">--dry-run</code></span></dt><dd><p>Do not actually trigger the event.</p></dd><dt><span class="term"><code class="option">--type=<em class="replaceable"><code>type</code></em></code></span></dt><dd><p>Trigger a specific type of devices. Valid types are:
<span class="command"><strong>devices</strong></span>, <span class="command"><strong>subsystems</strong></span>, <span class="command"><strong>failed</strong></span>.
The default value is <span class="command"><strong>devices</strong></span>.</p></dd><dt><span class="term"><code class="option">--action=<em class="replaceable"><code>action</code></em></code></span></dt><dd><p>Type of event to be triggered. The default value is <span class="command"><strong>change</strong></span>.</p></dd><dt><span class="term"><code class="option">--subsystem-match=<em class="replaceable"><code>subsystem</code></em></code></span></dt><dd><p>Trigger events for devices which belong to a matching subsystem. This option
can be specified multiple times and supports shell style pattern matching.</p></dd><dt><span class="term"><code class="option">--subsystem-nomatch=<em class="replaceable"><code>subsystem</code></em></code></span></dt><dd><p>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.</p></dd><dt><span class="term"><code class="option">--attr-match=<em class="replaceable"><code>attribute</code></em>=<em class="replaceable"><code>value</code></em></code></span></dt><dd><p>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.</p></dd><dt><span class="term"><code class="option">--attr-nomatch=<em class="replaceable"><code>attribute</code></em>=<em class="replaceable"><code>value</code></em></code></span></dt><dd><p>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.</p></dd><dt><span class="term"><code class="option">--property-match=<em class="replaceable"><code>property</code></em>=<em class="replaceable"><code>value</code></em></code></span></dt><dd><p>Trigger events for devices with a matching property value. This option can be
specified multiple times and supports shell style pattern matching.</p></dd><dt><span class="term"><code class="option">--tag-match=<em class="replaceable"><code>property</code></em></code></span></dt><dd><p>Trigger events for devices with a matching tag. This option can be
specified multiple times.</p></dd><dt><span class="term"><code class="option">--sysname-match=<em class="replaceable"><code>name</code></em></code></span></dt><dd><p>Trigger events for devices with a matching sys device name. This option can be
specified multiple times and supports shell style pattern matching.</p></dd></dl></div></div><div class="refsect2" title="udevadm settle [options]"><a id="id319655"/><h3>udevadm settle [<span class="optional">options</span>]</h3><p>Watches the udev event queue, and exits if all current events are handled.</p><div class="variablelist"><dl><dt><span class="term"><code class="option">--timeout=<em class="replaceable"><code>seconds</code></em></code></span></dt><dd><p>Maximum number of seconds to wait for the event queue to become empty.
The default value is 180 seconds. A value of 0 will check if the queue is empty
and always return immediately.</p></dd><dt><span class="term"><code class="option">--seq-start=<em class="replaceable"><code>seqnum</code></em></code></span></dt><dd><p>Wait only for events after the given sequence number.</p></dd><dt><span class="term"><code class="option">--seq-end=<em class="replaceable"><code>seqnum</code></em></code></span></dt><dd><p>Wait only for events before the given sequence number.</p></dd><dt><span class="term"><code class="option">--exit-if-exists=<em class="replaceable"><code>file</code></em></code></span></dt><dd><p>Stop waiting if file exists.</p></dd><dt><span class="term"><code class="option">--quiet</code></span></dt><dd><p>Do not print any output, like the remaining queue entries when reaching the timeout.</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2" title="udevadm control command"><a id="id319776"/><h3>udevadm control <em class="replaceable"><code>command</code></em></h3><p>Modify the internal state of the running udev daemon.</p><div class="variablelist"><dl><dt><span class="term"><code class="option">--log-priority=<em class="replaceable"><code>value</code></em></code></span></dt><dd><p>Set the internal log level of udevd. Valid values are the numerical
syslog priorities or their textual representations: <code class="option">err</code>,
<code class="option">info</code> and <code class="option">debug</code>.</p></dd><dt><span class="term"><code class="option">--stop-exec-queue</code></span></dt><dd><p>Signal udevd to stop executing new events. Incoming events
will be queued.</p></dd><dt><span class="term"><code class="option">--start-exec-queue</code></span></dt><dd><p>Signal udevd to enable the execution of events.</p></dd><dt><span class="term"><code class="option">--reload-rules</code></span></dt><dd><p>Signal udevd to reload the rules files.
The udev daemon detects changes automatically, this option is
usually not needed. Reloading rules does not apply any changes
to already existing devices.</p></dd><dt><span class="term"><code class="option">--property=<em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>value</code></em></code></span></dt><dd><p>Set a global property for all events.</p></dd><dt><span class="term"><code class="option">--children-max=</code><em class="replaceable"><code>value</code></em></span></dt><dd><p>Set the maximum number of events, udevd will handle at the
same time.</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2" title="udevadm monitor [options]"><a id="id319926"/><h3>udevadm monitor [<span class="optional">options</span>]</h3><p>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.
</p><div class="variablelist"><dl><dt><span class="term"><code class="option">--kernel</code></span></dt><dd><p>Print the kernel uevents.</p></dd><dt><span class="term"><code class="option">--udev</code></span></dt><dd><p>Print the udev event after the rule processing.</p></dd><dt><span class="term"><code class="option">--property</code></span></dt><dd><p>Also print the properties of the event.</p></dd><dt><span class="term"><code class="option">--subsystem-match=<em class="replaceable"><code>string[/string]</code></em></code></span></dt><dd><p>Filter events by subsystem[/devtype]. Only udev events with a matching subsystem value will pass.</p></dd><dt><span class="term"><code class="option">--tag-match=<em class="replaceable"><code>string</code></em></code></span></dt><dd><p>Filter events by property. Only udev events with a given tag attached will pass.</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2" title="udevadm test [options] devpath"><a id="id320042"/><h3>udevadm test [<span class="optional">options</span>] <em class="replaceable"><code>devpath</code></em></h3><p>Simulate a udev event run for the given device, and print debug output.</p><div class="variablelist"><dl><dt><span class="term"><code class="option">--action=<em class="replaceable"><code>string</code></em></code></span></dt><dd><p>The action string.</p></dd><dt><span class="term"><code class="option">--subsystem=<em class="replaceable"><code>string</code></em></code></span></dt><dd><p>The subsystem string.</p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help text.</p></dd></dl></div></div></div><div class="refsect1" title="Author"><a id="id320114"/><h2>Author</h2><p>Written by Kay Sievers <code class="email">&lt;<a class="email" href="mailto:kay.sievers@vrfy.org">kay.sievers@vrfy.org</a>&gt;</code>.</p></div><div class="refsect1" title="See Also"><a id="id320127"/><h2>See Also</h2><p><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span>
<span class="citerefentry"><span class="refentrytitle">udevd</span>(8)</span></p></div></div></body></html>