系统能耗监测

6 monitoring power-management

你知道有哪些监控系统功耗的应用程序吗?不仅仅是cpu,而是所有组件,最好是?


更新 - powertop&powerstat

我找到了powertop,但它并没有说太多。

在此处输入图片说明

我还发现了这个问题:功耗监控问题及其在 Ask Ubuntu 上的重复:https : //askubuntu.com/questions/291904/missed-power-est-column-in-powertop

答案是powertop在提供功耗计算之前需要几个小时来收集数据。(grochmal在他的评论中也提出了这一建议。)但鉴于我发现powertop在后台运行的内容,这可能不是全部事实。

$ sudo powertop &
[1] 20744
tomasz@tomasz-Latitude-E4200:~$ Loaded 0 prior measurements
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
RAPL device for cpu 0
RAPL device for cpu 0
RAPL device for cpu 0
Devfreq not enabled
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
Run Code Online (Sandbox Code Playgroud)

Ask Ubuntu 的回答还提到:

powerstat

它要求笔记本电脑使用电池运行(因此不适用于 RaspberryPi 和台式机),3 分钟后显示:

  Time    User  Nice   Sys  Idle    IO  Run Ctxt/s  IRQ/s Fork Exec Exit  Watts
03:28:26  20.2   0.0   2.4  77.4   0.1    1   1356    675    2    0    0  17.28 
03:28:36  12.8   0.0   2.4  84.8   0.1    1   1749    699    0    0    1  11.82 
03:28:46  11.6   0.0   1.7  86.7   0.0    1   1190    553    0    0    0  11.56 
03:28:56  16.8   0.0   2.4  80.7   0.1    1   1455    680    4    0    4  13.48 
03:29:06  14.7   0.0   1.9  83.4   0.1    2   1486    696    0    0    0  16.11 
03:29:16  22.6   0.0   3.1  74.3   0.0    3   2494    987    0    0    0  13.68 
03:29:26   4.3   0.0   0.8  94.9   0.1    2    806    391    0    0    1  12.05 
03:29:36   5.4   0.0   1.6  93.0   0.1    1   1219    665    4    0    2  11.85
Run Code Online (Sandbox Code Playgroud)

哪个更好。但是缺少对组件的细分。或者我不知道如何获得它们。

gro*_*mal 2

英特尔powertop准确地显示了设备的功耗。它甚至有一个可调选项卡,它试图更改这些设备的参数以使用更少的能源。

尽管它是由 Intel 编写的(令人惊讶的是开源的),但它已被移植到基于 ARM 的机器上。

参考