您现在的位置是:首页 > 文章详情

Linux命令:lspci显示PCI总线设备信息

日期:2018-05-07点击:1422

lspci:显示所有的PCI总线设备信息。

下面试lspci的全部功能介绍:

  1. $ lspci -
  2. Usage: lspci [<switches>]
  3. Basic display modes:
  4. -mm     Produce machine-readable output (single -m for an obsolete format)
  5.         #生成机器可读的输出(单个-m用于过时的格式)
  6. -t      Show bus tree
  7.         #显示巴士树
  8. Display options:
  9. -v      Be verbose (-vv for very verbose)
  10.         #详细(-vv非常详细)
  11. -k      Show kernel drivers handling each device
  12.         #显示处理每个设备的内核驱动
  13. -x      Show hex-dump of the standard part of the config space
  14.         #显示配置空间的标准部分的十六进制转储
  15. -xxx        Show hex-dump of the whole config space (dangerous; root only)
  16.         #显示整个配置空间的十六进制转储(危险;只有root)
  17. -xxxx       Show hex-dump of the 4096-byte extended config space (root only)
  18.         #显示4096字节扩展配置空间的十六进制转储(仅限root用户)
  19. -b      Bus-centric view (addresses and IRQ's as seen by the bus)
  20.         #以总线为中心的视图(巴士所看到的地址和IRQ)
  21. -D      Always show domain numbers
  22.         #始终显示域名编号
  23. Resolving of device ID's to names:
  24. -n      Show numeric ID's#将设备ID解析为名称:
  25. -nn     Show both textual and numeric ID's (names & numbers)
  26.         #显示文本和数字ID(姓名和号码)
  27. -q      Query the PCI ID database for unknown ID's via DNS
  28.         #通过DNS查询未知ID的PCI ID数据库
  29. -qq     As above, but re-query locally cached entries
  30.         #如上所述,但重新查询本地缓存条目
  31. -Q      Query the PCI ID database for all ID's via DNS
  32.         #通过DNS查询所有ID的PCI ID数据库
  33. Selection of devices:
  34. -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]   Show only devices in selected slots
  35.                         #仅显示选定插槽中的设备
  36. -d [<vendor>]:[<device>][:<class>]        Show only devices with specified ID's
  37.                         #仅显示具有指定ID的设备
  38. Other options:
  39. -i <file> Use specified ID database instead of /usr/share/hwdata/pci.ids
  40.         #使用指定的ID数据库而不是/usr/share/hwdata/pci.ids
  41. -p <file> Look up kernel modules in a given file instead of default modules.pcimap
  42.         #查找给定文件中的内核模块而不是默认的modules.pcimap
  43. -M      Enable `bus mapping' mode (dangerous; root only)
  44.         #启用`总线映射'模式(危险;只有root)
  45. PCI access options:
  46. -A <method>   Use the specified PCI access method (see `-A help' for a list)
  47.         #使用指定的PCI访问方法(请参阅`-A help'获取列表)
  48. -O <par>=<val>  Set PCI access parameter (see `-O help' for a list)
  49.         #设置PCI访问参数(请参阅“-O帮助”获取列表)
  50. -G      Enable PCI access debugging
  51.         #启用PCI访问调试
  52. -H <mode> Use direct hardware access (<mode> = 1 or 2)
  53.         #使用直接硬件访问(<mode> = 1或2)
  54. -F <file> Read PCI configuration dump from a given file
  55.         #从给定文件读取PCI配置转储

简单的几个例子:(grep指令:https://blog.csdn.net/rong_toa/article/details/79799127

  1. #查看显卡信息
  2. $ lspci | grep -i vga
  3. 00:0f.0 VGA compatible controller: VMware SVGA II Adapter
  4. #只显示制定槽中的设备
  5. $ lspci -s 00:0f.0
  6. 00:0f.0 VGA compatible controller: VMware SVGA II Adapter
  7. #用机器可读的形式输出
  8. $ lspci -mm -s 00:0f.0
  9. 00:0f.0 "VGA compatible controller" "VMware" "SVGA II Adapter" "VMware" "SVGA II Adapter"
  10. $ lspci -Q -s 00:0f.0
  11. 00:0f.0 VGA compatible controller: VMware SVGA II Adapter
  12. $ lspci -D -s 00:0f.0
  13. 0000:00:0f.0 VGA compatible controller: VMware SVGA II Adapter

查看详细信息:

  1. $ lspci -v -s 00:0f.0
  2. 00:0f.0 VGA compatible controller: VMware SVGA II Adapter (prog-if 00 [VGA controller])
  3.     Subsystem: VMware SVGA II Adapter
  4.     Flags: bus master, medium devsel, latency 64, IRQ 16
  5.     I/O ports at 1070 [size=16]
  6.     Memory at e8000000 (32-bit, prefetchable) [size=128M]
  7.     Memory at fe000000 (32-bit, non-prefetchable) [size=8M]
  8.     [virtual] Expansion ROM at c0000000 [disabled] [size=32K]
  9.     Capabilities: <access denied>
  10.     Kernel driver in use: vmwgfx
  11.     Kernel modules: vmwgfx
原文链接:https://www.centoschina.cn/command/help/10517.html
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章