[sf-lug] the lshw command

Rick Moen rick at linuxmafia.com
Mon Oct 26 16:35:25 PDT 2009

Quoting jim (jim at well.com):

>    this "list hardware" command has a -X option 
> that presents info via GUI if gui (x-windows) 
> is on the system. 

...and if package lshw-gtk is present.[1]

>    it's a nice, complete list of hardware stuff. 

It pulls from the same system data that primary tools lspci and lsusb
use, so the list is extensive, but I wouldn't call it complete. 
If you want really reliable, complete information on the hardware, your
best bet is still "dmesg | less", lspci, "less /proc/cpuinfo", "less
/proc/meminfo", lsusb, and maybe dmidecode.  For one thing, those will
tend to be present even on systems where lshw isn't.

But there's another thing:  I'm not really sure I like the fact that,
under Motherboard / CPU, it doesn't tell me what the CPU flags are, and
instead gives its _interpretation_ of those flags.

For example, it reports that CPU capabilities include "virtual mode
extensions" and "HyperThreading".  But what does that really mean?

o  If I'm intending to do full virtualisation under VMware or such, I need
   to know whether the CPU does required hardware support for that VM mode,
   which means the CPU's instruction set must include either VMX (Intel) or 
   SVM (AMD) extensions.  In Linux, those are shown by /proc/cpuinfo's
   "flags" line including either "vmx" or "svn".

o  In Linux, hyperthreading works if /proc/cpuinfo's "flags" line includes
   "ht" (which indicates the capability) and the count of physical
   and logical CPUs in /proc/cpuinfo differs.

I trust the raw data to tell me what's going on, but think it unwise to
trust some third-party utility's interpretation in place of that data.

[1] On distros where the GTK support glue is packaged separately.

More information about the sf-lug mailing list