Rate limit sftp upload

Forum for questions and support relating to the 1.26.x releases only.
Locked
trumee
Posts: 69
Joined: Tue Mar 08, 2011 3:33 pm

Rate limit sftp upload

Post by trumee »

Hi,

I have limited upload bandwidth and so wanted to limit the upload bandwidth. I modifed line 810 in zmfilter.pl
from

Code: Select all

$sftpOptions{more} = [ '-o'=>'StrictHostKeyChecking=no' ];
to

Code: Select all

$sftpOptions{more} = [ '-o'=>'StrictHostKeyChecking=no', '-l'=>'40' ];
The -l 40 option to sftp will rate limit to 40 kbps.

Unfortunately, i get an error that connection to the server cannot be made. Anybody understand why this is happening?

The documentation at http://search.cpan.org/~salva/Net-SFTP- ... Foreign.pm mentions "Note that this option expects a single command argument or a reference to an array of arguments".
trumee
Posts: 69
Joined: Tue Mar 08, 2011 3:33 pm

Re: Rate limit sftp upload

Post by trumee »

Looks like this cannot be done. This is the response i got from the author of the per module
Limiting the bandwidth usage is a feature of the 'sftp' binary but Net::SFTP::Foreign runs 'ssh', not 'sftp'.

It is not currently possible to limit the sftp bandwidth when using Net::SFTP::Foreign.
Locked