Code Monkey home page Code Monkey logo

rapl-tools's Introduction

rapl-tools

Tools for monitoring CPU power with Intel's RAPL interface

Project contents

AppPowerMeter - Measures the energy and monitors the power of an app PowerMonitor - Monitors CPU power of the system Rapl.cpp - CPP class designed to function as a RAPL interface

Running

AppPowerMeter is a commandline wrapper for application commands. For example,

./AppPowerMeter sleep 5

will measure the total energy and average power of the CPU while it runs "sleep 5". The CPU power is sampled every 100ms then written to rapl.csv.

The csv column headings in rapl.csv are "pkg, pp0, pp1, dram, time", measured in watts. See the Intel specification for more information about the different measurement types.

Building

The project is built with Gnu Make. G++ >= 4.7 is required.

make

Setup on Ubuntu

Before using the tools, you will need to load the msr module and adjust the permissions.

# Install and load the msr module
sudo apt-get install msr-tools
sudo modprobe msr

# Set permissions
sudo chmod o+rw /dev/cpu/0/msr

Recent versions of the linux kernel require special permission to access the msr.

sudo apt-get install libcap2-bin
sudo setcap cap_sys_rawio+ep ./AppPowerMeter
sudo setcap cap_sys_rawio+ep ./PowerMonitor

rapl-tools's People

Contributors

kentcz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.