[mrtg] Using MRTG for Co-Lo billing.

John Gorkos jgorkos at wildcatwireless.net
Thu Aug 11 00:40:48 MEST 2005


MRTG Gurus-

Today I asked my co-lo provider for a billing traffic count for the last 30 
days to my one and only server in their location.  The box acts as the 
mail/web server for my (small) WISP, and doesn't do a tremendous amount of 
traffic.

The co-lo sent me back a MRTG graph, which I've posted here:
http://www.wildcatwireless.net/weekly.png

The stats at the bottom read like this:
Inbound:  Current 3.49k Average 4.75k Maximum: 70.28k
Outbout: Current 9.80k Average 28.67k Maximum: 2.19M

This is the relevant explanation from the email:
"Here is your weekly graph for the past 30 days. The billing is
calculated from the total average in/out bandwidth (33kb/s in your
case)."

I thought that was a bit high, so I sent back this reply:
[jgorkos at www ~]$ uptime
 16:09:02 up 53 days,  3:43,  1 user,  load average: 0.00, 0.01, 0.00
[jgorkos at www ~]$ /sbin/ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0C:41:EB:0F:0D
          inet addr:63.77.16.216  Bcast:63.77.18.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:41ff:feeb:f0d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33185855 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6006941 errors:14890 dropped:0 overruns:0
carrier:29242
          collisions:0 txqueuelen:1000
          RX bytes:297514555 (283.7 Mb)  TX bytes:2352406665 (2243.4 Mb)
          Interrupt:10 Base address:0xdc00

based on this uptime, the machine has been running for 4,592,580
seconds.  
During that period, total bytes in and out of the eth0 interface (the
only active interface) has been  2649921220, or 21199369760 bits.  so,
bits/seconds is 4,616 bits/second over the last 53 days.
According to your math, if I had done 33kb/s on averge for the last 30
days, my total usage would be 10,692k, or a little over 10GB of data
transferred on and off the machine in the 30 day measurement window.
Since my internal counters show 2.4GB transferred on and off the machine
in 53 days, someones math ain't workin' out.

His response was this:
Those RX byte and TX byte counters are either not accurate or they roll
over at least every week. As an example, we have a Linux server that has
only 900MB RX and 2.6GB TX and has been up for over 28 days. However,
this machine averages over 300GB of transfer a month according to our
MRTG graphs. You're welcome to install MRTG on your server if you want
to compare graphs with ours.

Well, gee, I've ALREADY installed MRTG, and here is the link to MY version of 
these graphs:
http://www.wildcatwireless.net/mrtg/www.wildcatwireless.net_2.html

For those of you still interested, the values from MY weekly graph are:
In 379.6 kb/s (3.8%)  8448.0 b/s (0.1%)   9536.0 b/s (0.1%) 
Out 144.0 kb/s (1.4%)   4160.0 b/s (0.0%)   2544.0 b/s (0.0%) 

And my Monthly graph:

In  99.8 kb/s (1.0%)  7936.0 b/s (0.1%)   6880.0 b/s (0.1%) 
Out 70.7 kb/s (0.7%)   4584.0 b/s (0.0%)   3736.0 b/s (0.0%)

So, here's my question:  Is my co-lo provider's use of MRTG a valid way to 
calculate throughput for billing?  If so, how did we get such different 
numbers from MRTG?
For a bonus round, where should the TCP/IP counters "roll-over" on my 
uname -a:  Linux www 2.6.11-10mdk #1 Mon May 30 11:58:13 CEST 2005 i686 
Intel(R) Celeron(TM) CPU                1400MHz unknown GNU/Linux
box?


(BTW, for you security geeks, I know I've presented all kinds of private, 
internal, use-it-to-0wn-me data, but I have faith that ya'll will use this 
info for the forces of good.)

Thanks in advance.
John Gorkos

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list