首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >了解USB消息日志以解决USB自动生成问题

了解USB消息日志以解决USB自动生成问题
EN

Unix & Linux用户
提问于 2018-05-10 20:41:34
回答 1查看 1K关注 0票数 0

我试图解决一个问题,在一台服务器上,我的USB自动机,而在另一台服务器上,它不是。比较这两个实例的日志,我试图理解每一行意味着什么。

自动USB消息日志:

代码语言:javascript
运行
复制
May  9 18:10:40 kernel: usb 2-1.4: new high-speed USB device number 12  using ehci-pci 
May  9 18:10:40 kernel: usb 2-1.4: New USB device found, idVendor=8564, idProduct=1000
May  9 18:10:40 kernel: usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May  9 18:10:40 kernel: usb 2-1.4: Product: MYUSB
May  9 18:10:40 kernel: usb 2-1.4: Manufacturer: MYUSB
May  9 18:10:40 kernel: usb 2-1.4: SerialNumber: A1678
May  9 18:10:40 kernel: usb-storage 2-1.4:1.0: USB Mass Storage device detected
May  9 18:10:40 kernel: scsi host13: usb-storage 2-1.4:1.0
May  9 18:10:40 mtp-probe: checking bus 2, device 12: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4"
May  9 18:10:40 mtp-probe: bus: 2, device: 12 was not an MTP device
May  9 18:10:41 kernel: scsi 13:0:0:0: Direct-Access     USB      MYUSB        1100 PQ: 0 ANSI: 4
May  9 18:10:41 kernel: sd 13:0:0:0: Attached scsi generic sg2 type 0
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] 15724544 512-byte logical blocks: (8.05 GB/7.50 GiB)
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] Write Protect is off
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] No Caching mode page found
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] Assuming drive cache: write through
May  9 18:10:41 kernel: sdb: sdb1
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] Attached SCSI disk
May  9 18:10:41 kernel: FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
May  9 18:10:41 gvfs-udisks2-volume-monitor: disc.c:352: error opening file BDMV/index.bdmv
May  9 18:10:41 gvfs-udisks2-volume-monitor: disc.c:352: error opening file BDMV/BACKUP/index.bdmv
May  9 18:10:41 udisksd[838]: Mounted /dev/sdb1 at /run/media/user/MYUSB on behalf of uid 1000

不自动生成USB消息日志:

代码语言:javascript
运行
复制
May  9 18:09:07 kernel: usb 3-7: new high-speed USB device number 12 using xhci_hcd
May  9 18:09:07 kernel: usb 3-7: New USB device found, idVendor=8564, idProduct=1000
May  9 18:09:07 kernel: usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May  9 18:09:07 kernel: usb 3-7: Product: MYUSB
May  9 18:09:07 kernel: usb 3-7: Manufacturer: MYUSB
May  9 18:09:07 kernel: usb 3-7: SerialNumber: A1678
May  9 18:09:07 kernel: usb-storage 3-7:1.0: USB Mass Storage device detected
May  9 18:09:07 kernel: scsi host4: usb-storage 3-7:1.0
May  9 18:09:07 mtp-probe: checking bus 3, device 12: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-7"
May  9 18:09:07 mtp-probe: bus: 3, device: 12 was not an MTP device
May  9 18:09:08 kernel: scsi 4:0:0:0: Direct-Access     USB      MYUSB        1100 PQ: 0 ANSI: 4
May  9 18:09:08 kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] 15724544 512-byte logical blocks: (8.05 GB/7.50 GiB)
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] Write Protect is off
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] No Caching mode page found
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
May  9 18:09:08 kernel: sdb: sdb1
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] Attached SCSI disk
  1. 内核如何确定使用usb 2-1.4usb 3-7的哪个USB版本?
  2. sd 4:0:0:0:是什么意思?

另外,我还试图在工作盒上复制自动输出问题。我做了一个简短的比较,并注意到两个框上的linux实用程序版本是不同的,不工作的版本有一个旧版本(util 2.18),而both有一个更新的版本(util-linux-2.28)。有人知道这是否会影响USB自动计数吗?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-05-11 07:12:26

1)这不是"USB版本“,而是USB树中USB端口连接硬件的位置。实际编号由硬件和内核初始化USB根集线器并分配总线号的顺序决定。如果您有兴趣的话,可以使用lsusb -t来查看USB树。

2) 4:0:0:0意味着它被分配给SCSI总线编号4,而这条总线上只有一个设备(它是一个虚拟总线,因为它的存储协议本质上是SCSI)。13:0:0:0也一样。sd是SCSI磁盘内核子系统(或者可能是“存储磁盘”,不知道.),类似于st (磁带)等等。

3)所有这些都不会对你的自动化问题有所帮助。在这两台主机上都很好地检测到硬件和分区,其中一个主机被配置为自动运行,而另一个主机则没有。

有几种方法可以实现自动生成,所以第一步是找出您在一台主机上安装的方式,然后在第二台主机上配置和安装它。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/443073

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档