Linux file – pci.ids

Loading

Step 0: 前言
我們可以透過 #lspci 來查看系統上有什麼裝置.但有時候你會發現有些裝置是 unknown 的. 這時候我們可以透過更新 /usr/share/hwdata/pci.ids 使得看到所有完整的裝置名稱.

[root@benjr root]# lspci
00:00.0 Host bridge: Intel Corporation E7500 Memory Controller Hub (rev 03)
00:00.1 Class ff00: Intel Corporation E7500/E7501 Host RASUM Controller (rev 03)
00:02.0 PCI bridge: Intel Corporation E7500/E7501 Hub Interface B PCI-to-PCI Bridge (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #1) (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #2) (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corporation 82801CA LPC Interface Controller (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801CA Ultra ATA Storage Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 02)
01:1c.0 PIC: Intel Corporation 82870P2 P64H2 I/OxAPIC (rev 03)
01:1d.0 PCI bridge: Intel Corporation 82870P2 P64H2 Hub PCI Bridge (rev 03)
01:1e.0 PIC: Intel Corporation 82870P2 P64H2 I/OxAPIC (rev 03)
01:1f.0 PCI bridge: Intel Corporation 82870P2 P64H2 Hub PCI Bridge (rev 03)
04:03.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
04:04.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 0d)
04:05.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 0d

Step 1. 下載更新的 pci.ids
pci.ids 是由網站 http://pci-ids.ucw.cz/ 來維護,這裡可以在找到最新的檔案.

現在還可以透過指令 update-pciids (由套件 pciutils 提供) 直接下載最新的檔案.

root@ubuntu:~# update-pciids 
Downloaded daily snapshot dated 2017-05-25 03:15:02

Step 2. 解壓縮
通常網站上提供不同的壓縮檔只要用對壓縮程式就可以解開,這邊是以 .bz2 為例.

[root@benjr root]# bzip2 -d pci.ids.bz2

Step 3. 更新 pci.ids
RedHat 和 SuSE 放置 pci.ids 的位置不同,請參考下面的位置.

  • RedHat :
    [root@benjr root]# cp pci.ids /usr/share/hwdate/
    
  • SuSE :
    [root@benjr root]# cp pci.ids /usr/share/
    
  • Ubuntu :
    root@ubuntu:~# cp pci.ids /usr/share/misc/
    

其實更新這個檔案對於系統的幫助並不大,還是需要有正確的驅動程式才能使裝置正常運作.如果你要檢查 device ID 可以在 lspci 加入參數 -n 即可.

[root@benjr root]# lspci -n

加入參數 -v ,可以看到更多的資訊. -vv (兩個V,不是W)是多到你不想看的資訊.

[root@benjr root]# lspci -v

lspci 的使用請參考

  1. #lspci (list all PCI devices) 是最常用來看 PCI-(E) Bus 的系統硬體相關訊息的指令,請參考 https://benjr.tw/10851
  2. 透過 #lspci 查詢 PCI-E Bus 匯流排速度,請參考 https://benjr.tw/10842
  3. 關於 lspci 詳細資訊所代表的意思,請參考 https://benjr.tw/98087
沒有解決問題,試試搜尋本站其他內容

5 thoughts on “Linux file – pci.ids

  1. 自動引用通知: Linux – lspci | Benjr.tw

發佈回覆給「aa」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料