New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Measure download speed

Votes:

0

Your Vote:

Up

Down

We're looking to measure the download speed/bandwidth available to a probe at a given interval. Something like a speedtest.net test, I don't think PRTG has anything like that but we wanted to check. Anyone else out there that wants to/is able to do this sort of test with PRTG.

download prtg speed

Created on Nov 9, 2010 9:09:05 PM by  chris lefler (0) 1



Best Answer

Accepted Answer

Votes:

9

Your Vote:

Up

Down

Hi PRTG and users!

First off, let me say that I've been using other SNMP graphing programs in the past, including writing a lot of my own scripts in MRTG, and I LOVE PRTG! I wish I had come across your software 10 years ago.

I think what really is starting to set PRTG apart from others is the "XML/EXE Script Advanced Sensor" and this is what I used to solve the problem above.

I hope this answer isn't 4 years too late for whoever needed this, but I spent the past few days working on a way to accurately measure download speeds with PRTG.

I realize you do have a solution as posted above that involves downloading files and graphing the connection speeds, but I feel that method is inaccurate in certain situations:

  • A very fast connection requires a very large file download to get an accurate graph of connection speed.
  • You are relying on a single host to test the connection speed, and speed to that host may vary, even if your overall speed to the internet in general is consistently high.

So without further ado, here is my solution:

In a nutshell, you'll be installing three programs on your PRTG monitoring PC or Remote Probe:

  • Strawberry Perl, which lets you run:
  • App-Speedtest, a Perl-based command line speed test program. Download this.
  • Also, SED, a Linux-based script that can reformat a text file. Download this too.

Here's what happens when you have it all working:

  • You use Windows Task Scheduler to call the batch file--included below--every 15 mins.
  • * This batch file runs App-speedtest, which outputs the results as XML to a text file.
  • This batch file then runs four SED scripts against the text file format it correctly for PRTG.
  • This batch file then copies the resulting file into the appropriate PRTG directory so the Advanced Probe can read it.
  • PRTG then reads this text file every 15 minutes and creates the graphs we love so much!

Here is the batch file. This assumes you have the SED install directory in your windows path:

rem can be run with PRTG Custom EXE to XML parser, as either a PowerShell or BAT file.

rem requires Strawberry Perl for Windows, SED for windows, and the PERL-based speedtest called App-speedtest

rem call speedtest and output to xml file
perl c:\speedtest\speedtest.pl -q10 -P > c:\speedtest\speedtestresults.bat

rem now let's format this file so PRTG can read the channels

rem add echo at newline
sed.exe -i -e "s/^/echo /" c:\speedtest\speedtestresults.bat

rem add @echo off
c:\speedtest\sed.exe -i "1s/^/@echo off \n/" c:\speedtest\speedtestresults.bat

rem remove fourth line
c:\speedtest\sed.exe -i -e "4d" c:\speedtest\speedtestresults.bat

rem escape opening xml bracket
c:\speedtest\sed.exe -i -e "s/>/^>/g" c:\speedtest\speedtestresults.bat

rem escape closing html bracket
c:\speedtest\sed.exe -i -e "s/</^</g" c:\speedtest\speedtestresults.bat

rem finally, copy the speedtestresults.bat file into the PRTG custom XML app executable folder
copy c:\speedtest\speedtestresults.bat "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\speedtestresults.bat"

Assuming that you've downloaded the required programs and ran the batch script, you should be able to add a custom EXE advanced probe to your PRTG installation, and see "speedtestresults.bat" as one of the options listed.

Enjoy!

Miles

Edit: Formatting by mod.

Created on May 21, 2016 5:49:33 AM by  Miles Reed (140) 1

Last change on May 23, 2016 1:25:34 PM by  Luciano Lingnau [Paessler Support]



5 Replies

Votes:

2

Your Vote:

Up

Down

this is actually already possible, with a little workaround, please read:

Paessler Blog: Monitoring the Available Bandwidth (Part 2)

what you can do now is to create a HTTP Advanced sensor on the remote probe and use as URL

the download URL for the remote probe installation file. (pass-hash would be needed in the URL)

In that way you would download the remote probe installation file from the core server to the remote probe and you could measure speed between them.

