How this information will be disclosed will be very specific to the operating system (unless you are writing an operating system , of course).
You did not say which operating system you are running on. In the case of Linux, you can get data from / proc / cpuinfo, however, there are subtleties with the value of hyperthreading and a problem with multiple cores on the same matrix using a common L2 cache (in fact, you have the NUMA architecture).
symcbean
source share