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.?
pfSense® software has many built-in graphs that monitor different aspects of the system, and they work out-of-the-box with no intervention. The firewall collects and maintains data about how the system performs, and then stores this data in Round-Robin Database (RRD) files.
Round-robin database (RRD) is a very special type of storage designed to keep the aggregated time series statistics in a file or memory-mapped ring buffers. Since data is stored in a circular buffer-based database, the system storage footprint remains constant over time.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With