Jump to content
Sean

Command line scheduled speed test

Recommended Posts

Over the past few days, my fixed wireless broadband connection (Bluebox) has been practically unusable.  When I contacted North West Electronics trying to explain the problem, I got a pretty generic response all about contention, followed by "Ticket Status: Closed." :?

 

So I thought I'd run the auto test to getting an overnight graph to show it's clearly not contention, but quickly ran into a problem.  The connection is so unstable that the actual page refresh between intervals intermittently times out, leaving a message like "The connection was reset".  I'm sure anyone who had an Internet outage during a scheduled test would have experienced a similar issue.

 

After seeing CA3LE's trick of specifying test sizes in this thread, it meant I could start the test just by launching a URL from the Windows command line. :cool2:

 

The following is what I quickly put together as a starting point for now, which seems to work fine on my PC:

@echo off
@setlocal enableextensions enabledelayedexpansion
set LastInt=

set Invervals=00 15 30 45
set Delay=60
set DownloadSize=1MB
set UploadSize=512

:rep
ping -n 2 localhost >nul
if "%LastInt%"=="%time:~3,2%" goto rep
set LastInt=%time:~3,2%

echo.%Invervals% | findstr /C:"%LastInt%" 1>nul && (
  echo Running test for time interval: %time:~0,5% . . .
  start http://dallas.testmy.net/dl-%DownloadSize%
  ping -n %Delay% localhost >nul
  start http://dallas.testmy.net/ul-%UploadSize%
  ping -n %Delay% localhost >nul
)

goto rep

Just copy & paste this code into Notepad, adjust the four 'SET' lines near the top as desired and save it as a batch file, e.g. "Autotest.bat".  Then double-click the saved batch file to start the automated test.

 

The SET lines are as follows:

 

set Invervals=00 15 30 45  -- Minute intervals, e.g. 2:00pm, 2:15pm, 2:30pm, 2:45pm, 3:00pm and so on.

 

set Delay=60 -- Delay in seconds between running the download and upload tests to avoid overlap.

 

set DownloadSize=1MB -- Download size.  Change to "50MB" for a 50MB test, etc.

 

set UploadSize=512  -- Upload size (512KB here).  Change to "5MB" for a 5MB test, etc.

 

When each test URL is launched, it opens up in the default web browser in a new tab similar to clicking a shortcut link on the desktop. 

 

The script has a few small issues:

  • Each test is launched in the foreground, so if you're using the PC, you'll suddenly find the web browser appearing in your face at each interval. 
  • Every download and upload interval is loaded in a new tab, so if that script runs for let's say 30 intervals, there will be 60 browser tabs (upload + download tests) open. :wink2:   However, from a quick test with Firefox, it seems to have little issue having a very large number of tabs open.
  • The script endlessly runs until the command line window is closed.

To specify a browser to launch the test in, just add the browser name after the word 'start' for both lines above, e.g. "start iexplore http..." for Internet Explorer.  Change iexplore with Chrome or Firefox to launch in Chrome or Firefox, respectively. 

 

Edited by CA3LE
changed URL to subdomain

Share this post


Link to post
Share on other sites

Just an update leaving the script to run for a while:

 

post-248268-0-45805600-1440617970_thumb.

 

My fixed wireless subscription is suppose to be up to 50Mb down and 10Mb up: :o

 

post-248268-0-98967400-1440618073_thumb.

 

The above graph covers 6am to 8:30pm based on the last 50 results. 

 

I'll need to re-run it with just the outdoor antenna client unit connected to my laptop, but even without doing this, I am fairly sure this is not contention which my ISP is putting my issues down to, especially not at 6am in the morning!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...