Introduction to the npu-smi Command (for Versions 1.0.0-1.0.10)
- Introduction
- Usage of the npu-smi Command
- Querying Help Information
- Querying the Tool Version
- Commands for Information Query (info)
- Querying Basic Information
- Querying Chip Monitoring Data
- Querying All NPU Devices
- Querying the Mapping Information About All Chips
- Querying the Information About a Card
- Querying the Common Information About All Chips
- Querying the Flash Information of All Chips on a Card
- Querying the Memory Information of All Chips
- Querying the Statistics of All Chips on a Card
- Querying the Temperature of All Chips on a Card
- Querying the Power of All Chips on a Card
- Querying the Voltage of All Chips on a Card
- Querying the Health Status of All Chips on a Card
- Querying SSH Settings of All Chips
- Querying the ECC Error Count of All Chips
- Querying the ECC Enable Status
- Querying the p2p Enable Status
- Querying Information About a Chip
- Querying the Temperature of a Chip
- Querying the Power of a Chip
- Querying the Voltage of a Chip
- Querying Chip Statistics
- Querying the Flash Information of a Chip
- Querying the Memory Information of a Chip
- Querying the Health Status of a Chip
- Querying SSH Settings of a Chip
- Querying the ECC Error Count of a Chip
- Checking the IIC Channel Between the NPU and the MCU
- Querying the Product Type of a Specified Chip
- Querying Matrix Process Monitoring Data of a Specified Chip
- Querying a User Certificate
- Querying the IP Information of an AI Chip
- Querying the PCIe Error Count of All Chips
- Querying the PCIe Error Count of a Specified Chip
- Commands for Settings (set)
- Configuring SSH Settings for All Chips
- Configuring SSH Settings for a Specified Chip
- Enabling/Disabling ECC
- Enabling/Disabling P2P
- Collecting Logs
- Resetting the Standard PCIe Card
- Resetting a Chip
- Configuring a User Certificate
- Setting the IP Information of an AI Chip
- Clearing the PCIe Error Count of All Chips
- Clearing the PCIe Error Count of a Specified Chip
- Commands for Upgrade (upgrade)
Introduction
The npu-smi tool is a system management tool of NPU. It can be used to collect Atlas 300I inference card or Ascend 310 information, view the usage of the video RAM, enable or disable the NPU configuration option, and update firmware. If the NPU 20.X.X series software package is used for installation, VMs support some npu-smi commands.
Usage of the npu-smi Command
Command syntax: npu-smi Command Options...
Parameters
Parameter |
Description |
---|---|
info |
Queries information. |
set |
Configures the chip occupation mode and display buffer, or resets the chip. |
upgrade |
Upgrades the configuration and queries the upgrade status. |
-h |
Displays the help information of the command. |
-v |
Displays the version of the npu-smi tool. |
You can run the npu-smi parameter command to obtain the help information of each parameter.
Querying Help Information
Function
The npu-smi -h | --help command is used to display the help information about the tool.
Syntax
npu-smi -h
Example
#Display the help information about the tool.
- NPU 20.2.X or later:
npu-smi -h
Usage: npu-smi <Command|-h|-v> [Options...] npu-smi Command: -h Displays the help information. --help Displays the help information. -v Show npu-smi version information info Show hardware details set Modify device configuration properties upgrade Upgrade card or MCU firmware
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi -h
Usage: npu-smi <Command|-h|-v> [Options...] npu-smi Command: -h This help or command's help --help This help or command's help -v Show npu-smi version information info Show hardware details set Modify device configuration properties upgrade Upgrade card or MCU firmware
Querying the Tool Version
Function
The npu-smi -v command is used to query the version of the npu-smi tool.
Format
npu-smi -v
Example
#Query the version of the npu-smi tool.
npu-smi -v
npu-smi Version : 1.0.2
Commands for Information Query (info)
Querying Basic Information
Function
The npu-smi info command is used to query basic information about all devices.
Format
npu-smi info
Usage Instruction
None
Example
#query basic information about all devices.
npu-smi info
+------------------------------------------------------------------------------+ | npu-smi 20.2.0 Version: 20.2.0 | +-------------------+-----------------+----------------------------------------+ | NPU Name | Health | Power(W) Temp(C) | | Chip Device | Bus-Id | AICore(%) Memory-Usage(MB) | +===================+=================+========================================+ | 215 310 | OK | 12.8 56 | | 0 0 | 0000:DA:00.0 | 0 2703 / 8192 | +-------------------+-----------------+----------------------------------------+ | 215 310 | OK | 12.8 57 | | 1 1 | 0000:DC:00.0 | 0 2703 / 8192 | +-------------------+-----------------+----------------------------------------+ | 215 310 | OK | 12.8 57 | | 2 2 | 0000:DD:00.0 | 0 2703 / 8192 | +-------------------+-----------------+----------------------------------------+ | 215 310 | OK | 12.8 55 | | 3 3 | 0000:DB:00.0 | 0 2703 / 8192 | +===================+=================+========================================+
Output Description
Attribute |
Description |
---|---|
npu-smi |
Version of the npu-smi tool. |
Version |
Driver version. |
NPU |
Device ID. |
Name |
Chip name. |
Health |
Chip health status. The value can be OK, Warning, Alarm, Critical, or UNKNOWN. |
Power(W) |
Chip power. |
Temp(C) |
Chip temperature. |
Chip |
Chip ID. |
Device |
Device ID. |
Bus-Id |
BUS ID. |
AICore(%) |
AI core usage. |
Memory-Usage(MB) |
Memory usage. |
Querying Chip Monitoring Data
Function
The npu-smi info watch -i id -c chip_id -d delay_seconds -s watch_type command is used to query the monitoring data of all chips or a single chip.
Format
npu-smi info watch -i id -c chip_id -d delay_seconds -s watch_type
Usage Instruction
None
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
delay_seconds |
Delay of each query operation in seconds. |
watch_type |
Type of the monitored data. p indicates the power, t indicates the temperature, a indicates the AI core usage, i indicates the AI CPU usage, c indicates the control CPU usage, m indicates the memory usage, and b indicates the memory bandwidth usage. |
Example
# Query the monitoring data of chip 2 on device 199.
npu-smi info watch -i 199 -c 2 -d 5 -s ptaicmb
Npu ID Chip Id Pwr Temp AI Core AI Cpu Ctrl Cpu Memory Memory BW Idx Idx W C % % % % % 199 2 12.8 54 0 0 0 29 0 199 2 12.8 54 0 0 0 29 0 199 2 12.8 54 0 0 0 29 0 199 2 12.8 54 0 0 0 29 0 199 2 12.8 54 0 0 0 29 0
Querying All NPU Devices
Function
The npu-smi info -l command is used to query all NPU devices.
Syntax
npu-smi info -l
Usage Instruction
The product name and serial number fields cannot be queried on a VM or a Docker container.
Example
#Query information about all NPU devices.
- NPU 20.2.X or later:
npu-smi info -l
Card Count : 2 NPU ID : 0 Product Name : IT21DMPA01 Serial Number : 032WHW10K0000818 Chip Count : 4 NPU ID : 1 Product Name : IT21DMPC04 Serial Number : 034BDJ10M3000020 Chip Count : 4
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi info -l
Total Count : 2 NPU ID : 0 Product Name : IT21DMPB01 Serial Number : 033EFS10L6001937 Chip Count : 4 NPU ID : 1 Product Name : IT21DMPB01 Serial Number : 033EFS10L6002408 Chip Count : 4
Querying the Mapping Information About All Chips
Function
The npu-smi info -m command is used to query the mapping information about all chips.
Format
npu-smi info -m
Usage Instruction
The MCU information is not displayed on a VM or a Docker container.
Example
#Query the mapping information about all chips.
npu-smi info -m
NPU ID Chip ID Chip Logic ID Chip Name 18 0 0 MiniD 35 0 1 MiniD
Querying the Information About a Card
Function
The npu-smi info -t board -i id command is used to query the board information about a card.
Syntax
npu-smi info -t board -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
- The board information of a specific card cannot be queried on a VM or a Docker container.
- You can run this command only as the root user.
Example
#Query the board information about device 1.
- NPU 20.2.X or later:
npu-smi info -t board -i 1
NPU ID : 1 Product Name : IT21DMPA01 Model : NA Manufacturer : Huawei Serial Number : 032WHW10K0000818 Software Version : 20.2.0 Firmware Version : 1.76.22.3.220 Board ID : 0xfc PCB ID : D BOM ID : 1 PCIe Bus Info : 0000:86:00.0 Slot ID : 4 Class ID : NA PCI Vendor ID : 0x19E5 PCI Device ID : 0xD100 Subsystem Vendor ID : 0x0200 Subsystem Device ID : 0x0100 Chip Count : 4 Faulty Chip Count : 0
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi info -t board -i 1
NPU ID : 1 Product Name : NPU Model : Hi*** Manufacturer : Huawei Serial Number : RFD1644N48373 Software Version : 1.1.0T.B600 Firmware Version : 1.1.0.600 Board ID : 0xfc PCB ID : C BOM ID : 0 PCIe Bus Info : 0000:2d:00.0 Slot ID : 1 Class ID : NA PCI Vendor ID : 0x19E5 PCI Device ID : 0xD100 Subsystem Vendor ID : 0x0200 Subsystem Device ID : 0x0100 Chip Count : 4 Chip fault : 0
Querying the Common Information About All Chips
Function
The npu-smi info -t common -i id command is used to query the common information of all chips.
Syntax
npu-smi info -t common -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
This command is not supported on a VM or a Docker container.
Example
#Query the common information of all chips on device 1.
npu-smi info -t common -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Memory Usage Rate(%) : 30 Aicore Usage Rate(%) : 0 Temperature(C) : 46 Rated Power Dissipation(W) : 12.8 Chip ID : 1 Memory Usage Rate(%) : 30 Aicore Usage Rate(%) : 0 Temperature(C) : 47 Rated Power Dissipation(W) : 12.8 Chip ID : 2 Memory Usage Rate(%) : 30 Aicore Usage Rate(%) : 0 Temperature(C) : 48 Rated Power Dissipation(W) : 12.8 Chip ID : 3 Memory Usage Rate(%) : 30 Aicore Usage Rate(%) : 0 Temperature(C) : 48 Rated Power Dissipation(W) : 12.8 Chip Name : MCU Temperature(C) : 45 Power Dissipation(W) : 19.6
If the firmware version is 1.73.5.5 or earlier, Chip ID is displayed instead of Chip Name in the preceding command output.
Querying the Flash Information of All Chips on a Card
Function
The npu-smi info -t flash -i id command is used to query the flash information of all chips.
Format
npu-smi info -t flash -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
#Query the flash information of all chips on device 1.
npu-smi info -t flash -i 1
npu id : 1 chip count : 4 chip id : 0 flash count : 1 flash id : 624427202 manufacturer id : 0xc2 capacity(mb) : 16 chip id : 1 flash count : 1 flash id : 624427202 manufacturer id : 0xc2 capacity(mb) : 16 chip id : 2 flash count : 1 flash id : 624427202 manufacturer id : 0xc2 capacity(mb) : 16 chip id : 3 flash count : 1 flash id : 624427202 manufacturer id : 0xc2 capacity(mb) : 16
Querying the Memory Information of All Chips
Function
npu-smi info -t memory -i id command is used to query the memory information of all chips.
Format
npu-smi info -t memory -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
#Query the memory information of all chips on device 1.
npu-smi info -t memory -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Capacity(MB) : 8192 Clock Speed(MHz) : 400 Chip ID : 1 Capacity(MB) : 8192 Clock Speed(MHz) : 400 Chip ID : 2 Capacity(MB) : 8192 Clock Speed(MHz) : 400 Chip ID : 3 Capacity(MB) : 8192 Clock Speed(MHz) : 400
Querying the Statistics of All Chips on a Card
Function
The npu-smi info -t usages -i id command is used to collect the usage statistics of all chips.
Format
npu-smi info -t usages -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
#Query the memory usage of all chips on device 1.
npu-smi info -t usages -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Memory Capacity(MB) : 8192 Memory Usage Rate(%) : 38 Aicore Usage Rate(%) : 50 Aicpu Usage Rate(%) : 3 Ctrlcpu Usage Rate(%) : 0 Memory Bandwidth Usage Rate(%) : 13 Chip ID : 1 Memory Capacity(MB) : 8192 Memory Usage Rate(%) : 40 Aicore Usage Rate(%) : 0 Aicpu Usage Rate(%) : 1 Ctrlcpu Usage Rate(%) : 0 Memory Bandwidth Usage Rate(%) : 4 Chip ID : 2 Memory Capacity(MB) : 8192 Memory Usage Rate(%) : 39 Aicore Usage Rate(%) : 0 Aicpu Usage Rate(%) : 1 Ctrlcpu Usage Rate(%) : 0 Memory Bandwidth Usage Rate(%) : 3 Chip ID : 3 Memory Capacity(MB) : 8192 Memory Usage Rate(%) : 39 Aicore Usage Rate(%) : 55 Aicpu Usage Rate(%) : 0 Ctrlcpu Usage Rate(%) : 0 Memory Bandwidth Usage Rate(%) : 13
Querying the Temperature of All Chips on a Card
Function
The npu-smi info -t temp -i id command is used to query the temperature of all chips.
Syntax
npu-smi info -t temp -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
The MCU information is not displayed on a VM or a Docker container.
Example
#Query the temperature of all chips on device 1.
npu-smi info -t temp -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Temperature(C) : 43 Chip ID : 1 Temperature(C) : 46 Chip ID : 2 Temperature(C) : 45 Chip ID : 3 Temperature(C) : 45 Temperature (C) : 39 Chip Name : MCU
If the firmware version is 1.73.5.5 or earlier, Chip ID is displayed instead of Chip Name in the preceding command output.
Querying the Power of All Chips on a Card
Function
The npu-smi info -t power -i id command is used to query the power of all chips.
Syntax
npu-smi info -t power -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
The MCU information is not displayed on a VM or a Docker container.
Example
#Query the power of all chips on device 1.
npu-smi info -t power -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Rated Power Dissipation(W) : 12.8 Chip ID : 1 Rated Power Dissipation(W) : 12.8 Chip ID : 2 Rated Power Dissipation(W) : 12.8 Chip ID : 3 Rated Power Dissipation(W) : 12.8 Power Dissipation(W) : 21.9 Chip Name : MCU
If the firmware version is 1.73.5.5 or earlier, Chip ID is displayed instead of Chip Name in the preceding command output.
Querying the Voltage of All Chips on a Card
Function
The npu-smi info -t volt -i id command is used to query the voltage of all chips.
Syntax
npu-smi info -t volt -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
The MCU information is not displayed on a VM or a Docker container.
Example
#Query the voltage of all chips on device 1.
npu-smi info -t volt -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Voltage (V) : 0.80 Chip ID : 1 Voltage (V) : 0.80 Chip ID : 2 Voltage (V) : 0.80 Chip ID : 3 Voltage (V) : 0.80 Voltage (V) : 11.88 Chip Name : MCU
If the firmware version is 1.73.5.5 or earlier, Chip ID is displayed instead of Chip Name in the preceding command output.
Querying the Health Status of All Chips on a Card
Function
The npu-smi info -t health -i id command is used to query the health status of all chips.
Syntax
npu-smi info -t health -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
The MCU status is not displayed on a VM or a Docker container.
Example
#Query the health status of all chips on device 1.
npu-smi info -t health -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Health : OK Chip ID : 1 Health : OK Chip ID : 2 Health : OK Chip ID : 3 Health : OK Health : OK Chip Name : MCU
If the firmware version is 1.73.5.5 or earlier, Chip ID is displayed instead of Chip Name in the preceding command output.
Output Description
Attribute |
Description |
---|---|
NPU ID |
Device ID. |
Chip Count |
Number of chips. |
Chip ID |
Chip ID. |
Health |
Chip health status. The value can be OK, Warning, Alarm, Critical, or UNKNOWN. |
Chip Name |
Chip name. |
Querying SSH Settings of All Chips
Function
The npu-smi info -t ssh-enable -i id command is used to query the SSH settings of all chips.
Syntax
npu-smi info -t ssh-enable -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
# Query SSH settings of all chips on device 1.
npu-smi info -t ssh-enable -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 SSH-Enable Status : False Chip ID : 1 SSH-Enable Status : False Chip ID : 2 SSH-Enable Status : False Chip ID : 3 SSH-Enable Status : False
Querying the ECC Error Count of All Chips
Function
The npu-smi info -t ecc -i id command is used to query the ECC error count of all chips.
Syntax
npu-smi info -t ecc -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
#Query the ECC error count of all chips on device 1.
- NPU 20.2.X or later:
npu-smi info -t ecc -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Single-bit Error Count : 0 Double-bit Error Count : 0 Chip ID : 1 Single-bit Error Count : 0 Double-bit Error Count : 0 Chip ID : 2 Single-bit Error Count : 0 Double-bit Error Count : 0 Chip ID : 3 Single-bit Error Count : 0 Double-bit Error Count : 0
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi info -t ecc -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Single Bit Error Count : 0 Double Bit Error Count : 0 Chip ID : 1 Single Bit Error Count : 0 Double Bit Error Count : 0 Chip ID : 2 Single Bit Error Count : 0 Double Bit Error Count : 0 Chip ID : 3 Single Bit Error Count : 0 Double Bit Error Count : 0
Querying the ECC Enable Status
Function
The npu-smi info -t ecc-enable -i id command is used to query the ECC enable status of a PCIe card.
Format
npu-smi info -t ecc-enable -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
#Query the ECC enable status of device 1.
npu-smi info -t ecc-enable -i 1
ECC-Enable Status : True
Querying the p2p Enable Status
Function
The npu-smi info -t p2p-enable -i id command is used to query the p2p enable status of a PCIe card.
Format
npu-smi info -t p2p-enable -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
None
Example
#Query the p2p enable status of device 1.
npu-smi info -t p2p-enable -i 1
p2p-Enable Status : False
Querying Information About a Chip
Function
The npu-smi info -t board -i id -c chip_id command is used to query the board information of a chip on a PCIe card.
Syntax
npu-smi info -t board -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
You can run this command only as the root user.
Example
#Query the board information of chip 1 on device 1.
- NPU 21.0.X:
npu-smi info -t board -i 1 -c 1
NPU ID : 1 Chip ID : 1 Chip Type : Ascend Chip Name : 310 Board ID : 0xc8 PCB ID : NA BOM ID : 0 Die ID : V100, 088F5D94 02410E10 A5127993 0100A8C0 26100063 SLOT ID : 2 PCIe Bus Info : 0000:8A:00.0 firmware Version : 1.77.22.3.220
- NPU 1.X.X, NPU 20.0.X, NPU 20.1.X, and NPU 20.2.X:
npu-smi info -t board -i 1 -c 1
NPU ID : 1 Chip ID : 1 Chip Type : HIXXXX Chip Name : HI1910 Board ID : 0x01 PCB ID : @ BOM ID : 0 Die ID : V100, 918F2194 2161A900 AC443652 0100A8C0 8E100063 SLOT ID : 2 PCIe Bus Info : 0000:33:00.0 firmware Version : 1.1.0.600
Querying the Temperature of a Chip
Function
The npu-smi info -t temp -i id -c chip_id command is used to query the temperature of a chip.
Format
npu-smi info -t temp -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the temperature of chip 1 on device 1.
npu-smi info -t temp -i 1 -c 1
Temperature (C) : 49
Querying the Power of a Chip
Function
The npu-smi info -t power -i id -c chip_id command is used to query the power of a chip.
Format
npu-smi info -t power -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the power of chip 1 on device 1.
npu-smi info -t power -i 1 -c 1
Rated Power Dissipation(W) : 12.8
Querying the Voltage of a Chip
Function
The npu-smi info -t volt -i id -c chip_id command is used to query the voltage of a chip.
Format
npu-smi info -t volt -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the voltage of chip 1 on device 1.
npu-smi info -t volt -i 1 -c 1
Voltage(V) : 0.80
Querying Chip Statistics
Function
The npu-smi info -t usages -i id -c chip_id command is used to query the statistics of a chip.
Format
npu-smi info -t usages -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the statistics of chip 1 on device 1.
npu-smi info -t usages -i 1 -c 1
Memory Capacity(MB) : 8192 Memory Usage Rate(%) : 30 Aicore Usage Rate(%) : 5 Aicpu Usage Rate(%) : 1 Ctrlcpu Usage Rate(%) : 0 Memory Bandwidth Usage Rate(%) : 12
Querying the Flash Information of a Chip
Function
The npu-smi info -t flash -i id -c chip_id command is used to query the flash information of a chip.
Format
npu-smi info -t flash -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the flash information of chip 1 on device 1.
npu-smi info -t flash -i 1 -c 1
Flash Count : 1 Flash ID : 624427202 Manufacturer ID : 0xC2 Capacity(MB) : 16
Querying the Memory Information of a Chip
Function
The npu-smi info -t memory -i id -c chip_id command is used to query the memory information of a chip.
Format
npu-smi info -t memory -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the memory information of chip 1 on device 1.
npu-smi info -t memory -i 1 -c 1
Capacity(MB) : 8192 Clock Speed(MHz) : 1600
Querying the Health Status of a Chip
Function
The npu-smi info -t health -i id -c chip_id command is used to query the health status of a chip.
Format
npu-smi info -t health -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the health status of chip 1 on device 1.
npu-smi info -t health -i 1 -c 1
Health Status : OK Error Code : NA Error Information : NA
Health Status : Alarm Error Code : 1D5B 1D51 1D55 1D58 1D60 1C1F 1C1C 1D8F 1D4C Error Information : : 7515 : 7505 : 7509 : 7512 : 7520 : 7199 : 7196 : 7567 : 7500
Output Description
Attribute |
Description |
---|---|
Health Status |
Chip health status. The value can be OK, Warning, Alarm, Critical, or UNKNOWN. |
Error Code |
Error code |
Error Information |
Error message |
Querying SSH Settings of a Chip
Function
The npu-smi info -t ssh-enable -i id -c chip_id command is used to query the SSH settings of a specified chip.
Syntax
npu-smi info -t ssh-enable -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips IDs are 0, 1, 2, and 3. |
Usage Instruction
None
Example
# Query the SSH settings of chip 0 on device 1.
npu-smi info -t ssh-enable -i 1 -c 0
SSH-Enable Status : False
Querying the ECC Error Count of a Chip
Function
The npu-smi info -t ecc -i id -c chip_id command is used to query the ECC error count of a chip.
Syntax
npu-smi info -t ecc -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
None
Example
#Query the ECC error count of chip 1 on device 1.
- NPU 20.2.X or later:
npu-smi info -t ecc -i 1 -c 1
Single-bit Error Count : 25 Double-Bit Error Count : 0
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi info -t ecc -i 1 -c 1
Single Bit Error Count : 25 Double Bit Error Count : 0
Checking the IIC Channel Between the NPU and the MCU
Function
The npu-smi info -t i2c_check -i id command is used to check whether the IIC channel between the NPU and the MCU is normal.
Format
npu-smi info -t i2c_check -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
This command is not supported on a VM or a Docker container.
Example
#Check whether the IIC channel between the NPU and the MCU is normal.
npu-smi info -t i2c_check -i 1
Checking... Please do not interrupt! miniD 1 to MCU iic channel status: OK miniD 3 to MCU iic channel status: OK MCU to miniD 0 iic channel status: OK MCU to miniD 1 iic channel status: OK MCU to miniD 2 iic channel status: OK MCU to miniD 3 iic channel status: OK
Querying the Product Type of a Specified Chip
Function
The npu-smi info -t product -i id -c chip_id command is used to query the product type of an AI chip.
Syntax
npu-smi info -t product -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
- NPU 1.X.X series versions: NPU 1.4.0 and later versions support this command.
- NPU 20.X.X or later: All versions support this command.
Example
# Query the product type of AI chip 2 on device 0. The following product model is only an example.
- NPU 20.2.X or later:
npu-smi info -t product -i 0 -c 2
product type: Atlas 300I Model 3000.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi info -t product -i 0 -c 2
product type: Atlas 300 Model 3000.
Querying Matrix Process Monitoring Data of a Specified Chip
Function
The npu-smi info proc -i id -c chip_id -d delay_seconds command is used to query the Matrix process monitoring data of a specified chip.
Syntax
npu-smi info proc -i id -c chip_id -d delay_seconds
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
delay_seconds |
Delay of each query operation in seconds. The value ranges from 1 to 100, in seconds. The default value is 1. |
Usage Instruction
This command can be used only when the NPU version of the Atlas 300I inference card is 1.4.0.
Example
# Query the Matrix process monitoring data of chip 2 on device 0 within 2s.
npu-smi info proc -i 0 -c 2 -d 2
Npu ID Chip Id PID Memory% AI Cpu% 0 2 0 0.0 0.0 0 2 1 0.0 0.0 0 2 2 0.0 0.0 0 2 3 100.0 100.0 0 2 4 100.0 100.0 0 2 5 100.0 100.0 0 2 6 38.3 88.6 0 2 7 77.7 91.5 0 2 8 79.3 33.5
Querying a User Certificate
Function
The npu-smi info -t license -i id command is used to query a user certificate.
Syntax
npu-smi info -t license -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
- NPU 1.X.X series versions: Only npu-smi and MCU 1.4.0 and later versions support this command.
- NPU 20.X.X or later: All versions support this command.
- This command is not supported on a VM or a Docker container.
Example
# Obtain the certificate abcde of device 1.
npu-smi info -t license -i 1
License : abcde
Querying the IP Information of an AI Chip
Function
The npu-smi info -t ip -i id -c chip_id command is used to query the IP address of an AI chip.
Syntax
npu-smi info -t ip -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
- NPU 1.X.X series versions: NPU 1.4.1 and later versions support this command.
- NPU 20.X.X or later: All versions support this command.
Example
# Query the IP information about chip 0 on device 0.
npu-smi info -t ip -i 0 -c 0
ip : 192.168.4.199 netmask : 255.255.255.0
Querying the PCIe Error Count of All Chips
Function
The npu-smi info -t err-count -i id command is used to query the PCIe bit error count of all chips.
Syntax
npu-smi info -t err-count -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
- This command applies only to NPU 20.1.X or later.
Example
#Query the PCIe error count of all chips on device 1.
npu-smi info -t err-count -i 1
NPU ID : 1 Chip Count : 4 Chip ID : 0 Pcs Rx Error Count : 25 Phy Lane Error Count : 0 Dl Lcrc Error Count : 25 Dl Dcrc Error Count : 0 Chip ID : 1 Pcs Rx Error Count : 25 Phy Lane Error Count : 0 Dl Lcrc Error Count : 25 Dl Dcrc Error Count : 0 Chip ID : 2 Pcs Rx Error Count : 25 Phy Lane Error Count : 0 Dl Lcrc Error Count : 25 Dl Dcrc Error Count : 0 Chip ID : 3 Pcs Rx Error Count : 25 Phy Lane Error Count : 0 Dl Lcrc Error Count : 25 Dl Dcrc Error Count : 0
Querying the PCIe Error Count of a Specified Chip
Function
The npu-smi info -t err-count -i id -c chip_id command is used to query the PCIe error count of a specified chip.
Syntax
npu-smi info -t err-count -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
- This command applies only to NPU 20.1.X or later.
Example
#Query the PCIe error count of chip 1 on device 1.
npu-smi info -t err-count -i 1 -c 1
Pcs Rx Error Count : 25 Phy Lane Error Count : 0 Dl Lcrc Error Count : 25 Dl Dcrc Error Count : 0
Commands for Settings (set)
Configuring SSH Settings for All Chips
Function
The npu-smi set -t ssh-enable -i id -d value command is used to enable or disable SSH for all chips of a device.
Syntax
npu-smi set -t ssh-enable -i id -d value
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
value |
SSH setting. The value can be:
|
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
- After enabling SSH for all chips, you need to reset them for the configurations to take effect. For details, see Resetting the Standard PCIe Card.
- If you enable the SSH service, change the SSH login password of the device (including the passwords of the HwHiAiUser and root users) immediately.
- The SSH service will not be automatically disabled due to configuration persistency. You are advised to manually disable it in a timely manner after using it.
Example
# Enable SSH for all chips on device 1.
- NPU 20.2.X or later:
npu-smi set -t ssh-enable -i 1 -d 1
Status : OK Message : The ssh-enable of the card is set successfully. Reset card for the configuration to take effect.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t ssh-enable -i 1 -d 1
Status : OK Message : Set ssh-enable successfully, need reset card to active.
Configuring SSH Settings for a Specified Chip
Function
The npu-smi set -t ssh-enable -i id -c chip_id -d value command is used to enable or disable SSH for a specified chip.
Syntax
npu-smi set -t ssh-enable -i id -c chip_id -d value
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
value |
SSH setting. The value can be:
|
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
- After enabling SSH for a specified chip, you need to reset it for the configuration to take effect. For details, see Resetting a Chip.
- If you enable the SSH service, change the SSH login password of the device (including the passwords of the HwHiAiUser and root users) immediately.
- The SSH service will not be automatically disabled due to configuration persistency. You are advised to manually disable it in a timely manner after using it.
Example
# Disable SSH for chip 0 on device 1.
- NPU 20.2.X or later:
npu-smi set -t ssh-enable -i 1 -c 0 -d 0
Status : OK Message : The ssh-enable of the chip is set successfully. Reset chip for the configuration to take effect.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t ssh-enable -i 1 -c 0 -d 0
Status : OK Message : Set ssh-enable successfully, need reset chip to active.
Enabling/Disabling ECC
Function
The npu-smi set -t ecc-enable -i id -d value command is used to enable or disable the ECC function for all chips.
Syntax
npu-smi set -t ecc-enable -i id -d value
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
value |
ECC settings.
|
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
- After enabling ECC for all chips, you need to reset them for the configurations to take effect. For details, see Resetting the Standard PCIe Card.
- The ECC mode is disabled by default. If the ECC mode is enabled, some performance will deteriorate. Therefore, exercise caution when enabling the ECC mode.
Example
#Enable the ECC function for chip 1.
- NPU 20.2.X or later:
npu-smi set -t ecc-enable -i 1 -d 1
Status : OK Message : The ecc-enable is set successfully. Reset card for the configuration to take effect.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t ecc-enable -i 1 -d 1
Status : OK Message : Set ecc-enable successfully
Enabling/Disabling P2P
Function
The npu-smi set -t p2p-enable -i id -d value command is used to enable or disable the P2P function for all chips.
Syntax
npu-smi set -t p2p-enable -i id -d value
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
value |
p2p settings.
|
Usage Instruction
- For NPU 1.X.X series versions, this command can be used to disable the P2P function, but cannot be used to enable the P2P function for chips.
- This command is unavailable for NPU 20.X.X or later.
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
#Disable the P2P function for chip 1.
npu-smi set -t p2p-enable -i 1 -d 0
Status : OK Message : Set p2p-enable successfully
Collecting Logs
Function
The npu-smi set -t collect-log -i id command is used to collect MCU logs. For NPU 1.X.X and NPU 20.0.0, the collected logs are stored in the /tmp directory. For NPU 20.0.0 and later versions, NPU 20.2.X and later versions, and NPU 20.1.X, the collected logs are stored in the /run directory.
Syntax
npu-smi set -t collect-log -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
#Collect MCU logs of device 1.
- NPU 20.2.X or later:
npu-smi set -t collect-log -i 1
type(0): file_len(203198)--offset(203198) [100]. Logs collected successfully,(0). type(1): file_len(101991)--offset(101991) [100]. Logs collected successfully,(1). type(2): file_len(101376)--offset(101376) [100]. Logs collected successfully,(2).
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t collect-log -i 1
type(0): file_len(203198)--offset(203198) [100]. collect log success,(0). type(1): file_len(101991)--offset(101991) [100]. collect log success,(1). type(2): file_len(101376)--offset(101376) [100]. collect log success,(2).
Resetting the Standard PCIe Card
Software Preparations
The standard PCIe card reset function in out-of-band mode depends on IPMItool. Download the tool and load the driver in advance.
- Download ipmitool.
- CentOS, and EulerOS: yum install ipmitool
- Ubuntu: apt-get install ipmitool
- Load the driver.
modprobe ipmi_si
modprobe ipmi_devintf
modprobe ipmi_msghandler
- After the OS is reset, check whether the ipmi.service status is enabled. If the service status is not enabled, perform 2 to reload the driver.
Function
The npu-smi set -t reset -i id [-m 1] command is used to reset a PCIe card.
Syntax
npu-smi set -t reset -i id [-m 1]
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
- Do not run this command when services are running.
- In the preceding command, [-m 1] indicates an optional parameter. If this parameter is used, the PCIe card is reset in in-band mode. If this parameter is not used, the PCIe card is reset in out-of-band mode. This parameter applies only to NPU 20.1.X or later.
- The standard PCIe card reset in out-of-band mode depends on the iBMC. To ensure the reset function, upgrade the iBMC to the latest version.
- After the standard PCIe card is reset successfully, wait for at least 20s before querying information about this card or other standard cards and chips.
Example
# Reset device 1 in out-of-band mode.
- NPU 20.2.X or later:
npu-smi set -t reset -i 1
Resetting the standard PCIe card or NPU chip may cause a system hang or abnormal reset during service running. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset card successfully.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t reset -i 1
Resetting a standard PCIe card or npu chip during service running may cause system hang or abnormal reset. Are you sure you want to continue resetting?(Y/N) y Message : resetting .. Status : OK Message : Reset card successfully
# Reset device 77 in in-band mode.
- NPU 20.2.X or later:
npu-smi set -t reset -i 77 -m 1
Resetting the standard PCIe card or NPU chip may cause a system hang or abnormal reset during service running. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset card successfully.
- NPU 20.1.X:
npu-smi set -t reset -i 77 -m 1
Resetting a standard PCIe card or npu chip during service running may cause system hang or abnormal reset. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset card successfully
Resetting a Chip
Software Preparations
The chip reset function in out-of-band mode depends on IPMItool. Download the tool and load the driver in advance.
- Download ipmitool.
- CentOS, and EulerOS: yum install ipmitool
- Ubuntu: apt-get install ipmitool
- Load the driver.
modprobe ipmi_si
modprobe ipmi_devintf
modprobe ipmi_msghandler
- After the OS is reset, check whether the ipmi.service status is enabled. If the service status is not enabled, perform 2 to reload the driver.
Function
The npu-smi set -t reset -i id -c chip_id [-m 1] command is used to reset a chip.
Syntax
npu-smi set -t reset -i id -c chip_id [-m 1]
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
- Do not run this command when services are running.
- In the preceding command, [-m 1] indicates an optional parameter. If this parameter is used, the specified chip is reset in in-band mode. If this parameter is not used, the specified chip is reset in out-of-band mode. This parameter is used only in NPU 20.1.X or later.
- The chip reset in out-of-band mode depends on the iBMC. To ensure the reset function, upgrade the iBMC to the latest version.
- After the chip is reset successfully, wait for at least 20s before querying information about this chip or other chips.
- This command does not support out-of-band reset of a specified MCU.
Example
#Reset chip 0 on device 1 in out-of-band mode.
- NPU 20.2.X or later:
npu-smi set -t reset -i 1 -c 0
Resetting the standard PCIe card or NPU chip may cause a system hang or abnormal reset during service running. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset chip successfully.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t reset -i 1 -c 0
Resetting a standard PCIe card or npu chip during service running may cause system hang or abnormal reset. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset chip successfully
#Reset chip 0 on device 77 in in-band mode.
- NPU 20.2.X or later:
npu-smi set -t reset -i 77 -c 0 -m 1
Resetting the standard PCIe card or NPU chip may cause a system hang or abnormal reset during service running. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset chip successfully.
- NPU 20.1.X:
npu-smi set -t reset -i 77 -c 0 -m 1
Resetting a standard PCIe card or npu chip during service running may cause system hang or abnormal reset. Are you sure you want to continue resetting?(Y/N) y Message : resetting ... Status : OK Message : Reset chip successfully
Configuring a User Certificate
Function
The npu-smi set -t license -i id -f "license" command is used to configure a user certificate. The certificate can be configured only once. Otherwise, the configuration fails.
Syntax
npu-smi set -t license -i id -f "license"
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
license |
Certificate content. The value is a string of 1 to 255 bytes. NOTE:
Some special characters in Linux shell commands indicate reserved fields. For example, $$ indicates the shell process ID, and $? indicates the exit status of the previous command. If special characters need to be set, you need to escape the special characters. |
Usage Instruction
- NPU 1.X.X series versions: Only npu-smi and MCU 1.4.0 and later versions support this command.
- NPU 20.X.X or later: All versions support this command.
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
# Set the certificate of device 1 to abcde.
- NPU 20.2.X or later:
npu-smi set -t license -i 1 -f "abcde"
Status : OK Message : The license of the chip is set successfully.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t license -i 1 -f "abcde"
Status : OK Message : Set chip license successfully
Setting the IP Information of an AI Chip
Function
The npu-smi set -t ip -i id -c chip_id -s ipstring command is used to set the IP address of an AI chip.
Syntax
npu-smi set -t ip -i id -c chip_id -s ipstring
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
ipstring |
IP address and subnet mask. Syntax: XX.XX.XX.XX/XX.XX.XX.XX The information before the slash (/) is the IP address, and the information after the slash (/) is the subnet mask. |
Usage Instruction
- NPU 1.X.X series versions: Only NPU 1.4.1 and later versions support this command.
- NPU 20.X.X series versions: All versions support this command.
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
- After the system is restarted or the chip is reset, the configured IP address is lost and is restored to the default IP address. The IP address of the AI chip needs to be reset.
- The IP address must be configured by the root user of the physical machine. If the IP address is configured by a non-root user of the physical machine, or on a container or VM, an error is reported.
- For NPU 1.X.X series versions, the SSH function of the chip must be enabled before the IP address is configured. Otherwise, only the IP address of the chip is modified, and the SSH service fails to be restarted. In this case, an error is returned.
Example
# Set the IP address of AI chip 0 on device 0 to 192.168.5.199 and subnet mask to 255.255.255.0.
- NPU 20.2.X or later:
npu-smi set -t ip -i 0 -c 0 -s 192.168.5.199/255.255.255.0
Status : OK Message : The ip of the chip is set successfully.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi set -t ip -i 0 -c 0 -s 192.168.5.199/255.255.255.0
Status : OK Message : Set chip ip successfully
Clearing the PCIe Error Count of All Chips
Function
The npu-smi set -t errcount-clear -i id command is used to clear the PCIe bit error count of all chips.
Syntax
npu-smi set -t errcount-clear -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
Usage Instruction
- This command applies only to NPU 20.1.X or later.
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
# Clear the PCIe error code count of all chips on device 1.
- NPU 20.2.X or later:
npu-smi set -t errcount-clear -i 1
Status : OK Message : The errcount-clear is set successfully.
- NPU 20.1.X:
npu-smi set -t errcount-clear -i 1
Status : OK Message : Set errcount-clear successfully
Clearing the PCIe Error Count of a Specified Chip
Function
The npu-smi set -t errcount-clear -i id -c chip_id command is used to clear the PCIe bit error count of a specified chip.
Syntax
npu-smi set -t errcount-clear -i id -c chip_id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
chip_id |
Chip ID. If there are four chips, the chips are numbered 0, 1, 2, and 3. |
Usage Instruction
- This command applies only to NPU 20.1.X or later.
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
#Clear the PCIe error count of chip 1 on device 1.
- NPU 20.2.X or later:
npu-smi set -t errcount-clear -i 1 -c 1
Status : OK Message : The errcount-clear of the chip is set successfully.
- NPU 20.1.X:
npu-smi set -t errcount-clear -i 1 -c 1
Status : OK Message : Set chip errcount-clear successfully
Commands for Upgrade (upgrade)
Querying Firmware Upgrade Status
Function
The npu-smi upgrade -q item -i id command is used to query the firmware upgrade status.
Syntax
npu-smi upgrade -q item -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
item |
Upgrade type: MCU. |
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
#Query the firmware upgrade status of the MCU on device 1.
- NPU 20.2.X or later:
npu-smi upgrade -q mcu -i 1
Conclusion : PASS Message : The device is upgraded successfully.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi upgrade -q mcu -i 1
Conclusion : PASS Message : Device upgrade successfully.
Querying Firmware Version
Function
The npu-smi upgrade -b item -i id command is used to query firmware version.
Format
npu-smi upgrade -b item -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
item |
Upgrade type: MCU. |
Usage Instruction
This command is not supported on a VM or a Docker container.
Example
#Query firmware version of MCU on device 1.
npu-smi upgrade -b mcu -i 1
Version : 1.1.8
Upgrading the Firmware
Function
The npu-smi upgrade -t item -i id -f file_path command is used to upgrade firmware.
Syntax
npu-smi upgrade -t item -i id -f file_path
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
item |
Upgrade type: MCU. |
file_path |
Path of the upgrade file. The file path can contain only letters, digits, underscores (_), dots (.), slashes (/), and hyphens (-). |
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
# Upgrade the MCU firmware on device 1.
- NPU 20.2.X or later:
npu-smi upgrade -t mcu -i 1 -f ./IT91VPUA_MCU_V103.bin
Validity : success file_len(160847)--offset(160847) [100]. Transfer : success Status : start to upgrade Start upgrade [100]. Status : OK Message : The device upgrade is started successfully Message : need active mcu
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi upgrade -t mcu -i 1 -f ./IT91VPUA_MCU_V103.bin
validate : successfully file_len(160847)--offset(160847) [100]. transfile : successfully Status : start to upgrade Start upgrade [100]. Status : OK Message : Start device upgrade successfully Message : need active mcu
Validating Firmware
Function
The npu-smi upgrade -a item -i id command is used to validate firmware after the firmware is upgraded.
Syntax
npu-smi upgrade -a item -i id
Parameters
Parameter |
Description |
---|---|
id |
Device ID. The NPU ID obtained by running the npu-smi info -l command is the device ID. |
item |
Upgrade type: MCU. |
Usage Instruction
- This command is not supported on a VM or a Docker container.
- You can run this command only as the root user.
Example
# Make the MCU firmware of the new version take effect on device 1.
- NPU 20.2.X or later:
npu-smi upgrade -a mcu -i 1
Status : OK Message : The upgrade has taken effect after performed reboot successfully.
- NPU 1.X.X, NPU 20.0.X, and NPU 20.1.X:
npu-smi upgrade -a mcu -i 1
Status : OK Message : Active upgrade warm reboot successfully.
- Introduction
- Usage of the npu-smi Command
- Querying Help Information
- Querying the Tool Version
- Commands for Information Query (info)
- Querying Basic Information
- Querying Chip Monitoring Data
- Querying All NPU Devices
- Querying the Mapping Information About All Chips
- Querying the Information About a Card
- Querying the Common Information About All Chips
- Querying the Flash Information of All Chips on a Card
- Querying the Memory Information of All Chips
- Querying the Statistics of All Chips on a Card
- Querying the Temperature of All Chips on a Card
- Querying the Power of All Chips on a Card
- Querying the Voltage of All Chips on a Card
- Querying the Health Status of All Chips on a Card
- Querying SSH Settings of All Chips
- Querying the ECC Error Count of All Chips
- Querying the ECC Enable Status
- Querying the p2p Enable Status
- Querying Information About a Chip
- Querying the Temperature of a Chip
- Querying the Power of a Chip
- Querying the Voltage of a Chip
- Querying Chip Statistics
- Querying the Flash Information of a Chip
- Querying the Memory Information of a Chip
- Querying the Health Status of a Chip
- Querying SSH Settings of a Chip
- Querying the ECC Error Count of a Chip
- Checking the IIC Channel Between the NPU and the MCU
- Querying the Product Type of a Specified Chip
- Querying Matrix Process Monitoring Data of a Specified Chip
- Querying a User Certificate
- Querying the IP Information of an AI Chip
- Querying the PCIe Error Count of All Chips
- Querying the PCIe Error Count of a Specified Chip
- Commands for Settings (set)
- Configuring SSH Settings for All Chips
- Configuring SSH Settings for a Specified Chip
- Enabling/Disabling ECC
- Enabling/Disabling P2P
- Collecting Logs
- Resetting the Standard PCIe Card
- Resetting a Chip
- Configuring a User Certificate
- Setting the IP Information of an AI Chip
- Clearing the PCIe Error Count of All Chips
- Clearing the PCIe Error Count of a Specified Chip
- Commands for Upgrade (upgrade)