lscpu gathers CPU architecture information from sysfs and /proc/cpuinfo.
The command output can be optimized for parsing or for easy readability by humans. The information includes, for example, the number of CPUs, threads, cores, sockets, and Non-Uniform Memory Access (NUMA) nodes.
There is also information about the CPU caches and cache sharing, family, model, bogoMIPS, byte order, and stepping.
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
On-line CPU(s) list: 0-11
Thread(s) per core: 1
Core(s) per socket: 6
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
CPU MHz: 2660.000
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
NUMA node0 CPU(s): 0-5
NUMA node1 CPU(s): 6-11
In the other article How to tell if cpu hyperthreading enabled on linux, one of the way I described is to use the output of lscpu to check if hyperthreading enabled on the host, it's to use the following information, easy to tell if hyperthreading enabled.
Thread(s) per core: 1
It's the indication that HT is disabled, if the value is 2, then HT is enabled.
Customized output format
# lscpu -a -e=socket,cpu,core,address,online,configured
SOCKET CPU CORE ADDRESS ONLINE CONFIGURED
0 0 0 - yes -
0 1 1 - yes -
0 2 2 - yes -
0 3 3 - yes -
0 4 4 - yes -
0 5 5 - yes -
1 6 6 - yes -
1 7 7 - yes -
1 8 8 - yes -
1 9 9 - yes -
1 10 10 - yes -
1 11 11 - yes -
Columns in above can be one of them
CPU The logical CPU number of a CPU as used by the Linux kernel.
CORE The logical core number. A core can contain several CPUs.
SOCKET The logical socket number. A socket can contain several cores.
BOOK The logical book number. A book can contain several sockets.
NODE The logical NUMA node number. A node may contain several books.
CACHE Information about how caches are shared between CPUs.
ADDRESS The physical address of a CPU.
ONLINE Indicator that shows whether the Linux instance currently makes use of the CPU.
Indicator that shows if the hypervisor has allocated the CPU to the virtual hardware on
which the Linux instance runs. CPUs that are configured can be set online by the
Linux instance. This column contains data only if your hardware system and hyper-
visor support dynamic CPU resource allocation.
This column contains data for Linux instances that run on virtual hardware with a
hypervisor that can switch the CPU dispatch-
ing mode (polarization). The polarization can be:
horizontal The workload is spread across all available CPUs.
vertical The workload is concentrated on few CPUs.
For vertical polarization, the column also shows the degree of concentration, high,
medium, or low. This column contains data only if your hardware system and hypervisor
support CPU polarization.