Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want update my linux in one shell but by default wget or axel in updater use all the bandwidth.

How can I limit the speed in this shell?

I want other shells to have a fair share, and to limit everything in that shell – something like a proxy!

I use Zsh and Arch Linux.

share|improve this question
add comment

3 Answers

up vote 14 down vote accepted

Have a look at trickle a userspace bandwidth shaper. Just start your shell with trickle and specify the speed, e.g.:

trickle -d 100 zsh

which tries to limit the download speed to 100KB/s for all programs launched inside this shell.

As trickle uses LD_PRELOAD this won't work with static linked programs but this isn't a problem for most programs.

share|improve this answer
add comment

http://lartc.org/wondershaper/

It is in Ubuntu / Debian repositories, probably others too. It limits not just a single shell, but the whole machine. Never tried it myself though

share|improve this answer
add comment

The man page for wget provides the following information:

 --limit-rate=amount

Limit the download speed to amount bytes per second. Amount may be expressed in bytes, kilobytes with the k suffix, or megabytes with the m suffix. For example, --limit-rate=20k will limit the retrieval rate to 20KB/s. This is useful when, for whatever reason, you don't want Wget to consume the entire available bandwidth.

share|improve this answer
    
update question: i want all application limited, not only wget –  Efazati May 26 '12 at 11:15
    
@Efazati: Sorry I don't know how to set it in general. I use it only for wget and apt-get. –  Marco Daniel May 26 '12 at 11:24
    
don't wory man, just wating for answer ;) –  Efazati May 26 '12 at 11:25
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.