如何获取 CPU 节流统计数据?

如何获取 CPU 节流统计数据?

我的 dmesg 输出表明由于温度原因,CPU 受到限制。

[ 1283.260276] CPU3: Core temperature above threshold, cpu clock throttled (total events = 1)
[ 1283.260277] CPU2: Core temperature above threshold, cpu clock throttled (total events = 1)
[ 1283.260278] CPU0: Package temperature above threshold, cpu clock throttled (total events = 1)
[ 1283.260279] CPU1: Package temperature above threshold, cpu clock throttled (total events = 1)
[ 1283.260283] CPU2: Package temperature above threshold, cpu clock throttled (total events = 1)
[ 1283.260288] CPU3: Package temperature above threshold, cpu clock throttled (total events = 1)
[ 1283.260290] mce: [Hardware Error]: Machine check events logged
[ 1283.260291] mce: [Hardware Error]: Machine check events logged
[ 1283.261312] CPU3: Core temperature/speed normal
[ 1283.261314] CPU1: Package temperature/speed normal
[ 1283.261315] CPU0: Package temperature/speed normal
[ 1283.261316] CPU2: Core temperature/speed normal
[ 1283.261320] CPU2: Package temperature/speed normal
[ 1283.261323] CPU3: Package temperature/speed normal

有一个固定的时间间隔(比如 10 小时),我该如何检查CPU 被限制了多长时间我需要的是每分钟知道 CPU 是否受到限制。我想我需要为此做一个 cron 作业,并设置一些 if/else 条件。

操作系统:Fedora 23 工作站 x86_64

模型:HP ProBook 4730s(笔记本电脑)

中央处理器:Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz(系列:0x6,型号:0x2a,步进:0x7)

相关内容