I got mass mass mass tired of lspci, so I wrote a hardware monitor that also has a brain

Published: (February 28, 2026 at 01:01 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

Every hardware‑info tool on Linux does the same thing: spawn lspci, pray the output format hasn’t changed, regex the hell out of it, and call it a day.

I wanted something that just asks the kernel directly—no middleman. So I wrote hwmonitor in pure C. It reads /sys and /proc raw, spits out structured JSON, and runs in under a millisecond.

Features

  • Queries CPU, GPU, RAM, storage, motherboard, battery, and more directly from the kernel.
  • No external commands, no fork().
  • Outputs machine‑readable JSON.
  • Small footprint: ~2000 lines of C, one dependency.
  • MIT licensed, zero memory leaks.

AI‑Powered Hardware Analysis

The tool can answer natural‑language questions about your hardware. For example:

hwmonitor --gpu -A "Can I run a 70B model locally on this hardware?"
╭─ AI Hardware Analysis (Groq)
| With 8GB VRAM on your RTX 5060 a 70B model won't fit even with
| INT4 quantization. You'd need ~35GB VRAM. Stick to 7B‑13B models,
| or offload layers to your 32GB RAM at the cost of ~4x slower
| inference.
╰─

You ask your hardware a question. It answers—from the terminal.

Installation & Usage

# Clone the repository
git clone https://github.com/th0truth/hwmonitor.git
cd hwmonitor

# Build
make

# Run
./hwmonitor --json   # prints all detected hardware as JSON

License

MIT licensed.

Repository

hwmonitor on GitHub

What hardware questions would you ask?

0 views
Back to Blog

Related posts

Read more »