Linux 如何列出USB端口类型和连接设备的速度?

Linux 如何列出USB端口类型和连接设备的速度?,linux,usb,port,device,Linux,Usb,Port,Device,我希望有一个命令输出USB端口类型(OHCI、UHCI、EHCI、XHCI等)和连接到的设备(如果有),以及Linux的实际速度(HS、FS、SS等)。最好是一条线 我想快速查明所有设备是否都在以尽可能高的速度运行。我刚刚发现了解决方案lsusb-t(我以前不知道,因为它的文档记录得很差)。以下是一个示例输出: > lsusb -t /: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M /: Bus 06.Po

我希望有一个命令输出USB端口类型(OHCI、UHCI、EHCI、XHCI等)和连接到的设备(如果有),以及Linux的实际速度(HS、FS、SS等)。最好是一条线

我想快速查明所有设备是否都在以尽可能高的速度运行。

我刚刚发现了解决方案
lsusb-t
(我以前不知道,因为它的文档记录得很差)。以下是一个示例输出:

> lsusb -t
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/3p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/3p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/3p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/3p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 3: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 6: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 4: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M

.

也指编程问题,而不是关于使用或配置Linux的问题。SuperUser.com或unix.stackexchange.com将是回答此类问题的更好地方。我的问题不是关于使用或配置Linux。那么它是关于什么的?这与你编写的程序无关,因为你没有发布任何代码。一个编程问题不能要求一个完整的简单程序(脚本),而不必自己动手吗?如果您确实需要一些开始,那么这个列出每个端口的USB版本号的脚本(希望如此):
lsusb | sort-n | awk'$1==“Bus”&&&7==“Linux”{print$2:“$4”USB“$9}”
如果您在问题中提出类似的内容,我不会投票关闭它。在我看来,您只是在寻找返回所需信息的命令的名称。