EnergyMon provides a general C interface for energy monitoring utilities.
For details, please see the following publication and reference as appropriate:
- Connor Imes, Lars Bergstrom, and Henry Hoffmann. "A Portable Interface for Runtime Energy Monitoring". In: FSE. 2016. DOI: https://doi.org/10.1145/2950290.2983956
- You may also find an extended analysis in the Tech Report.
Applications using some libraries may need to be executed using elevated privileges.
The following instructions are for Linux systems. If you are using a different platform, change the commands accordingly.
Current EnergyMon implementation options are:
- dummy [default]
- cray-pm
- msr
- odroid
- odroid-ioctl
- osp
- osp-polling
- rapl
- shmem
- wattsup
- wattsup-libusb
- wattsup-libftdi
- zcu102
This project uses CMake.
By default, all libraries will be built, with dummy
as the energymon-default
implementation:
mkdir _build
cd _build
cmake ..
make
To use a different default implementation, e.g., the RAPL energy monitor, specify ENERGYMON_BUILD_DEFAULT
with cmake:
cmake -DENERGYMON_BUILD_DEFAULT=rapl ..
Set ENERGYMON_BUILD_DEFAULT=NONE
to disable building a default implementation.
Its default value is dummy
.
To build only a single library, e.g., the RAPL energy monitor, specify ENERGYMON_BUILD_LIB
with cmake:
cmake -DENERGYMON_BUILD_LIB=rapl ..
Set ENERGYMON_BUILD_LIB=NONE
to only build the default implementation (if set).
Set back to its default value of ALL
to build all libraries.
To build shared objects / dynamically linked libraries instead of static libraries, set BUILD_SHARED_LIBS
with cmake:
cmake .. -DBUILD_SHARED_LIBS=ON
For an optimized build, set CMAKE_BUILD_TYPE
when with cmake, e.g., one of:
cm