All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Balliache <leoball@opalsoft.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Bandwidth Monitor
Date: Sat, 02 Aug 2003 04:28:19 +0000	[thread overview]
Message-ID: <marc-lartc-105979861425474@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105975676824336@msgid-missing>

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/

  reply	other threads:[~2003-08-02  4:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-01 16:50 [LARTC] Bandwidth Monitor Sebastián Aresca
2003-08-02  4:28 ` Leonardo Balliache [this message]
2003-08-02  9:13 ` Cristian Ionescu-Idbohrn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105979861425474@msgid-missing \
    --to=leoball@opalsoft.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.