I’m working on a C++ backend tool that performs system diagnostics for various hardware components on Linux.

So far, I’ve implemented tests for:

  • Memory — using memtester
  • CPU — using stress-based utilities
  • GPU, Battery, Ethernet, Mouse, Keyboard — using CLI tools and libevdev for input devices

All of these are integrated into a gRPC-based service that reports JSON-formatted results back to the frontend.

Now I need to implement a system board diagnostic, i.e. something that can test or at least report the health of the motherboard and its connected components — like USB ports, PCIe slots, onboard sensors, etc.

Question:

Is there any existing Linux utility, API, or system file that can:

Report faults or health metrics for the motherboard/system board

Or help me programmatically verify that onboard components (like USB controllers, PCIe slots, etc.) are functioning correctly?

Even partial suggestions (e.g., checking sensors, voltage levels, or slot enumeration) are welcome — I just need a reliable way to detect possible motherboard-level issues programmatically.

Environment:

  • OS: Ubuntu 25.04 / Debian-based

  • Language: C++