Today I had to google a bit to discover how to find out how many CPU cores I had on one of my CentOS 7.x Virtual Machines. Luckily enough, I found this great topic on the CentOS forum where I could retrieve most of the following one-liners:
Show the System CPU architecture
1 |
[hostname:~]# lscpu |
Show all CPU infos, including physical and logical cores
1 |
[hostname:~]# cat /proc/cpuinfo |
Show all physical cores
1 |
[hostname:~]# cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l |
Show if (and how many) the installed CPUs support Hyper-Threading
1 |
[hostname:~]# dmidecode -t processor | grep HTT |