当前位置 主页 > 服务器问题 > Linux/apache问题 >

    Linux查看PCIe版本及速率的方法(3)

    栏目:Linux/apache问题 时间:2019-10-24 15:18


    这3个编号会组合成一个 16-bits 的识别码,

    汇流排(bus number) 8bits 2^8 至多可连接 256 个汇流排(0 to ff),

    装置(device number) 5bits 2^5 至多可接 32 种装置(0 to 1f) 以及

    功能(function number) 3bits 2^3 至多每种装置可有 8 项功能(0 to 7).

    关于更多 #lspci 的资讯请参考 http://benjr.tw/node/543

    然后查看vendor id和device id

    root@XXX# lspci -n | grep -i 06:00.0
    06:00.0 0200: 8086:10fb (rev 01)
    root@XXX# 

    Linux 使用 Class ID + Vendor ID + Device ID  來代表裝置,如剛剛的  0200: 8086:10fb 所代表裝置名稱為 (Class ID = 0200 , Vendor ID = 8086, Device ID = 10fb)

    最后查看指定PCI设备的带宽

    root@XXX# lspci -n -d 8086:10fb -vvv | grep --color Width
      LnkCap: Port #9, Speed 5GT/s, Width x8, ASPM L0s, Latency L0 <1us, L1 <8us
      LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
      LnkCap: Port #9, Speed 5GT/s, Width x8, ASPM L0s, Latency L0 <1us, L1 <8us
      LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
      LnkCap: Port #1, Speed 5GT/s, Width x8, ASPM L0s, Latency L0 <1us, L1 <8us
      LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
      LnkCap: Port #1, Speed 5GT/s, Width x8, ASPM L0s, Latency L0 <1us, L1 <8us
      LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
    root@XXX# 
    

    LnkSta : 目前系統所提供的速度 PCI-Express 2.0 ( 5GT/s )

    LnkCap : 裝置目前所採用的速度.

    LnkSta 和 LnkCap 這兩個速度有可能不一樣 , 典型情况下: 系統所提供的是 PCI Express 是 3.0 但裝置還是使用 2.0 的.

    以上就是本次介绍的相关知识点,感谢大家的学习和对IIS7站长之家的支持。