Home>Article>Operation and Maintenance> How to check the cpu model in linux?
In Linux, you can view the cpu model by viewing the model name information of the /proc/cpuinfo file, or directly using the commandcat /proc/cpuinfo | grep 'model name' |uniq
.
#In the Linux system, the proc file system is provided to display the system's software and hardware information. If you want to know the provider and related configuration information of the CPU in the system, you can get it through the /proc/cpuinfo file.
Use the following command to read the /proc/cpuinfo file and view cpu information
cat /proc/cpuinfo
Output:
processor : 0 vendor_id :GenuineIntel cpu family :6 model :26 model name :Intel(R) Xeon(R) CPU E5520 @ 2.27GHz stepping :5 cpu MHz :1600.000 cache size : 8192 KB physical id :0 siblings :8 core id : 0 cpu cores :4 apicid :0 fpu :yes fpu_exception :yes cpuid level : 11 wp :yes 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 syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lm bogomips :4522.12 clflush size :64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management :
View the "model name" line output to view The name, model, main frequency and other information of the CPU.
Related instructions:
●Processor: The number of the logical processing core in the system. For single-core processors, it can be thought of as its CPU number. For multi-core processors, it can be a physical core or a virtual logical core using hyper-threading technology; its count starts from 0.
●vendor_id: CPU manufacturer
●cpu family: CPU product series code
● Model: The codename of which generation in the series the CPU belongs to
● Model name: The name and number of the CPU, and the nominal frequency
● Stepping: The CPU belongs to the updated version
●cpu MHz: The actual main frequency used by the CPU
● cache size: CPU secondary cache size
● Physical id: The label of a single CPU
●Siblings: Number of logical physical cores of a single CPU
●Core id: The number of the current physical core in the CPU where it is located. This number is not necessarily consecutive
●cpu cores: The number of physical cores of the CPU where the logical core is located
● APICid: The number used to distinguish different logical cores. This number must be different for each logical core in the system, and this number may not be consecutive
●fpu: Whether it has a floating point unit (Floating Point Unit)
● fpu_exception: Whether to support floating point calculation exception
●cpuid level: The value in the eax register before executing the cpuid instruction. Depending on the value, the cpuid instruction will return different contents
●wp: Indicates whether the current CPU supports write protection (Write Protection) for user space in kernel mode
●flags: Functions supported by the current CPU
●bogomips: Roughly measured CPU speed when the system kernel starts (Million Instructions Per Second)
●Clflush size: The size unit for each cache refresh
● cache_alignment: Cache address alignment unit
●Address sizes: Number of accessible address spaces
If you don’t want to get all the information about the CPU, but just want to check the CPU model, you can use the following command:
cat /proc/cpuinfo | grep 'model name' |uniq
Output:
model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
Recommended video tutorials: "Linux Tutorial"
The above is the entire content of this article, I hope it will be helpful to everyone's learning. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !
The above is the detailed content of How to check the cpu model in linux?. For more information, please follow other related articles on the PHP Chinese website!