Skip to content

Realtime, decentralized measuring and reporting on CPU and GPU hardware electricity consumption by blockchain nodes

License

Notifications You must be signed in to change notification settings

allisterb/libpwrm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

libpwrm is an embeddable library, CLI app and daemon for realtime, decentralized measuring and reporting on CPU and GPU hardware electricity consumption by blockchain nodes without requiring specialized hardware power meters. libpwrm provides software-based continuous monitoring of different hardware power consumption interfaces and automatic reporting of the measurement data and estimated CO2 Emissions to the CO2.Storage data network.

libpwrm can read power consumption data from different hardware power meters including laptop power supply meters. It can also read CPU power consumption data from Intel's Running Average Power Limit – RAPL interface which uses power metering builtin to Intel CPUs, and NVIDIA GPU power consumption data using the builtin GPU power meters and the NVML interface.

libpwrm runs continuously and publishes the power consumption and emissions data it collects for each system it runs on as assets on CO2.Storage. Each asset can be signed by the operator which authenticates the entity creating it and contains information that the blockchain node operator provides like a unique miner ID and geographic information together with up-to-date information on the current electricity consumption of their hardware. This allows individual blockchain node operators like Filecoin storage providers to automate reporting their electrical consumption data estimates in real-time without requiring installation of external power metering hardware or complex software or making changes to their existing processes.

The aggregated data collected can also provide a useful complement to existing methods of estimating power consumption of an entire blockchain network at a particular time.

Getting started

Requirements:

  1. C++11 toolchain
  2. CMake 3.17 or greater.
  3. To monitor NVIDIA graphics card you'll need the CUDA Toolkit installed.
  4. To upload data to CO2.Storage you will need a recent version of NodeJS.

Installation

  1. Clone the git repository git clone https://github.com/allisterb/libpwrm.git --recurse-submodules.
  2. Run the build-debug script from the repo folder.
  3. If you want to upload data to CO2.Storage:
    • cd to the src/co2.storage directory and run npm install.
    • Create a .env file in the same directory with the required CO2.Storage settings plus other fields for recording power usage and emissions. See the .env.example file for an example.
  4. Run ./pwrm --help from the repo folder to see the available commands.

About

Realtime, decentralized measuring and reporting on CPU and GPU hardware electricity consumption by blockchain nodes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages