<!DOCTYPE RefEntry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<refentry id="lshw">

<refmeta>
<refentrytitle>lshw</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo>$Rev$</refmiscinfo>
</refmeta>

<refnamediv>
<refname>lshw</refname>
<refpurpose>
list hardware
</refpurpose>
</refnamediv>

<refsynopsisdiv>
 <cmdsynopsis>
   <command>lshw</command> 
        <arg choice="opt"><option>-version</option></arg>
   </cmdsynopsis>
 <cmdsynopsis>
   <command>lshw</command> 
        <arg choice="opt"><option>-help</option></arg>
   </cmdsynopsis>
 <cmdsynopsis>
   <command>lshw</command> 
        <arg choice="opt"><option>-X</option></arg>
   </cmdsynopsis>
 <cmdsynopsis>
   <command>lshw</command> 
      <group choice="opt">
	<arg choice="opt"><option>-html</option></arg>
	<arg choice="opt"><option>-short</option></arg>
	<arg choice="opt"><option>-xml</option></arg>
	<arg choice="opt"><option>-json</option></arg>
	<arg choice="opt"><option>-businfo</option></arg>
      </group>
	<arg choice="opt"><option>-dump </option><replaceable class="parameter">filename</replaceable></arg>
	<arg choice="opt" rep="repeat"><option>-class </option><replaceable class="parameter">class</replaceable></arg>
	<arg choice="opt" rep="repeat"><option>-disable </option><replaceable class="parameter">test</replaceable></arg>
	<arg choice="opt" rep="repeat"><option>-enable </option><replaceable class="parameter">test</replaceable></arg>
	<arg choice="opt"><option>-sanitize</option></arg>
	<arg choice="opt"><option>-numeric</option></arg>
	<arg choice="opt"><option>-quiet</option></arg>
   </cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>DESCRIPTION</title>
<para>
<indexterm><primary>lshw</primary></indexterm>
<application>lshw</application>
is a small tool to extract detailed information on the hardware
configuration of the machine. It can report exact memory
configuration, firmware version, mainboard configuration, 
<hardware>CPU</hardware> version
and speed, cache configuration, bus speed, etc. on 
<acronym>DMI</acronym>-capable x86 or IA-64
systems and on some <productname>PowerPC</productname>
machines (<productname>PowerMac G4</productname> is known to work).
</para>
<para>
It currently supports <hardware>DMI</hardware> (x86 and IA-64 only), <productname>OpenFirmware</productname> device tree (<productname>PowerPC</productname> only),
<hardware>PCI/AGP</hardware>, <hardware>CPUID</hardware> (x86), <hardware>IDE/ATA/ATAPI</hardware>, <hardware>PCMCIA</hardware> (only tested on x86), <hardware>SCSI</hardware> and <hardware>USB</hardware>.
</para>

<para>
<variablelist>
<varlistentry><term>-version</term>
<listitem><para>
Displays the version of <application>lshw</application> and exits.
</para></listitem></varlistentry>
<varlistentry><term>-help</term>
<listitem><para>
Displays the available command line options and quits.
</para></listitem></varlistentry>
<varlistentry><term>-X</term>
<listitem><para>
Launch the X11 GUI (if available).
</para></listitem></varlistentry>
<varlistentry><term>-html</term>
<listitem><para>
Outputs the device tree as an HTML page.
</para></listitem></varlistentry>
<varlistentry><term>-xml</term>
<listitem><para>
Outputs the device tree as an XML tree.
</para></listitem></varlistentry>
<varlistentry><term>-json</term>
<listitem><para>
Outputs the device tree as a JSON object (JavaScript Object Notation).
</para></listitem></varlistentry>
<varlistentry><term>-short</term>
<listitem><para>
Outputs the device tree showing hardware paths, very much like the output of <productname>HP-UX</productname>'s <command>ioscan</command>.
</para></listitem></varlistentry>
<varlistentry><term>-businfo</term>
<listitem><para>
Outputs the device list showing bus information, detailing <productname>SCSI</productname>, <productname>USB</productname>, <productname>IDE</productname> and <productname>PCI</productname> addresses.
</para></listitem></varlistentry>
<varlistentry><term>-dump <replaceable class="parameter">filename</replaceable></term>
<listitem><para>
Dump collected information into a file (SQLite database).
</para></listitem></varlistentry>
<varlistentry><term>-class <replaceable class="parameter">class</replaceable></term>
<listitem><para>
Only show the given class of hardware. <replaceable class="parameter">class</replaceable> can be found using <command>lshw -short</command> or <command>lshw -businfo</command>.
</para></listitem></varlistentry>
<varlistentry><term>-C <replaceable class="parameter">class</replaceable></term>
<listitem><para>
Alias for <command>-class</command> <replaceable class="parameter">class</replaceable>.
</para></listitem></varlistentry>
<varlistentry><term>-enable <replaceable class="parameter">test</replaceable></term><term>-disable <replaceable class="parameter">test</replaceable></term>
<listitem><para>
Enables or disables a test. <replaceable class="parameter">test</replaceable> can be <command>dmi</command> (for <productname>DMI</productname>/<productname>SMBIOS</productname> extensions), <command>device-tree</command> (for <productname>OpenFirmware</productname> device tree), <command>spd</command> (for memory <productname>Serial Presence Detect</productname>), <command>memory</command> (for memory-size guessing heuristics), <command>cpuinfo</command> (for kernel-reported CPU detection), <command>cpuid</command> (for CPU detection), <command>pci</command> (for <productname>PCI</productname>/<productname>AGP access</productname>), <command>isapnp</command> (for <productname>ISA PnP</productname> extensions), <command>pcmcia</command> (for <productname>PCMCIA</productname>/<productname>PCCARD</productname>), <command>ide</command> (for <productname>IDE</productname>/<productname>ATAPI</productname>), <command>usb</command> (for <productname>USB</productname> devices),<command>scsi</command> (for <productname>SCSI</productname>) or <command>network</command> (for network interfaces detection).
</para></listitem></varlistentry>
<varlistentry><term>-quiet</term>
<listitem><para>
Don't display status.
</para></listitem></varlistentry>
<varlistentry><term>-sanitize</term>
<listitem><para>
Remove potentially sensitive information from output (IP addresses, serial numbers, etc.).
</para></listitem></varlistentry>
<varlistentry><term>-numeric</term>
<listitem><para>
Also display numeric IDs (for PCI and USB devices).
</para></listitem></varlistentry>
</variablelist>
</para>

