I have Intel i7-2600K quadcore, with hyperthreading enabled on Ubuntu 12.04. I know that I can find out how many cores I have in Python with import multiprocessing; multiprocessing.cpu_count(), but that gives me 8 because I have hyperthreading enabled on 4 physical cores. I’m rather interested in finding out how many physical cores I have. Is there a way to do that in Python? Alternatively, is there a way of finding out in Python whether hyperthreading is enabled? Thank you in advance for your help!
I have Intel i7-2600K quadcore, with hyperthreading enabled on Ubuntu 12.04. I know that
Share
According to http://archive.richweb.com/cpu_info, determining a cpu hyperthreading a bit complicated, but still useful.
Note that method is linux-specific.