Linux 系統硬件管理的基礎知識(一)
以下講述關于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 提供;大約有如下文件;
- [beinan@localhost ~]# rpm -ql hwdata-0.158-1
- /etc/hotplug/blacklist
- /etc/pcmcia
- /etc/pcmcia/config
- /usr/X11R6/lib/X11/Cards
- /usr/share/doc/hwdata-0.158
- /usr/share/doc/hwdata-0.158/COPYING
- /usr/share/doc/hwdata-0.158/LICENSE
- /usr/share/hwdata
- /usr/share/hwdata/CardMonitorCombos
- /usr/share/hwdata/Cards
- /usr/share/hwdata/MonitorsDB
- /usr/share/hwdata/pci.ids
- /usr/share/hwdata/pcitable
- /usr/share/hwdata/upgradelist
- /usr/share/hwdata/usb.ids
lspci 有兩個參數是我們常用的,-b 和-v ,lspci 也會把usb接口列出來;
舉例:
- [root@localhost beinan]# lspci -b
- 00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
- 00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller
(rev 02)- 00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller
(rev 02)- 00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
- 00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
- 00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller
#1 (rev 03)- 00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller
#2 (rev 03)- 00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller
#3 (rev 03)- 00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)
- 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)
- 00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)
- 00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)
- 00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
- 00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97
Audio Controller (rev 03)- 00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
- 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
- 02:09.0 CardBus bridge: Texas Instruments Texas Instruments PCIxx21/x515 Cardbus Controller
- 02:09.2 FireWire (IEEE 1394): Texas Instruments Texas Instruments OHCI Compliant IEEE 1394 Host
Controller- 02:09.3 Unknown mass storage controller: Texas Instruments Texas Instruments PCIxx21
Integrated FlashMedia Controller- 02:09.4 Class 0805: Texas Instruments Texas Instruments PCI6411, PCI6421, PCI6611,
PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD)
請點下方《Linux 系統硬件管理的基礎知識(二)》。
【編輯推薦】