日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 综合教程 >内容正文

综合教程

PCIe网卡查看工具

發(fā)布時(shí)間:2024/6/21 综合教程 48 生活家
生活随笔 收集整理的這篇文章主要介紹了 PCIe网卡查看工具 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

今天測(cè)試部匯報(bào)了一個(gè)設(shè)備出現(xiàn)問(wèn)題:” 8個(gè)1g電口 +8個(gè)1g光口+4個(gè)10g bp光口+4個(gè)10g非bp光口,其中有4個(gè)口沒(méi)有up起來(lái),ifconfig看不到接口“

拿到這個(gè)問(wèn)題我就在想:“怎樣確定是不是只有4個(gè)網(wǎng)口沒(méi)有up?ifconfig只是一個(gè)查看內(nèi)核虛擬設(shè)備,那么物理網(wǎng)卡設(shè)備呢? 怎樣確定這個(gè)4個(gè)口就是測(cè)試人員所說(shuō)的10g非bp光口?

?ù---所以為了弄清楚上述問(wèn)題,需要確認(rèn)什么信息,使用什么工具作為輔助?----

物理拓?fù)洌汉?jiǎn)要情況就是網(wǎng)口插入PCIe板卡

所以首先要確認(rèn)PCIe板卡是否被識(shí)別!

那么有什么工具幫助查看呢?

linux的lspci命令可以幫助查看

執(zhí)行l(wèi)spci命令如下:lspci |grep Eth

03:00.0 Ethernet controller: Intel Corporation Device 1521 (rev 01)
03:00.1 Ethernet controller: Intel Corporation Device 1521 (rev 01)
03:00.2 Ethernet controller: Intel Corporation Device 1521 (rev 01)
03:00.3 Ethernet controller: Intel Corporation Device 1521 (rev 01)
04:00.0 Ethernet controller: Intel Corporation Device 1521 (rev 01)
04:00.1 Ethernet controller: Intel Corporation Device 1521 (rev 01)
04:00.2 Ethernet controller: Intel Corporation Device 1521 (rev 01)
04:00.3 Ethernet controller: Intel Corporation Device 1521 (rev 01)
07:00.0 Ethernet controller: Intel Corporation Device 1521 (rev 01)
07:00.1 Ethernet controller: Intel Corporation Device 1521 (rev 01)
07:00.2 Ethernet controller: Intel Corporation Device 1521 (rev 01)
07:00.3 Ethernet controller: Intel Corporation Device 1521 (rev 01)
08:00.0 Ethernet controller: Intel Corporation Device 1521 (rev 01)
08:00.1 Ethernet controller: Intel Corporation Device 1521 (rev 01)
08:00.2 Ethernet controller: Intel Corporation Device 1521 (rev 01)
08:00.3 Ethernet controller: Intel Corporation Device 1521 (rev 01)
0a:00.0 Ethernet controller: Intel Corporation Device 1533 (rev 03)
0b:00.0 Ethernet controller: Intel Corporation Device 1533 (rev 03)
0c:00.0 Ethernet controller: Intel Corporation Device 1572 (rev 02)
0c:00.1 Ethernet controller: Intel Corporation Device 1572 (rev 02)
0c:00.2 Ethernet controller: Intel Corporation Device 1572 (rev 02)
0c:00.3 Ethernet controller: Intel Corporation Device 1572 (rev 02)

可以看到PCIe數(shù)目不對(duì),可知為PCIe板卡沒(méi)有被識(shí)別到

這次主要想說(shuō)的問(wèn)題是:

0c:00.3 Ethernet controller: Intel Corporation Device 1572 (rev 02)
這些數(shù)值是什么意思??

以及l(fā)spci還能查看那些信息;除了lspci還有哪些工具可以幫助分析問(wèn)題

先看lspci幫助:lspci - 列出所有PCI設(shè)備

-v
    使得 lspci 以冗余模式顯示所有設(shè)備的詳細(xì)信息。 
