Skip to content

Demo project for the Java Agent

keilhofh edited this page Sep 26, 2024 · 5 revisions

The demo project can be built using the gradle command: gradlew shadowJarDemo

You may also find the demo project compiled under Assets in the releases section: e.g. https://github.com/msg-systems/jpowermonitor/releases/download/release-1-2-0/jpowermonitor-demo-1.2.0.jar

Start the agent using the demo project like this:

java -javaagent:.\build\libs\jpowermonitor-<version>-all.jar[=path-to-jpowermonitor.yaml] -jar .\build\libs\jpowermonitor-demo-<version>.jar [runtimeSeconds] [cpuThreads]

For example for version 1.2.0

java -javaagent:.\build\libs\jpowermonitor-1.2.0-all.jar -jar .\build\libs\jpowermonitor-demo-1.2.0.jar 60 8

Clone this wiki locally