Linux 系統硬體管理的基礎知識(一)

來源:互聯網
上載者:User

以下講述關於Linux 硬體管理的基礎知識,由於很多朋友對這部分知識瞭解的不全,希望以下的對大家有所協助。

一、在Linux 硬體管理中,對硬體判別的標識的依據;

在 LinuxSir.Org 討論區,我們經常看到有些弟兄這樣來描述自己的硬體“我的顯示卡是XXX牌子的,Linux 不支援怎麼辦?”。其實這樣描述是最差的,大家也根本沒有辦法提供協助;因為Linux對硬體的識別是以為晶片集的廠商為依據的,而非硬體的品牌;因為現在硬體廠商大多是OEM的,也就是說硬體的主晶片是他們生產不了的,但他們會從硬體主晶片廠商拿來,焊接在自己的電路板上,這就是OEM 的過程;

無論什麼硬體都是以晶片集的廠商為標識的,而不是什麼市場看到的這個品牌,那個品牌的;舉個例子,我們在市場上看到有各種各樣的顯卡,其實看一下他們的晶片,大多是ATI和 NVIDIA的,所有的ATI和NVIDIA的驅動都是ATI和NVIDIA開發出來的。所以我們提問的時候,要把硬體的晶片說出來,晶片是驅動的唯一標識,而不是品牌!!!

所以我們要找硬體的驅動時,我們一定要根據硬體主晶片的資訊來找相關的驅動;

二、在Linux中查看硬體資訊的工具;

在Linux 中,並不是沒有工具可以查看硬體的晶片資訊,應該說Linux的工具能把硬體資訊查看的更清楚;下面介紹幾個常用的工具;我們最常用的工具還是lspci ;其它的工具只是瞭解一下;

1、lspci 列出所有PCI 裝置;

lspci - list all PCI devices ,主要是有來列出機器中的PCI 裝置,比如音效卡、顯卡、貓、網卡等,主板整合裝置也能列出來;lspci 是讀取 hwdata 資料庫,hwdata 由軟體包 hwdata 提供;大約有如下檔案;

 
  1. [beinan@localhost ~]# rpm -ql hwdata-0.158-1  
  2. /etc/hotplug/blacklist  
  3. /etc/pcmcia  
  4. /etc/pcmcia/config  
  5. /usr/X11R6/lib/X11/Cards  
  6. /usr/share/doc/hwdata-0.158  
  7. /usr/share/doc/hwdata-0.158/COPYING  
  8. /usr/share/doc/hwdata-0.158/LICENSE  
  9. /usr/share/hwdata  
  10. /usr/share/hwdata/CardMonitorCombos  
  11. /usr/share/hwdata/Cards  
  12. /usr/share/hwdata/MonitorsDB  
  13. /usr/share/hwdata/pci.ids  
  14. /usr/share/hwdata/pcitable  
  15. /usr/share/hwdata/upgradelist  
  16. /usr/share/hwdata/usb.ids  

lspci 有兩個參數是我們常用的,-b 和-v ,lspci 也會把usb介面列出來;

舉例: 

 
  1. [root@localhost beinan]# lspci -b  
  2. 00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)  
  3. 00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller 
    (rev 02)  
  4. 00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller 
    (rev 02)  
  5. 00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)  
  6. 00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)  
  7. 00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller
     #1 (rev 03)  
  8. 00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller 
    #2 (rev 03)  
  9. 00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller 
    #3 (rev 03)  
  10. 00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)  
  11. 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)  
  12. 00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)  
  13. 00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)  
  14. 00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)  
  15. 00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97
     Audio Controller (rev 03)  
  16. 00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)  
  17. 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)  
  18. 02:09.0 CardBus bridge: Texas Instruments Texas Instruments PCIxx21/x515 Cardbus Controller  
  19. 02:09.2 FireWire (IEEE 1394): Texas Instruments Texas Instruments OHCI Compliant IEEE 1394 Host
     Controller  
  20. 02:09.3 Unknown mass storage controller: Texas Instruments Texas Instruments PCIxx21 
    Integrated FlashMedia Controller  
  21. 02:09.4 Class 0805: Texas Instruments Texas Instruments PCI6411, PCI6421, PCI6611, 
    PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) 

請點下方《Linux 系統硬體管理的基礎知識二)》。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.