[LARTC] Bandwidth Monitor

Leonardo Balliache leoball@opalsoft.net
Sat, 02 Aug 2003 00:28:19 -0400


Hi,

Have a look at=20
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!!!  =3DP
>
>#!/bin/bash
>
># Bandwidth Monitor
>
>device=3Deth0
>
>bytes=3D`grep $device /proc/net/dev |  cut -f 2 -d : | cut -d ' ' -f 2`
>kbytes=3D`expr $bytes / 1024`
>actual=3D$kbytes
>
>i=3D1
>x=3D0
>total=3D0
>while [ $i -le 2 ]
>do
>     x=3D`expr $x + 1`
>     bytes=3D`grep $device /proc/net/dev |  cut -f 2 -d : | cut -d ' ' -f=
 2`
>     kbytes=3D`expr $bytes / 1024`
>     valor=3D`expr $kbytes - $actual`
>     actual=3D$kbytes
>
>     if [ $x =3D  5 ]
>     then
>         x=3D2
>         total=3D$promedio
>     fi
>
>     total=3D`expr $total + $valor`
>     promedio=3D`expr $total / $x`
>
>     echo actual: [$valor Kb/s] - promedio: [$promedio Kb/s]
>     sleep 1
>
>done
>
>Best regards.
>
>Sebasti=E1n 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