[mrtg] Determine daily traffic
rihad
rihad at mail.ru
Mon Sep 3 07:47:16 CEST 2012
On 09/03/2012 01:12 AM, Steve Shipway wrote:
> The rrdfetch will give you the average rate for that interval, in bits/sec
>
> If you multiply the returned value by the interval size and divide by 8 you'll get it in bytes.
>
> rrdtool fetch myfile.rrd AVERAGE -r 86400 -e 1346526000 -s e-24h
> ds0 ds1
> 1346544000: 4.3133558301e+04 2.2494106657e+03
>
> Multiply 43133 (ds0, bits/sec) by 86400 (sec in the interval, 1 day) and divide by 8 (bit/byte) to get bytes/day... this example makes about 455 MBytes which sounds reasonable.
>
> You could also use the Routers2 frontend to MRTG/RRD which calculates this for you and displays it on the page :)
>
> Steve
>
> Steve Shipway
> University of Auckland ITS
> UNIX Systems Design Lead
> s.shipway at auckland.ac.nz
> Ph: +64 9 373 7599 ext 86487
>
>
>
Thanks a lot, Steve, for clarifying. Works great!
More information about the mrtg
mailing list