npu-smi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

npu-smi Command Reference

npu-smi命令参考手册

Quick reference for Huawei Ascend NPU device management commands.
华为Ascend NPU设备管理命令快速参考。

Quick Start

快速入门

bash
npu-smi info -l                           # List all devices
npu-smi info -t health -i 0               # Check device health
npu-smi info -t temp -i 0 -c 0            # Check temperature
npu-smi info -t power -i 0 -c 0           # Check power
npu-smi info -t memory -i 0 -c 0          # Check memory
bash
npu-smi info -l                           # 列出所有设备
npu-smi info -t health -i 0               # 检查设备健康状态
npu-smi info -t temp -i 0 -c 0            # 检查温度
npu-smi info -t power -i 0 -c 0           # 检查功耗
npu-smi info -t memory -i 0 -c 0          # 检查内存

Device Queries

设备查询

Basic Information

基本信息

bash
npu-smi info -l                           # List devices
npu-smi info -t health -i <id>            # Health status (OK/Warning/Error)
npu-smi info -t board -i <id>             # Board details (firmware, software version)
npu-smi info -t npu -i <id> -c <chip>     # Chip details (name, health, usage)
npu-smi info -m                           # List all chips
bash
npu-smi info -l                           # 列出设备
npu-smi info -t health -i <id>            # 健康状态(正常/警告/错误)
npu-smi info -t board -i <id>             # 板卡详情(固件、软件版本)
npu-smi info -t npu -i <id> -c <chip>     # 芯片详情(名称、健康状态、使用率)
npu-smi info -m                           # 列出所有芯片

Real-time Metrics

实时指标

bash
npu-smi info -t temp -i <id> -c <chip>    # Temperature (NPU, AI Core)
npu-smi info -t power -i <id> -c <chip>   # Power usage and limit
npu-smi info -t memory -i <id> -c <chip>  # Memory usage, total, rate
bash
npu-smi info -t temp -i <id> -c <chip>    # 温度(NPU、AI Core)
npu-smi info -t power -i <id> -c <chip>   # 功耗使用情况与限制
npu-smi info -t memory -i <id> -c <chip>  # 内存使用量、总量、使用率

Advanced Queries

高级查询

bash
npu-smi info proc -i <id> -c <chip>       # Running processes (PID, memory, AI Core usage)
npu-smi info -t ecc -i <id> -c <chip>     # ECC errors and mode
npu-smi info -t usages -i <id> -c <chip>  # Utilization (AI Core, memory, bandwidth)
npu-smi info -t pcie-info -i <id> -c <chip>  # PCIe speed and width
npu-smi info -t p2p -i <id> -c <chip>     # P2P status and mode
npu-smi info -t product -i <id> -c <chip> # Product name and serial
See: references/device-queries.md for output formats, examples, monitoring scripts, and platform identification (A2 vs A3).
bash
npu-smi info proc -i <id> -c <chip>       # 运行中进程(PID、内存、AI Core使用率)
npu-smi info -t ecc -i <id> -c <chip>     # ECC错误与模式
npu-smi info -t usages -i <id> -c <chip>  # 利用率(AI Core、内存、带宽)
npu-smi info -t pcie-info -i <id> -c <chip>  # PCIe速率与带宽
npu-smi info -t p2p -i <id> -c <chip>     # P2P状态与模式
npu-smi info -t product -i <id> -c <chip> # 产品名称与序列号
参考: references/device-queries.md 获取输出格式、示例、监控脚本以及平台识别(A2 vs A3)相关内容。

Configuration

配置

Temperature and Power Thresholds

温度与功耗阈值

bash
npu-smi set -t temperature -i <id> -c <chip> -d <value>   # Temperature threshold (°C)
npu-smi set -t power-limit -i <id> -c <chip> -d <value>   # Power limit (W)
bash
npu-smi set -t temperature -i <id> -c <chip> -d <value>   # 设置温度阈值(°C)
npu-smi set -t power-limit -i <id> -c <chip> -d <value>   # 设置功耗限制(W)

Mode Configuration

模式配置

bash
npu-smi set -t ecc-mode -i <id> -c <chip> -d <0|1>        # 0=Disable, 1=Enable
npu-smi set -t compute-mode -i <id> -c <chip> -d <mode>   # 0=Default, 1=Exclusive, 2=Prohibited
npu-smi set -t persistence-mode -i <id> -d <0|1>          # Persistence mode
npu-smi set -t p2p-mem-cfg -i <id> -c <chip> -d <0|1>     # P2P configuration
bash
npu-smi set -t ecc-mode -i <id> -c <chip> -d <0|1>        # 0=禁用,1=启用
npu-smi set -t compute-mode -i <id> -c <chip> -d <mode>   # 0=默认,1=独占,2=禁止
npu-smi set -t persistence-mode -i <id> -d <0|1>          # 持久化模式
npu-smi set -t p2p-mem-cfg -i <id> -c <chip> -d <0|1>     # P2P配置

