diff options
Diffstat (limited to 'doc/s6-uevent-listener.html')
-rw-r--r-- | doc/s6-uevent-listener.html | 117 |
1 files changed, 0 insertions, 117 deletions
diff --git a/doc/s6-uevent-listener.html b/doc/s6-uevent-listener.html deleted file mode 100644 index cd60639..0000000 --- a/doc/s6-uevent-listener.html +++ /dev/null @@ -1,117 +0,0 @@ -<html> - <head> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <meta http-equiv="Content-Language" content="en" /> - <title>s6-linux-utils: the s6-uevent-listener program</title> - <meta name="Description" content="s6-linux-utils: the s6-uevent-listener program" /> - <meta name="Keywords" content="s6 linux administration root utilities devd mdev mdevd udev s6-uevent-listener uevent" /> - <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> - </head> -<body> - -<p> -<a href="index.html">s6-linux-utils</a><br /> -<a href="//skarnet.org/software/">Software</a><br /> -<a href="//skarnet.org/">skarnet.org</a> -</p> - -<h1> The <tt>s6-uevent-listener</tt> program </h1> - -<p> -<tt>s6-uevent-listener</tt> listens to the netlink interface for uevents -(also called "hotplug" or "udev" events), and writes those uevents to -its standard output, using a simple format. -</p> - -<p> -<strong>This program is deprecated</strong>, and will disappear in a -near future version of s6-linux-utils. It has been replaced with the -<a href="//skarnet.org/software/mdevd/mdevd-netlink.html">mdevd-netlink</a> -program, from the <a href="//skarnet.org/software/mdevd/">mdevd</a> -package. -</p> - -<h2> Interface </h2> - -<pre> - s6-uevent-listener [ -v <em>verbosity</em> ] [ -b kbufsz ] -</pre> - -<ul> - <li> s6-uevent-listener binds to the netlink interface and listens for -hotplug events, as the <em>udev</em> program does. </li> - <li> It writes event information to its stdout. The output contains -null characters, so a terminal will not display them correctly. To -properly use s6-uevent-listener, it should be piped into a handler -program such as -<a href="s6-uevent-spawner.html">s6-uevent-spawner</a>. -or <a href="//skarnet.org/software/mdevd/mdevd.html">mdevd</a>. </li> - <li> s6-uevent-listener is a long-lived program. -When it receives a SIGTERM, it stops listening; it will -exit as soon as it has flushed its event queue to stdout. </li> -</ul> - -<h2> Options </h2> - -<ul> - <li> <tt>-v</tt> <em>verbosity</em> : be more or less verbose. -Default verbosity is 1. 0 will only print fatal error messages, 3 will -print warnings every time the netlink interface sends something -unexpected. </li> - <li> <tt>-b</tt> <em>kbufsz</em> : try and reserve a kernel buffer of -<em>kbufsz</em> bytes for the netlink queue. Too large a buffer wastes kernel memory; -too small a buffer risks losing events. The default is 65536 (which is on -the large side). </li> -</ul> - -<h2> Protocol </h2> - -<ul> - <li> An event is a series of null-terminated strings as they are sent by -the kernel to the netlink; s6-uevent-listener adds a final empty string -(i.e. an additional null character) to mark the end of the series. </li> - <li> The first string is a short description of the event; it normally -contains the string "@/". Other strings after the first are of the form -"VARIABLE=value", and describe the environment which a hotplug helper -for the event (registered in <tt>/proc/sys/kernel/hotplug</tt>) would be -spawned with. </li> - <li> Example (newlines added for clarity): <pre> -add@/class/input/input9/mouse2\0 -ACTION=add\0 -DEVPATH=/class/input/input9/mouse2\0 -SUBSYSTEM=input\0 -SEQNUM=106\0 -PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/22/22:1.0 -PHYSDEVBUS=usb\0 -PHYSDEVDRIVER=usbhid\0 -MAJOR=13\0 -MINOR=34\0 -\0 </pre> </li> -</ul> - -<h2> Notes </h2> - -<ul> - <li> s6-uevent-listener is a daemon; it should be run under a proper supervision system such -as <a href="//skarnet.org/software/s6/">s6</a>. </li> -<li> If you are running s6-uevent-listener, <em>prog...</em> should be the -only program handling uevents, which means that -<tt>/proc/sys/kernel/hotplug</tt> should be empty. </li> - <li> Examples of valid uses of s6-uevent-listener: - <ul> - <li> <tt>s6-uevent-listener | s6-uevent-spawner mdev</tt> </li> - <li> <tt>s6-uevent-listener | mdevd</tt> </li> - <li> Those examples can be made safer by using a supervision system: -under <a href="//skarnet.org/software/s6/">s6</a> or -<a href="//skarnet.org/software/s6-rc/">s6-rc</a>, write a service -pipeline where <tt>s6-uevent-listener</tt> is a producer and -<tt>s6-uevent-spawner mdev</tt> or <tt>mdevd</tt> is a consumer. This -setup has the advantage, among others, that you can restart the netlink -listener and the event handler separately. </li> - </ul> - </li> -</ul> - -</body> -</html> |