Ubuntu 16.04 下查看gpu的运行情况

 

$ nvidia-smi
Fri Aug 31 14:49:38 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130                Driver Version: 384.130                   |
|-------------------------------+----------------------+----------------------+
| 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 108...  Off  | 00000000:01:00.0  On |                  N/A |
|  3%   45C    P8    18W / 250W |    442MiB / 11169MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1044      G   /usr/lib/xorg/Xorg                           220MiB |
|    0      3248      G   compiz                                       127MiB |
|    0     16948      G   ...-token=C2AF575F0081C7FF039D10E2FA4410A2    91MiB |
+-----------------------------------------------------------------------------+

 配合 watch命令,可以每秒执行一次

$ watch -n 1 nvidia-smi
Fri Aug 31 14:49:38 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130                Driver Version: 384.130                   |
|-------------------------------+----------------------+----------------------+
| 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 108...  Off  | 00000000:01:00.0  On |                  N/A |
|  3%   45C    P8    18W / 250W |    442MiB / 11169MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1044      G   /usr/lib/xorg/Xorg                           220MiB |
|    0      3248      G   compiz                                       127MiB |
|    0     16948      G   ...-token=C2AF575F0081C7FF039D10E2FA4410A2    91MiB |
+-----------------------------------------------------------------------------+

 

你可能感兴趣的:(Ubuntu,AI,人工智能,GPU)