Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计通过

nvidia-smi英伟达 SMI

Agent Skill

nvidia-smi 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,679

周安装

232

GitHub Stars

公开资料未说明

下载量

1,819
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nvidia-smi(英伟达 SMI)
来源仓库:https://github.com/duanc-chao/nvidia-smi
安装命令:
openclaw skills install nvidia-smi
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install nvidia-smi

简介

提供有关使用 nvidia-smi 命令进行实时 NVIDIA GPU 监控、管理、故障排除和自动化的详细指南。

SKILL.md

Skill: Deep Dive into 'nvidia-smi'

Name: nvidia-smi-mastery Description: Provides a comprehensive guide to using the nvidia-smi command for monitoring, managing, and troubleshooting NVIDIA GPU devices, from basic status checks to advanced scripting. Keywords: ["nvidia-smi", "gpu monitoring", "nvml", "cuda", "deep learning", "gpu troubleshooting", "system administration"]

Deep Dive into 'nvidia-smi'

Objective To transform users from basic nvidia-smi observers into power users capable of advanced GPU diagnostics, performance tuning, and automated monitoring.

Core Concept: The GPU's Dashboard

nvidia-smi (NVIDIA System Management Interface) is the primary command-line utility for monitoring and managing NVIDIA GPUs. It acts as a "dashboard," providing real-time data on your GPU's health and performance.

  • Under the Hood: nvidia-smi is a client for the NVIDIA Management Library (NVML), a C library that provides the interface to the GPU driver. This means you can also use NVML bindings in languages like Python (pynvml) to build custom monitoring tools.
  • Primary Use Cases:

- Monitoring GPU utilization and temperature during model training. - Diagnosing "CUDA out of memory" (OOM) errors by identifying processes consuming VRAM. - Troubleshooting performance bottlenecks like thermal throttling. - Managing multi-GPU environments.

The Output: A Field Guide

Running nvidia-smi provides a table of information. Here's how to interpret the key fields:

  • GPU: The ID of the GPU (e.g., 0, 1) in a multi-GPU system.
  • Fan, Temp, Perf: Fan speed (%), GPU temperature (°C), and performance state (P0 is max performance, P12 is idle).
  • Pwr:Usage/Cap: Current power draw versus the board's power limit (TDP).
  • Memory-Usage: The most critical field for many. It shows Used / Total VRAM.
  • GPU-Util: The percentage of time the GPU's compute cores were busy. Note the distinction between high VRAM usage and high GPU utilization.
  • Processes: A list of PIDs and process names currently using the GPU, along with their individual memory consumption. This is invaluable for finding "zombie" processes.

Essential Commands and Workflows

Basic Monitoring

  • The Standard View: nvidia-smi
  • Continuous Monitoring: Instead of a one-time snapshot, use watch or the built-in loop option for real-time updates.

- watch -n 1 nvidia-smi (Updates every 1 second) - nvidia-smi -l 1 (Native loop, updates every 1 second)

Targeted Queries

  • List GPUs: nvidia-smi -L provides a clean list of all detected GPUs and their UUIDs.
  • Focus on a Single GPU: nvidia-smi -i 0 restricts the view to GPU 0.
  • Get Detailed Info: nvidia-smi -i 0 -q gives a verbose, detailed report for GPU 0, including clock speeds, temperature limits, and ECC status.
  • Filter Information: Use the -d flag to display only specific categories.

- nvidia-smi -q -d MEMORY,POWER shows only memory and power data.

Process Management

  • Find the Culprit: When you get an OOM error, the main table's "Processes" section is your first stop.
  • Clean Output for Scripting: nvidia-smi --query-compute-apps=pid,process_name,used_memory --format=csv provides a clean CSV output of all compute processes, which is perfect for parsing in scripts.

Advanced Diagnostics and Troubleshooting

Scenario 1: Diagnosing "CUDA out of memory"

  1. Check Baseline: Run nvidia-smi before starting your task to see how much VRAM is already occupied by other processes (e.g., a display manager).
  2. Identify Process: If an OOM occurs, use the process list to find the PID of the job that consumed all the memory.
  3. Kill the Process: Use kill <PID> to terminate the process and free up the VRAM.

Scenario 2: Troubleshooting Performance Drops If your training loop suddenly slows down, use continuous monitoring (watch -n 0.5 nvidia-smi) and look for:

  • Thermal Throttling: A sudden spike in Temp followed by a change in Perf state (e.g., from P2 to P8) indicates the GPU is reducing its clock speed to cool down.
  • Power Capping: If Pwr:Usage is constantly hitting the Cap, the GPU might be limited by its power budget.

Daemon Mode (dmon) For a more compact, columnar output ideal for long-term monitoring, use the daemon mode.

  • nvidia-smi dmon -s pumt -d 1
  • -s pumt: Specifies the metrics to show: power, utilization, memory, temperature.
  • -d 1: Sets the update interval to 1 second.

Automation and Scripting

You can use nvidia-smi in shell scripts or Python to automate monitoring and logging.

Python Scripting with pynvml Since nvidia-smi is a wrapper for NVML, you can use the pynvml library for more direct and faster access in Python.

import pynvml
import time

pynvml.nvmlInit()
device_count = pynvml.nvmlDeviceGetCount()

print(f"Found {device_count} GPU(s)")

try:
    while True:
        for i in range(device_count):
            handle = pynvml.nvmlDeviceGetHandleByIndex(i)
            name = pynvml.nvmlDeviceGetName(handle).decode('utf-8')
            temp = pynvml.nvmlDeviceGetTemperature(handle, pynvml.NVML_TEMPERATURE_GPU)
            power = pynvml.nvmlDeviceGetPowerUsage(handle) / 1000.0  # Convert mW to W
            mem_info = pynvml.nvmlDeviceGetMemoryInfo(handle)
            util = pynvml.nvmlDeviceGetUtilizationRates(handle)

            print(f"[{i}] {name}")
            print(f"  Temp: {temp}°C")
            print(f"  Power: {power:.2f}W")
            print(f"  Memory: {mem_info.used // 1024**2} / {mem_info.total // 1024**2} MB")
            print(f"  GPU Util: {util.gpu}%")
            print("-" * 20)
        time.sleep(2)
except KeyboardInterrupt:
    print("\
Monitoring stopped.")
    pynvml.nvmlShutdown()

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

82.05%
按下载量换算1,492

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install nvidia-smi 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills