joular / joularjx

JoularJX is a Java-based agent for software power monitoring at the source code level.
https://www.noureddine.org/research/joular/joularjx
GNU General Public License v3.0
71 stars 17 forks source link
energy green java joular joularjx power software

Joular Project JoularJX :microscope:

License: GPL v3 Java

JoularJX Logo

JoularJX is a Java-based agent for software power monitoring at the source code level.

Detailed documentation (including user and reference guides) are available at: https://joular.github.io/joularjx/.

:rocket: Features

:package: Compilation and Installation

To build JoularJX, you need Java 11+ and Maven, then just build:

mvn clean install -DskipTests

Alternatively, you can use the Maven wrapper shipped with the project with the command:

Linux: ./mvnw clean install -DskipTests
Windows: ./mvnw.cmd clean install -DskipTests

JoularJX depend on the following software or packages in order to get power reading:

We also support Asus Tinker Board (S).

:bulb: Usage

JoularJX is a Java agent where you can simply hook it to the Java Virtual Machine when starting your Java program's main class:

java -javaagent:joularjx-$version.jar YourProgramMainClass

If your program is a JAR file, then just run it as usual while adding JoularJX:

java -javaagent:joularjx-$version.jar -jar yourProgram.jar

JoularJX will generate multiple CSV files according to the configuration settings (in config.properties), and will create these files in a joularjx-resultsfolder.

The generated files are available under the following folder structure:

JoularJX can be configured by modifying the config.properties files:

You can install the jar package (and the PowerMonitor.exe on Windows) wherever you want, and call it in the javaagent with the full path. However, config.properties must either be copied to the same folder as where you run the Java command or its location must be set with the -Djoularjx.config=/path/to/config.properties property when running your program.

In virtual machines, JoularJX requires two steps:

Generated files

For real-time power data or the total energy at the program exit, JoularJX generated two CSV files:

For example, if Package1.MethodA calls java.io.PrintStream.println to print some text to a terminal, then we calculate:

We manage to do this by analyzing the stacktrace of all running threads on runtime.

JoularJX Reader

JoularJX Reader is a GUI to process, analyze and visualize JoularJX generated energy files. It is available at its own repository here.

:bookmark_tabs: Cite this work

To cite our work in a research paper, please cite our paper in the 18th International Conference on Intelligent Environments (IE2022).

@inproceedings{noureddine-ie-2022,
  title = {PowerJoular and JoularJX: Multi-Platform Software Power Monitoring Tools},
  author = {Noureddine, Adel},
  booktitle = {18th International Conference on Intelligent Environments (IE2022)},
  address = {Biarritz, France},
  year = {2022},
  month = {Jun},
  keywords = {Power Monitoring; Measurement; Power Consumption; Energy Analysis}
}

:newspaper: License

JoularJX is licensed under the GNU GPL 3 license only (GPL-3.0-only).

Copyright (c) 2021-2024, Adel Noureddine, Université de Pau et des Pays de l'Adour. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU General Public License v3.0 only (GPL-3.0-only) which accompanies this distribution, and is available at: https://www.gnu.org/licenses/gpl-3.0.en.html

Author : Adel Noureddine