Hey All,

I've been working on a script to provide customers with a little bit more reporting when they say the network is slow over a VPN or between a site-to-site. I've been using a program called iperf. I think its a very cool tool which provides exactly what I need. http://dast.nlanr.net/Projects/Iperf/

To get the program to work, you have to install the client on both ends of the tunnel. Then run a command that starts one as the "server" and then based on different options, configure the "client" to connect to it.

However, the problem with just logging onto these machines is that its time comsuming and more often than not, the remote site does not have a server. So you have to interfere with a users computer. So, I wrote a script to do everything automagically.

I am having a little trouble getting the "server" script to work. I don't know why, but for whatever reason it says the script running correctly but when I run the client script it says that it can't connect. However, if you manually configure the "server" side, the client script runs perfectly.

I wanted to post these scripts for two reasons. One to let everyone use it but also if anyone had any ideas on how to tweak out the install to get it to run better.

Here is the "Server" install script which needs to be run first on the machine you want to use as the server:

Script Name: iPerf Server Install
Script Description: iPerf Server Install

IF True
THEN
Write File
Parameter 1 : c:\temp\iperf.exe
Parameter 2 : VSASharedFiles\iperf.exe
OS Type : 0
Pause Script
Parameter 1 : 30
OS Type : 0
Execute Shell Command
Parameter 1 : c:\temp\iperf.exe -s -D
Parameter 2 : 0
OS Type : 0
ELSE

And here is the script for the Client install to be run on the machine that is across the tunnel from the server computer:

Script Name: iPerf Client
Script Description: iPerf Client

IF True
THEN
Write File
Parameter 1 : c:\temp\iperf.exe
Parameter 2 : VSASharedFiles\iperf.exe
OS Type : 0
Execute Shell Command
Parameter 1 : c:\temp\iperf.exe -c **x.x.x.x** >> c:\temp\iperflog.txt
Parameter 2 : 0
OS Type : 0
Pause Script
Parameter 1 : 30
OS Type : 0
Get Variable
Parameter 1 : 1
Parameter 2 : c:\temp\iperflog.txt
Parameter 3 : iperf
OS Type : 0
Send Email
Parameter 1 :email@whateveryouwant.com
Parameter 2 : iPerf report
Parameter 3 : #iperf#
OS Type : 0
Delete File
Parameter 1 : c:\temp\iperflog.txt
OS Type : 0
ELSE

A couple of things with the client install, gotta configure the email address and also the IP address of the server. I wish there was a pop-up option when you ran the script to put this information in instead of modifying the script everytime!

Here is an example of the OutPut you get when you run it successfully

------------------------------------------------------------

Client connecting to 192.168.1.6, TCP port 5001 TCP window size: 8.00 KByte (default)

------------------------------------------------------------

[1920] local 192.168.5.17 port 1588 connected with 192.168.1.6 port 5001

[ ID] Interval Transfer Bandwidth

[1920] 0.0-10.8 sec 288 KBytes 218 Kbits/sec

The Client in this example is 192.168.5.17 and the server is 192.168.1.6

As you can see their line is VERY VERY slow.. gotta work on that haha.



Have Fun!


Legacy Forum Name: Script to measure bandwidth between sites,
Legacy Posted By Username: CHIPSCC