nvidia-smi命令解读

本文介绍了如何使用nvidia-smi命令查看GPU的使用情况,包括驱动版本、GPU信息和各进程显存占用。内容提及显存和GPU占用的区别,并提到在运行不同框架(如Caffe、TensorFlow)时的占用差异。
摘要由CSDN通过智能技术生成

经常会用到nvidia-smi命令来查看gpu的使用情况,
这里写图片描述
具体的命令释义为:
参考教程1,
第一行为机器的当前时间,
第二行为驱动的版本号,
第三行是GPU名字,持续模式,Bus-Id,Disp.A,
第四行是具体的使用情况,

1)Fan:N/A是风扇转速,从0到100%之间变动,这个速度是计算机期望的风扇转速,实际情况下如果风扇堵转,可能打不到显示的转速。有的设备不会返回转速,因为它不依赖风扇冷却而是通过其他外设保持低温(比如我们实验室的服务器是常年放在空调房间里的)。 
2)Temp:是温度,单位摄氏度。 
3)Perf:是性能状态,从P0到P12,P0表示最大性能,P12表示状态最小性能。 
4)Pwr:是能耗,上方的Persistence-M:是持续模式的状态,持续模式虽然耗能大,但是在新的GPU应用启动时,花费的时间更少,这里显示的是off的状态。 
5)Bus-Id是涉及GPU总线的东西,domain:bus:device.function 
6)Disp.A是Display Active,表示GPU的显示是否初始化。 
第五第六栏下方的Memory Usage是显存使用率。 
第七栏是浮动的GPU利用率。 
第八栏上方是关于ECC的东西。 
第八栏下方Compute M是计算模式。 

下面一张表示每个进程占用的显存使用率。

显存占用和GPU占用是两个不一样的东西,显卡是由GPU和显存等组成的,显存和GPU的关系有点类似于内存和CPU的关系。听说跑caffe代码的时候显存占得少,GPU占得多;跑TensorFlow代码的时候,显存占得多,GPU占得少。

执行nvidia-smi -h > log.txt将帮助信息导出到log.txt中,

NVIDIA System Management Interface -- v375.39

NVSMI provides monitoring information for Tesla and select Quadro devices.
The data is presented in either a plain text or an XML format, via stdout or a file.
NVSMI also provides several management operations for changing the device state.

Note that the functionality of NVSMI is exposed through the NVML C-based
library. See the NVIDIA developer website for more information about NVML.
Python wrappers to NVML are also available.  The output of NVSMI is
not guaranteed to be backwards compatible; NVML and the bindings are backwards
compatible.

http://developer.nvidia.com/nvidia-management-library-nvml/
http://pypi.python.org/pypi/nvidia-ml-py/
Supported products:
- Full Support
    - All Tesla products, starting with the Fermi architecture
    - All Quadro products, starting with the Fermi architecture
    - All GRID products, starting with the Kepler architecture
    - GeForce Titan products, starting 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值