These are chat archives for Spirals-Team/powerapi

Jan 2017
Maxime Colmant
Jan 23 2017 15:29

Hello, sorry for the delay ;)

Thanks for using PowerAPI.
You can use PowerAPI to monitor the power consumption of your web browser. If I use your example on MacOS, I would execute instead:

./bin/powerapi modules sigar-cpu-simple monitor --frequency 1000 --pids 808

(MacOS does not have the ProcFS interface).

Did you correctly configure PowerAPI? If not, please look at:

You have to find the TDP of your CPU in the Intel documentation (just use the reference of your CPU inside google and check the Intel website, you will easily find this information).

Once found, edit the file: conf/powerapi.conf with the parameter powerapi.cpu.tdp = [YOUR_OWN_TDP_VALUE]

Maxime Colmant
Jan 23 2017 15:47

@dsilva0101 We use the TDP as a basis to get the maximum power consumption dissipated by the CPU and to easily provide a power estimation at runtime ;)

If you want to be able to measure the startup power consumption, you will have to do it manually.
You can check this bash script:

As an example, you can use it as follows:

./start.bash stress -c 2 -t 10

This command will create a process, print its PID to the console, and wait a signal before to launch the program with its arguments.
You can next launch PowerAPI with this PID and start the power monitoring.
Once PowerAPI prints text, you can use kill -s SIGCONT $PIDto start the program and thus measuring its startup power consumption.