[SOLVED] MLDonkey peak time rate limiting

If none of the more specific forums is the right place to ask

[SOLVED] MLDonkey peak time rate limiting

Postby plifalo » 2006-05-08 08:18

Hi all

I'm looking to limit the upload and download rates of my mldonkey-server installation at the peak times defined by my ISP (4pm to midnight). I'd like to limit it to 12KB/s down/6KB/s up at these times, and 64KB/s down/32KB/s up at all other times.

I could write a script which stopped the server, modified its config file then started the server again, and run this from cron, but that would mean that all the downloads would be stopped twice a day and lose their place on any queues. Is there a way to do this while keeping the server running?

Thanks!
Last edited by plifalo on 2006-05-17 09:16, edited 1 time in total.
plifalo
 
Posts: 126
Joined: 2006-01-27 18:09
Location: Cambridge, UK

Postby plifalo » 2006-05-17 09:16

Well this one's solved, with a little thought. It wasn't too hard really. This is a small script which uses the mldonkey telnet interface to change the speeds. Just adjust the script to your needs (fill in the bits in <angle brackets>) and set it as a cron job at whatever peak times your ISP defines.

Code: Select all
#!/bin/bash
# Set MLDonkey transfer rates

ULRATE=<your-upload-rate>
DLRATE=<your-download-rate>

(sleep 0.5 ; echo "auth <username> <password>" ; \
    sleep 0.5 ; echo "set max_hard_upload_rate $ULRATE" ; \
    sleep 0.5 ; echo "set max_hard_download_rate $DLRATE" ; \
    sleep 0.5; echo "q") \
    | telnet localhost 4000
plifalo
 
Posts: 126
Joined: 2006-01-27 18:09
Location: Cambridge, UK


Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable