Perl + FTP + Windows -- Unable to capture the rate of Data Transfer.

A

Anand Kumar V

Hi,

I want to write a Perl code which does FTP to a server, does data
transfer in both directions (get and put) and capture the rates in
which data is getting transfered.

I got the FTP module Net::FTP to open, get and put the files. But I am
not able to capture the data rate in the Perl Module. Is there any
method that supports this feature ?.

The data rate (speed) is displayed normally when you run a FTP client
in Windows platform.

Regards
Anand.
 
B

Ben Morrow

I want to write a Perl code which does FTP to a server, does data
transfer in both directions (get and put) and capture the rates in
which data is getting transfered.

I got the FTP module Net::FTP to open, get and put the files. But I am
not able to capture the data rate in the Perl Module. Is there any
method that supports this feature ?.

The data rate (speed) is displayed normally when you run a FTP client
in Windows platform.

See the thread http://groups.google.com/groups?
threadm=75e50dfd.0402031135.76d6e599%40posting.google.com
(excuse the wrapping) where there were two methods given for setting a
callback for every Kb of data transferred; from this and the time taken
you can calculate the data transfer rate.

Ben
 
A

Anand Kumar V

Hi,

Thanks for your reply. I am a beginner in Perl and I don't get the
callback mechanism you had refered to. With the number of hashes we
can find how many bytes had been transfered but how do we calculate
the time period ?.. Is there any start timer / stop timer method
avaiable in Perl ?.

Thanks in advance.

Regards
Anand.
 
B

Ben Morrow

[quoting fixed. don't top-post]

Thanks for your reply. I am a beginner in Perl and I don't get the
callback mechanism you had refered to. With the number of hashes we
can find how many bytes had been transfered but how do we calculate
the time period ?.. Is there any start timer / stop timer method
avaiable in Perl ?.

Use time() or Time::HiRes.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top