RRDtool is a data logging and graphing system for metrics (performance data).
RRDtool refers to Round Robin Database tool. RRDtool works with Round Robin Databases (RRDs). It stores and retrieves data from them.
RRDtool originated from MRTG (Multi Router Traffic Grapher). MRTG started as a tiny little script for graphing the use of a university's connection to the Internet.
RRDtool lets you:
rrdtool create test.rrd \
--start 920804400 \
DS:speed:COUNTER:600:U:U \
--step=300 \
RRA:AVERAGE:0.5:1:24 \
RRA:AVERAGE:0.5:6:10
where:
Data to insert:
Time | Data |
---|---|
12:05 | 12345 |
12:10 | 12357 |
12:15 | 12363 |
Syntax:
rrdtool update test.rrd 920804700:12345
rrdtool update test.rrd 920805000:12357
rrdtool update test.rrd 920805300:12363
# or with the batch mode
rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363
where:
rrdtool fetch test.rrd AVERAGE --start 920804700 --end 920805300
920805000: 4.0000000000e-02
920805300: 2.0000000000e-02
920805600: nan # Not A Number It can be also NAN, U or UNKN
rrdtool graph speed.png \
--start 920804400 --end 920808000 \
DEF:myspeed=test.rrd:speed:AVERAGE \
LINE2:myspeed#FF0000
where:
Rrd4j is a port of RRD in Java