Skip to main content

Common CLI Usage

MB-SDK provides Command-Line Interface (CLI) tools for SDK users to easily control and manage MB-DPU devices. Each CLI tool supports tab-completion to automatically complete bash commands.

Device Control

mango-ctl CLI tool is used to configure MangoBoost solutions.

~$ mango-ctl dev -h
Control MangoBoost DPU devices
Usage: mango-ctl dev [OPTIONS] [SUBCOMMAND]

Options:
-h,--help Print this help message and exit

Subcommands:
list List the available devices
show Show the details of devices
rescan Rescan the PCIe devices
remove Remove the PCIe device
enable Enable the MangoBoost project
disable Disable the MangoBoost project
sriov Enable the SR-IOV

You can list all the MangoBoost PCIe devices using mango-ctl dev command. Each device is identified by a unique BDF (Bus, Device, Function). The following example shows a Mango GPUBoost device (0a:00.0) on the machine.

~$ mango-ctl dev list
0000:0a:00.0
~$ sudo mango-ctl dev show
PCI FPGA Devices
0000:0a:00.0
Vendor ID: 1f52
Device ID: 1008
Revision ID: 0
Description: Mango GPUBoost - RDMA
BAR[0]: 0x91100000 [size=0x40000]
BAR[2]: 0x90c00000 [size=0x400000]
BAR[4]: 0x91000000 [size=0x100000]
NUMA Node: 0
PCIe MSI-X: 16
PCIe Link: Speed 16GT/s (ok), Width x8 (ok)
Kernel module:
info

Each solution has a different CLI usage for device control. Refer to each solution's manual for the details.

Card Monitoring

mango-smi CLI tool is used to monitor the status of MangoBoost DPU devices. It shows the generic card information and sensor monitoring results including power and temperature.

~$ sudo mango-smi
+--------------------------------------------------------+
| MANGO-SMI 0.5.8 Kernel Driver 1.0.0-250707 |
|========================================================|
| PCIe BDF (Vendor:Device ID) | Total Power |
| Card serial number (type) | FPGA Temperature |
| Device description | SoC Status |
+--------------------------------------------------------+
| 0000:0a:00.0 (1f52:1008) | 38W (Avg) 39W (Max) |
| XFL1LRXXXXXX (u45n) | 44C (Avg) 44C (Max) |
| Mango GPUBoost - RDMA | SoC OS Running |
+--------------------------------------------------------+