Home

Inspecting CPU details on Linux

A short reference for pulling CPU details on a Linux box. There are three commands I rotate between depending on how much detail I need.

/proc/cpuinfo

The simplest option — just read the kernel's view of the CPU. You can pipe through grep to pull out a specific field.

bash
cat /proc/cpuinfo
bash
root@linuxpedi:~# cat /proc/cpuinfoprocessor       : 0vendor_id       : GenuineIntelcpu family      : 6model           : 85model name      : Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHzstepping        : 4microcode       : 0x2000065cpu MHz         : 1612.384cache size      : 11264 KBphysical id     : 0siblings        : 16core id         : 0cpu cores       : 8apicid          : 0initial apicid  : 0fpu             : yesfpu_exception   : yescpuid level     : 22wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1dbugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihitbogomips        : 4200.00clflush size    : 64cache_alignment : 64address sizes   : 46 bits physical, 48 bits virtualpower management:
bash
cat /proc/cpuinfo | grep 'vendor' | uniq      # vendor / brandcat /proc/cpuinfo | grep 'model name' | uniq  # CPU modelcat /proc/cpuinfo | grep processor | wc -l    # total core count

dmidecode

dmidecode reads hardware info from the system's SMBIOS tables. More detailed than /proc/cpuinfo — it'll tell you the socket, the max speed, the L1/L2/L3 cache handles, and so on.

bash
dmidecode --type processor
bash
root@linuxpedi:~# dmidecode --type processor# dmidecode 3.2Getting SMBIOS data from sysfs.SMBIOS 3.2 present.Handle 0x0400, DMI type 4, 48 bytesProcessor Information        Socket Designation: CPU1        Type: Central Processor        Family: Xeon        Manufacturer: Intel        ID: 54 06 05 00 FF FB EB BF        Signature: Type 0, Family 6, Model 85, Stepping 4        Flags:                FPU (Floating-point unit on-chip)                VME (Virtual mode extension)                DE (Debugging extension)                PSE (Page size extension)                TSC (Time stamp counter)                MSR (Model specific registers)                PAE (Physical address extension)                MCE (Machine check exception)                CX8 (CMPXCHG8 instruction supported)                APIC (On-chip APIC hardware supported)                SEP (Fast system call)                MTRR (Memory type range registers)                PGE (Page global enable)                MCA (Machine check architecture)                CMOV (Conditional move instruction supported)                PAT (Page attribute table)                PSE-36 (36-bit page size extension)                CLFSH (CLFLUSH instruction supported)                DS (Debug store)                ACPI (ACPI supported)                MMX (MMX technology supported)                FXSR (FXSAVE and FXSTOR instructions supported)                SSE (Streaming SIMD extensions)                SSE2 (Streaming SIMD extensions 2)                SS (Self-snoop)                HTT (Multi-threading)                TM (Thermal monitor supported)                PBE (Pending break enabled)        Version: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz        Voltage: 1.8 V        External Clock: 9600 MHz        Max Speed: 4000 MHz        Current Speed: 2100 MHz        Status: Populated, Enabled        Upgrade: Socket LGA2011        L1 Cache Handle: 0x0700        L2 Cache Handle: 0x0701        L3 Cache Handle: 0x0702        Serial Number: Not Specified        Asset Tag: Not Specified        Part Number: Not Specified        Core Count: 8        Core Enabled: 8        Thread Count: 16        Characteristics:                64-bit capable                Multi-Core                Hardware Thread                Execute Protection                Enhanced Virtualization                Power/Performance ControlHandle 0x0401, DMI type 4, 48 bytesProcessor Information        Socket Designation: CPU2        Type: Central Processor        Family: Xeon        Manufacturer: Intel        ID: 54 06 05 00 FF FB EB BF        Signature: Type 0, Family 6, Model 85, Stepping 4        Flags:                FPU (Floating-point unit on-chip)                VME (Virtual mode extension)                DE (Debugging extension)                PSE (Page size extension)                TSC (Time stamp counter)                MSR (Model specific registers)                PAE (Physical address extension)                MCE (Machine check exception)                CX8 (CMPXCHG8 instruction supported)                APIC (On-chip APIC hardware supported)                SEP (Fast system call)                MTRR (Memory type range registers)                PGE (Page global enable)                MCA (Machine check architecture)                CMOV (Conditional move instruction supported)                PAT (Page attribute table)                PSE-36 (36-bit page size extension)                CLFSH (CLFLUSH instruction supported)                DS (Debug store)                ACPI (ACPI supported)                MMX (MMX technology supported)                FXSR (FXSAVE and FXSTOR instructions supported)                SSE (Streaming SIMD extensions)                SSE2 (Streaming SIMD extensions 2)                SS (Self-snoop)                HTT (Multi-threading)                TM (Thermal monitor supported)                PBE (Pending break enabled)        Version: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz        Voltage: 1.8 V        External Clock: 9600 MHz        Max Speed: 4000 MHz        Current Speed: 2100 MHz        Status: Populated, Enabled        Upgrade: Socket LGA2011        L1 Cache Handle: 0x0703        L2 Cache Handle: 0x0704        L3 Cache Handle: 0x0705        Serial Number: Not Specified        Asset Tag: Not Specified        Part Number: Not Specified        Core Count: 8        Core Enabled: 8        Thread Count: 16        Characteristics:                64-bit capable                Multi-Core                Hardware Thread                Execute Protection                Enhanced Virtualization                Power/Performance Control

lshw

lshw is a small tool for digging into the full hardware config. With -C CPU it limits the output to just the CPU section.

bash
lshw -C CPU
bash
root@kale:~# lshw -C CPU  *-cpu:0       description: CPU       product: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz       vendor: Intel Corp.       physical id: 400       bus info: cpu@0       version: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz       slot: CPU1       size: 2100MHz       capacity: 4GHz       width: 64 bits       clock: 1010MHz       capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d       configuration: cores=8 enabledcores=8 threads=16  *-cpu:1       description: CPU       product: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz       vendor: Intel Corp.       physical id: 401       bus info: cpu@1       version: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz       slot: CPU2       size: 2100MHz       capacity: 4GHz       width: 64 bits       clock: 1010MHz       capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d       configuration: cores=8 enabledcores=8 threads=16