Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Specifically, I am looking to rate-limit an scp or sftp session (or other arbitrary network call) in the call itself.

For example, let's say I want to copy 100MB to one server, and 1GB to another. I'd like to be able to run both of these at the same time, but maintain a QoS for "normal" computer usage - somewhat similar to how you can rate-limit bittorrent.

Is there a way to do this without touching the networking hardware?

I'm envisioning something akin to:

magic-qos-tool 'scp file user@host:/path/to/file'

Or..

scp -rate 40kbps file user@host:/path/to/file
share|improve this question
add comment

3 Answers

up vote 9 down vote accepted

Yes, there's an application that works exactly like your 'magic-qos-tool', called "trickle".

EXAMPLES
     trickle -u 10 -d 20 ncftp

     Launch ncftp(1) limiting its upload capacity to 10 KB/s, and download ca-
     pacity at 20 KB/s.
share|improve this answer
1  
thanks, @davr - one wrapper tool vs learning all the options to each is a great improvement :) –  warren Apr 8 '10 at 14:51
add comment

Rsync makes this easy on you, it has an option to do this: --bwlimit=KBPS

share|improve this answer
add comment

scp has -l, and rsync has --bwlimit.

share|improve this answer
    
that was not an option in the man page I checked earlier... looks like it depends on the platform, perhaps? –  warren Apr 2 '10 at 20:52
    
Quite possibly. I have OpenSSH 5.3p1 here. –  Ignacio Vazquez-Abrams Apr 2 '10 at 20:55
    
XenServer 6 has scp with -l option –  Brian Boatright May 28 '12 at 21:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.