如何在CentOS Linux上检查GPU

pyt*_*nic 11 c linux gpu gpgpu x86-64

建议在Linux上使用该命令找到GPU lspci | grep VGA.它在Ubuntu上运行正常但是当我尝试在CentOS上使用它时,它说没有找到lspci命令.如何在CentOS上检查GPU卡.请注意,我不是机器的管理员,我只能从命令行远程使用它.我打算在那台机器上使用GPU作为GPGPU,但首先我需要检查它是否有一台.

小智 17

这假设您已安装专有驱动程序,但发出以下命令...

nvidia-smi
Run Code Online (Sandbox Code Playgroud)

输出应该类似于:

Mon Dec 23 10:50:28 2013       
+------------------------------------------------------+                       
| NVIDIA-SMI 331.20     Driver Version: 331.20         |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 660     Off  | 0000:01:00.0     N/A |                  N/A |
| 10%   38C  N/A     N/A /  N/A |     97MiB /  2047MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|    0            Not Supported                                               |
+-----------------------------------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)

  • 是的@hihell - `watch -n 1 nvidia-smi`会每秒刷新一次. (2认同)

sho*_*nex 16

你试过推出/sbin/lspci还是/usr/sbin/lspci


Abu*_*oeb 7

尝试lshwlspci。如果您还没有安装它们,则必须安装它们。

安装 lshw

sudo yum install lshw //CentOS
sudo apt-get install lshw // Ubuntu
Run Code Online (Sandbox Code Playgroud)

然后运行这个

sudo lshw -C display
Run Code Online (Sandbox Code Playgroud)

输出看起来像这样

 *-display
       description: VGA compatible controller
       product: GP102 [GeForce GTX 1080 Ti]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:0b:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:95 memory:fb000000-fbffffff memory:e0000000-efffffff memory:de000000-dfffffff ioport:5000(size=128) memory:faf00000-faf7ffff
Run Code Online (Sandbox Code Playgroud)

同样,您可以尝试 lspci

lspci | grep VGA
Run Code Online (Sandbox Code Playgroud)

输出看起来像这样

0b:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
Run Code Online (Sandbox Code Playgroud)