Posts

Showing posts from March, 2013

Simple Command Line Download Speed Test

Image
I got a server that started to have a bad network connection. To help debugging this I needed to collect some data, e.g. of running a download test every 5 minutes.

A quick search revealed nothing so I found a simple way to do that with curl and Google Drive.
1. Google Drive Form I set up a simple Google Drive form that accepts two text values: Next I need to find out the HTML form field names of these two fields. This takes a little bit of digging.   There is always a label attached to each input field. They are connected via the for attribute of the label.
With this information I can now construct a simple curl script.
2. CURL script to collect some data and post I want curl to try to download a URL and record the download speed. The -w, -y and -Y options come in handy for this purpose: -w lets me output only the information I really care about (the speed of the download in Bytes per second)-y gives a timeout after which curl will abort the download-Y gives a minimum download speed (…