Skip to content

Export Citation

        
          
@article{fieni-2024,
TITLE = {{PowerAPI: A Python framework for building software-defined power meters}},
AUTHOR = {Fieni, Guillaume and Acero, Daniel Romero and Rust, Pierre and Rouvoy, Romain},
URL = {https://hal.science/hal-04601379},
JOURNAL = {{Journal of Open Source Software}},
PUBLISHER = {{Open Journals}},
VOLUME = {9},
NUMBER = {98},
PAGES = {6670},
YEAR = {2024},
MONTH = Jun,
DOI = {10.21105/joss.06670},
KEYWORDS = {Power ; Energy ; Toolkit ; Measurement ; Framework},
PDF = {https://hal.science/hal-04601379/file/10.21105.joss.06670-3.pdf},
HAL_ID = {hal-04601379},
HAL_VERSION = {v1},
}
          
          
              
      

Getting started

If you want to monitor the energy consumption of your process we have some ready-to-use tools

Source and Destination

In order to use any Formula, you need to run a Source and a Destination. The former is used by a Sensor to store metrics. The later allows the Formula to make available the estimations. For starting, you can use MongoDB as Source and InfluxDB:2.X as Destination by installing them as Docker containers. For more details about Sources and Destinations please check this section.

SmartWatts Formula

for monitoring the power consumption of your process

Smartwatts is made for tracking the power consumption of processes on a machine. To install Smartwatts on a baremetal server or a PC run the following script in a Terminal. Please notice that you will need pip or docker in order to use the Formula.

The script explains what it will do and then pauses before it does it.

Please notice that you need a Linux distribution in order to use the HWPC Sensor installed by the script as well as a comptible Intel (Sandy Bridge and newer) or AMD Processor (Zen). You also need docker. Power/ARM/RISCV are not supported architectures. HWPC Sensor will not work on a Virtual Machine. However, you can install the Formula by hand in a Virtual Machine if need it.

CGroups

If you need to monitor a process or a group of process via SmartWatts by using HWPC Sensor version 1.2 or older, you can follow this tutorial. Please notice that cgroup V1 is required only for HWPC Sensor version 1.2 or older. If you need to enable this cgroup version please follow this tutorial.