Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I currently have MRTG running in a Debian box. It currently polls a Netgear Switch for the speeds of 7 or so ports and then makes the graphs of them. It currently only records the bits/sec. I would like to set up MRTG to record and display the total amount of data that has gone through the port, not just the speed of it.

I am somewhat new to MIBS and SNMP and so I need some help. The switch is a Netgear GS748AT and am not quite sure where to find the MIBS for it, or which MIBS I need to accomplish my task.

Any and all help is appreciated!

share|improve this question
    
bits per second is essentially througput, not speed - speed is the latency involved. Bandwidth is a measure of how much data can fit through a specified size pipe during a specified period of time. So 1 megabit per second means that in one second, up to 1 megabit can travel through. If you are graphing the usage (bits per second), then the total amount of bits over the time period you specify (say 1 week) is the usage during that week. I am not sure how specifically to log that in MRTG, though. –  MaQleod Apr 9 '12 at 22:44
    
This might be helpful: serverfault.com/questions/367677/… –  MaQleod Apr 10 '12 at 14:19

1 Answer 1

I'm afraid MRTG is not designed or even capable of tracking a cumulative counter, in the manner you're suggesting. While it does query the absolute values of the port traffic which each poll, it uses the difference between the two values to calculate the bounded rate, which it graphs. Furthermore, since MRTG log files do not grow in size over time, they must decrease in accuracy: The absolute values it receives from its polling and the deltas it calculates begin to have their precision fall off; this would not provide you with an accurate accounting over time. Since most low-end consumer devices only implement SNMP V1.0, its counters are only 32-bits: they roll over after 65536^2 octets, or about 4.3 Gigabytes of data. This too is a source of problems. MRTG has code to help it maintain a reasonable delta between rollovers, and device/port resets, but it does not, and cannot keep an absolute count of all packets sent.

At any given time, snmpget can be used to poll the absolute numbers on an interface or group of interfaces. In the following example, I have determined (by perusing the output of an snmpwalk) that my dslmodem's WiFi interface is number 9, and so I can pull its current absolute stats in this way:


[mini-nevie:~] nevinwilliams% snmpget -c public -v1 192.168.2.1 .sysUpTimeInstance .ifLastChange.9 .ifInOctets.9 .ifOutOctets.9
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (187184300) 21 days, 15:57:23.00
IF-MIB::ifLastChange.9 = Timeticks: (2500757) 6:56:47.57
IF-MIB::ifInOctets.9 = Counter32: 824681152
IF-MIB::ifOutOctets.9 = Counter32: 317952735

Which tells me that (though I'm not sure if it's 21 days, or 7 hours; I think the former, as it's not used much) that my WiFi interface passed 1.1 gigabytes of data. (I have since rebooted my DSL modem)


Another way of seeing the absolute counters is with the command snmpstatus:

[mini-nevie:~] nevinwilliams% snmpstatus -c public 192.168.2.1 [UDP: [192.168.2.1]:161->[0.0.0.0]:0]=>[Siemens Subscriber Networks 6520-Series (E752)] Up: 0:25:25.00 Interfaces: 22, Recv/Trans packets: 16230/28039 | IP: 5530/1696 5 interfaces are down!

which, as you can see, provides a much more condensed format. However, such data simply does not graph well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.