How can I tell if my USB flash drive is running at full USB 2.0 speed? Currently I'd just like to verify that the drive is plugged into a 480 Mbps port, but in the past I've been unsure if a given device was USB 2.0 or an older revision. I'd like a way to identify its capabilities other than testing read/write speed.
You could check out
On my system I get for example this line (and much more information):
Port 6: 0000.0503 highspeed power enable connect
Alternatively you can issue a:
tail -f /var/log/kern.log
in one terminal and then plug in the USB flash drive. On my system I get for example this message:
Sep 15 22:10:40 foo kernel: [405279.750140] usb 2-2: new high speed USB device using ehci_hcd and address 24
ehci_hcd is the USB 2.0 controler module in the kernel (i.e. everything is ok, the USB 2.0 stick is used with the right speed).
Unless you get a follow up message like this:
Sep 15 22:15:25 foo kernel: [405564.451402] usb 6-2: not running at top speed; connect to a high speed hub
(in this case probably compatibility problem with a low quality USB 2.0 stick (Kensington), since the computer's USB port supports USB 2.0 high speed devices otherwise)
With a non USB 2.0 high speed stick I get this message:
Sep 15 22:15:25 foo kernel: [405564.300127] usb 6-2: new full speed USB device using uhci_hcd and address 4
If your user account does not have access to /var/log/kern.log (or another system dependent kernel log message file location), you could use the command dmesg as an alternative to display the contents of the kernel message buffer. The disadvantage of dmesg is just that it does print such nice time stamps and it does not have a follow output option.
shows the speed directly after the device name.
lsusb -t you can see the specifications of the usb:
$ sudo lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M |__ Port 6: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 3: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 4: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M
But to check the speed of the usb, and see if it is working right you need to do a speed test with hdparm
$ sudo hdparm -tT /dev/sdd /dev/sdd: Timing cached reads: 7642 MB in 2.00 seconds = 3822.03MB/sec Timing buffered disk reads: 96 MB in 3.05 seconds = 31.44MB/sec
The example is one of my random pendrive, you must see something like before.