source: general/sysutils/usbutils.xml@ ac8c7d4

10.0 10.1 11.0 11.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since ac8c7d4 was ac8c7d4, checked in by DJ Lucas <dj@…>, 5 years ago

Use timers in systemd where appropriate, not crontab.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19359 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY usbutils-download-http "&kernel-dl;/linux/utils/usb/usbutils/usbutils-&usbutils-version;.tar.xz">
8 <!ENTITY usbutils-download-ftp " ">
9 <!ENTITY usbutils-md5sum "2780b6ae21264c888f8f30fb2aab1259">
10 <!ENTITY usbutils-size "284 KB">
11 <!ENTITY usbutils-buildsize "3.8 MB">
12 <!ENTITY usbutils-time "less than 0.1 SBU">
13]>
14
15<sect1 id="usbutils" xreflabel="usbutils-&usbutils-version;">
16 <?dbhtml filename="usbutils.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>usbutils-&usbutils-version;</title>
24
25 <indexterm zone="usbutils">
26 <primary sortas="a-usbutils">usbutils</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to USB Utils</title>
31
32 <para>
33 The <application>USB Utils</application> package contains utilities
34 used to display information about USB buses in the system and the
35 devices connected to them.
36 </para>
37
38 &lfs81_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&usbutils-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&usbutils-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &usbutils-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &usbutils-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &usbutils-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &usbutils-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">USB Utils Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="libusb"/>
79 </para>
80
81 <bridgehead renderas="sect4">Required Runtime</bridgehead>
82 <para role="required">
83 <xref role="runtime" linkend="python2"/>
84 </para>
85
86 <para condition="html" role="usernotes">User Notes:
87 <ulink url="&blfs-wiki;/usbutils"/>
88 </para>
89 </sect2>
90
91 <sect2 role="installation">
92 <title>Installation of USB Utils</title>
93
94 <para>
95 Install <application>USB Utils</application> by
96 running the following commands:
97 </para>
98
99<screen><userinput>sed -i '/^usbids/ s:usb.ids:hwdata/&amp;:' lsusb.py &amp;&amp;
100
101./configure --prefix=/usr --datadir=/usr/share/hwdata &amp;&amp;
102make</userinput></screen>
103
104 <para>
105 This package does not come with a test suite.
106 </para>
107
108 <para>
109 Now, as the <systemitem class="username">root</systemitem> user:
110 </para>
111
112<screen role="root"><userinput>make install</userinput></screen>
113
114 <para>
115 To install the <filename>usb.ids</filename> data file, using
116 <xref linkend="wget"/>, run, as the
117 <systemitem class="username">root</systemitem> user:
118 </para>
119
120<screen role="root"><userinput>install -dm755 /usr/share/hwdata/ &amp;&amp;
121wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</userinput></screen>
122
123 <para>
124 The script <command>lsusb.py</command> displays information in a more
125 easily readable form than <command>lsusb</command>. To find the options,
126 use <command>lsusb.py -h</command>. One form of use recommended by the
127 developer is <command>lsusb.py -ciu</command>.
128 </para>
129
130 </sect2>
131
132 <sect2 role="commands">
133 <title>Command Explanations</title>
134
135 <para>
136 <command>sed ... lsusb.py</command>: Instructs lsusb.py where to search
137 <filename>usb.ids</filename>.
138 </para>
139
140 </sect2>
141
142 <sect2 role="configuration">
143 <title>Configuring USB Utils</title>
144
145 <para revision="sysv">
146 The <filename>usb.ids</filename> data file is constantly being updated.
147 To get a current version of this file, using <xref linkend="wget"/>,
148 periodically run again, as the
149 <systemitem class="username">root</systemitem> user:
150 </para>
151
152<screen role="root" revision="sysv"><userinput>wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</userinput></screen>
153
154 <para revision="sysv">
155 You may wish to add an entry to
156 <systemitem class="username">root</systemitem>'s (or any other user who has
157 write privilege to <filename class="directory">/usr/share/hwdata</filename>)
158 crontab to automatically update the <filename>usb.ids</filename> file
159 periodically.
160 </para>
161
162 <para revision="systemd">
163 You should update the <filename>/usr/share/hwdata/usb.ids</filename> file
164 periodically. Execute the following commands, as the
165 <systemitem class="username">root</systemitem> user, to create a systemd
166 timer to update it weekly on Sundays at 3:00 A.M. (local time):
167 </para>
168
169<screen role="root" revision="systemd"><userinput>cat &gt; /lib/systemd/system/update-usbids.service &lt;&lt; "EOF" &amp;&amp;
170<literal>[Unit]
171Description=Update usb.ids file
172Documentation=man:lusub(8)
173DefaultDependencies=no
174After=local-fs.target
175Before=shutdown.target
176
177[Service]
178Type=oneshot
179RemainAfterExit=yes
180ExecStart=/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids</literal>
181EOF
182cat &gt; /lib/systemd/system/update-usbids.timer &lt;&lt; "EOF" &amp;&amp;
183<literal>[Unit]
184Description=Update usb.ids file weekly
185
186[Timer]
187OnCalendar=Sun 03:00:00
188Persistent=true
189
190[Install]
191WantedBy=timers.target</literal>
192EOF
193systemctl enable update-usbids.timer</userinput></screen>
194
195 </sect2>
196
197 <sect2 role="content">
198 <title>Contents</title>
199
200 <segmentedlist>
201 <segtitle>Installed Programs</segtitle>
202 <segtitle>Installed Libraries</segtitle>
203 <segtitle>Installed Directories</segtitle>
204
205 <seglistitem>
206 <seg>
207 lsusb, lsusb.py, usb-devices, and usbhid-dump
208 </seg>
209 <seg>
210 None
211 </seg>
212 <seg>
213 None
214 </seg>
215 </seglistitem>
216 </segmentedlist>
217
218 <variablelist>
219 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
220 <?dbfo list-presentation="list"?>
221 <?dbhtml list-presentation="table"?>
222
223 <varlistentry id="lsusb">
224 <term><command>lsusb</command></term>
225 <listitem>
226 <para>
227 is a utility for displaying information about all USB buses
228 in the system and all devices connected to them, but not in human
229 friendly form.
230 </para>
231 <indexterm zone="usbutils lsusb">
232 <primary sortas="b-lsusb">lsusb</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="lsusb.py">
238 <term><command>lsusb.py</command></term>
239 <listitem>
240 <para>
241 displays information about all USB buses in the system and all
242 devices connected to them in reasonable human friendly form.
243 </para>
244 <indexterm zone="usbutils lsusb.py">
245 <primary sortas="b-lsusb.py">lsusb.py</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="usb-devices">
251 <term><command>usb-devices</command></term>
252 <listitem>
253 <para>
254 is a shell script that displays details of USB buses and devices
255 connected to them. It is designed to be used if /proc/bus/usb/devices
256 is not available on your system.
257 </para>
258 <indexterm zone="usbutils usb-devices">
259 <primary sortas="b-usb-devices">usb-devices</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="usbhid-dump">
265 <term><command>usbhid-dump</command></term>
266 <listitem>
267 <para>
268 is used to dump report descriptors and streams from HID
269 (human interface device) interfaces of USB devices.
270 </para>
271 <indexterm zone="usbutils usbhid-dump">
272 <primary sortas="b-usbhid-dump">usbhid-dump</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 </variablelist>
278
279 </sect2>
280
281</sect1>
Note: See TracBrowser for help on using the repository browser.