![/proc/cpuinfo 显示 0 CPU 时钟速度](https://linux22.com/image/33936/%2Fproc%2Fcpuinfo%20%E6%98%BE%E7%A4%BA%200%20CPU%20%E6%97%B6%E9%92%9F%E9%80%9F%E5%BA%A6.png)
我看到一个有趣的问题,文件系统cpuinfo
中的文件/proc
显示 cpu 时钟速度为零。它是没有虚拟化的物理主机。有人可以向我解释这背后的一些可能的原因吗?
$ cat /proc/cpuinfo | grep -i "cpu Mhz"
cpu MHz : 0.000
cpu MHz : 0.000
cpu MHz : 0.000
cpu MHz : 0.000
# dmidecode | grep -A 20 CPU
Socket Designation: CPU1
Type: Central Processor
Family: Xeon
Manufacturer: Intel(R) Corporation
ID: D7 06 02 00 FF FB EB BF
Signature: Type 0, Family 6, Model 45, Stepping 7
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)
--
Version: Intel(R) Xeon(R) CPU E5-2670 @ 2.60GHz
Voltage: 0.8 V
External Clock: 100 MHz
Max Speed: 4000 MHz
Current Speed: 2600 MHz
Status: Populated, Enabled
Upgrade: <OUT OF SPEC>
L1 Cache Handle: 0x0007
L2 Cache Handle: 0x0008
L3 Cache Handle: 0x0009
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
Handle 0x0005, DMI type 4, 42 bytes
Processor Information
Socket Designation: CPU2
Type: Central Processor
Family: Xeon
Manufacturer: Intel(R) Corporation
ID: D7 06 02 00 FF FB EB BF
Signature: Type 0, Family 6, Model 45, Stepping 7
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)
--
Version: Intel(R) Xeon(R) CPU E5-2670 @ 2.60GHz
Voltage: 0.8 V
External Clock: 100 MHz
Max Speed: 4000 MHz
Current Speed: 2600 MHz
Status: Populated, Enabled
Upgrade: <OUT OF SPEC>
L1 Cache Handle: 0x000B
L2 Cache Handle: 0x000C
L3 Cache Handle: 0x000D
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
Handle 0x0006, DMI type 7, 19 bytes
Cache Information
--
Designation: SLOT1_PCIE_G3_X16(CPU1)
Type: x16 <OUT OF SPEC>
Current Usage: Available
Length: Long
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Hot-plug devices are supported
Handle 0x0015, DMI type 9, 17 bytes
System Slot Information
Designation: SLOT2_PCIE_G3_X16(CPU1)
Type: x16 <OUT OF SPEC>
Current Usage: Available
Length: Long
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Hot-plug devices are supported
Handle 0x0016, DMI type 9, 17 bytes
System Slot Information
Designation: SLOT3_PCIE_G3_X8(CPU2)
Type: x8 <OUT OF SPEC>
Current Usage: Available
Length: Long
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Hot-plug devices are supported
Handle 0x0017, DMI type 9, 17 bytes
System Slot Information
Designation: SLOT4_PCIE_G3_X16(CPU2)
Type: x16 <OUT OF SPEC>
Current Usage: Available
Length: Long
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Hot-plug devices are supported
Handle 0x0018, DMI type 10, 6 bytes
On Board Device Information
Type: Video
Status: Enabled
Description: ASPEED Technology, Inc. AST GPU 0.96.00 (VGA1)
Handle 0x0019, DMI type 10, 6 bytes
On Board Device Information
Type: Ethernet
Status: Enabled
Description: LOM 1G I350-BT2 (LAN1)
--
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 36119A9B
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x001F, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_A5
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x0020, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x002F
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_A2
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 36119ADA
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x0021, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_A6
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x0022, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x0030
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_A3
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 3611991C
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x0023, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_A7
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x0024, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x0031
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_A4
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 361196BF
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x0025, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_A8
Bank Locator: CPU1
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x0026, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x0032
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_B1
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 36119A9C
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x0027, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_B5
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x0028, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x0033
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_B2
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 36119696
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x0029, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_B6
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x002A, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x0034
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_B3
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 361196C0
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x002B, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_B7
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x002C, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: 0x0035
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM_B4
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: CE00B304CE00
Serial Number: 36119AD8
Asset Tag: 02171321
Part Number: M393B2G70BH0-YH9
Handle 0x002D, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM_B8
Bank Locator: CPU2
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: Unknown
Manufacturer: NO DIMM
Serial Number: NO DIMM
Asset Tag: NO DIMM
Part Number: NO DIMM
Handle 0x002E, DMI type 18, 23 bytes
32-bit Memory Error Information
Type: OK
Granularity: Unknown
Operation: Unknown
Vendor Syndrome: Unknown
Memory Array Address: Unknown
Device Address: Unknown
Resolution: Unknown
Handle 0x002F, DMI type 18, 23 bytes
32-bit Memory Error Information
# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 16
Thread(s) per core: 1
Core(s) per socket: 8
CPU socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 45
Stepping: 7
CPU MHz: 0.000
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 20480K
答案1
当你往下看时,你看到什么了吗/sys/devices/system/cpu/
?
$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
2667000
你也可以尝试这个。安装“cpufrequtils”包,您可以使用以下命令更改调速器和频率:
$ cpufreq-set
可以使用以下命令找到当前调速器和频率:
$ cpufreq-info