SNMP Bandwidth usage
I'm writing an application that uses SNMP to retrieve some device data and to show the average bandwidth usage over a given period of time (like 5 minutes for example). The problem is that for some reason I can't get an accurate reading of the usage so either my calculations are off or the readings are off.
If it helps with something the application is written in PHP and the test was done on a Debian install.
- did a reading via snmpwalk (doesn't matter if it's from command line or the application)
- run a test on speedtest.net (results were ~93Mbps on download)
- did a reading again via snmpwalk
Results: ~28MB/s inbound - done over a 100Mbps uplink (basically it's ~18MB/s over the maximum physical capabilities of the uplink)
Note: The interval between the pools was 30 seconds.
The OID I used is 184.108.40.206.220.127.116.11.1.10 which corresponds to ifInOctets and the formula I used is: (ifInOctets(reading2) - ifInOctets(reading1)) * 8 / poolInterval.
Does anyone know why I get these results and not the actual usage?
So no one has encountered this issue?
July 22nd, 2013, 05:01 PM
Try a 3rd party application
Originally Posted by dbrian
Does the PHP application need the SNMP information or are you trying to monitor how well the PHP application is performing? There are third party applications that do SNMP monitoring quite well. Opsview is one that comes to mind.