Wednesday, January 1, 2014

Check whether hyperthreading is enabled or not in Linux?


# cat /proc/cpuinfo
If the number of siblings and number of cores you see is same then hyper threading is not enabled. If they are not same then its enabled.
If its enabled, then "siblings" give logical cores present and "cpu core" gives actual physical cores.

Linux detect or find out a dual-core cpu
Type the following command to get overall cpu info:

$ less /proc/cpuinfo
Task: Identif whether a cpu is dual-core or not
$ grep cores /proc/cpuinfo
Output:
cpu cores       : 2

Physical Processor

If you want to make sure how many physical CPUs are in the system, you can use the above information to calculate the number of physical CPUs. However simply counting the different physical id fields is easier.

1 comment: