hwloc
The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. (Summary from the program web page.)
The official web page:http://www.open-mpi.org/projects/hwloc/
Typical usage
$ module add hwloc
$ lstopo