#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2009
    Posts
    52
    Rep Power
    6

    SNMP Bandwidth usage


    Hello,

    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.

    Test procedure:
    - 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 1.3.6.1.2.1.2.2.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?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2009
    Posts
    52
    Rep Power
    6
    So no one has encountered this issue?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    10
    Rep Power
    0

    Try a 3rd party application


    Originally Posted by dbrian
    Hello,

    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.

    Test procedure:
    - 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 1.3.6.1.2.1.2.2.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?

    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.

IMN logo majestic logo threadwatch logo seochat tools logo