lspci?-s [[[[]:]]:][][.[]]?顯示指定PCI設(shè)備的信息,域名通??梢允÷浴H缦聢D所示,lspci?-s?02:00.0 中02表示bus number,00表示device number,0表示function number。-mm選項(xiàng)用于產(chǎn)生一種易于機(jī)器解析的輸出格式。輸出的信息將以一種結(jié)構(gòu)化的、通常是鍵值對(duì)的形式展現(xiàn),便于腳本或其他自動(dòng)化工具處理和分析。以總線樹的方式呈現(xiàn)所有PCI設(shè)備,設(shè)備信息量較少,僅僅只有[[[[]:]]:][][.[]],不含其他信息,因此為了顯示更多信息,可以使用lspci -tv? ??
? ??列出所有PCI設(shè)備的詳細(xì)信息,v數(shù)量越多,信息越詳細(xì)為了方便比較,我們指定了bc:00.0設(shè)備使用lspci -v和lspci -vv,顯示效果如下。lspci -v 顯示的信息比較少,只顯示了PCI設(shè)備存在的能力結(jié)構(gòu)名稱,其中能力結(jié)構(gòu)字段沒有顯示,而lspci -vv顯示的信息比較多,顯示了PCI設(shè)備配置空間的所有能力結(jié)構(gòu)
? ??NOTE: lspci 顯示的并不全是PCI配置空間的真實(shí)值,其中部分字段來自系統(tǒng)緩存的信息,例如bar0~bar5,一旦PCI設(shè)備因?yàn)殒溌凡环€(wěn)定等問題發(fā)生復(fù)位導(dǎo)致bar寄存器被清零時(shí),lspci顯示的bar數(shù)值依舊是復(fù)位之前的數(shù)值。? ? ??lspci -PP 針對(duì)endpoint設(shè)備,會(huì)額外添加當(dāng)前設(shè)備的bridge設(shè)備的bus and device number? ??lspci -s 04:00.0 -PP 獲取指定Endpoint PCIe設(shè)備04:00.0的對(duì)接bridge設(shè)備號(hào),如圖所示bridge設(shè)備號(hào)為00:0c.0lspci -nn 顯示PCI設(shè)備的class code、vendor id以及device id。如下圖所示,lspci??-s 74:00.0 -nn顯示了class code[0604],顯示了vendor id[19e5]以及device id[a121]。? ??lspci -Q?:通過DNS(域名系統(tǒng))查詢所有PCI設(shè)備的vendor id和device id,新申請(qǐng)的vendor id在舊版本的lspci中是無法顯示公司名稱的,只能顯示vendor id和device id。通過lspci -Q命令可以更新本地vendor id和device id數(shù)據(jù)庫(kù),之后使用lspci就能顯示公司名稱了。lspci?-d []:[][:]??: 查詢指定的PCI設(shè)備,輸入命令時(shí)至少需要輸入vendor id和device id。lspci -x 以16進(jìn)制的形式顯示PCI標(biāo)準(zhǔn)配置空間內(nèi)容lspci -xxxx 以16進(jìn)制的形式顯示4KB配置空間內(nèi)容? ??2.lspci --help ??
[root@asic icxiaoge]# lspci --helplspci: invalid option --?Usage: lspci []? ? ? ? ? ? ???-mm ? ? ? ? ? ? Produce machine-readable output (single -m for an obsolete format ? ? ? ? ? ? ? ? ? )-t ? ? ? ? ? ? ?Show bus tree? ? ? ? ? ? ? ??-v ? ? ? ? ? ? ?Be verbose (-vv or -vvv for higher verbosity)-k ? ? ? ? ? ? ?Show kernel drivers handling each device-x ? ? ? ? ? ? ?Show hex-dump of the standard part of the config space-xxx ? ? ? ? ? ?Show hex-dump of the whole config space (dangerous; root only)-xxxx ? ? ? ? ? Show hex-dump of the 4096-byte extended config space (root only)-b ? ? ? ? ? ? ?Bus-centric view (addresses and IRQ's as seen by the bus)? ? ? ? ? ? ? ??-D ? ? ? ? ? ? ?Always show domain numbers-P ? ? ? ? ? ? ?Display bridge path in addition to bus and device number-PP ? ? ? ? ? ? Display bus path in addition to bus and device number? ? ? ? ? ? ? ??Resolving of device id's to names:-n ? ? ? ? ? ? ?Show numeric ID's-nn ? ? ? ? ? ? Show both textual and numeric ID's (names & numbers)-q ? ? ? ? ? ? ?Query the PCI ID database for unknown ID's via DNS-qq ? ? ? ? ? ? As above, but re-query locally cached entries-Q ? ? ? ? ? ? ?Query the PCI ID database for all ID's via DNS? ? ? ??? ? ? ? ? ???-s [[[[]:]]:][][.[]] ? Show only devices in selected slots -d []:[][:] ? ? ? ? ? ? ?Show only devices with specified ID's? ? ? ? ? ? ? ?? -i? ? ? ?Use specified ID database instead of /usr/share/hwdata/pci.ids-p? ? ? ?Look up kernel modules in a given file instead of default modules.pcimap-M ? ? ? ? ? ? ?Enable `bus mapping' mode (dangerous; root only)? ? ? ? ? ? ? ? ??-A? ? ?Use the specified PCI access method (see `-A help' for a list)-O=? Set PCI access parameter (see `-O help' for a list)-G ? ? ? ? ? ? ?Enable PCI access debugging-F? ? ? ?Read PCI configuration dump from a given file |
欲知詳情,請(qǐng)下載word文檔
下載文檔
本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請(qǐng)聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請(qǐng)及時(shí)聯(lián)系本站刪除。