RRD4J inspector: How to use it

Hi folks,

during my upgrade process from OH 2 to OH 3 (great improvement!) I am struggeling with the rrd4j persistence. Therefore I wanted to look inside the newly created rrd4j data files. If you are using docker container (recommended…), these files are located here: …/openhab/userdata/persistence/rrd4j/.

There are some post in this forum about the usage of the inspector, but they are incomplete. So go to this site: https://repo1.maven.org/maven2/org/rrd4j/rrd4j/3.3.1/ and download these TWO files:

  • rrd4j-3.3.1-inspector.jar AND
  • rrd4j-3.3.1.jar

Put both files into the same directory. Use a CLI and change into this directory. Start the inspector with
java -cp rrd4j-3.3.1-inspector.jar org.rrd4j.inspector.RrdInspector
Select a rrd4j file for inspection. If you get an error like Exception in thread “main” java.lang.NoClassDefFoundError: org/rrd4j/core/RrdDb, then you are missing the 2nd .jar-file from above!

This should clarify the usage of the rrd4j inspector. Don’t use later versions of the inspector, the required class is not there anymore… Additionally the inspector requires a graphical interface (Windows-PC is fine) and does not work on headless systems.

Have fun!

4 Likes

Thanks for this input.
It used to work with the single (-inspector) jar file. However now you do need both.
Did my test with the 3.4 Version.

Thanks, works like a charm on my Win11 Laptop with Oracle Java 1.8.0_221
Just drop both java files in a directory, click on the inspector and browse the OH3.4.2-1 persistence folder in a samba share.

Java 8 ? Really ? openHAB 3 requires Java 11 to work properly…

Yes, I confirm. My Rasbian is headless, I need to run the tool on Windows.
Yesterday I did just open the RRD file to take a look, I didn’t want to stop OH.
But now, to be sure, I stopped OH and could change a NaN value in the database and checked that the file was properly updated.
In the manifest of RRdInspector I can read JDK 11:

Manifest-Version: 1.0
Created-By: Apache Maven 3.5.2
Built-By: travis
Build-Jdk: 11
Main-Class: org.rrd4j.inspector.RrdInspector
Class-Path: rrd4j-3.3.1.jar

But it runs on JSE 8.0

Microsoft Windows [version 10.0.22000.1696]
(c) Microsoft Corporation. Tous droits réservés.

C:\Wintools\rrd4j>java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

And yes on the RPi3B, OH3.4.2-1 runs on Java 11

mu@Pivert:~$ java -version
openjdk version "11.0.18" 2023-01-17 LTS
OpenJDK Runtime Environment Zulu11.62+17-CA (build 11.0.18+10-LTS)
OpenJDK Client VM Zulu11.62+17-CA (build 11.0.18+10-LTS, mixed mode)

It is just about the rrd viewer that runs with java 8. Not about OH3.

2 Likes