--- name: npu-smi description: Huawei Ascend NPU npu-smi command reference. Use for device queries (health, temperature, power, memory, processes, ECC), configuration (thresholds, modes, fan), firmware upgrades (MCU, bootloader, VRD), virtualization (vNPU), and certificate management. keywords: - npu-smi - 设备管理 - 温度 - 功耗 - 内存 - 进程 - ECC - 配置 - 风扇 - 固件升级 - 虚拟化 - 证书管理 --- # npu-smi Command Reference Quick reference for Huawei Ascend NPU device management commands. ## 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 ``` ## Device Queries ### Basic Information ```bash npu-smi info -l # List devices npu-smi info -t health -i # Health status (OK/Warning/Error) npu-smi info -t board -i # Board details (firmware, software version) npu-smi info -t npu -i -c # Chip details (name, health, usage) npu-smi info -m # List all chips ``` ### Real-time Metrics ```bash npu-smi info -t temp -i -c # Temperature (NPU, AI Core) npu-smi info -t power -i -c # Power usage and limit npu-smi info -t memory -i -c # Memory usage, total, rate ``` ### Advanced Queries ```bash npu-smi info proc -i -c # Running processes (PID, memory, AI Core usage) npu-smi info -t ecc -i -c # ECC errors and mode npu-smi info -t usages -i -c # Utilization (AI Core, memory, bandwidth) npu-smi info -t pcie-info -i -c # PCIe speed and width npu-smi info -t p2p -i -c # P2P status and mode npu-smi info -t product -i -c # Product name and serial ``` > **See**: [references/device-queries.md](references/device-queries.md) for output formats, examples, and monitoring scripts. ## Configuration ### Temperature and Power Thresholds ```bash npu-smi set -t temperature -i -c -d # Temperature threshold (°C) npu-smi set -t power-limit -i -c -d # Power limit (W) ``` ### Mode Configuration ```bash npu-smi set -t ecc-mode -i -c -d <0|1> # 0=Disable, 1=Enable npu-smi set -t compute-mode -i -c -d # 0=Default, 1=Exclusive, 2=Prohibited npu-smi set -t persistence-mode -i -d <0|1> # Persistence mode npu-smi set -t p2p-mem-cfg -i -c -d <0|1> # P2P configuration ``` ### 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) ``` ### System Settings ```bash npu-smi set -t mac-addr -i -c -d -s "XX:XX:XX:XX:XX:XX" npu-smi set -t boot-select -i -c -d <3|4> # 3=M.2 SSD, 4=eMMC npu-smi set -t cpu-freq-up -i -d <0|1> # 0=1.9GHz/800MHz, 1=1.0GHz/800MHz npu-smi set -t sys-log-enable -d <0|1> # System logging ``` ### Clear Commands ```bash npu-smi clear -t ecc-info -i -c # Clear ECC errors npu-smi clear -t tls-cert-period -i -c # Restore cert threshold ``` > **See**: [references/configuration.md](references/configuration.md) for parameter tables and examples. ## Firmware Management ### Upgrade Workflow ``` Query → Upgrade → Check Status → Activate → Restart ``` ```bash npu-smi upgrade -b -i # Query current version npu-smi upgrade -t -i -f # Upload firmware npu-smi upgrade -q -i # Check upgrade status npu-smi upgrade -a -i # Activate firmware ``` ### Components and Restart Requirements | Component | Item Name | Restart Required | |-----------|-----------|------------------| | MCU | `mcu` | Yes (restart) | | Bootloader | `bootloader` | Yes (restart) | | VRD | `vrd` | Yes (power cycle 30s) | > **See**: [references/firmware-upgrade.md](references/firmware-upgrade.md) for complete procedures. ## Virtualization (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 # Templates for specific device npu-smi info -t info-vnpu -i -c # View vNPU info ``` ### Management ```bash npu-smi set -t vnpu-mode -d <0|1> # Set AVI mode npu-smi set -t create-vnpu -i -c -f