poqui has asked for the wisdom of the Perl Monks concerning the following question:

Here at work we are having a problem with FTP...
We are FTPing large files to a customer, and most of the time it goes great, but occasionally we will get a really slow connection that takes 2+ hours to move a file that normally takes less than 50% of that.
I was thinking about mitigation strategies and wondered if anyone had a test for FTP connect speed, and I thought I had remembered hearing that someone had done this before.

Specifically, making multiple FTP connections, testing their connect speeds somehow, and using the good ones and dropping the bad ones.

Thanks!
h. poquitou hydjnw

Replies are listed 'Best First'.
Re: FTP speed test
by JayBonci (Curate) on Feb 06, 2002 at 23:49 UTC
    You could use Net::FTP to get a reasonably large file (500K) or so, and then use a localtime() before and after to see how long it would take. Repeat every few minutes with a cron job, and start pushing files over when the time is right. I don't think there is a particular speed test module for FTP (as it depends per server, etc), and benchmarking net connections is circumstantial information at best.

    Good luck with it!
        --jay
Re: FTP speed test
by dhammaBum (Acolyte) on Feb 06, 2002 at 23:07 UTC
    Have a look at expect, it is very good at interactive stuff but the tcl syntax sucks. There are alot of ftp scripts that come with the language.

    Otherwise why not just do a while loop until a certain speed is reached??