This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Description
Currently, the code to check whether the hyper threading is on:
if (total_cores * total_physical_cpus) * 2 == total_logical_cpus:
hyperthreading = True
But it seems that the code above is not correct, because it can be partially on. For example, the results in my desktop:
❯ python3 check.py
This system has 1 physical CPUs
This system has 16 cores per physical CPU
This system has 16 total cores
This system has 24 logical CPUs
Why not compare tocal cores to logical CPUs directly?