Linux下如何查看NVIDIA显卡信息

2024年11月19日 22:39
有4个网友回答
网友(1):

1、首先在ubuntu系统中按Ctrl+Alt+T快捷键打开命令输入框,输入“gnome-terminal”命令,然后按回车键即可打开终端:

2、然后在终端中输入命令“lspci | grep -i nvidia”即可得到NVIDIA显卡的信息:

3、最后可以用Linux查看Nvidia显卡信息及使用情况,Nvidia自带一个命令行工具可以查看显存的使用情况,终端输入“nvidia-smi”可以查看到:

网友(2):

lspci  | grep -i vga


这样就可以显示机器上的显卡信息,比如 

[root@localhost conf]# lspci | grep -i vga

01:00.0 VGA compatible controller: nVidia Corporation Device 1081 (rev a1)

02:00.0 VGA compatible controller: nVidia Corporation GT215 [GeForce GT 240] (rev a2)

08:05.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 10)


如果想看详细的信息,比如 GeForce GT 240,即 02:00.0


[root@localhost conf]# lspci -v -s 02:00.0

02:00.0 VGA compatible controller: nVidia Corporation GT215 [GeForce GT 240] (rev a2) (prog-if 00 [VGA controller])

Subsystem: ASUSTeK Computer Inc. Device 8351

Flags: bus master, fast devsel, latency 0, IRQ 169

Memory at f9000000 (32-bit, non-prefetchable) [size=16M]

Memory at d0000000 (64-bit, prefetchable) [size=256M]

Memory at ce000000 (64-bit, prefetchable) [size=32M]

I/O ports at bc00 [size=128]

[virtual] Expansion ROM at f8f80000 [disabled] [size=512K]

Capabilities: [60] Power Management version 3

Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+

Capabilities: [78] Express Endpoint, MSI 00

Capabilities: [b4] Vendor Specific Information: Len=14

Capabilities: [100] Virtual Channel

Capabilities: [128] Power Budgeting

Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024

Kernel driver in use: nvidia

Kernel modules: nvidiafb, nvidia


可以看到GT240的显存是 256M


但是我的系统上其实是装了两块显卡的,还有一块显示不出来,这个时候,对于nvidia显卡的话可以用nvidia-smi命令来查

[root@localhost conf]# nvidia-smi

网友(3):

使用命令:lspci | grep -i vga

这样就可以显示机器上的显卡信息,比如
[root@localhost conf]# lspci | grep -i vga
01:00.0 VGA compatible controller: nVidia Corporation Device 1081 (rev a1)
02:00.0 VGA compatible controller: nVidia Corporation GT215 [GeForce GT 240] (rev a2)
08:05.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 10)

网友(4):

lspci | grep -i nVida