Fan Control

风扇控制

bash
npu-smi set -t pwm-mode -d <0|1>                          # 0=Manual, 1=Automatic
npu-smi set -t pwm-duty-ratio -d <0-100>                  # Fan speed (percent)
bash
npu-smi set -t pwm-mode -d <0|1>                          # 0=手动,1=自动
npu-smi set -t pwm-duty-ratio -d <0-100>                  # 风扇转速(百分比)

System Settings

系统设置

bash
npu-smi set -t mac-addr -i <id> -c <chip> -d <mac_id> -s "XX:XX:XX:XX:XX:XX"
npu-smi set -t boot-select -i <id> -c <chip> -d <3|4>     # 3=M.2 SSD, 4=eMMC
npu-smi set -t cpu-freq-up -i <id> -d <0|1>               # 0=1.9GHz/800MHz, 1=1.0GHz/800MHz
npu-smi set -t sys-log-enable -d <0|1>                    # System logging
bash
npu-smi set -t mac-addr -i <id> -c <chip> -d <mac_id> -s "XX:XX:XX:XX:XX:XX"
npu-smi set -t boot-select -i <id> -c <chip> -d <3|4>     # 3=M.2 SSD,4=eMMC
npu-smi set -t cpu-freq-up -i <id> -d <0|1>               # 0=1.9GHz/800MHz,1=1.0GHz/800MHz
npu-smi set -t sys-log-enable -d <0|1>                    # 系统日志启用状态

Clear Commands

清除命令

bash
npu-smi clear -t ecc-info -i <id> -c <chip>               # Clear ECC errors
npu-smi clear -t tls-cert-period -i <id> -c <chip>        # Restore cert threshold
See: references/configuration.md for parameter tables and examples.
bash
npu-smi clear -t ecc-info -i <id> -c <chip>               # 清除ECC错误
npu-smi clear -t tls-cert-period -i <id> -c <chip>        # 恢复证书阈值
参考: references/configuration.md 获取参数表与示例。

Firmware Management

固件管理

Upgrade Workflow

升级流程

Query → Upgrade → Check Status → Activate → Restart
bash
npu-smi upgrade -b <item> -i <id>                         # Query current version
npu-smi upgrade -t <item> -i <id> -f <file.hpm>           # Upload firmware
npu-smi upgrade -q <item> -i <id>                         # Check upgrade status
npu-smi upgrade -a <item> -i <id>                         # Activate firmware
查询 → 升级 → 检查状态 → 激活 → 重启
bash
npu-smi upgrade -b <item> -i <id>                         # 查询当前版本
npu-smi upgrade -t <item> -i <id> -f <file.hpm>           # 上传固件
npu-smi upgrade -q <item> -i <id>                         # 检查升级状态
npu-smi upgrade -a <item> -i <id>                         # 激活固件

Components and Restart Requirements

组件与重启要求

ComponentItem NameRestart Required
MCU
mcu
Yes (restart)
Bootloader
bootloader
Yes (restart)
VRD
vrd
Yes (power cycle 30s)
See: references/firmware-upgrade.md for complete procedures.
组件项目名称是否需要重启
MCU
mcu
是(重启设备)
Bootloader
bootloader
是(重启设备)
VRD
vrd
是(断电30秒后重启)
参考: references/firmware-upgrade.md 获取完整流程。

Virtualization (vNPU)

虚拟化(vNPU)

Queries

查询

bash
npu-smi info -t vnpu-mode                                 # Query AVI mode (0=Container, 1=VM)
npu-smi info -t template-info                             # List all templates
npu-smi info -t template-info -i <id>                     # Templates for specific device
npu-smi info -t info-vnpu -i <id> -c <chip>               # View vNPU info
bash
npu-smi info -t vnpu-mode                                 # 查询AVI模式(0=容器,1=虚拟机)
npu-smi info -t template-info                             # 列出所有模板
npu-smi info -t template-info -i <id>                     # 指定设备的模板
npu-smi info -t info-vnpu -i <id> -c <chip>               # 查看vNPU信息

Management

管理

