{"id":13724036,"url":"https://github.com/sosy-lab/cpu-energy-meter","last_synced_at":"2026-01-12T11:39:39.604Z","repository":{"id":53716666,"uuid":"46493895","full_name":"sosy-lab/cpu-energy-meter","owner":"sosy-lab","description":"A tool for measuring energy consumption of Intel CPUs","archived":false,"fork":false,"pushed_at":"2023-11-02T07:08:26.000Z","size":255,"stargazers_count":342,"open_issues_count":2,"forks_count":30,"subscribers_count":12,"default_branch":"main","last_synced_at":"2026-01-11T10:27:13.652Z","etag":null,"topics":["energy","linux","rapl","resource-measurement"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sosy-lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-19T13:28:07.000Z","updated_at":"2025-12-21T21:43:40.000Z","dependencies_parsed_at":"2023-09-21T19:57:02.119Z","dependency_job_id":"3a2cd241-09d9-426b-afe5-6b77e54c1b6b","html_url":"https://github.com/sosy-lab/cpu-energy-meter","commit_stats":{"total_commits":211,"total_committers":5,"mean_commits":42.2,"dds":0.5592417061611374,"last_synced_commit":"a8f665b777074564a08940e1fe24bb44dc5eea38"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sosy-lab/cpu-energy-meter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosy-lab%2Fcpu-energy-meter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosy-lab%2Fcpu-energy-meter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosy-lab%2Fcpu-energy-meter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosy-lab%2Fcpu-energy-meter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sosy-lab","download_url":"https://codeload.github.com/sosy-lab/cpu-energy-meter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosy-lab%2Fcpu-energy-meter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28321258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["energy","linux","rapl","resource-measurement"],"created_at":"2024-08-03T01:01:48.917Z","updated_at":"2026-01-12T11:39:39.590Z","avatar_url":"https://github.com/sosy-lab.png","language":"C","funding_links":[],"categories":["C","Consumption"],"sub_categories":["Computation and Communication"],"readme":"\u003c!--\nThis file is part of CPU Energy Meter,\na tool for measuring energy consumption of Intel CPUs:\nhttps://github.com/sosy-lab/cpu-energy-meter\n\nSPDX-FileCopyrightText: 2012 Intel Corporation\nSPDX-FileCopyrightText: 2015-2021 Dirk Beyer \u003chttps://www.sosy-lab.org\u003e\n\nSPDX-License-Identifier: BSD-3-Clause\n--\u003e\n\nCPU Energy Meter\n================\n\n[![Build Status](https://gitlab.com/sosy-lab/software/cpu-energy-meter/badges/main/pipeline.svg)](https://gitlab.com/sosy-lab/software/cpu-energy-meter/pipelines)\n[![BSD-3-Clause License](https://img.shields.io/badge/license-BSD--3--clause-brightgreen.svg)](https://github.com/sosy-lab/cpu-energy-meter/blob/main/LICENSE)\n[![Releases](https://img.shields.io/github/release/sosy-lab/cpu-energy-meter.svg)](https://github.com/sosy-lab/cpu-energy-meter/releases)\n[![DOI via Zenodo](https://zenodo.org/badge/46493895.svg)](https://zenodo.org/badge/latestdoi/46493895)\n\n\nCPU Energy Meter is a Linux tool that allows to monitor power consumption of Intel CPUs\nat fine time granularities (few tens of milliseconds).\nPower monitoring is available for the following power domains:\n- per package domain (CPU socket)\n- per core domain (all the CPU cores on a package)\n- per uncore domain (uncore components, e.g., integrated graphics on client CPUs)\n- per memory node (memory local to a package, server CPUs only)\n- per platform (all devices in the platform that receive power from integrated\n  power delivery mechanism, e.g., processor cores, SOC, memory, add-on or\n  peripheral devices)\n\nTo do this, the tool uses a feature of Intel CPUs that is called [RAPL (Running Average Power Limit)](https://en.wikipedia.org/wiki/Running_average_power_limit),\nwhich is documented in the [Intel Software Developers Manual](https://software.intel.com/en-us/articles/intel-sdm), Volume 3B Chapter 14.9.\nRAPL is available on CPUs from the generation [Sandy Bridge](https://en.wikipedia.org/wiki/Sandy_Bridge) and later.\nBecause CPU Energy Meter uses the maximal possible measurement interval\n(depending on the hardware this is between a few minutes and an hour),\nit causes negligible overhead.\n\nCPU Energy Meter is a fork of the [Intel Power Gadget](https://software.intel.com/en-us/articles/intel-power-gadget-20)\nand developed at the [Software Systems Lab](https://www.sosy-lab.org)\nof the [Ludwig-Maximilians-Universität München (LMU Munich)](https://www.uni-muenchen.de)\nunder the [BSD-3-Clause License](https://github.com/sosy-lab/cpu-energy-meter/blob/main/LICENSE).\n\n\nInstallation\n------------\n\nFor Debian or Ubuntu the easiest way is to install from our [PPA](https://launchpad.net/~sosy-lab/+archive/ubuntu/benchmarking):\n\n    sudo add-apt-repository ppa:sosy-lab/benchmarking\n    sudo apt install cpu-energy-meter\n\nAlternatively, you can download our `.deb` package from [GitHub](https://github.com/sosy-lab/cpu-energy-meter/releases)\nand install it with `apt install ./cpu-energy-meter*.deb`.\n\nDependencies of CPU Energy Meter are [libcap](https://sites.google.com/site/fullycapable/),\nwhich is available on most Linux distributions in package `libcap` (e.g., Fedora)\nor `libcap2` (e.g, Debian and Ubuntu: `sudo apt install libcap2`),\nand a Linux kernel with the MSR module (available by default)\n\nAlternatively, for running CPU Energy Meter from source (quick and dirty):\n\n    sudo apt install libcap-dev\n    sudo modprobe msr\n    make\n    sudo ./cpu-energy-meter\n\nIt is also possible (and recommended) to run CPU Energy Meter without root.\nTo do so, the following needs to be done:\n\n- Load kernel modules `msr` and `cpuid`.\n- Add a group `msr`.\n- Add a Udev rule that grants access to `/dev/cpu/*/msr` to group `msr` ([example](https://github.com/sosy-lab/cpu-energy-meter/blob/main/debian/additional_files/59-msr.rules)).\n- Run `chgrp msr`, `chmod 2711`, and `setcap cap_sys_rawio=ep` on the binary (`make setup` is a shortcut for this).\n\nThe provided Debian package in our [PPA](https://launchpad.net/~sosy-lab/+archive/ubuntu/benchmarking)\nand on [GitHub](https://github.com/sosy-lab/cpu-energy-meter/releases) does these steps automatically\nand lets all users execute CPU Energy Meter.\n\nHow to use it\n-------------\n\n    cpu-energy-meter [-d] [-e sampling_delay_ms] [-r]\n\nThe tool will continue counting the cumulative energy use of all supported CPUs\nin the background and will report a key-value list of its measurements when it\nreceives SIGINT (Ctrl+C):\n\n```\n+--------------------------------------+\n| CPU-Energy-Meter            Socket 0 |\n+--------------------------------------+\nDuration                  2.504502 sec\nPackage                   3.769287 Joule\nCore                      0.317749 Joule\nUncore                    0.010132 Joule\nDRAM                      0.727783 Joule\nPSYS                     29.792603 Joule\n```\n\nTo get intermediate measurements, send signal `USR1` to the process.\n\nOptionally, the tool can be executed with parameter `-r`\nto print the output as a raw (easily parsable) list:\n\n```\ncpu_count=1\nduration_seconds=3.241504\ncpu0_package_joules=4.971924\ncpu0_core_joules=0.461182\ncpu0_uncore_joules=0.053406\ncpu0_dram_joules=0.953979\ncpu0_psys_joules=38.904785\n```\n\nThe parameter `-d` adds debug output.\nBy default, CPU Energy Meter computes the necessary measurement interval automatically,\nthis can be overridden with the parameter `-e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsosy-lab%2Fcpu-energy-meter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsosy-lab%2Fcpu-energy-meter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsosy-lab%2Fcpu-energy-meter/lists"}