Dial up transfer rates: ugly hack #1 ;-)

squareyes squareyes at optusnet.com.au
Mon Aug 29 12:50:21 UTC 2005


Peter Garrett wrote:

>>    
>>
>Hi Winton,
>
>This way of doing things is "Too Ugly to Live (tm)", but you can try it .
>
>sudo apt-get install bwm  <---- tiny utility
>
>bwm monitors your transfer rates... it takes some seconds to output anything, and uses ctrl-c to stop. If you do this:
>
>start downloading  http://foo.bar.org/somebigfile  [substitute ad-lib]
>
>then open a terminal and do
>
>while true ; do bwm | grep ppp0 ; done
>
>then leave that running for a while you get something like
>
>while true ; do bwm | grep ppp0 ; done
>        ppp0            4.287        3.654           7.941
>        ppp0            5.906        1.110           7.016
>        ppp0            4.436        0.183           4.619
>
><snipped>
>
>bwm outputs in batches of ten lines or so, every twenty seconds, from memory.  To stop it just do a "ctrl-c". Easiest way to record it is to copy paste to gedit or your editor of choice and save. If you want to get fancy you can paste the top line of the standard bwm at the top of the file before doing this... (running bwm without arguments outputs a nice little updated table with labels for each interface)
>
>Thus:
>
>       Iface        RX(KB/sec)   TX(KB/sec)   Total(KB/sec)  <--- top line of standard bwm output
>        ppp0            4.287        3.654           7.941              <---- first line of "while true .... etc"
>        ppp0            5.906        1.110           7.016
>        ppp0            4.436        0.183           4.619
>
>... but of course you will wait to get a decent number of lines of output - to impress the optusnet people ;) So wait a while and let the "while true... " run...
>
>See how you go...
>
>Peter - hoping the bash experts will step in and demonstrate how this is done elegantly ;-)
>  
>
Hi Peter,
looks like a great idea to me.
Not a very elegant person myself, don't own a tux, and a long time since 
I went
formal (quite possibly decades). Thanks, tried it and it looks great, 
will feed Optusnet
a nice big email :-)
Thanks again,
Take Care
Winton




More information about the ubuntu-users mailing list