Skip to content

A portable interface for energy monitoring utilities

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

jasonm128/energymon

 
 

Repository files navigation

Energy Monitoring Interface

EnergyMon provides a general C interface for energy monitoring utilities.

For details, please see the following publication and reference as appropriate:

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

Building

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