Velocity Reviews > Convert bytes to MB on cisco router

# Convert bytes to MB on cisco router

tlanum@yahoo.com
Guest
Posts: n/a

 03-29-2006
when doing a sho int atm and looking at the output.

Example

143849529 packets input, 129326779238 bytes
125183986 packets output, 29173768997 bytes
there is a way to convert this to actual Mb/s

Does someone know the calculation to achieve this

Arnold Nipper
Guest
Posts: n/a

 03-29-2006
On 29.03.2006 22:59 http://www.velocityreviews.com/forums/(E-Mail Removed) wrote

> when doing a sho int atm and looking at the output.
>
> Example
>
> 143849529 packets input, 129326779238 bytes
> 125183986 packets output, 29173768997 bytes
> there is a way to convert this to actual Mb/s
>
> Does someone know the calculation to achieve this
>

Take the minimum of 'Last clearing of "show interface" counters' and
'uptime' and do the math,

--
Arnold Nipper, AN45

Walter Roberson
Guest
Posts: n/a

 03-29-2006
In article <(E-Mail Removed) .com>,
<(E-Mail Removed)> wrote:
>when doing a sho int atm and looking at the output.

>143849529 packets input, 129326779238 bytes
>125183986 packets output, 29173768997 bytes
>there is a way to convert this to actual Mb/s

>Does someone know the calculation to achieve this

On sufficiently new high-end devices you could probably
put together some TCL code that did the conversion for you.

The figures you gave are not enough information to calculate
Mb/s -- to calculate that, you need the time interval as
well as the volume difference.

You should decide "which" Mb/s you mean. Does your prefix 'M'
mean "million" (10^6), or does it mean the same "mega" that is
used to measure memory, 1024*1024*1024 (i.e., 2^30) ?

Also, because of inconsistant usage, you should decide if you
want megabits per second or megabytes per second.

I would suggest that possibly the easiest thing for you to do
would be to set up MRTG monitoring of the device, and let it
take the measurements and do the calculations and keep the nice
historical trend graphs. It usually isn't very useful to know
that the average traffic rate *since the device was last reset*
was something-or-other -- typically the low evening and weekend
figures distort those figures completely. You probably want to
get a good idea of what your peak rates are at various times:
MRTG and similar are great for that.

Merv
Guest
Posts: n/a

 03-29-2006
If you are just trying to get a traffic snapshot,
then clear the interface counters and then do
a show clock and a show interface together
wait several minutes and repeat. subtract the
traffic and the clock times and do the math.

you can also configure "load-interval 30" on the interface
and then it will give you traffic average for a 30 second period
as seen in the output of show interface

Joel Salminen
Guest
Posts: n/a

 03-30-2006
Short answer... there is 8 bits to 1 bytes.

Covert bits to bytes: divide the megabits by 8
Covert bytes to bits: multiple the megabytes by 8

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> when doing a sho int atm and looking at the output.
>
> Example
>
> 143849529 packets input, 129326779238 bytes
> 125183986 packets output, 29173768997 bytes
> there is a way to convert this to actual Mb/s
>
> Does someone know the calculation to achieve this
>

Walter Roberson
Guest
Posts: n/a

 03-30-2006
In article <(E-Mail Removed)>,
Joel Salminen <nomail@nomail> top-posted, now corrected:
><(E-Mail Removed)> wrote in message
>news:(E-Mail Removed) roups.com...
>> when doing a sho int atm and looking at the output.

>> 143849529 packets input, 129326779238 bytes

>> there is a way to convert this to actual Mb/s

>Short answer... there is 8 bits to 1 bytes.

>Covert bits to bytes: divide the megabits by 8
>Covert bytes to bits: multiple the megabytes by 8

Please re-examine the information the OP has available.
It is in packets and bytes. There is no megabits or megabytes
on it, so neither of your calculations would apply.

Your calculations are also not correct as phrased. One does not
convert "bits" to "bytes" by dividing megabits by 8. Dividing
megabits by 8 would yeild megabytes, not bytes.

But the OP wanted "Mb/s". As I indicated in my earlier posting,
one first has to resolve what "Mb/s" means. "Mb/s" is sometimes
used for "megabits per second", and sometimes for "megabytes per
second" (but not correctly). In turn "megabits" might refer to
one million bits (10^6), or it might refer to "mega" as in the
use in computer memory, which is 1024*1024*1024 (2^30).

Once one has decided what "Mb/s" means, one will need a time
interval in order to do the appropriate calculation. Scaling
the data the OP showed by 8 cannot yield megabits PER SECOND.

TLan
Guest
Posts: n/a

 03-30-2006
ok then i had this wrong. I thought this was the avg throughput at that
point in time on that interface. an engineer at AT&T informed me but I
must have misheard him.

I have setup MRTG so not an issue anymore

also Mb/s in my topic was meant as megabits per second.