WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: lshw does not show product or vendor information  (Read 6720 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
lshw does not show product or vendor information
« on: June 30, 2020, 01:48:10 PM »
Hi, Rich. I just wanted to point out that the latest  lshw  in the TCL11 x86_64 and TCL10 x86 repos is not showing the "product" and "vendor" lines as expected.

These are the expected output lines:
  description: foo
  product: bar
  vendor: baz
  physical id: bang

These are the acual output lines:
  description: foo
  physical id: bang

For example, this is the actual output when using  lshw  on TCL11 64:
Code: [Select]
$ sudo /usr/local/sbin/lshw -c network
  *-network                 
       description: Ethernet interface
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 03
       serial: 00:1f:16:17:f0:da
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.8-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:29 memory:e1a00000-e1a1ffff memory:e1a24000-e1a24fff ioport:3000(size=32)
  *-network
       description: Wireless interface
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 24:fd:52:18:5b:e5
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=5.4.3-tinycore64 firmware=N/A ip=10.1.86.254 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:e1900000-e191ffff memory:e1920000-e192ffff
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: dummy0
       serial: 46:e9:67:5b:59:d2
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=1.0
But this is the expected output (which is what I see when I use a homebrewed portable version of lshw):
Code: [Select]
$ sudo /opt/bin/lshw -c network
  *-network                 
       description: Ethernet interface
       product: 82567LM Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 03
       serial: 00:1f:16:17:f0:da
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.8-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:29 memory:e1a00000-e1a1ffff memory:e1a24000-e1a24fff ioport:3000(size=32)
  *-network
       description: Wireless interface
       product: AR93xx Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 24:fd:52:18:5b:e5
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=5.4.3-tinycore64 firmware=N/A ip=10.1.86.254 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:e1900000-e191ffff memory:e1920000-e192ffff
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: dummy0
       serial: 46:e9:67:5b:59:d2
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=1.0

Any idea why the repo version of  lshw  is missing the helpful "product" and "vendor" fields?
« Last Edit: June 30, 2020, 01:52:27 PM by GNUser »

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: lshw does not show product or vendor information
« Reply #1 on: June 30, 2020, 09:51:47 PM »
Hi GNUser !

I am sorry if this looks too bad but did you install lshw-dev ?

I have noticed that the files required for lshw to list vendor and product lines (they are the identifier files for each vendor and product
/usr/share/lshw/oui.txt
/usr/share/lshw/pci.ids
/usr/share/lshw/usb.ids
) are in -dev. So, I suggest trying it.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: lshw does not show product or vendor information
« Reply #2 on: June 30, 2020, 10:39:36 PM »
There is no  lshw-dev.tcz  in the repo.

Also, I noticed that  lshw.tcz  includes these files:

Code: [Select]
/usr/local/share/lshw/pci.ids.gz             
/usr/local/share/lshw/pnp.ids.gz             
/usr/local/share/lshw/pnpid.txt.gz
/usr/local/share/lshw/usb.ids.gz

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: lshw does not show product or vendor information
« Reply #3 on: June 30, 2020, 10:49:06 PM »
You should have oui.txt and all the above said files.

Oh ! I saw x86 repo before  :P . I think you are using x64. Just now saw that they are in -doc in x64. Try it.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: lshw does not show product or vendor information
« Reply #4 on: June 30, 2020, 11:08:04 PM »
Hi GNUser
I did a little poking around and this is what I found.

Checking the CPU produces product and vendor in the output:
Code: [Select]
tc@E310:~$ sudo lshw -c cpu
  *-cpu                     
       description: CPU
       product: Intel(R) Pentium(R) 4 CPU 2.80GHz
       vendor: Intel Corp.
       physical id: 400
       bus info: cpu@0
       version: 15.4.9
       serial: 0000-0F49-0000-0000-0000-0000
       slot: Microprocessor
       size: 2800MHz
       capacity: 4GHz
       width: 64 bits
       clock: 800MHz
       capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe x86-64 constant_tsc pebs bts cpuid pni dtes64 monitor ds_cpl cid cx16 xtpr lahf_lm
       configuration: id=0
     *-logicalcpu:0
          description: Logical CPU
          physical id: 0.1
          width: 64 bits
          capabilities: logical
     *-logicalcpu:1
          description: Logical CPU
          physical id: 0.2
          width: 64 bits
          capabilities: logical
tc@E310:~$

Checking the network with the  -numeric  option produces product and vendor in the output:
Code: [Select]
tc@E310:~$ sudo lshw -numeric -c network
  *-network                 
       description: Ethernet interface
       product: [8086:1064]
       vendor: [8086]
       physical id: 8
       bus info: pci@0000:03:08.0
       logical name: eth0
       version: 04
       serial: 00:13:20:c4:4a:20
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.24-k2-NAPI duplex=full ip=192.168.1.35 latency=64 link=yes maxlatency=56 mingnt=8 multicast=yes port=MII speed=100Mbit/s
       resources: irq:20 memory:dfcff000-dfcfffff ioport:dcc0(size=64)
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: dummy0
       serial: ee:f4:2f:68:6e:22
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=1.0
tc@E310:~$

This is from the  pci.ids.gz  file. The  8086:1064  shows up, but without the  8086  prefix. Maybe that's why its not listing those fields.
Code: [Select]
1060  82571EB Gigabit Ethernet Controller
8086 0060  PRO/1000 PB Dual Port Server Connection
8086 1060  PRO/1000 PB Dual Port Server Connection
1064  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: lshw does not show product or vendor information
« Reply #5 on: July 01, 2020, 08:48:57 AM »
I figured out the problem: The lshw binary in the extension looks for data files in /usr/share/lshw. However, the extension puts those data files in /usr/local/share/lshw:

Code: [Select]
$ sudo strace -e trace=file /usr/local/sbin/lshw -c network 2>&1 | grep -F share/lshw
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnp.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnp.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnpid.txt.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnpid.txt", O_RDONLY) = -1 ENOENT (No such file or directory)

If I create a link, then  lshw  works as expected:
Code: [Select]
$ sudo ln -s /usr/local/share/lshw /usr/share/lshw
$ sudo /usr/local/sbin/lshw -c network
...
  *-network
       description: Wireless interface
       product: AR93xx Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
...

Maybe the root issue goes back to when lshw was compiled (missing "--prefix=/usr/local"). The fix would be to recompile  lshw  or to include link from /usr/share/lshw to /usr/local/share/lshw in the extension.

Rich, to prevent duplicating effort: Do you want to fix this issue or should I?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: lshw does not show product or vendor information
« Reply #6 on: July 01, 2020, 10:42:50 AM »
Maybe the root issue goes back to when lshw was compiled (missing "--prefix=/usr/local"). The fix would be to recompile  lshw  or to include link from /usr/share/lshw to /usr/local/share/lshw in the extension.

It would be better to find the hard coded address in the code and fix it. Is there an option to use the data in pci-utils?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: lshw does not show product or vendor information
« Reply #7 on: July 01, 2020, 01:20:52 PM »
A simple fix would be to move the four database files up from the /usr/local/share/lshw directory to the /usr/local/share directory.
/usr/local/share (but not /usr/local/share/lshw) is already one of the places where lshw looks for the data files :)

