[Ssh-sftp-perl-users] sftp tranfer speed very slow
Brought to you by:
dbrobins
From: Umesh B. <u.b...@gm...> - 2007-09-17 07:48:34
|
Hi My sftp script is transfering files at a very slow speed. Normal sftp transfer speeds from the server are around 10 Mb/s. Transfers using the script are around 500 Kb/s. Is this normal? Is there anyway I can speed up the transfer rates? This the ssh portion of my script: use Net::SFTP; use Net::SSH::Perl; sub OpenSSH { my $user = "****"; my $a = "******"; my $Path = "./../../usr/local/logs/"; open (LOGFILE, ">$DataPath/$Month2Word/$Month2Word\_LogFile") || (warn "Can't open file $Month2Word\_LogFile\n"); print LOGFILE "Connecting to $Name ...\n"; close (LOGFILE); my $sftp = Net::SFTP->new($Name,user=>$user,password=>$a,debug=>0,ssh_args=>[port=>22]) || die "Can't connect $@\n"; #make our connection foreach ( $sftp->ls($Path) ) { my $Line = ""; $Line = $_->{filename}; if (($Line ne "\.") && ($Line ne "\.\.") && ($Line =~ m/[0-3][0-9]-$Month2Word-$Year2Work*/) && !($Line =~ m/summary/) ) { $sftp->get("$Path/$Line" , "$DataPath/$Month2Word\_$Type/$Line"); } } } Thanks in advance. |