How to read RRD file to get usage data?

Yasiru G picture Yasiru G · Jan 24, 2013 · Viewed 57.7k times · Source

I have setup a mrtg setup with rrdtool. Now I'm planning to get incoming outgoing usage data from these RRD files and failing to find a correct way to do it.

Can anyone show we how to get those usage data from rrd files?
Then I can maintain a db to keep those usage data and calculate the cost etc.?

Answer

Tobi Oetiker picture Tobi Oetiker · Jan 24, 2013

you can use rrdtool graph ... PRINT:xxx or rather rrdtool xport ... to get data out of the rrd file. If you want to get to the actual data, use rrdtool fetch.

you can find tons of additional info on http://rrdtool.org