bash
npu-smi set -t vnpu-mode -d <0|1>                         # Set AVI mode
npu-smi set -t create-vnpu -i <id> -c <chip> -f <template> [-v <vnpu_id>] [-g <vgroup_id>]
npu-smi set -t destroy-vnpu -i <id> -c <chip> -v <vnpu_id>
vNPU ID Range:
[phy_id*16+100, phy_id*16+115]
See: references/virtualization.md for vNPU creation and management.
bash
npu-smi set -t vnpu-mode -d <0|1>                         # 设置AVI模式
npu-smi set -t create-vnpu -i <id> -c <chip> -f <template> [-v <vnpu_id>] [-g <vgroup_id>]
npu-smi set -t destroy-vnpu -i <id> -c <chip> -v <vnpu_id>
vNPU ID范围:
[phy_id*16+100, phy_id*16+115]
参考: references/virtualization.md 获取vNPU创建与管理相关内容。

Certificate Management

证书管理

Queries

查询

bash
npu-smi info -t tls-csr-get -i <id> -c <chip>             # Generate CSR (PEM format)
npu-smi info -t tls-cert -i <id> -c <chip>                # View certificate details
npu-smi info -t tls-cert-period -i <id> -c <chip>         # Check expiration threshold
npu-smi info -t rootkey -i <id> -c <chip>                 # Rootkey status
bash
npu-smi info -t tls-csr-get -i <id> -c <chip>             # 生成CSR(PEM格式)
npu-smi info -t tls-cert -i <id> -c <chip>                # 查看证书详情
npu-smi info -t tls-cert-period -i <id> -c <chip>         # 检查过期阈值
npu-smi info -t rootkey -i <id> -c <chip>                 # Rootkey状态

Management

管理

bash
npu-smi set -t tls-cert -i <id> -c <chip> -f "<tls.pem> <ca.pem> <subca.pem>"
npu-smi set -t tls-cert-period -i <id> -c <chip> -s <days>  # Set threshold (7-180 days)
npu-smi clear -t tls-cert-period -i <id> -c <chip>        # Restore default (90 days)
See: references/certificate-management.md for certificate lifecycle management.
bash
npu-smi set -t tls-cert -i <id> -c <chip> -f "<tls.pem> <ca.pem> <subca.pem>"
npu-smi set -t tls-cert-period -i <id> -c <chip> -s <days>  # 设置阈值(7-180天)
npu-smi clear -t tls-cert-period -i <id> -c <chip>        # 恢复默认值(90天)
参考: references/certificate-management.md 获取证书生命周期管理相关内容。

Parameters Reference

参数参考

ParameterDescriptionHow to Get
id
Device ID (NPU ID)
npu-smi info -l
chip_id
Chip ID
npu-smi info -m
vnpu_id
vNPU IDAuto-assigned or specified in range
mac_id
MAC interface0=eth0, 1=eth1, 2=eth2, 3=eth3
参数描述获取方式
id
设备ID(NPU ID)
npu-smi info -l
chip_id
芯片ID
npu-smi info -m
vnpu_id
vNPU ID自动分配或在指定范围内手动指定
mac_id
MAC接口0=eth0, 1=eth1, 2=eth2, 3=eth3

Supported Platforms

支持的平台

  • Atlas 200I DK A2 Developer Kit
  • Atlas 500 A2 Smart Station
  • Atlas 200I A2 Acceleration Module (RC/EP scenarios)
  • Atlas A2/A3 Training Series
  • Atlas Training Series
Note: Chip name (e.g., 910B3) does not indicate server platform (A2 vs A3). Use
dmidecode -t system | grep Product
or
npu-smi info -t product
to identify the server model. See references/device-queries.md for details.
  • Atlas 200I DK A2开发者套件
  • Atlas 500 A2智能小站
  • Atlas 200I A2加速模块(RC/EP场景)
  • Atlas A2/A3训练系列
  • Atlas训练系列
注意: 芯片名称(如910B3)不能表示服务器平台(A2 vs A3)。使用
dmidecode -t system | grep Product
npu-smi info -t product
识别服务器型号。详情请参考references/device-queries.md

Important Notes

重要注意事项

  • Most configuration commands require root permissions
  • Device IDs from
    npu-smi info -l
  • Chip IDs from
    npu-smi info -m
  • MCU/bootloader upgrades require restart after activation
  • VRD upgrades require power cycle (30+ seconds off)
  • MAC/boot changes require restart
  • Command availability varies by hardware platform
  • 大多数配置命令需要root权限
  • 设备ID通过
    npu-smi info -l
    获取
  • 芯片ID通过
    npu-smi info -m
    获取
  • MCU/bootloader升级激活后需要重启设备
  • VRD升级需要断电循环(断电30秒以上)
  • MAC/启动项修改后需要重启设备
  • 命令可用性因硬件平台而异

Scripts

脚本

  • scripts/npu-health-check.sh - Comprehensive device health check
  • scripts/npu-health-check.sh - 全面设备健康检查脚本

Official Documentation

官方文档