All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Bandwidth Monitor
@ 2003-08-01 16:50 Sebastián Aresca
  2003-08-02  4:28 ` Leonardo Balliache
  2003-08-02  9:13 ` Cristian Ionescu-Idbohrn
  0 siblings, 2 replies; 3+ messages in thread
From: Sebastián Aresca @ 2003-08-01 16:50 UTC (permalink / raw)
  To: lartc

Anybody knows about one bandwidth meter to use in Bering.
This is a script i built, it's works wel, but it's not very nice!!!  =P

#!/bin/bash

# Bandwidth Monitor

device=eth0

bytes=`grep $device /proc/net/dev |  cut -f 2 -d : | cut -d ' ' -f 2`
kbytes=`expr $bytes / 1024`
actual=$kbytes

i=1
x=0
total=0
while [ $i -le 2 ]
do
    x=`expr $x + 1`
    bytes=`grep $device /proc/net/dev |  cut -f 2 -d : | cut -d ' ' -f 2`
    kbytes=`expr $bytes / 1024`
    valor=`expr $kbytes - $actual`
    actual=$kbytes

    if [ $x =  5 ]
    then
        x=2
        total=$promedio
    fi

    total=`expr $total + $valor`
    promedio=`expr $total / $x`

    echo actual: [$valor Kb/s] - promedio: [$promedio Kb/s]
    sleep 1

done

Best regards.

Sebastián A. Aresca

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Bandwidth Monitor
  2003-08-01 16:50 [LARTC] Bandwidth Monitor Sebastián Aresca
@ 2003-08-02  4:28 ` Leonardo Balliache
  2003-08-02  9:13 ` Cristian Ionescu-Idbohrn
  1 sibling, 0 replies; 3+ messages in thread
From: Leonardo Balliache @ 2003-08-02  4:28 UTC (permalink / raw)
  To: lartc

Hi,

Have a look at 
http://ldp.kernelnotes.de/HOWTO/Querying-libiptc-HOWTO/bmeter.html

Best regards,

Leonardo Balliache

At 01:50 p.m. 01/08/03 -0300, you wrote:
>Anybody knows about one bandwidth meter to use in Bering.
>This is a script i built, it's works wel, but it's not very nice!!!  =P
>
>#!/bin/bash
>
># Bandwidth Monitor
>
>device=eth0
>
>bytes=`grep $device /proc/net/dev |  cut -f 2 -d : | cut -d ' ' -f 2`
>kbytes=`expr $bytes / 1024`
>actual=$kbytes
>
>i=1
>x=0
>total=0
>while [ $i -le 2 ]
>do
>     x=`expr $x + 1`
>     bytes=`grep $device /proc/net/dev |  cut -f 2 -d : | cut -d ' ' -f 2`
>     kbytes=`expr $bytes / 1024`
>     valor=`expr $kbytes - $actual`
>     actual=$kbytes
>
>     if [ $x =  5 ]
>     then
>         x=2
>         total=$promedio
>     fi
>
>     total=`expr $total + $valor`
>     promedio=`expr $total / $x`
>
>     echo actual: [$valor Kb/s] - promedio: [$promedio Kb/s]
>     sleep 1
>
>done
>
>Best regards.
>
>Sebastián A. Aresca
>
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Practical QoS
http://opalsoft.net/qos


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Bandwidth Monitor
  2003-08-01 16:50 [LARTC] Bandwidth Monitor Sebastián Aresca
  2003-08-02  4:28 ` Leonardo Balliache
@ 2003-08-02  9:13 ` Cristian Ionescu-Idbohrn
  1 sibling, 0 replies; 3+ messages in thread
From: Cristian Ionescu-Idbohrn @ 2003-08-02  9:13 UTC (permalink / raw)
  To: lartc

On Fri, 1 Aug 2003, [iso-8859-1] Sebastián Aresca wrote:

> Anybody knows about one bandwidth meter to use in Bering.

You might want give nanotop a try. It shows a line like this:

CPU: [=-       ]   MEM:   8.8MB   LAN:   1.0kB/s(RX) 454.00B/s(TX)  0(ERR

Dynamically built and stripped, the executable file size is about 5k.

The home page:

  http://floppyfw.wojci.dk/nanotop.phtml


Cheers,
Cristian
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-02  9:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-01 16:50 [LARTC] Bandwidth Monitor Sebastián Aresca
2003-08-02  4:28 ` Leonardo Balliache
2003-08-02  9:13 ` Cristian Ionescu-Idbohrn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.