As a followup question to this one:

I am using the --limit-rate parameter to limit the download speed on computers whose internet is being used:

curl --limit-rate 10k -r 104857601-209715200 -o distro2.iso 'http://files.cdn/distro.iso'

I want to periodically monitor the network usage of each computer, and dynamically decrease the --limit-rate once the internet is being used by the user and increase it as the internet usage becomes idle. For now, the only solution that comes to my mind is to restart curl with updated --limit-rate and -r parameter values. Is there any better way to achieve this?


No, because curl is not interactive. But both wget and curl have "continue" switches. So you can restart them from the point where you left with new limit rate settings. The following should continue from the point you left.

curl -C

wget has the similar switch

wget -c

It's also possible to limit the traffic rate using the tc and netem tools but this will limit the rate for the network interface of the computer. More info is here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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