> For the complete documentation index, see [llms.txt](https://asus-isg-aidc.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asus-isg-aidc.gitbook.io/guide/v1.4.0/cli/commandreference/hardwarespec.md).

# Hardware Specification

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/02/12    |

## Table of Contents

* [1. Overview](#overview)
* [2. Module Flag](#module-flag)
* [3. Subcommands](#subcommands)
* [4. Usage Examples](#usage-examples)

***

## 1. Overview <a href="#overview" id="overview"></a>

The `hwspec` command collects hardware specification details from target nodes. Supports two data collection methods: local tools (`dmidecode`, `lshw`, etc.) and Redfish API.

```bash
aidc-cli hwspec <subcommand> -m <tool|redfish> [flags]
```

***

## 2. Module Flag <a href="#module-flag" id="module-flag"></a>

Most subcommands require the `--module` (`-m`) flag to specify the data collection method. Four subcommands have a **fixed mode** and do not require `-m`:

| Subcommand  | Fixed Mode |
| ----------- | ---------- |
| `gpu-spec`  | `tool`     |
| `pike-spec` | `tool`     |
| `pcie-spec` | `redfish`  |
| `psu-spec`  | `redfish`  |

For all other subcommands, `-m` is required:

| Value     | Description                                    |
| --------- | ---------------------------------------------- |
| `tool`    | Use local system tools (dmidecode, lshw, etc.) |
| `redfish` | Use Redfish API via BMC                        |

***

## 3. Subcommands <a href="#subcommands" id="subcommands"></a>

### 3.1 `all-spec` — All Hardware Specs

Collects all available hardware specifications in one operation.

```bash
aidc-cli hwspec all-spec -m <tool|redfish>
```

{% hint style="info" %}
The report generated by `aidc-cli hwspec` commands will be stored in the `report/hardware-spec` directory, located in the same directory as the Vagrantfile on the host machine.
{% endhint %}

***

### 3.2 Individual Component Specs

| Subcommand       | Description                          |
| ---------------- | ------------------------------------ |
| `baseboard-spec` | Baseboard/motherboard information    |
| `cpu-spec`       | CPU model, cores, threads, frequency |
| `memory-spec`    | Memory modules, capacity, speed      |
| `disk-spec`      | Storage devices, capacity, type      |
| `nic-spec`       | Network interface cards              |
| `pike-spec`      | PIKE card specifications             |
| `gpu-spec`       | GPU model, memory, driver version    |
| `pcie-spec`      | PCIe slot/device information         |
| `psu-spec`       | Power supply unit specifications     |

**Syntax** for flexible-mode subcommands (`baseboard-spec`, `cpu-spec`, `memory-spec`, `disk-spec`, `nic-spec`):

```bash
aidc-cli hwspec <component>-spec -m <tool|redfish>
```

Fixed-mode subcommands (`gpu-spec`, `pike-spec`, `pcie-spec`, `psu-spec`) do not require `-m` and will ignore it if provided.

***

## 4. Usage Examples <a href="#usage-examples" id="usage-examples"></a>

```bash
# Collect all hardware specs using local tools
aidc-cli hwspec all-spec -m tool

# Collect GPU specs (fixed to tool mode, -m not required)
aidc-cli hwspec gpu-spec

# Collect CPU and memory specs for specific nodes
aidc-cli hwspec cpu-spec -m tool -l node01,node02
aidc-cli hwspec memory-spec -m tool -l node01,node02

# Collect all specs via Redfish for specific nodes
aidc-cli hwspec all-spec -m redfish -l node01
```
