nvidia-smi 命令

背景

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, –helpPrint usage information and exit.

LIST OPTIONS:

参数详解
-L, –list-gpusDisplay 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,–unitShow 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-formatProduce XML output.
–dtdWhen 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-resetTrigger 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:

参数命令
–dtdPrint device DTD and exit.
-f, –filename=Log to a specified file, rather than to stdout.
-u, –unitShow unit, rather than device, DTD.
–debug=Log encrypted debug information to a specified file.

Process Monitoring:

参数命令补充
pmonDisplays process stats in scrolling format.“nvidia-smi pmon -h” for more information.

TOPOLOGY: (EXPERIMENTAL)

参数命令补充
topoDisplays device/system topology. “nvidia-smi topo -h” for more information.Please see the nvidia-smi(1) manual page for more detailed information.
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
nvidia-smiNVIDIA System Management Interface程序的命令行工具。它可以用于在Windows和Linux系统中查看和管理NVIDIA显卡的状态和信息。在Windows系统中,nvidia-smi.exe的位置通常是C:\Program Files\NVIDIACorporation\NVSMI\nvidia-smi.exe。在Linux系统中,nvidia-smi的位置通常是/usr/bin/nvidia-smi。由于这些位置已经加入了系统的PATH路径,所以可以直接在命令行中输入nvidia-smi来运行该命令。除了直接运行nvidia-smi命令之外,还可以使用不同的参数来查看NVIDIA显卡的其他状态。例如,使用-L参数可以列出本机上所有可用的NVIDIA GPU。其他常用的参数可以在nvidia-smi的手册(man nvidia-smi)中查找到。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [nvidia-smi 命令详解](https://blog.csdn.net/weixin_44966641/article/details/121228579)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [NVIDIA-SMI系列命令总结](https://blog.csdn.net/luhuaxiang/article/details/125219285)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值