HOME | Library | JRobin API | Utilities | Support | About Us | Forum

Utilities
JRobin MRTG
Inspector
Convertor

# Convertor

Ok, you have a thousand of already exisiting RRDTool files, you like Java and you are willing to give a chance to JRobin to take you further. But you don't wont to loose your data in RRDTool files. There is a simple and efficient Convertor utility which will convert RRDTool (non-portable) files to JRobin (portable) equivalents.

Since JRobin does not know anything about the inner structure of RRDTool files, it uses RRDTool dump utility to start the conversion process. JRobin can parse dumped XML files and convert them to JRobin RRD files with the same data in it. It means that you must have fully functional RRDTool binary (bin/rrdtool file in your RRDTool distribution) in order to run the Convertor.

Don't worry: Convertor will not remove or change your existing RRDTool files in any way. It will just create a new file in JRobin's native format, in the same directory and with the same name buth with a different extension.

To convert a single RRDTool file, use the following syntax:

    java -jar convertor-{version}.jar \
        <path_to_rrdtool_binary> \
        <path_to_RRDTool_file> [optional_suffix]

To convert all RRDTool files in a single directory, use something like:

    java -jar convertor-{version}.jar \
        <path_to_rrdtool_binary> \
        <path_to_directory> [optional_suffix]

If you ever get `OutOfMemoryError` during the conversion process (Convertor uses DOM to parse XML files, and extremely big RRD files could crash JVM), just increase the amount of memory available to JVM (`-Xmx` option)

Examples:

    java -jar convertor-{version}.jar \
        /opt/rrdtool/bin/rrdtool \
        /home/rrds/first.rrd .jrb

...creates JRobin-compatible file `first.rrd.jrb` from the file `first.rrd`.

    java -jar convertor-{version}.jar \
        /opt/rrdtool/bin/rrdtool \
        /home/rrds .jrb

...converts all files with the `.rrd` extension in the `/home/rrds` directory to JRobin-compatible format.

You can modify the source code of this utility to perform more complex conversion tasks.

Back to the top

Copyright © 2003, 2004 Sasa Markovic & Arne Vandamme. All Rights Reserved.