|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
A few Newbie questionsHi.
I have to use RRDtool for a project but am not to familar with it. I've read the tutorials I've found online but still not too sure what I'm doing I have a couple of questions 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" Also I've seen online that you can use rrdtool with php. How would one going about doing this. I've tried the tutorial on here http://www.ioncannon.net/system-administration/59/php-rrdtool-tutorial/ but it didn't work. I would be very grateful for any help received. Thanks in advance Allen |
|
|
Re: A few Newbie questionsapoch632 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. _______________________________________________ rrd-users mailing list rrd-users@... https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |
|
|
Re: A few Newbie questionsif 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@...> 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. > _______________________________________________ rrd-users mailing list rrd-users@... https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |
|
|
Re: A few Newbie questionsErik de Mare <erik <at> oezie.org> writes:
> 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"); Well, my data are gathered and update every 300 seconds. If I do smthing like: CDEF:total=eth0_in,UN,0,in,300,*,IF and graph it as an area. Does it represent the total bytes downloaded every 5 minutes ? _______________________________________________ rrd-users mailing list rrd-users@... https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |
| Free embeddable forum powered by Nabble | Forum Help |