1. What Is npu-smi
npu-smi is a command-line tool provided by Huawei, purpose-built for managing and monitoring the status and performance of Huawei Ascend series Neural Processing Units (NPUs), similar to NVIDIA’s nvidia-smi.
2. Meaning of npu-smi Fields
| |
| Field | Description |
|---|---|
| npu-sml | Version of the npu-sml tool |
| Version | Driver version |
| NPU | Device id |
| Name | Chip name |
| Health | Health state of the chip, with five possible states: OK, Warning, Alarm, Critical, and UNKNOWN |
| Power(W) | Chip power (unit: W) |
| Temp(C) | Chip temperature (unit: ℃) |
| Hugepages-Usage(page) | Huge page usage ratio (unit: page); each page is 2048KB in size. |
| Chip | Chip id |
| Device | Chip number |
| Bus-Id | BUS ID |
| AICore(%) | AICore utilization |
| Memory-Usage(MB) | Memory usage ratio |
3. Using npu-smi info
3.1 Parameter Format
| |
Specify the query type with -t and the device ID with -i. The available query types are (the types supported vary by device):
| Query Type | Meaning |
|---|---|
| board | Board information |
| flash | Flash information |
| memory | Memory information |
| usages | Resource usage |
| sensors | Sensor information |
| temp | Temperature information |
| power | Power information |
| volt | Voltage information |
| mac-addr | MAC address information |
| common | Common information |
| health | Health state |
| product | Product information |
| ecc | Error Correction Code (ECC) information |
| ip | IP address information |
| sys-time | System time information |
| i2c_check | I2C check information |
| work-mode | Work mode |
| ecc-enable | Error Correction Code (ECC) enable state |
| p2p-enable | Point-to-Point (P2P) communication enable state |
| ssh-enable | SSH enable state |
| license | License information |
| customized-info | Customized information |
| device-share | Device share information |
| nve-level | NVE level information |
| aicpu-config | AI CPU configuration information |
| pcie-err | PCIe error information |
| mcu-monitor | MCU monitoring information |
| err-count | Error count information |
| boot-area | Boot area information |
| vnpu-mode | vNPU mode information |
| info-vnpu | vNPU information |
| vnpu-svm | vNPU virtualization information |
| cpu-num-cfg | CPU core configuration information |
| first-power-on-date | First power-on date information |
| proc-mem | Process memory information |
| phyid-remap | Physical ID remap information |
| vnpu-cfg-recover | vNPU configuration recovery information |
| key-manage | Key management information |
| template-info | Template information |
| pkcs-enable | PKCS enable state |
| p2p-mem-cfg | P2P memory configuration information |
| pwm-mode | PWM mode information |
| pwm-duty-ratio | PWM duty cycle information |
| boot-select | Boot select information |
| topo | Topology information |
3.2 Common info Commands
- Query board details of a device
| |
- Query chip details of a device
| |
- View the connection topology
| |
- Query chip monitoring data
| |
- Query common information of a device
| |
4. Using npu-smi set
4.1 Parameter Format
| |
Specify the configuration type with -t and the device ID with -i. Unlike npu-smi info, here you use -d to specify the configuration value. The available configuration types are (the types supported vary by device):
| Type | Meaning |
|---|---|
| ecc-enable | Enable ECC error correction |
| collect-log | Collect logs |
| reset | Reset the device |
| device-share | Device sharing |
| nve-level | NVE level setting |
| clear-ecc-info | Clear ECC information |
| license | License management |
| ssh-enable | Enable SSH |
| customized-info | Customized information setting |
| clear-pcie-err | Clear PCIe errors |
| revocate | Revoke operation |
| mac-addr | MAC address setting |
| mcu-monitor | MCU monitoring setting |
| boot-area | Boot area setting |
| aicpu-config | AI CPU configuration |
| disk-power | Disk power setting |
| ip | IP address setting |
| errcount-clear | Clear error counts |
| vnpu-mode | vNPU mode setting |
| create-vnpu | Create vNPU |
| destroy-vnpu | Destroy vNPU |
| vnpu-svm | vNPU virtualization setting |
| cpu-num-cfg | CPU core count configuration |
| vnpu-cfg-recover | vNPU configuration recovery |
| key-manage | Key management |
| pkcs-enable | Enable PKCS |
| p2p-mem-cfg | P2P memory configuration |
| pwm-mode | PWM mode setting |
| pwm-duty-ratio | PWM duty cycle setting |
| power-state | Power state setting |
| boot-select | Boot select setting |
| reset-vnpu | Reset vNPU |
4.2 Common set Commands
- Collect logs
| |
After collection finishes, the log files can be found in the /run/mcu_log directory. The system does not clean up these logs automatically, so you need to clean them up yourself.
- Configure the ECC enable state
Enable
| |
Disable
| |
- Set the compute power level of a specified chip
| |
The compute power level is divided into four grades:
0 - Low
1 - Middle
2 - High
3 - Full
5. Using npu-smi clear
5.1 Parameter Format
| |
Specify the clear type with -t, the device ID with -i, and the chip ID with -c.
5.2 Common clear Commands
- Clear the ECC error counts of all chips on device 0
| |
- Clear the ECC error counts of all devices
| |
View the ECC error counts
| |
