CUDA之nvidia-smi命令详解---gpu
nvidia-smi是用来查看GPU使用情况的。我常用这个命令判断哪几块GPU空闲,但是最近的GPU使用状态让我很困惑,于是把nvidia-smi命令显示的GPU使用表中各个内容的具体含义解释一下。
这是服务器上特斯拉K80的信息。
上面的表格中:
第一栏的Fan:N/A是风扇转速,从0到100%之间变动,这个速度是计算机期望的风扇转速,实际情况下如果风扇堵转,可能打不到显示的转速。有的设备不会返回转速,因为它不依赖风扇冷却而是通过其他外设保持低温(比如我们实验室的服务器是常年放在空调房间里的)。
第二栏的Temp:是温度,单位摄氏度。
第三栏的Perf:是性能状态,从P0到P12,P0表示最大性能,P12表示状态最小性能。
第四栏下方的Pwr:是能耗,上方的Persistence-M:是持续模式的状态,持续模式虽然耗能大,但是在新的GPU应用启动时,花费的时间更少,这里显示的是off的状态。
第五栏的Bus-Id是涉及GPU总线的东西,domain:bus:device.function
第六栏的Disp.A是Display Active,表示GPU的显示是否初始化。
第五第六栏下方的Memory Usage是显存使用率。
第七栏是浮动的GPU利用率。
第八栏上方是关于ECC的东西。
第八栏下方Compute M是计算模式。
下面一张表示每个进程占用的显存使用率。
显存占用和GPU占用是两个不一样的东西,显卡是由GPU和显存等组成的,显存和GPU的关系有点类似于内存和CPU的关系。我跑caffe代码的时候显存占得少,GPU占得多,师弟跑TensorFlow代码的时候,显存占得多,GPU占得少。
背景
qgzang@ustc:~$ nvidia-smi -h
输出如下信息:
NVIDIA System Management Interface – v352.79
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 with the Kepler architecture
- Limited Support
- All Geforce products, starting with the Fermi architecture
命令
nvidia-smi [OPTION1 [ARG1]] [OPTION2 [ARG2]] ...
参数
参数 | 详解 |
---|---|
-h, –help | Print usage information and exit. |
LIST OPTIONS:
参数 | 详解 |
---|---|
-L, –list-gpus | Display a list of GPUs connected to the system. |
qgzang@ustc:~$ nvidia-smi -L
GPU 0: GeForce GTX TITAN X (UUID: GPU-xxxxx-xxx-xxxxx-xxx-xxxxxx)
SUMMARY OPTIONS:
参数 | 详解 |
---|---|
-i,–id= | Target a specific GPU. |
-f,–filename= | Log to a specified file, rather than to stdout. |
-l,–loop= | Probe until Ctrl+C at specified second interval. |
QUERY OPTIONS:
参数 | 详解 |
---|---|
-q, | –query |
-u,–unit | Show unit, rather than GPU, attributes. |
-i,–id= | Target a specific GPU or Unit. |
-f,–filename= | Log to a specified file, rather than to stdout. |
-x,–xml-format | Produce XML output. |
–dtd | When showing xml output, embed DTD. |
-d,–display= | Display only selected information: MEMORY, |
-l, –loop= | Probe until Ctrl+C at specified second interval. |
-lms, –loop-ms= | Probe until Ctrl+C at specified millisecond interval. |
SELECTIVE QUERY OPTIONS:
参数 | 详解 | 补充 |
---|---|---|
–query-gpu= | Information about GPU. | Call –help-query-gpu for more info. |
–query-supported-clocks= | List of supported clocks. | Call –help-query-supported-clocks for more info. |
–query-compute-apps= | List of currently active compute processes. | Call –help-query-compute-apps for more info. |
–query-accounted-apps= | List of accounted compute processes. | Call –help-query-accounted-apps for more info. |
–query-retired-pages= | List of device memory pages that have been retired. | Call –help-query-retired-pages for more info. |
[mandatory]
参数 | 命令 |
---|---|
-i, –id= | Target a specific GPU or Unit. |
-f, –filename= | Log to a specified file, rather than to stdout. |
-l, –loop= | Probe until Ctrl+C at specified second interval. |
-lms, –loop-ms= | Probe until Ctrl+C at specified millisecond interval. |
DEVICE MODIFICATION OPTIONS:
参数 | 命令 | 补充 |
---|---|---|
-pm, –persistence-mode= | Set persistence mode: 0/DISABLED, 1/ENABLED | |
-e, –ecc-config= | Toggle ECC support: 0/DISABLED, 1/ENABLED | |
-p, –reset-ecc-errors= | Reset ECC error counts: 0/VOLATILE, 1/AGGREGATE | |
-c, –compute-mode= | Set MODE for compute applications: | 0/DEFAULT,1/EXCLUSIVE_THREAD (deprecated),2/PROHIBITED, 3/EXCLUSIVE_PROCESS |
–gom= | Set GPU Operation Mode: | 0/ALL_ON, 1/COMPUTE, 2/LOW_DP |
-r –gpu-reset | Trigger reset of the GPU. |
UNIT MODIFICATION OPTIONS:
参数 | 命令 |
---|---|
-t, –toggle-led= | Set Unit LED state: 0/GREEN, 1/AMBER |
-i, –id= | Target a specific Unit. |
SHOW DTD OPTIONS:
参数 | 命令 |
---|---|
–dtd | Print device DTD and exit. |
-f, –filename= | Log to a specified file, rather than to stdout. |
-u, –unit | Show unit, rather than device, DTD. |
–debug= | Log encrypted debug information to a specified file. |
Process Monitoring:
参数 | 命令 | 补充 |
---|---|---|
pmon | Displays process stats in scrolling format. | “nvidia-smi pmon -h” for more information. |
TOPOLOGY: (EXPERIMENTAL)
参数 | 命令 | 补充 |
---|---|---|
topo | Displays device/system topology. “nvidia-smi topo -h” for more information. | Please see the nvidia-smi(1) manual page for more detailed information. |
CUDA之nvidia-smi命令详解---gpu相关推荐
- 【转载】GPU之nvidia-smi命令详解
转载自:GPU之nvidia-smi命令详解 1.nvidia-smi介绍 nvidia-sim简称NVSMI,提供监控GPU使用情况和更改GPU状态的功能,是一个跨平台工具,支持所有标准的NVIDI ...
- nvidia-smi 命令详解
nvidia-smi 命令详解 简介 nvidia-smi - NVIDIA System Management Interface program nvidia smi(也称为NVSMI)为来自 F ...
- 【网络编程】Linux tcpdump命令详解---编辑中
目录 即看即用 详细说明 简介 输出信息含义 链路层头 TCP 数据包 UDP 数据包 SMB/CIFS 解码 AFS 请求和回应 KIP AppleTalk协议 IP 数据包破碎 时间戳 反向过滤 ...
- Android自动化测试环境部署及adb sdkmanager avdmanager Monitor DDMS工具使用及命令详解
环境部署及工具使用 系列文章 前言 环境部署 硬件环境 软件环境 ADB工具 adb组成 adb命令 android命令 sdkmanager 命令 avdmanager命令 管理模拟器 monito ...
- Linux命令大全- tcpdump命令详解
losbyday 一名热爱开源.朴实的搬运工 Linux tcpdump命令详解 简介 用简单的话来定义tcpdump,就是:dump the traffic on a network,根据使用者的定 ...
- docker常用命令详解
docker常用命令详解 本文只记录docker命令在大部分情境下的使用,如果想了解每一个选项的细节,请参考官方文档,这里只作为自己以后的备忘记录下来. 根据自己的理解,总的来说分为以下几种: Doc ...
- oracle home 命令,$ORACLE_HOMEbin目录下所有命令的使用方法及命令详解
求$ORACLE_HOME/bin目录下所有命令的使用方法及命令详解 如题. $ORACLE_HOME/bin目录下有很多命令,那我们平时用到的也不是太多,即使用到的那部分可能用法也不是完全能掌握,所 ...
- 【FFmpeg】ffmpeg命令详解(三)高级选项
ffmpeg命令详解(三)高级选项 1.-map 2.-ignore_unknown 3.-copy_unknown 4.-map_channel 5.-map_metadata 6.-map_cha ...
- 【FFmpeg】ffmpeg命令详解(二)
ffmpeg命令详解(二) 4.流选择 4.1 自动选择流 4.2 手动选择流 5.命令行选择详解 5.1 命令行选项的值说明: 5.2 流说明符 5.3 通用选项 5.4 主选项 5.5 视频相关选 ...
最新文章
- SpringBoot日期格式处理
- java网页爬虫xml_基于webmagic的java网页爬虫,抓取网页指定节点,然后使用dom4j分析xml数据...
- 为什么ConcurrentHashMap是弱一致的
- React 中使用sass
- Andrew Ng - 深度学习工程师 - Part 2. 改善深层神经网络:超参数调试、正则化以及优化(Week 1. 机器学习的实用层面)...
- cass生成曲线要素文件_几种常见的CASS字体异常问题,教你如何解决
- 如何实现数据跨链交互?
- sublime安装python库_Mac OS 轻松用 Sublime Text 3 配置Python编译环境
- Go语言---结构体
- sql主键_SQL主键
- CXF(2.7.10) - RESTful Services, JSON Support
- python情感词典计算得分_利用情感词典计算调研纪要中的情感得分
- DOS命令:color
- 从百度指数到微信指数,我们正进入“数据世界”
- 复制PS图层的样式到其它图层
- 数据库系统原理与应用教程(019)—— MySQL 的配置文件
- maple 求特征值
- 精通 Python OpenCV4:第二部分
- 2021爱智先行者—数量遗传学 第一章 数量遗传学概论
- vue中axios利用blob实现文件浏览器下载
热门文章
- 总结一下在使用某里云服务器的过程中出现过的一些问题
- 系统架构升级要不要上微服务?历“久”弥新微服务——你真的需要升级微服务架构吗
- Spring AOP + Redis解决重复提交的问题
- 2022-2028年中国涤纶市场投资分析及前景预测报告
- Redis学习之路(一)--下载安装redis
- 102. Binary Tree Level Order Traversal
- 【机器学习】【条件随机场CRF-3】条件随机场的参数化形式详解 + 画出对应的状态路径图 + 给出对应的矩阵表示...
- 【图论】有向无环图的拓扑排序
- 数据结构——四大查找算法(工作必备)
- 3D Cube计算引擎加速运算