Linux 系統(tǒng)硬件管理的基礎(chǔ)知識(shí)(一)
以下講述關(guān)于Linux 硬件管理的基礎(chǔ)知識(shí),由于很多朋友對(duì)這部分知識(shí)了解的不全,希望以下的對(duì)大家有所幫助。
一、在Linux 硬件管理中,對(duì)硬件判別的標(biāo)識(shí)的依據(jù);
在 LinuxSir.Org 討論區(qū),我們經(jīng)??吹接行┑苄诌@樣來描述自己的硬件“我的顯示卡是XXX牌子的,Linux 不支持怎么辦?”。其實(shí)這樣描述是最差的,大家也根本沒有辦法提供幫助;因?yàn)長(zhǎng)inux對(duì)硬件的識(shí)別是以為芯片組的廠商為依據(jù)的,而非硬件的品牌;因?yàn)楝F(xiàn)在硬件廠商大多是OEM的,也就是說硬件的主芯片是他們生產(chǎn)不了的,但他們會(huì)從硬件主芯片廠商拿來,焊接在自己的電路板上,這就是OEM 的過程;
無論什么硬件都是以芯片組的廠商為標(biāo)識(shí)的,而不是什么市場(chǎng)看到的這個(gè)品牌,那個(gè)品牌的;舉個(gè)例子,我們?cè)谑袌?chǎng)上看到有各種各樣的顯卡,其實(shí)看一下他們的芯片,大多是ATI和 NVIDIA的,所有的ATI和NVIDIA的驅(qū)動(dòng)都是ATI和NVIDIA開發(fā)出來的。所以我們提問的時(shí)候,要把硬件的芯片說出來,芯片是驅(qū)動(dòng)的唯一標(biāo)識(shí),而不是品牌?。?!
所以我們要找硬件的驅(qū)動(dòng)時(shí),我們一定要根據(jù)硬件主芯片的信息來找相關(guān)的驅(qū)動(dòng);
二、在Linux中查看硬件信息的工具;
在Linux 中,并不是沒有工具可以查看硬件的芯片信息,應(yīng)該說Linux的工具能把硬件信息查看的更清楚;下面介紹幾個(gè)常用的工具;我們最常用的工具還是lspci ;其它的工具只是了解一下;
1、lspci 列出所有PCI 設(shè)備;
lspci - list all PCI devices ,主要是有來列出機(jī)器中的PCI 設(shè)備,比如聲卡、顯卡、貓、網(wǎng)卡等,主板集成設(shè)備也能列出來;lspci 是讀取 hwdata 數(shù)據(jù)庫(kù),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 有兩個(gè)參數(shù)是我們常用的,-b 和-v ,lspci 也會(huì)把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)
請(qǐng)點(diǎn)下方《Linux 系統(tǒng)硬件管理的基礎(chǔ)知識(shí)(二)》。
【編輯推薦】