Calculate bitrate

Hello, I cant calculate bitrate correctly. And I think, that snmp is delayed for a while and get some more value.
Can some one help me correct the problem? You are my last hope :slight_smile:


LINK 1 [bitrate(((rate((oid(β€œ1.3.6.1.2.1.31.1.1.1.6.2”,5,5,β€œ172.16.69.90”)))))]
[bitrate(((rate((oid(β€œ1.3.6.1.2.1.31.1.1.1.10.2”,5,5,β€œ172.16.69.90”))))))]

LINK 2 [bitrate(((rate((oid(β€œ1.3.6.1.2.1.31.1.1.1.6.2”,5,5,β€œ172.16.69.37”)))))]
[bitrate(((rate((oid(β€œ1.3.6.1.2.1.31.1.1.1.10.2”,5,5,β€œ172.16.69.37”)))))]

TOGETHER [bitrate(((rate((sum(array(oid(β€œ1.3.6.1.2.1.31.1.1.1.6.2”,5,5,β€œ172.16.69.90”),oid(β€œ1.3.6.1.2.1.31.1.1.1.6.2”,5,5,β€œ172.16.69.37”)))))))]

The main purpose is to calculate them together and get the overall rate in mbps.

No one knows?

Here is int g0/0 adding both in and out octects and multiplying by 8 to go from bytes to bits.
[round(rate(diff32(oid(β€œ1.3.6.1.2.1.2.2.1.10.1”))*8)) + round(rate(diff32(oid(β€œ1.3.6.1.2.1.2.2.1.16.1”))*8))]
Seems to be somewhat accurate… says 100,000 when both interfaces are at 50kbps…

Cisco says the accurate way to measure bandwidth is:

((rate input octets *8 *100) divided by (rate *interface speed)) + ((rate output octets *8 *100) divided by (rate *interface speed))
http://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/8141-calculate-bandwidth-snmp.html

Maybe round those calculations to get something meaningful.

Lebowski

Gsandul had this rate function that you might parse into something you can use…
http://forum.mikrotik.com/t/norification-if-speed-on-a-link-drops/39246/1

thx