Answers:
您可以使用rsync
近似的传输速度,尽管它取决于要传输的是小文件还是大文件,并且目的地是慢速闪存驱动器还是快速的外部硬盘。例如:
rsync -avviu ~/Videos /media/Mik2
sent 874419803 bytes received 149 bytes 4427442.79 bytes/sec
total size is 874312527 speedup is 1.00
(此外,如果打开tail -f /var/log/kern.log
然后连接设备,您可以查看是否已针对支持USB 2速度的ehci(增强的主机控制器接口)进行了设置。例如,内核日志中应注明“新的高速USB设备...使用ehci_hcd'。)
该pv
工具使您可以查看流经它的数据的吞吐量。安装软件包后,您可以运行以下命令以查看写入速率:
$ cat /dev/zero | pv > /media/some_usb/tmp123
203.1MiB 0:00:02 [100.2MiB/s] [ <=> ]
为了阅读,请使用新创建的tmp123
文件执行相反的操作:
$ cat /media/some_usb/tmp123 | pv > dev/null
我对此感到很好奇,因为我想使用SATA 3 SSD来处理一些视频文件(以使I / O等待最少),但是系统上只有SATA 2(3Gbps)端口可用, USB3端口可用。
您可以使用以下命令确定每个USB端口的理论最大速度 sudo lsusb -vvv |grep -i -B5 -A5 bcdUSB
bcdUSB行返回端口的USB版本。
我的系统之一的示例:
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x8087 Intel Corp.
--
Port 7: 0000.0100 power
Port 8: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
--
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
--
Bus 001 Device 003: ID 10d5:5a08 Uni Class Technology Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x10d5 Uni Class Technology Co., Ltd
--
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x8087 Intel Corp.
--
Port 5: 0000.0100 power
Port 6: 0000.0303 lowspeed power enable connect
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
--
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
--
Bus 004 Device 002: ID 174c:5106 ASMedia Technology Inc. Transcend StoreJet 25M3
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x174c ASMedia Technology Inc.
--
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
--
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
或快速简便的替代方法lsusb -t
提供以下输出:
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 4: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 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/6p, 480M
|__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
由于通过USB3提供的5 Gbps距离更接近于SATA 3的6 Gbps,因此我决定将驱动器连接到那里Bus 004 Device 002
(通过Asmedia USB3toSATA适配器)。结果相当令人满意。
资料来源:本页
实验性
lsblk
和[etc / mtab]之类的文件内容,@ Melab在大多数情况下似乎很明显。如果您有新问题,请随时使用[问问题按钮](askubuntu.com/questions/询问)在页面的右上角。
试试这个:
$ sudo lsusb -vvv
然后,查看名为bDeviceProtocol和bInterfaceProtocol的条目
sudo lsusb -vvv |grep -i -B5 -A5 bDeviceProtocol
。然后查看列为bDeviceClass Hub的条目。