</refsect1>

<refsect1><title>BUGS</title>
<para>
<application>lshw</application> currently does not detect 
<hardware>Firewire</hardware>(<hardware>IEEE1394</hardware>) devices.
</para>

<para>
Not all architectures supported by GNU/Linux are fully supported (e.g.
<hardware>CPU</hardware> detection).
</para>

<para>
"Virtual" <hardware>SCSI</hardware> interfaces used for <hardware>SCSI</hardware> emulation over <hardware>IDE</hardware> are not reported correctly yet.
</para>

</refsect1>

<refsect1><title>NOTES</title>
<para>
<application>lshw</application> must be run as super user or it will only report
partial information.
</para>

</refsect1>

<refsect1><title>FILES</title>
<para>
<variablelist>

<varlistentry><term>/usr/local/share/pci.ids</term>
<term>/usr/share/pci.ids</term>
<term>/etc/pci.ids</term>
<term>/usr/share/hwdata/pci.ids</term>
<listitem><para>
A list of all known PCI ID's (vendors,  devices, classes and subclasses).
If compiled with zlib support, lshw will look for <filename>pci.ids.gz</filename> first, then for <filename>pci.ids</filename>.
</para></listitem></varlistentry>

<varlistentry><term>/proc/bus/pci/*</term>
<listitem><para>
Used to access the configuration of installed PCI busses and devices.
</para></listitem></varlistentry>

<varlistentry><term>/proc/ide/*</term>
<listitem><para>
Used to access the configuration of installed IDE busses and devices.
</para></listitem></varlistentry>

<varlistentry><term>/proc/scsi/*, /dev/sg*</term>
<listitem><para>
Used to access the configuration of installed SCSI devices.
</para></listitem></varlistentry>

<varlistentry><term>/dev/cpu/*/cpuid</term>
<listitem><para>
Used on x86 platforms to access CPU-specific configuration.
</para></listitem></varlistentry>

<varlistentry><term>/proc/device-tree/*</term>
<listitem><para>
Used on PowerPC platforms to access OpenFirmware configuration.
</para></listitem></varlistentry>

<varlistentry><term>/proc/bus/usb/*</term>
<listitem><para>
Used to access the configuration of installed USB busses and devices.
</para></listitem></varlistentry>

<varlistentry><term>/sys/*</term>
<listitem><para>
Used on 2.6 kernels to access hardware/driver configuration information.
</para></listitem>
</varlistentry>

</variablelist>
</para>
</refsect1>

<refsect1><title>EXAMPLES</title>
<para>
<variablelist>
<varlistentry>
<term><command>lshw -short</command></term>
<listitem><para>
Lists hardware in a compact format.
</para></listitem>
</varlistentry>

<varlistentry>
<term><command>lshw -class disk -class storage</command></term>
<listitem><para>
Lists all disks and storage controllers in the system.
</para></listitem>
</varlistentry>

<varlistentry>
<term><command>lshw -html -class network</command></term>
<listitem><para>
Lists all network interfaces in HTML.
</para></listitem>
</varlistentry>

<varlistentry>
<term><command>lshw -disable dmi</command></term>
<listitem><para>
Don't use DMI to detect hardware.
</para></listitem>
</varlistentry>

</variablelist>
</para>
</refsect1>

<refsect1><title>SEE ALSO</title>
<para><filename>/proc/*</filename>, <application>linuxinfo</application>(1), <application>lspci</application>(8), <application>lsusb</application>(8)
</para>
</refsect1>

<refsect1><title>COPYING</title>
<para>
<application>lshw</application> is distributed under the GNU GENERAL PUBLIC LICENSE (GPL) version 2.
</para>
</refsect1>

<refsect1><title>AUTHOR</title>
<para>
<application>lshw</application> is maintained by Lyonel Vincent
<email>lyonel@ezix.org</email>.
</para>
</refsect1>

<refsect1><title>OTHER INFO</title>
<para>
The webpage for <application>lshw</application> is at 
<ulink url="http://lshw.ezix.org/"></ulink></para>
</refsect1>

</refentry>

