EcoFloc was developed by the R&D laboratory of Technopôle Domolandes1, with support from Université de Pau et des Pays de l'Adour and Université de Toulouse. These institutions play a key role in advancing research and innovation, contributing to technological progress and regional development in France.
EcoFloc is a versatile tool that measures the energy consumption of processes based on the load they generate on CPU, GPU, RAM, storage devices (SD), and network interface controllers (NIC). It supports independent per-component measurement, interval-based sampling, and long-term monitoring, persisting data even if applications restart. EcoFloc can analyze existing applications or launch new ones from the boot process to track their energy usage from the start.
EcoFloc estimates energy consumption per hardware component based on the load generated by running processes. It uses data from GNU/Linux kernel interfaces when available; otherwise, it relies on predefined or user-customized hardware specs.
This release includes pre-defined formulas for the five hardware components2. Future updates will add more methods and kernel-level interfaces like RAPL3, giving users flexible measurement options.
Like any software-based energy measurement tool, EcoFloc provides approximations and should not be considered absolutely precise.
EcoFloc requires an Arch-based or Debian-based GNU/Linux distribution with Linux kernel 5.12 or higher.
To collect hardware metrics, install the following packages:
- CPU:
msr-tools - GPU:
nvidia-smi(yes, this version only supports NVIDIA GPUs :-) ) - RAM:
glibc(foriconv) andperf - NIC:
nethogs≥ 0.8.7
# Arch-based distributions
pacman -S msr-tools glibc linux-tools nethogs nvidia-smi # Use 'linux-zen-tools' instead if running the Zen kernel
# Debian-based distributions
apt-get update
apt-get install msr-tools libc-bin linux-tools-common linux-tools-$(uname -r) nethogs nvidia-smi
# If nethogs ≥ 0.8.7 is unavailable, check:
# https://launchpad.net/ubuntu/kinetic/arm64/nethogs/0.8.7-1EcoFloc needs the power profile of each hardware component, along with some custom information, such as the network interface to monitor for NIC analysis. While EcoFloc attempts to detect these values automatically, please update the _settings.conf file in each hardware folder. You can find the required values in the hardware datasheets, usually available on the manufacturer’s website.
Automated Installation
To install EcoFloc, run the following command as root:
/bin/bash ecofloc_installer.sh # Requires Python 3 At the end of the installation, a summary will display any potential issues. If you believe these issues are not valid and still want to test EcoFloc, proceed with the manual compilation steps below.
Manual Compilation and Installation
- Navigate to the project root
cd /path/to/ecofloc - Clean previous builds
make clean - Compile and install
make
make install - Uninstall if needed
make uninstall To use EcoFloc, execute the ecofloc command as root with the following options:
- Hardware - The first parameter to specify is the hardware component to analyze. For example:
ecofloc --cpu ... EcoFloc can analyze an existing process or application, or launch an application to monitor its execution, including its boot process.
- Process ID (PID) (
-p) – Analyze an already running process by specifying its PID. - Application Name (
-n) – Monitor all PIDs associated with an existing application. - Launch Application (
-l) – Start an application and analyze only its main PID. - Launch Application (
-L) – Start an application and monitor all PIDs associated with its name. (If an instance is already running, it will be included in the analysis.) - System Mode (
-S) – (Beta) Analyze the entire system, aggregating the energy consumption of all running processes.
Then, specify the measuring interval and total analysis time:
- Total Analysis Time (
-t) – Defines the measurement duration. A negative value enables continuous analysis, which can be stopped withCtrl+Cto display results. - Measurement Interval (
-i) – Sets how often EcoFloc collects load and power data. Smaller values may increase CPU usage.
- Dynamic Mode (
-d) – Allows EcoFloc to track applications that may be closed and reopened during analysis. - Export Mode (
-f) – Saves measurement results to a CSV file at the specified path. If set to default, EcoFloc will use the path defined insettings.confinside each component folder. The file includes, for each interval: measurement time, PID, average power, and energy consumed. - Verbose Mode (
-v) – Shows warnings, especially when-lor-Lis used.
Run EcoFloc using the following format:
ecofloc --cpu -p or -n [PID or App Name] or -l or -L [App Name] or -S -i [interval] -t [duration] -d -v -f [path]
ecofloc --sd -p or -n [PID or App Name] or -l or -L [App Name] or -S -i [interval] -t [duration] -d -v -f [path]
ecofloc --nic -p or -n [PID or App Name] or -l or -L [App Name] or -S -i [interval] -t [duration] -d -v -f [path]
ecofloc --ram -p or -n [PID or App Name] or -l or -L [App Name] or -S -i [interval] -t [duration] -d -v -f [path]
ecofloc --gpu -p or -n [PID or App Name] or -l or -L [App Name] or -S -i [interval] -t [duration] -d -v -f [path] After the specified timeout or when you press Ctrl+C, EcoFloc will display:
- Average Power (Watts): Mean power consumption over the total analysis time.
- Energy Consumption (Joules): Total energy used during the analysis.
To check the CPU energy usage of a process with PID 20300, sampling every 1000ms for 10 seconds, run:
ecofloc --cpu -p 20300 -i 1000 -t 10 -f /home/user/ You'll see something like this:
/*****************************
/ECOFLOC_RAM_PID_20300
*****************************/
Average Power (CPU): 0.47 Watts
Total CPU Energy (CPU): 4.72 Joules
***************************** With -f, EcoFloc saves a .csv file in the specified path (e.g., /home/user/). The filename includes the component and process (e.g., /ECOFLOC_RAM_PID_20300.csv).
If you use default (-f default), the file goes to the path set in features.conf inside the project folder.
Each row in the .csv includes: PID, average power (Watts), and energy consumed (Joules).
To monitor Chrome's GPU usage, tracking all its PIDs every 1000ms, running until you stop it (-t -1), run:
ecofloc --gpu -n chrome -i 1000 -t -1 -d The -d flag lets EcoFloc keep running even if Chrome closes and reopens.
You'll see something like this:
/*****************************
/ECOFLOC_SD_COMM_chrome
*****************************/
Average Power (GPU): 1.98 Watts
Total GPU Energy (GPU): 39.6 Joules
***************************** Footnotes
-
Humberto, A.V.H.: An energy-saving perspective for distributed environments: Deployment, scheduling and simulation with multidimensional entities for Software and Hardware. Ph.D. thesis, UPPA, https://www.theses.fr/s342134 (2022) ↩
-
Running Average Power Limit (RAPL): Intel® 64 and IA-32 Architectures Software Developer's Manual, specifically in the section detailing power and thermal management. ↩



