WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

System Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Detect Network Bandwidth


Question:

I have several subnets here at work. One seems extreemly slow and I was wondering if there was a script that could test the bandwidth between two subnets? Maybe copy a file to a remote machine the retrieve it while recording the speed. Dunno how this can be done.

Answer:

smallfile="testsmall.txt"  ; some small file
srcfile="test.txt"
destfile="\\server\share\testfile.txt" ; some large (more than 1mb file)

;Do it once to grease the skids...
FileCopy(smallfile,destfile,0)

;Now do it again with big file and time it
a=GetTickCont()
FileCopy(srcfile,destfile,0)
b=GetTickCount

diff=b-a
If diff==0 Then diff=1

fs=FileSize(srcfile)
;note Filesize should be LARGE.  Say  more than 1MB  maybe 10MB.

fs=fs+0.0  ; convert to float

bps=(fs*diff)/1000

Message("Transfer speed in bytes per sec",bps)


Article ID:   W17031
File Created: 2007:07:03:14:27:42
Last Updated: 2007:07:03:14:27:42