当前位置:   article > 正文

【linux 常用命令】查看gpu、显卡常用命令_linux查看gpu命令

linux查看gpu命令

1.查看显卡基本信息
lspci | grep -i nvidia
2.查看显卡驱动版本
nvidia-smi -a
3.查看gpu使用情况
nvidia-smi

(spam) [dongli@dt-gpu-1 train]$ nvidia-smi 
Fri Sep 27 16:42:33 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00    Driver Version: 418.87.00    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla P40           Off  | 00000000:82:00.0 Off |                    0 |
| N/A   44C    P0    54W / 250W |  22057MiB / 22919MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0    125983      C   python                                     22047MiB |
+-----------------------------------------------------------------------------+
(spam) [dongli@dt-gpu-1 train]$ lspci |grep -i nvidia
82:00.0 3D controller: NVIDIA Corporation GP102GL [Tesla P40] (rev a1)
(spam) [dongli@dt-gpu-1 train]$ lspci | grep -i nvidia
82:00.0 3D controller: NVIDIA Corporation GP102GL [Tesla P40] (rev a1)
(spam) [dongli@dt-gpu-1 train]$ 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

Drivers 驱动

CUDA-一种由Nvidia推出的通用并行计算架构和应用程序编程接口模型。02
cuDNN-一套Nvidia专门为深度神经网络设计的GPU计算加速库。

> nvidia-smi 展示nvidia显卡使用信息
  • 1

4、动态查看gpu使用情况

watch -n 1 nvidia-smi
  • 1
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00    Driver Version: 418.87.00    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla P40           Off  | 00000000:82:00.0 Off |                    0 |
| N/A   31C    P0    47W / 250W |      0MiB / 22919MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号