The OpenMPI project has a tool called hwloc that helps identify hardware, useful beyond parallel/high-performance computing. It even generates ASCII artwork!
http://nitschinger.at/Discovering-Hardware-Topology-in-Rust/
The Hardware Locality (hwloc) software project aims at easing the process of discovering hardware resources in parallel architectures. It offers command-line tools and a C API for consulting these resources, their locality, attributes, and interconnection. hwloc primarily aims at helping high-performance computing (HPC) applications, but is also applicable to any project seeking to exploit code and/or data locality on modern computing platforms.
https://www.open-mpi.org/projects/hwloc/
https://github.com/open-mpi/hwloc
https://www.open-mpi.org/projects/hwloc/doc/v2.0.1/

