Linux 查看當(dāng)前 python 進程
在 shell 中執(zhí)行如下指令:
ps -ef | grep python
實時查看所有進程:
top
Windows 查看當(dāng)前 python 進程
在 shell 中執(zhí)行如下指令:
wmic process where name="python.exe"
或者
wmic process where name="python.exe" list full
wmic process where name="python.exe" list brief
查看其它程序進程,只需要將 python 改個名即可。
Nvidia 顯卡查看 GPU 利用率
Linux 下,直接執(zhí)行指令:
nvidia-smi
Windows 下,需要切換到 nvidia-smi.exe 可執(zhí)行程序的目錄 C:\Program Files\NVIDIA Corporation\NVSMI 下,再在命令行中執(zhí)行該程序。指令如下:
cd C:\Program Files\NVIDIA Corporation\NVSMI
nvidia-smi.exe
示意圖:
Linux和Windows查看當(dāng)前運行的 python 進程及 GPU、磁盤利用率
Linux 磁盤利用率
查看整個 file system 的使用情況:
df -lh
查看當(dāng)前文件夾及子文件(夾)的大?。海ㄐ薷?--max-depth 參數(shù)即可查看不同深度的子文件夾的情況)
du -ah --max-depth=0