3

There used to be lots of info on usb devices, coming form /proc/bus/usb/devices.

Then this was no longer auto mounted, so you had to mount it yourself (usbdevfs it was called, or something)

Now, in 11.04, even that doesn't work. How can I get some info on my device now?

  • define what info you want and I'll expand my answer. – Rinzwind Aug 13 '11 at 12:27
6

lsusb shows this:

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0bda:0138 Realtek Semiconductor Corp. 
Bus 001 Device 003: ID 064e:c218 Suyin Corp.  
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

What more do you need to know?

If you need more there is usbview on sourceforge: USBView is a GTK program that displays the topography of the devices that are plugged into the USB bus on a Linux machine. It also displays information on each of the devices. This can be useful to determine if a device is working properly or not.

enter image description here

did not try usbview in 11.04 btw

5

/proc is becoming deprecated, /sys/bus/usb/devices is what you are looking for. A program to query for USB devices is lsusb.

1

Here are a few nice tools for gathering USB info about connected devices,

usb-devices:

This is part of the DEFAULT PACKAGE usbutils on 18.04 LTS. Specimen output:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.15
S:  Manufacturer=Linux 4.15.0-1050-oem xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0781 ProdID=5571 Rev=01.00
S:  Manufacturer=SanDisk'
S:  Product=Cruzer Fit
S:  SerialNumber=4C530000280331109123
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

.

udevadm monitor

udevadm is part of the DEFAULT PACKAGE udev on 18.04 LTS.

Execute this command BEFORE you connect your USB device.

Note in the specimen output below it tells us which block device the USB flash drive loaded as:

udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[969.010067] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[969.010367] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[969.018769] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0 (scsi)
KERNEL[969.018849] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/scsi_host/host0 (scsi_host)
KERNEL[969.018934] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
KERNEL[969.019049] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
UDEV  [969.024995] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
UDEV  [969.031390] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
UDEV  [969.036362] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0 (scsi)
UDEV  [969.041258] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/scsi_host/host0 (scsi_host)
UDEV  [969.046202] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0 (usb)
UDEV  [969.051734] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-1 (usb)
KERNEL[970.051706] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0 (scsi)
KERNEL[970.052068] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[970.052215] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[970.052435] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[970.052585] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
KERNEL[970.052774] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[970.052963] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
UDEV  [970.060833] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0 (scsi)
KERNEL[970.061634] add      /devices/virtual/bdi/8:0 (bdi)
UDEV  [970.069006] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV  [970.071467] add      /devices/virtual/bdi/8:0 (bdi)
UDEV  [970.075852] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[970.079839] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[970.079989] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV  [970.083556] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV  [970.091288] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
UDEV  [970.091755] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0 (scsi_generic)
UDEV  [970.106807] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
UDEV  [970.339976] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV  [970.519549] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
  • @user68186 Please validate your info before down-marking a correct answer. I checked BOTH pkgs are part of the furniture of a default 18.04 LTS install using this pkg list: https://packages.ubuntu.com/bionic/allpackages . dpkg -S /bin/udevadm tells us is provided by udevwhich is on that list, which. Also, dpkg -S /usr/bin/usb-devices tells us is provided by usbutils which is also on that list. I also re-imaged an 18.04 host to validate this: they're there by default. And I did state in my original answer how udevadm was used. – F1Linux Aug 27 '19 at 18:49
  • No prob. I'm generally very meticulous when I post a solution, so I was really a bit stunned when you pulled me up. Anyhoo, thanks for rescinding the initial down-grade! When ever I get feedback on an answer- downgrade or not- I'll always try to take it on-board and incorporate it – F1Linux Aug 27 '19 at 20:27
  • Keep up the good work. :) – user68186 Aug 27 '19 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.