gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 3, 2015 18:11:24 GMT
I am using IOG www.dynw.com/iog/ to track bandwidth usage. 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? I am running on an AUP1D4.
|
|
|
Post by Lee Sharp on Aug 3, 2015 23:45:48 GMT
The SNMP code in SmallWall and t1n1wall are essentially the same right now.
But I think that SNMP is not your problem. I am seeing very high bandwidth graphs in Cacti just fine. How is iog handling the larger numbers?
|
|
gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 4, 2015 3:02:27 GMT
IOG polls interface counters once per hour.
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.
TIA
|
|
|
Post by Lee Sharp on Aug 4, 2015 7:08:39 GMT
Well, we are all based on FreeBSD 8.4, so we are all on UCD-snmp 4.2.7.1, 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.
|
|
gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 4, 2015 12:59:18 GMT
OK, thanks for the answer. Here's another question: What does the MIB look like and can changing that alone solve this problem?
I wonder what the pfsense guys are doing with this?
|
|
gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 4, 2015 15:05:06 GMT
Partial answer to one of my questions: pfsense uses 64bit counters in the area of interest: Object, ifHCInOctets. OID=.1.3.6.1.2.1.31.1.1.1.6.1, Type=Counter64, Value=453519 Object, ifHCOutOctets. OID=.1.3.6.1.2.1.31.1.1.1.10.1, Type=Counter64, Value=1167532 Get busy guys 
|
|
|
Post by Lee Sharp on Aug 4, 2015 18:47:32 GMT
Partial answer to one of my questions: pfsense uses 64bit counters in the area of interest: Object, ifHCInOctets. OID=.1.3.6.1.2.1.31.1.1.1.6.1, Type=Counter64, Value=453519 Object, ifHCOutOctets. OID=.1.3.6.1.2.1.31.1.1.1.10.1, Type=Counter64, Value=1167532 Get busy guys  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!
|
|
gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 13, 2015 19:43:52 GMT
See my followup over on the t1n1wall forum.
|
|
|
Post by Lee Sharp on Aug 13, 2015 21:08:26 GMT
|
|
gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 13, 2015 22:01:01 GMT
Thanks for diving into this. I'm keeping my fingers crossed.
|
|
|
Post by Lee Sharp on Aug 14, 2015 7:57:06 GMT
Feel free to dive with me. 
|
|
gderf
Junior Member

Posts: 14
|
Post by gderf on Aug 14, 2015 15:02:54 GMT
Andy has has updated t1n1wall to use net-snmp-5.7.3.
His 1.8.2b44 has been tested by me and is working well with IOG using 64 bit interface counters.
Do you subscribe to his commit notices?
|
|
|
Post by Lee Sharp on Aug 15, 2015 0:39:27 GMT
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...
|
|