[rtg] A lack of parity between RTG's counters and MRTG's counters.

Drew Weaver drew.weaver at thenap.com
Tue Dec 4 16:34:39 EST 2007


I recently upgraded MRTG on our old old old MRTG box that we use for a few things around here and I noticed they have a new perl script for generating traffic totals called: mrtg-traffic-sum.

We poll the same switches with both MRTG and RTG. We have been using RTG to create 'totals' in and out for awhile now and always felt like what we got was fairly indicative of actual utilization, well just for giggles I started messing around with MRTG's script and I noticed there is a lack of parity between what I am getting.

FastEthernet7/2                                 9237, 8301.82
FastEthernet7/3                                 9234, 8326.03
FastEthernet7/4                                 8511, 8025.78
FastEthernet7/5                                 9330, 8392.90
FastEthernet7/6                                 9152, 8235.37
FastEthernet7/7                                 10933, 9813.15
FastEthernet7/8                                 9101, 8186.83
FastEthernet7/17                                3414, 2846.63

The first number is what MRTG is reporting for the month of November, the second number is what RTG has stored in our MySQL table .

I got those numbers from RTG by doing the following:

SELECT SUM(counter) from rtg.ifInOctets_5 where id = '443' and dtime BETWEEN '2007-11-01' AND '2007-11-30';
SELECT SUM(counter) from rtg.ifOutOctets_5 where id = '443' and dtime BETWEEN '2007-11-01' AND '2007-11-30';

I then took the resulting octet counts, added them together and divided by 1073741824 (1024 x 1024 x 1024...)

Is my math wrong? or does MRTG and RTG poll differently enough to explain the difference in numbers?

Thanks,
Drew



More information about the RTG mailing list