PDA

View Full Version : Net::FTP or LWP question


Aradon
07-01-2005, 08:26 PM
Hey everyone,

I'm presently working on an FTP script of some type but what I want to do isn't your usualy ftp stuff.

I want to know how fast a file was FTP'd to a certain server. For example if I do a put command with Net::FTP is there a way to see how many kb/s is either occuring or the avg that occured?

If not is there a way to do this through lwp?

Another option is of course having a seperate thread watch the upstream and downstream of the client but I"m unsure of how to go about that, or at least where to start.

A starting point would be fine, as google has apparently failed me :(

Thanks in advance ^_^

rwedge
07-02-2005, 11:11 PM
Is this something ping might be good for? I am not aware of anything in Net::FTP or LWP that would measure server performance.

You could time the transfer of a measured amount of data to get an average. Host, client, connection speeds and points in between would effect the results.

Aradon
07-03-2005, 06:59 PM
So as in listening on a port in a seperate thread with the amount of upload and download going on would not be possible in either of these?

If this is true does anyone know of a way to do it in perl. If not perl then any language? (except assembly please :P )

Aradon
07-08-2005, 04:26 PM
well I thought I'd just update any of you still trying to figure this out.

I've given up on doing it in perl. Honestly it's not my first language and there didn't seem to be an easy way to do it without writing my own modules that worked sort of like LWP..which would be a task onto itself.

Instead I decided to move to Java. And I know what you're thinking "Not Java!" But that is the first language I learned and the one I know the most about..

So I guess it was a natrual progression. What's funny is I"m still using perl with my java, so I guess it kind of works out..even if the perl is just doing simple telnetting :)