Linux 显示处理器速度

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5998703/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 04:04:51  来源:igfitidea点击:

show Processor speed

linux

提问by user752949

I have a server with an AMD Opteron(tm) Processor 246 and a customised Linux kernel (2.6.9-100.ELhugemem) in it. When I check the processor using dmidecode, it displays a speed of 2000 MHz, whereas /proc/cpuinfoshows a speed of 1000MHz. Can anybody explain this and also give me a method to check the current CPU speed?

我有一台带有 AMD Opteron(tm) 处理器 246 和定制 Linux 内核 (2.6.9-100.ELhugemem) 的服务器。当我使用 来检查处理器时dmidecode,它显示速度为 2000 MHz,而/proc/cpuinfo显示速度为 1000 MHz。任何人都可以解释这一点,并给我一种检查当前 CPU 速度的方法吗?

回答by ninjalj

What you are seeing is probably due to frequency scaling. You can see the minimum, maximum and current cpu frequency by:

您所看到的可能是由于频率缩放。您可以通过以下方式查看最小、最大和当前 CPU 频率:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

(Replace cpu0as appropiate).

(根据需要更换cpu0)。

回答by ninjagecko

see cpufreq-infoand cpufreq-setin http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils

cpufreq-infocpufreq-sethttp://www.thinkwiki.org/wiki/How_to_use_cpufrequutils

(may have to possibly install depending on distro)

(可能必须根据发行版进行安装)