1. 程式人生 > >CentOS查看顯卡及GPU相關信息

CentOS查看顯卡及GPU相關信息

nco count pan mask manage fas ted pid expr

lspci | grep -i vga

這樣就可以顯示機器上的顯卡信息,比如

[[email protected] 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

[[email protected]

/* */ 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命令來查,查看GPU也是用這個命令

[[email protected]
/* */ conf]# nvidia-smi
Tue Dec 3 14:46:02 2013
+------------------------------------------------------+
| NVIDIA-SMI 4.304.54 Driver Version: 304.54 |
|-------------------------------+----------------------+----------------------+
| GPU Name | Bus-Id Disp. | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 570 | 0000:01:00.0 N/A | N/A |
| 50% 65C N/A N/A / N/A | 49% 624MB / 1279MB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GT 240 | 0000:02:00.0 N/A | N/A |
| N/A 39C N/A N/A / N/A | 1% 2MB / 255MB | N/A Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Compute processes: GPU Memory |
| GPU PID Process name Usage |
|=============================================================================|
| 0 Not Supported |
| 1 Not Supported |
+-----------------------------------------------------------------------------+



可以看到,還有一塊顯卡是 GTX 570, 顯存是 1279M,也就是我們用lspci看到的 01:00.0

CentOS查看顯卡及GPU相關信息