Linux查看gpu进程和杀死结束进程

1.查看进程

$ nvidia-smi
Fri Jul 17 19:51:09 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.43       Driver Version: 418.43       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  TITAN Xp            Off  | 00000000:65:00.0 Off |                  N/A |
| 46%   74C    P2   236W / 250W |   3825MiB / 12196MiB |     98%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     30318      C   python                                      3815MiB |
+-----------------------------------------------------------------------------+

2.杀死结束进程

$ kill -9 PID (如结束上图进程为:$ kill -9 30318)

你可能感兴趣的:(Linux,Ubntu16.04,linux,多进程,kill)