From the in your neighborhood department
hwloc provides command line tools and a C API to obtain the hierarchical map of key computing elements, such as: NUMA memory nodes, shared caches, processor sockets, processor cores, and processor "threads". hwloc also gathers various attributes such as cache and memory information, and is portable across a variety of different operating systems and platforms.
The hwloc team considers version 1.0 to be the first production-quality release that is suitable for widespread adoption. Please send your feedback on hwloc experiences to our mailing lists (see the web site, above).
Thanks team, keep up the good work, and don't go anywhere.