How to find the no of cpu, core and if its under HT technology CPU

Finding Physical Processors

$ grep ‘physical id’ /proc/cpuinfo | sort | uniq | wc -l

Finding Virtual Processors

$ grep ^processor /proc/cpuinfo | wc -l

Finding CPU cores

$ grep ‘cpu cores’ /proc/cpuinfo

“2” indicates the two physical processors are dual-core, resulting in 4 virtual processors.

If “1” was returned, the two physical processors are single-core.

If the processors are single-core, and the number of virtual processors is greater than the number of physical processors, the CPUs are using hyper-threading.