2

The helpful commands for dissecting loaded devices /NIC's

Beyond dmesg, there is a set of commands I can't remember, that illustrate details about LINUX devices specifically NIC's, lspci is one of them but I'm stuck trying to learn the differences between two Atheros 8100 Ethernet 802.3, old fashion CAT5 adapters on two different laptops.

The overall issue is the alx drivers compile for Ubuntu 10.04 or later for an AMD64 but refuse to burp past the "Module not found error#2" on the same distro from the same drive when tried on an Intel i5 both are nearly identical Toshiba's and the verified working NIC's in Windows as of this moment seem identical too.

Searching the web has helped me learn how to fix everyone else's problem with Atheros cards but at this moment I'm trying to figure out the difference in the two down to the DNA if I have to.

NOTE: I originally posted this on UNIX/LINUX site but deleted it and reposted at SF since I forgot it isn't out of scope here.

1 Answer 1

1

One easy way to query information about a device is hwinfo(8):


# hwinfo --help
Usage: hwinfo [options]
Probe for hardware.
  --short        just a short listing
  --log logfile  write info to logfile
  --debug level  set debuglevel
  --version      show libhd version
  --dump-db n    dump hardware data base, 0: external, 1: internal
  --hw_item      probe for hw_item
  hw_item is one of:
   all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard,
   cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub,
   ide, isapnp, isdn, joystick, keyboard, memory, modem, monitor, mouse,
   netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer,
   scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl,
   vbe, wlan, zip

Probing the netcard outputs something like:


# hwinfo --netcard
24: PCI 300.0: 0282 WLAN controller
  [Created at pci.318]
  Unique ID: y9sn.7ENUz3zhXm0
  Parent ID: qTvu.9IUMPjEn2W4
  SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
  SysFS BusID: 0000:03:00.0
  Hardware Class: network
  Model: "Intel WLAN controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x0083
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x1325
  Driver: "iwlwifi"
  Driver Modules: "iwlwifi"
  Device File: wlan0
  Features: WLAN
  Memory Range: 0xf1b00000-0xf1b01fff (rw,non-prefetchable)
  IRQ: 45 (1 event)
  HW Address: 74:e5:0b:76:04:8a
  WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13
  WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472
  WLAN encryption modes: WEP40 WEP104 TKIP CCMP
  WLAN authentication modes: open sharedkey wpa-psk wpa-eap
  Module Alias: "pci:v00008086d00000083sv00008086sd00001325bc02sc80i00"
  Driver Info #0:
    Driver Status: iwlwifi is active
    Driver Activation Cmd: "modprobe iwlwifi"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #15 (PCI bridge)

You can then use that information to investigate further


# ls -lrt /sys/devices/pci0000\:00/0000\:00\:1c.1/0000\:03\:00.0/
total 0
-rw-r--r--. 1 root root 4.0K May  1 12:33 uevent
lrwxrwxrwx. 1 root root    0 May  1 12:33 subsystem -> ../../../../bus/pci/
-r--r--r--. 1 root root 4.0K May  1 12:33 class
drwxr-xr-x. 3 root root    0 May  1 12:33 leds/
drwxr-xr-x. 3 root root    0 May  1 12:33 ieee80211/
-r--r--r--. 1 root root 4.0K May  1 12:33 vendor
drwxr-xr-x. 3 root root    0 May  1 12:33 net/
lrwxrwxrwx. 1 root root    0 May  1 12:33 driver -> ../../../../bus/pci/drivers/iwlwifi/
-r--r--r--. 1 root root 4.0K May  1 12:33 device
-rw-r--r--. 1 root root 4.0K May  1 12:34 config
-r--r--r--. 1 root root 4.0K May  1 22:16 resource
-r--r--r--. 1 root root 4.0K May  1 22:16 irq
-r--r--r--. 1 root root 4.0K May  2 00:41 subsystem_vendor
-r--r--r--. 1 root root 4.0K May  2 00:41 subsystem_device
-r--r--r--. 1 root root 4.0K May  2 00:41 modalias
-rw-------. 1 root root 8.0K May  2 00:48 resource0
--w-------. 1 root root 4.0K May  2 00:48 reset
--w--w----. 1 root root 4.0K May  2 00:48 rescan
--w--w----. 1 root root 4.0K May  2 00:48 remove
drwxr-xr-x. 2 root root    0 May  2 00:48 power/
-r--r--r--. 1 root root 4.0K May  2 00:48 numa_node
drwxr-xr-x. 3 root root    0 May  2 00:48 msi_irqs/
-rw-r--r--. 1 root root 4.0K May  2 00:48 msi_bus
-r--r--r--. 1 root root 4.0K May  2 00:48 local_cpus
-r--r--r--. 1 root root 4.0K May  2 00:48 local_cpulist
lrwxrwxrwx. 1 root root    0 May  2 00:48 firmware_node -> ../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1b/device:1c/
-rw-------. 1 root root 4.0K May  2 00:48 enable
-r--r--r--. 1 root root 4.0K May  2 00:48 dma_mask_bits
-rw-r--r--. 1 root root 4.0K May  2 00:48 d3cold_allowed
-r--r--r--. 1 root root 4.0K May  2 00:48 consistent_dma_mask_bits
-rw-r--r--. 1 root root 4.0K May  2 00:48 broken_parity_status

Look for differences like


# cat /sys/devices/pci0000\:00/0000\:00\:1c.1/0000\:03\:00.0/driver/module/srcversion
3A84FA6037EB1F39D3947AE

For lspci(8), check that you have run update-pciids(8).

2
  • That is the answer I needed, how do I "upvote" / kudo your answer Dawud ? Can'd see the button and I'm still not allowed to upvote until 15 rep. May 5, 2013 at 22:53
  • Check here
    – dawud
    May 7, 2013 at 6:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .