Testing connection bandwidth from command line for automatic monitoring
Among the approaches discussed here, this one seems to be the most solid (ab is part of apache2-utils).
ab -n 4 -c 4 http://speed01.il.towerstream.com/speedtest/random1000x1000.jpg | grep 'Transfer rate' | cut -c 23-28
This gives me the actual transfer rate in KB/sec. I wrapped a little Icinga script around it for continual data collection and notification of bandwidth drops.
53 notes /