【问题标题】:How to list USB port type with speed of connected device?如何以连接设备的速度列出 USB 端口类型?
【发布时间】:2017-08-17 06:23:03
【问题描述】:

我想要一个输出 USB 端口类型(OHCI、UHCI、EHCI、XHCI、...)和连接的设备(如果有)以及实际速度(HS、FS、SS , ...) 对于 Linux。最好都在一条线上。

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

【问题讨论】:

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

标签: linux usb port device


【解决方案1】:

我刚刚发现了USB Port Speed Linux 和解决方案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

也被https://askubuntu.com/questions/598022/how-to-find-usb-hub-speed引用。

【讨论】:

  • 投反对票的人会这么好心在投反对票时发表评论吗?
猜你喜欢
  • 1970-01-01
  • 2017-12-14
  • 1970-01-01
  • 2013-08-06
  • 1970-01-01
  • 1970-01-01
  • 2023-01-23
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多