Created on Nov 10, 2010 9:33:17 AM by  Aurelio Lombardi [Paessler Support]

Last change on May 23, 2016 7:26:09 AM by  Luciano Lingnau [Paessler Support]



Accepted Answer

Votes:

9

Your Vote:

Up

Down

Hi PRTG and users!

First off, let me say that I've been using other SNMP graphing programs in the past, including writing a lot of my own scripts in MRTG, and I LOVE PRTG! I wish I had come across your software 10 years ago.

I think what really is starting to set PRTG apart from others is the "XML/EXE Script Advanced Sensor" and this is what I used to solve the problem above.

I hope this answer isn't 4 years too late for whoever needed this, but I spent the past few days working on a way to accurately measure download speeds with PRTG.

I realize you do have a solution as posted above that involves downloading files and graphing the connection speeds, but I feel that method is inaccurate in certain situations:

  • A very fast connection requires a very large file download to get an accurate graph of connection speed.
  • You are relying on a single host to test the connection speed, and speed to that host may vary, even if your overall speed to the internet in general is consistently high.

So without further ado, here is my solution:

In a nutshell, you'll be installing three programs on your PRTG monitoring PC or Remote Probe:

  • Strawberry Perl, which lets you run:
  • App-Speedtest, a Perl-based command line speed test program. Download this.
  • Also, SED, a Linux-based script that can reformat a text file. Download this too.

Here's what happens when you have it all working:

  • You use Windows Task Scheduler to call the batch file--included below--every 15 mins.
  • * This batch file runs App-speedtest, which outputs the results as XML to a text file.
  • This batch file then runs four SED scripts against the text file format it correctly for PRTG.
  • This batch file then copies the resulting file into the appropriate PRTG directory so the Advanced Probe can read it.
  • PRTG then reads this text file every 15 minutes and creates the graphs we love so much!

Here is the batch file. This assumes you have the SED install directory in your windows path:

rem can be run with PRTG Custom EXE to XML parser, as either a PowerShell or BAT file.

rem requires Strawberry Perl for Windows, SED for windows, and the PERL-based speedtest called App-speedtest

rem call speedtest and output to xml file
perl c:\speedtest\speedtest.pl -q10 -P > c:\speedtest\speedtestresults.bat

rem now let's format this file so PRTG can read the channels

rem add echo at newline
sed.exe -i -e "s/^/echo /" c:\speedtest\speedtestresults.bat

rem add @echo off
c:\speedtest\sed.exe -i "1s/^/@echo off \n/" c:\speedtest\speedtestresults.bat

rem remove fourth line
c:\speedtest\sed.exe -i -e "4d" c:\speedtest\speedtestresults.bat

rem escape opening xml bracket
c:\speedtest\sed.exe -i -e "s/>/^>/g" c:\speedtest\speedtestresults.bat

rem escape closing html bracket
c:\speedtest\sed.exe -i -e "s/</^</g" c:\speedtest\speedtestresults.bat

rem finally, copy the speedtestresults.bat file into the PRTG custom XML app executable folder
copy c:\speedtest\speedtestresults.bat "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\speedtestresults.bat"

Assuming that you've downloaded the required programs and ran the batch script, you should be able to add a custom EXE advanced probe to your PRTG installation, and see "speedtestresults.bat" as one of the options listed.

Enjoy!

Miles

Edit: Formatting by mod.

Created on May 21, 2016 5:49:33 AM by  Miles Reed (140) 1

Last change on May 23, 2016 1:25:34 PM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Miles,
thank you very much for your kind feedback and the script you've shared, that's awesome!

Created on May 23, 2016 7:20:49 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

You're very welcome. I've been running it for a couple months now and I've had satisfactory results on line speeds from 1MB to 1GB, seems pretty stable with the occasional missed data point.

Created on Jul 7, 2016 1:29:30 PM by  Miles Reed (140) 1



Votes:

0

Your Vote:

Up

Down

I have made something like this myself also. Didn't want to use a scheduled task for it. So I made PRTG call the exe file and return the xml data.

Look here for more information.

Created on Jul 27, 2016 12:47:49 PM by  nicolaitornhoj (0)

Last change on Jul 27, 2016 2:20:13 PM by  Luciano Lingnau [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.