Easy-To-Use Linux Power and Resource Consumption Monitoring Library and Daemon. Monitors CPU, GPU, RAM, I/O, Network and the overall system.
This library uses meson as the building system. To install meson, Python >= 3.8 is required. Please, check the following instructions according to your needs:
# Ubuntu
sudo apt install python3 python3-pip# Ubuntu
sudo apt install ninja-buildsudo pip3 install mesonDependencies
First, it is important to recall that this is a Linux library. It requires the following dependencies:
On Fedora 40, you can install some of these dependencies using:
# ProcPS
yum install procps-ng-devel.x86_64 procps-ng.x86_64
# Linux Perf
yum install perf
# SQLite
yum install libsqlite3x.x86_64 libsqlite3x-devel.x86_64
# ZeroMQ
yum install cppzmq-devel.x86_64
# JsonCPP
yum install jsoncpp-devel.x86_64On Ubuntu 20.04:
# ProcPS
apt install libprocps-dev libprocps8
# Linux Perf
apt install linux-tools-common linux-tools-generic
# SQLite
apt install libsqlite3-dev libsqlite3-0
# ZeroMQ
apt install libzmqpp4 libzmqpp-dev
# JsonCPP
apt install libjsoncpp-devOptional
For the documentation, you will require other dependencies like graphviz, java, texlive and doxygen. Please, install them by using:
# Ubuntu
sudo apt install doxygen graphviz openjdk-17-jre texlive-font-utilsYou can switch the "-Dbuild-docs" or "-Dbuild-docs-only" to true if you want to compile the documentation.
Compiling EfiMon follows the same process as any meson project. Please, follow the steps to have EfiMon on your system:
meson builddir $OPTIONS
ninja -C builddinr
sudo ninja -C builddirEfiMon will be installed under the /usr/local/ prefix.
For the $OPTIONS, you can select the following:
| Option | Default Value | Values | Description |
|---|---|---|---|
| build-docs | false | [true, false] | Enable docs compilation |
| build-docs-only | false | [true, false] | Enable docs-only compilation |
| build-examples | true | [true, false] | Enable examples compilation |
| developer-mode | true | [true, false] | Enable developer mode |
| enable-pcm | true | [true, false] | Enable the Intel PCM |
| enable-perf | true | [true, false] | Enable the Linux Perf Tool |
| enable-rapl | true | [true, false] | Enable the RAPL Interface |
| enable-sql | true | [true, false] | Enable the SQL Logger |
| enable-ipmi | true | [true, false] | Enable the IPMI Logger |
T.B.D
The EfiMon Power Analyser wraps a process and perform the analysis. It is self-contained and requires root.
Currently, we have been focused on an analyser for measuring the power consumption based on the histograms.
PID=2000 # Process ID
STIME=10 # Metering during 10 seconds
sudo efimon-power-analyser -p ${PID} -s ${STIME} > consumption.csvAnother way to execute it:
STIME=10 # Metering during 10 seconds
# the command is time sleep 1
sudo efimon-power-analyser -s ${STIME} -c time sleep 1The EfiMon Daemon is a server that performs observations of PID. It receives the information about the processes to analyse over IPC (TCP). It does require root.
Example of usage:
efimon-daemonIt has options to:
The EfiMon Launcher wraps an application, launching its execution or intercepting a PID. It connects to the EfiMon Daemon over IPC and extracts the analysis.
It does not require root.
APP="../NanoBenchmark/cpu 11"
efimon-launcher -s 10 -c ${APP}It launches a command.
efimon-launcher -s 3 --pid 60603It monitors an already running process.
It has options to:
The launcher requires a running instance of the EfiMon Daemon
EfiMon has been tested in the following platforms:
This project is given to you under the LGPL v2.1 Licence. Dynamic linkage from commercial applications to EfiMon is allowed. Derived work and modifications must be released under the same license as EfiMon (LGPL v2.1).