tags:

views:

12

answers:

1
+1  Q: 

Rrd4j persistence

I am using rrd4j to do what rrd4j does, and it works great. However, if I shut down my app and start it back up again, the data from the previous session will be gone.

I am using a normal file backend, like so:

RrdDef rrdDef = new RrdDef( "/path/to/my/file", 3000 );

Is there a setting or something I need to trigger to make rrd4j load the data from the previous session?

+1  A: 

Seems you should use RrdDb("/path/to/my/file") instead. From Javadocs:

RrdDb(java.lang.String path): Constructor used to open already existing RRD in R/W mode, with a default storage (backend) type (file on the disk).

And also:

RrdDb(RrdDef rrdDef): Constructor used to create new RRD object from the definition.

nawroth