cisco octets to mbps

Thursday, July 12, 2012 » cisco

Counters

Depending on the type of counter you want to track you can use one of the two

following oid's…

'64' bit counter => oid => '.1.3.6.1.2.1.31.1.1.1'
'32' bit counter => oid => '.1.3.6.1.2.1.2.2'

Example

Transferred octets;

28879519327687

10 seconds later:

28879428276119

That's 91051568 octets in 10 seconds.

Divide by 10 for per second value: 9105156

Multiply by 8 for bits: 72841248

Divide by 1048576 for Mbps: 69

Convert octets to Mbps.

>>> 28879519327687 - 28879428276119
91051568
>>> 91051568 / 10 
9105156
>>> 9105156 * 8
72841248
>>> 72841248 / 1048576
69

Reference:
howto calc bw
cisco docs one
cisco docs two