As a Linux Administrator might know the processor information, number of cores, processor speed and others in Linux or Unix system. The following command will help you for basic processor information.
cpuinfo :
We can get processor information from the /proc/cpuinfo,
Find Number of processor:
# grep processor /proc/cpuinfo
or
# less /proc/cpuinfo | grep processor
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
processor : 8
processor : 9
All the CPU information shows on,
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2420 0 @ 2.10GHz
stepping : 4
microcode : 0x424
cpu MHz : 2100.024
cache size : 15360 KB
physical id : 1
siblings : 12
core id : 5
cpu cores : 6
apicid : 43
initial apicid : 43
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu tsc msr pae cx8 cmov pat clflush mmx fxsr sse sse2 ss syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 cx16 sse4_1 sse4_2 popcnt aes avx hypervisor lahf_lm tpr_shadow vnmi flexpriority ept vpid aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm fsgsbase erms
bogomips : 4200.04
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
Find hyper threading Enabled ?
# less /proc/cpuinfo | grep flags | uniq | grep -i --color -E "ht"
flags : 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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
The below command find out number of "physical id" and "core id".
# less /proc/cpuinfo | grep "physical id" | sort|uniq | wc -l
2# less /proc/cpuinfo | grep "core id" | sort|uniq | wc -l
6So the number of cores would be 2 x 6 = 12 cores
Architecture :
lscpu command is shows cpu information,
# lscpu
# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Stepping: 4
CPU MHz: 2100.024
BogoMIPS: 4200.04
Hypervisor vendor: XXX
Virtualization type: none
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 15360K
NUMA node0 CPU(s): 0-9
Frequency:
# lscpu | grep -i mhz
CPU MHz: 2100.024
The cpu frequency changes can be seen by monitoring the output of /proc/cpuinfo using watch command,
# watch -n 0.1 "cat /proc/cpuinfo | grep -i mhz"
Every 0.1s: cat /proc/cpuinfo | grep -i mhz Fri Sep 25 19:02:14 2015
cpu MHz : 3492.066
cpu MHz : 3492.066
cpu MHz : 3492.066
cpu MHz : 3492.066
cpu MHz : 3492.066
Comments (0)