py-cpuinfo icon indicating copy to clipboard operation
py-cpuinfo copied to clipboard

add core and socket and numa node count info from lscpu

Open mherkazandjian opened this issue 6 years ago • 6 comments

Hi,

In this pull request i implemented getting the following fields from "lscpu":

  • threads_per_core
  • cores_per_socket
  • sockets
  • numa_nodes

i also updated the readme. I tested the changes on a linux machine that is running the latest updated arch linux with lscpu version from util-linux 2.33.2

please let me know if i can further changes to improve this pull request.

Best,

mherkazandjian avatar Jun 15 '19 23:06 mherkazandjian

I'll look into merging this. I need to make sure there are ways of get this information on other platforms that don't have lscpu.

Thanks

workhorsy avatar Jun 19 '19 23:06 workhorsy

ok. tnx. which platforms specifically? i might be able to work some of those out too.

mherkazandjian avatar Jun 19 '19 23:06 mherkazandjian

If we add the new fields: threads_per_core, cores_per_socket, sockets, and numa_nodes, ideally those new fields would be present when running py-cpuinfo on Windows/FreeBSD/Linux/BeOS/OSX.

workhorsy avatar Jun 20 '19 01:06 workhorsy

i see. I can try to work on fetching the info for FreeBSD and OSX. I have not used BeOS before and my windows knowledge is limited. i'll keep you posted as i do progress, i'll start with freebsd first.

mherkazandjian avatar Jun 20 '19 01:06 mherkazandjian

@workhorsy, Any updates on this ?

ShadyAbuKalam avatar Oct 06 '21 23:10 ShadyAbuKalam

Unfortunately I haven't made any progress on this. I can't find a way to get threads_per_core, cores_per_socket, sockets, or numa_nodes on vanilla Windows. I've also been extremely busy with real life, and haven't had much time to work on this project. Any help would be great.

workhorsy avatar Oct 07 '21 13:10 workhorsy