In the past this worked very well, but now that I have a much higher speed internet connection and a router that can make use of it, I find that the interface counters OIDs on t1n1wall are only 32bit and are wrapping way too fast to be usable by a IOG that polls once an hour.
What version of SNMP is being used in smallwall and are the interface counters 64bit?
The counters are ifInOctets and ifOutOctets. These are 32bit (SNMP v1) and can only have a maximum value of 2**32 Bytes, or 4GB.
64bit counters would be ifHCInOctets and ifHCOutOctets, available in SNMPv2c. But SNMP walking my AUP1D4 doesn't find them, just the 32bit ones.
On a 100mbps interface running full speed, a 32bit counter will wrap in 5.7 minutes. This would be OK for MRTG which samples every 5 minutes.
On a 1000mbps interface running full speed, a 32bit counter will wrap in about 34 seconds.
How often is your Cacti sampling? I'm guessing you are using the default which is 5 minutes? If so, and you don't exceed 100mps (even on a 1000mbps interface), you wouldn't be wrapping more than once between polls and wouldn't see the problem.
As a temporary workaround, I am now using MRTG to poll every 5 minutes to collect the data. This avoids wrapping the counters more than once between polls. I am using the MRTG Traffic Utilization script to keep track of the bandwidth totals.
But I would still like to use IOG.
Since you code for smallwall, can you tell me what version of SNMP it is built against? Saying that it's the same as t1n1wall doesn't tell me that. Also, SNMP walk your router when you have time. I'm curious as to what bit counters you have in it.
Well, we are all based on FreeBSD 8.4, so we are all on UCD-snmp 22.214.171.124, and yes it is all 32 bit. Moving to 5.x is not trivial, and at this point, even the 10 alphas are still on the 4.x series, I think.
But you have a good point, in that it is no longer sufficient to modern needs.
The 64bit counters are not populated in SmallWall. I checked. And I have no clue what it would take since I have not looked at that part of the code in quite a while.
As to that last line... svn.SmallWall.org is working... In all seriousness, I did a lot to make development easier then it was with m0n0wall. This is a lot of data, for one... www.smallwall.org/docs/dev/index.html Also a full filesystem is downloadable to see what is what. If you come up with something that works with exec.php or with workon.sh, I will look at putting it in right away!
This was posted on the t1n1wall forum but my links are "no follow" there. Also, I check here more often. Either way, if I develop the fix first, I will e-mail it to Andrew White. We both will be wanting this!
Ha! That Andy is good! While I was looking at making the old snmp work, he just made the new one work. I am looking at it, but I think I like his solution better. Mine was getting a bit long in the patch...