top of page

Automating a Speedtest in Windows

Over the years I spent quite a bit of time writing articles on how to create new Speedtest within your own company using iperf.


I’ve had many requests asking how we do the same to test Internet performance.

That’s where this comes in, I thought I would show you how to write a windows batch file that would record speed test performance results in a file so you can create new reports at a later date.


The only part of the the IoT that I did not have time to cover was a DJI use the date and the times for the file name as I suggested you have to make sure your date has the same regional settings that I have.


My regional and the formats are displayed below. If you do not have the same format that I have, you will have issues formatting your date.


If you have issues with the date, I would encourage you to simply think that port cant make sure the file was being preyed properly and then play with the guy in the time afterwards



I encourage you to use parts of the batch file for any other automation you might need with iperf, etc.

Heres the batch file- just copy and paste into a file with a bat extension

echo off

cls

 

set year=%date:~10,4%

set month=%date:~4,2%

set day=%date:~7,2%

set filename=%year%_%month%_%day%

 

ECHO Running speedtest %time%

 

SETLOCAL ENABLEDELAYEDEXPANSION

SET count=1

FOR /F "tokens=* USEBACKQ" %%F IN (`speedtest -s 46435 -f csv`) DO (

  SET var!count!=%%F

  SET /a count=!count!+1

)

echo 1

ECHO %date%,%time%,%var1%

echo ============================

echo %date%,%time%,%var1%>>%filename%speedtest_results.csv

ENDLOCAL

 



 


 

 

47 views

Comments


bottom of page