[rrd-users] Getting number of bytes transfered from an existing RRD?

Mats Pettersson mog.pettersson at telia.com
Sat Jun 7 02:30:37 MEST 2003


I already have a RRD with counters with two DS measuring avarage in/out
traffic on a network interface (ala mrtg) which work's well. Now i would
like to sum up how much data (in bytes) that flow through in and out on that
interface each week. Can i use the existing RRD database or do i have to
make a new one? Or maybe it's something for the frontend to keep track of?

What i can't figure out is how to get the difference between "now"
minus -start -168h for example, with the RRD i'm now using. The RRD looks
like follows:

RRDs::create ($rrd_data,
"RRA:AVERAGE:0.5:1:288", # 5 minute samples (one day)
"RRA:AVERAGE:0.5:12:168");      # 1 hour samples (one week)

bin=total number of bytes in, bout = total number of bytes out, which is
updated every 5 minutes. So by subtracting the total number of bytes a week
ago from the total number of bytes now, i get the number of bytes passed in
a week, right?

I was thinking of using fetch to fetch one value at "now" and one value
at -start -168h and then manually subtracting them, but that doesn't seem
like the right thing to do.

Am i totaly out of track here? Should i pick up stamp collection instead? :)


Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list