http://www.cyberciti.biz/faq/linux-cpuid-command-read-cpuid-instruction-on-linux-for-cpu
Is there a CPU-Z like a freeware/open source software that detects the central processing unit (CPU) of a modern personal computer in Linux operating system? How can I get detailed information about the CPU(s) gathered from the CPUID instruction, including the exact model of CPU(s) on Linux operating system?
There are three programs on Linux operating system that can provide CPUID information and these tools are useful to find out if specific advanced features such as virtualization, extended page tables, encryption and more:
Sample outputs:
Sample outputs:
Sample outputs:
Sample outputs:
Sample outputs:
Some important flags for sysadmins on Linux based system:
Here is complete information about one of cpu:
Sample outputs:
Is there a CPU-Z like a freeware/open source software that detects the central processing unit (CPU) of a modern personal computer in Linux operating system? How can I get detailed information about the CPU(s) gathered from the CPUID instruction, including the exact model of CPU(s) on Linux operating system?
There are three programs on Linux operating system that can provide CPUID information and these tools are useful to find out if specific advanced features such as virtualization, extended page tables, encryption and more:
- lscpu command– Show information on CPU architecture.
- x86info command– Show x86 CPU diagnostics.
- cpuid command– Dump CPUID information for each CPU. This is the closet tool to CPU-Z app on Linux.
x86info
x86info is a program which displays a range of information about the CPUs present in an x86 system.Install x86info on Debian / Ubuntu Linux
$ sudo apt-get install x86info
Install x86info on Fedora Linux
$ sudo dnf install x86info
Install x86info on RHEL/SL/CentOS Linux
$ sudo yum install x86info
Examples
Simply type the following command:# x86info
Sample outputs:
See TLB, cache sizes and cache associativity
# x86info -c
Sample outputs:
x86info v1.30. Dave Jones 2001-2011 |
See CPU feature flags like AES/FPU/SSE and more
# x86info -f
Sample outputs:
x86info v1.30. Dave Jones 2001-2011 |
See MP table showing CPUs BIOS knows about
# x86info -mp
Sample outputs:
x86info v1.30. Dave Jones 2001-2011 |
Show register values from all possible cpuid calls
# x86info -r
....To see all information, type:
..
eax in: 0x00000000, eax = 0000000a ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x00000001, eax = 000106ca ebx = 00040800 ecx = 0040e31d edx = bfebfbff
eax in: 0x00000002, eax = 4fba5901 ebx = 0e3080c0 ecx = 00000000 edx = 00000000
eax in: 0x00000003, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000004, eax = 04004121 ebx = 0140003f ecx = 0000003f edx = 00000001
eax in: 0x00000005, eax = 00000040 ebx = 00000040 ecx = 00000003 edx = 00000010
eax in: 0x00000006, eax = 00000001 ebx = 00000002 ecx = 00000001 edx = 00000000
eax in: 0x00000007, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000008, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000009, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x0000000a, eax = 07280203 ebx = 00000000 ecx = 00000000 edx = 00000503
eax in: 0x80000000, eax = 80000008 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000001, eax = 00000000 ebx = 00000000 ecx = 00000001 edx = 20100800
eax in: 0x80000002, eax = 20202020 ebx = 20202020 ecx = 746e4920 edx = 52286c65
eax in: 0x80000003, eax = 74412029 ebx = 54286d6f ecx = 4320294d edx = 44205550
eax in: 0x80000004, eax = 20303135 ebx = 20402020 ecx = 36362e31 edx = 007a4847
eax in: 0x80000005, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000006, eax = 00000000 ebx = 00000000 ecx = 02006040 edx = 00000000
eax in: 0x80000007, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000008, eax = 00003024 ebx = 00000000 ecx = 00000000 edx = 00000000
....
..
# x86info -a
cpuid
cpuid dumps detailed information about the CPU(s) gathered from the CPUID instruction, and also determines the exact model of CPU(s) from that information. It dumps all information available from the CPUID instruction. The exact collection of information available varies between manufacturers and processors. The following information is available consistently on all modern CPUs:- vendor_id
- version information (1/eax)
- miscellaneous (1/ebx)
- feature information (1/ecx)
Install cpuid on Debian / Ubuntu Linux
$ sudo apt-get install cpuid
Install cpuid on Fedora Linux
$ sudo dnf install cpuid
Install cpuid on RHEL/SL/CentOS Linux
$ sudo yum install cpuid
Examples
Simply type the following command (this command provides lots of useful information including list of all features in human readable format):# cpuid
# cpuid | less
# cpuid | grep 'something'
Sample outputs:
Display information only for the first CPU
# cpuinfo -1
Use the CPUID instruction (default and very reliable)
# cpuinfo -i
Use the CPUID kernel module (not seems to be reliable on all combinations of CPU type and kernel version)
# cpuinfo -k
Search for specific CPU feature
## Is virtualization supported (see below for flags)? ##
# cpuid -1 | egrep --color -iw 'vmx|svm|ept|vpid|npt|tpr_shadow|vnmi|flexpriority'
VMX: virtual machine extensions = true
## Is advanced encryption supported? ##
# cpuid -1 | egrep --color -i 'aes|aes-ni'
AES instruction = true
Some important flags for sysadmins on Linux based system:
- vmx– Intel VT-x, basic virtualization.
- svm– AMD SVM, basic virtualization.
- ept– Extended Page Tables, an Intel feature to make emulation of guest page tables faster.
- vpid– VPID, an Intel feature to make expensive TLB flushes unnecessary when context switching between guests.
- npt– AMD Nested Page Tables, similar to EPT.
- tpr_shadow and flexpriority– Intel feature that reduces calls into the hypervisor when accessing the Task Priority Register, which helps when running certain types of SMP guests.
- vnmi– Intel Virtual NMI feature which helps with certain sorts of interrupt events in guests.
Display information only for the first CPU
# cpuinfo -1
Here is complete information about one of cpu:
CPU: |
lscpu command example
You will get information about your CPU Architecture on Linux:$ lscpu
Sample outputs:
Architecture: x86_64Of course you can also extract information from /proc/cpuinfo and /dev/cpu/* files:
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 45
Stepping: 7
CPU MHz: 2000.063
BogoMIPS: 4001.39
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 20480K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
$ less /proc/cpuinfo