A free portable, standalone (no need for RRDs.pm) tool to create and edit RRD files. See RRD::Editor for more details, including downloads.
See rrdtool for more on RRDs and RRDTOOL.
Implementing RRD::Editor in Perl rather than C doesn't seem to incur much of a performance hit, at least based on the following measurements:
Test script: speed.pl (perl test script, so rrdupdate incurs the cost of a switch out of perl and into C)
Test script: speed.sh (bash shell script, so RRD::Editor incurs the cost of switching into perl - using /usr/bin/speedy rather than /usr/bin/perl avoids needless perl compilation overhead)
RRD::Editor supports a couple of portable file formats (which actually just correspond to the native file format by RRDTOOL on Intel platforms). However, to interoperate with RRDTOOL we would also like it to support the non-portable file format used by RRDTOOL. This format is non-portable because it depends on some low-level details of the machine being used, especially:
Provided that the byte ordering and alignment choices above are all we need to be concerned with, then RRD::Editor should be able to figure out the non-portable format used by RRDTOOL on any specific machine, and so be able to read/write files in this format. The question is, are there other ordering/alignment options we need to take care of (that are used by modern machines rather than museum pieces, that is) ? The best way to find out is probably to check as many different platforms as possible. Below are data collected for a few different platforms, which basically consists of example non-portable RRD files with known contents (so they can be directly compared).
The following data was collected using t.pl.
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 2f 25 c0 c7 C 2b 1f 5b 4 0 0 0 5 0 0 0 2c 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 X 2 0 0 0 0 0 0 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 G A U G
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 2f 25 c0 c7 C 2b 1f 5b 4 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 2c 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 X 2 0 0 0 0 0 0 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0
As above.
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 C 2b 1f 5b 2f 25 c0 c7 4 0 0 0 5 0 0 0 2c 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 X 2 0 0 0 0 0 0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 G A U G
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 2f 25 c0 c7 C 2b 1f 5b 4 0 0 0 5 0 0 0 2c 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 X 2 0 0 0 0 0 0 0 0 0 0 0 0 f8 7f 0 0 0 0 0 0 f8 7f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 5b 1f 2b C c7 c0 25 2f 0 0 0 4 0 0 0 5 0 0 1 2c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 X 0 0 0 0 7f f7 ff ff ff ff ff ff 7f f7 ff ff ff ff ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 5b 1f 2b C c7 c0 25 2f 0 0 0 4 0 0 0 5 0 0 1 2c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 X 0 0 0 0 7f f7 ff ff ff ff ff ff 7f f7 ff ff ff ff ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 2f 25 c0 c7 C 2b 1f 5b 4 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 2c 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 X 2 0 0 0 0 0 0 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0
See machine details.
RRD Test File:
test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 5b 1f 2b C c7 c0 25 2f 0 0 0 4 0 0 0 5 0 0 1 2c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 X 0 0 0 0 ff f8 0 0 0 0 0 0 ff f8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0
See machine details.
RRD Test File: test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 5b 1f 2b C c7 c0 25 2f 0 0 0 4 0 0 0 5 0 0 1 2c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 X 0 0 0 0 7f ff ff ff ff ff ff ff 7f ff ff ff ff ff ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0
See machine details.
RRD Test File: test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 5b 1f 2b C c7 c0 25 2f 0 0 0 4 0 0 0 5 0 0 1 2c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 X 0 0 0 0 7f ff ff ff ff ff ff ff 7f ff ff ff ff ff ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0 0 0 0 0 0 0 0 0
See machine details.
RRD Test File: test.rrd test.xml
Dump of first 256 bytes of file header:
R R D 0 30 30 30 33 0 0 0 0 0 0 0 0 2f 25 c0 c7 C 2b 1f 5b 4 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 2c 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C O U N T E R 0 0 0 0 0 0 0 0 0 0 0 0 0 X 2 0 0 0 0 0 0 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 f8 ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e l 32 0 0 0 0 0
Feel free to run the t.pl script to collect data for your own machine, and if its not already on the list above I'd be more than happy to post it here. The dumplfile.pl script can be used to inspect the binary rrd files directly.