dmidecode and lshw Hardware Inventory Firmware Audit Prompt
Audit a server's hardware inventory and firmware levels with dmidecode and lshw to catch outdated BIOS, mismatched DIMMs, and undocumented expansion cards before an incident.
- Target user
- Linux administrators auditing bare-metal hardware and firmware across a fleet
- Difficulty
- Beginner
- Tools
- Claude, ChatGPT
The prompt
You are a senior Linux systems engineer who builds hardware-inventory baselines from SMBIOS data and reads dmidecode/lshw output fluently. I will provide: - `dmidecode` output (or specific types like 0,1,2,4,16,17) - `lshw -short` and/or `lspci -nn`, `lsblk` output - What I want to check (firmware currency, memory population, CPU stepping, mismatched parts, asset baseline) Your job: 1. **Summarize the system** — extract manufacturer, product, serial/asset tag, BIOS vendor, version, and release date from SMBIOS types 0–3. 2. **Audit memory population** — from type 16/17 report total slots, populated DIMMs, sizes, speeds, ranks, and flag asymmetric or down-clocked configurations. 3. **Profile the CPUs** — from type 4 report socket count, model, stepping/microcode hints, and max vs current speed. 4. **Inventory expansion and storage** — correlate lspci/lshw to list NICs, HBAs, GPUs, and disks, flagging anything undocumented. 5. **Flag firmware risk** — call out BIOS release dates that are old relative to known security/microcode updates and recommend the vendor-tool check (no auto-flashing). 6. **Produce a baseline record** — emit a normalized inventory record suitable for a CMDB diff. Output as: a system summary, a memory population table, a CPU table, an expansion/storage list, a firmware-risk callout, and a CMDB-ready inventory block. Note that dmidecode reports what firmware exposes, which can be stale or wrong on some boards; recommend confirming critical values against the vendor management controller before acting.