[rrd-users] A few Newbie questions
Erik de Mare
erik at oezie.org
Wed Feb 6 08:20:15 CET 2008
if you have 1.2.x it can be done this way:
(from the manual http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html)
TOTAL
Returns the rate from each defined time slot multiplied with the step size.
This can, for instance, return total bytes transfered when you have logged
bytes per second. The time component returns the number of seconds.
Example: VDEF:total=mydata,TOTAL
or with rrdtool 1.0.x here is a little part from my perl script
push(@data,"--start=-$span");
push(@data,"CDEF:totalin=in,UN,0,in,$span,*,IF");
push(@data,"CDEF:totalout=out,UN,0,out,$span,*,IF");
push(@data,"GPRINT:totalin:AVERAGE:Total traffic\\: %.2lf %s\\n");
push(@data,"GPRINT:totalout:AVERAGE:Total traffic\\: %.2lf %s");
Mvg,
Erik de Mare
On Tue, 5 Feb 2008 23:17:47 +0000, Simon Hobson <linux at thehobsons.co.uk>
wrote:
> apoch632 wrote:
>
>>I have a set of .rrd databases which give the Internet usage of an IP
>>address over a timeframe. How do I extract this data to be able to say on
> a
>>webpage or terminal that " 'This IP address' has downloaded X bytes this
>>month"
>
> Average = total/time
>
> therefore
>
> total = average * time
>
> Get average over period, multiply by timespan of period, you have total !
>
> Just use 'gprint' to print out the average of the data, multiply it
> by time, you get total.
>
More information about the rrd-users
mailing list