Code: [Select]
$ strings /usr/local/sbin/lshw | grep share
...
/usr/local/share/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids
/usr/local/share/pnp.ids:/usr/share/lshw/pnp.ids:/usr/share/hwdata/pnp.ids
/usr/local/share/pnpid.txt:/usr/share/lshw/pnpid.txt:/usr/share/hwdata/pnpid.txt
/usr/local/share/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids

It would therefore be trivial to fix the existing extensions.
@Rich - I see you were the last one to submit the lshw extension. Would you like to do this, or should I?
« Last Edit: July 01, 2020, 01:30:05 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: lshw does not show product or vendor information
« Reply #8 on: July 01, 2020, 05:16:31 PM »
Since I'm the one that seems to be the most bothered by this, I went ahead and fixed it for TCL10 (32 and 64 bit) and TCL11 (32 and 64 bit).

I did not recompile, just moved the .gz data archives from /usr/local/share/lshw/ to /usr/local/share/

The four adjusted extensions have been submitted :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: lshw does not show product or vendor information
« Reply #9 on: July 02, 2020, 01:57:17 AM »
Hi Juanito
... It would be better to find the hard coded address in the code and fix it. ...
I modified the build script to search the  .cc  files and fix them. Updated to newer version:
Code: [Select]
* lshw B.02.19
  detection of NVMe disks
  detection of SD/MMC and SDIO devices
  bug fixes
  code cleanup
  updated data files

Newly compiled extensions submitted.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: lshw does not show product or vendor information
« Reply #10 on: July 02, 2020, 02:06:49 AM »
Hi GNUser
Since I'm the one that seems to be the most bothered by this, ...
Now that's simply not true. I was busy yesterday and did not check the forum until last night.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: lshw does not show product or vendor information
« Reply #11 on: July 02, 2020, 07:58:42 AM »
I've received submissions from both of you  :)  which one should I use?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: lshw does not show product or vendor information
« Reply #12 on: July 02, 2020, 08:06:31 AM »
Rich's is the better solution. Please go ahead and post his :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: lshw does not show product or vendor information
« Reply #13 on: July 02, 2020, 08:08:53 AM »
Rich - Sorry for assuming I was the one most bothered. It was not meant as an accusation, just a call to action to myself. I tend to have a bit of inertia.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: lshw does not show product or vendor information
« Reply #14 on: July 02, 2020, 08:28:53 AM »
Hi GNUser
Rich - Sorry for assuming I was the one most bothered. ...
No problem. I was just having a little fun at your expense and probably should have included a smiley face in my comment ;D.

I figured out the problem: The lshw binary in the extension looks for data files in /usr/share/lshw. However, the extension puts those data files in /usr/local/share/lshw ...
Thank you for taking the time to pinpoint the issue.