zl程序教程

您现在的位置是:首页 >  系统

当前栏目

教你如何在Linux上查看CPU信息(linux看cpu)

LinuxCPU 如何 查看 信息
2023-06-13 09:16:16 时间

Linux 是用户友好的开源操作系统之一,在这个系统中,有很多命令可以帮助用户获取、查看和更改有关 CPU 信息的数据。本文将介绍教你如何在 Linux 上查看 CPU 信息的一些步骤。

首先,要查看 CPU 信息,你可以使用`cat /proc/cpulinfo`命令,它会列出当前 CPU 的类型、模型、架构、序列号、速度以及缓存大小等信息,如下所示:

# cat /proc/cpuinfo
processor : 0vendor_id : GenuineIntel
cpu family : 6model : 58
model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHzstepping : 9
cpu MHz : 2394.000cache size : 4096 KB

另外,你还可以使用`lscpu`命令来获取有关 CPU 的更多信息,例如 CPU 的位宽,支持的指令集,地址大小,最大 CPU 数量等等,如下所示:

# lscpu
Architecture: x86_64Byte Order: Little Endian
CPU(s): 2On-line CPU(s) list: 0,1
Thread(s) per core: 2Core(s) per socket: 1
Socket(s): 1Model name: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
CPU family: 6CPU MHz: 2394.000
L1d cache: 32KL1i cache: 32K
L2 cache: 256KL3 cache: 4096K
NUMA node0 CPU(s): 0,1Flags: 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

最后,你也可以使用`dmidecode`命令来获取 CPU 的更多信息,如 CPU 类型、位宽、生产商、型号、序列号、速度等等,如下所示:

# dmidecode -t processor
# dmidecode 3.2Getting SMBIOS data from sysfs.
SMBIOS 2.6 present.
Handle 0x000E, DMI type 4, 42 bytesProcessor Information
Socket Designation: CPU Type: Central Processor
Family: Core i7 Manufacturer: GenuineIntel
ID: B1 06 02 00 FF FB EB BF Signature: Type 0, Family 6, Model 58, Stepping 9
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) Version: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
Voltage: 1.2 V External Clock: 100 MHz
Max Speed: 2900 MHz Current Speed: 2900 MHz
Status: Populated, Scalable Upgrade: Socket LGA1399
L1 Cache Handle: 0x0005 L2 Cache Handle: 0x0006
L3 Cache Handle: 0x0007 Serial Number: Not Specified
Asset Tag: Fill By OEM Part Number: Not Specified
Core Count: 2 Core Enabled: 2
Thread Count: 4 Characteristics:
64-bit capable

综上所述,通过以上这些步骤,你可以很容易的查看 Linux 上的 CPU 信息。


我想要获取技术服务或软件
服务范围:MySQL、ORACLE、SQLSERVER、MongoDB、PostgreSQL 、程序问题
服务方式:远程服务、电话支持、现场服务,沟通指定方式服务
技术标签:数据恢复、安装配置、数据迁移、集群容灾、异常处理、其它问题

本站部分文章参考或来源于网络,如有侵权请联系站长。
数据库远程运维 教你如何在Linux上查看CPU信息(linux看cpu)