-vv
    使得 lspci 以過(guò)冗余模式顯示更詳細(xì)的信息 (事實(shí)上是 PCI 設(shè)備能給出的所有東西)。這些數(shù)據(jù)的確切意義沒(méi)有在此手冊(cè)頁(yè)中解釋?zhuān)绻阆胫栏啵?qǐng)參照 /usr/include/linux/pci.h 或者 PCI 規(guī)范。 
-n
    以數(shù)字形式顯示 PCI 生產(chǎn)廠商和設(shè)備號(hào),而不是在 PCI ID 數(shù)據(jù)庫(kù)中查找它們。 
-x
    以十六進(jìn)制顯示 PCI 配置空間 (configuration space) 的前64個(gè)字節(jié)映象 (標(biāo)準(zhǔn)頭部信息)。此參數(shù)對(duì)調(diào)試驅(qū)動(dòng)和 lspci 本身很有用。 
-xxx
    以十六進(jìn)制顯示所有 PCI 配置空間的映象。此選項(xiàng)只有 root 可用,并且很多 PCI 設(shè)備在你試圖讀取配置空間的未定義部分時(shí)會(huì)崩潰 (此操作可能不違反PCI標(biāo)準(zhǔn),但是它至少非常愚蠢)。 
-b
    以總線為中心進(jìn)行查看。顯示所有 IRQ 號(hào)和內(nèi)存地址,就象 PCI 總線上的卡看到的一樣,而不是內(nèi)核看到的內(nèi)容。 
-t
    以樹(shù)形方式顯示包含所有總線、橋、設(shè)備和它們的連接的圖表。 
-s [[<bus>]:][<slot>][.[<func>]]
    僅顯示指定總線、插槽上的設(shè)備或設(shè)備上的功能塊信息。設(shè)備地址的任何部分都可以忽略,或以“*”代替 (意味著所有值)。所有數(shù)字都是十六進(jìn)制。例如:“0:”指的是在0號(hào)總線上的所有設(shè)備;“0”指的是在任意總線上0號(hào)設(shè)備的所有功能塊;“0.3”選擇 了所有總線上0號(hào)設(shè)備的第三個(gè)功能塊;“.4”則是只列出每一設(shè)備上的第四個(gè)功能塊。 
-d [<vendor>]:[<device>]
    只顯示指定生產(chǎn)廠商和設(shè)備 ID 的設(shè)備。 這兩個(gè) ID 都以十六進(jìn)制表示,可以忽略或者以“*”代替 (意味著所有值)。 
-i <file>
    使用 <file> 作為 PCI ID 數(shù)據(jù)庫(kù)而不是使用默認(rèn)的 /usr/share/hwdata/pci.ids。 
-p <dir>
    使用 <dir> 作為包含 PCI 總線信息的目錄而不是使用默認(rèn)的目錄 /proc/bus/pci。 
-m
    以機(jī)器可讀的方式轉(zhuǎn)儲(chǔ) PCI 設(shè)備數(shù)據(jù) (支持兩種模式:普通和冗余),便于腳本解析。 

常用問(wèn)題&命令:

首先在x86系統(tǒng)中PCIe支持256個(gè)Bus,每條Bus支持32個(gè)Device,每個(gè)Device支持8個(gè)Function,所以PCIe設(shè)備關(guān)鍵信息組成為:DBDF(Domain,Bus,Deivce,Function)

PCIe的拓?fù)浜蚅inux的PCIe ID

lspci –vt

所以使用lspci -vt 可以查看PCIe拓?fù)洌桓鶕?jù)拓?fù)渚涂梢钥闯觯尤霂讉€(gè)板卡,每個(gè)板卡下面接入了多少設(shè)備

dmidecode –t slot”命令查看PCIE Slot的信息

dmidecode,讀取DMI表中的數(shù)據(jù)來(lái)提取硬件信息,可查看bios,cpu,memory等信息

結(jié)合/proc和/sys可以查詢硬件使用的驅(qū)動(dòng)信息

總結(jié)

以上是生活随笔為你收集整理的PCIe网卡查看工具的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。