You are not logged in.

#1 2010-02-12 18:39:52

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

[solved]Control rtorrent with scripts?

I got a seed box, and have it throttled so that people can use the internet while it's working. But is it possible to control it through scripts, so that crontab can toggle it from throttled/unthrottled at night, when nobody uses the internet. One could maybe kill rtorrent and start it again with another configuration file, although that would be highly impractical!

Last edited by hatten (2010-02-13 12:06:08)

Offline

#2 2010-02-12 18:46:39

AlexS
Member
From: Munich, Germany
Registered: 2009-05-16
Posts: 114

Re: [solved]Control rtorrent with scripts?

You can schedule download rates:

Scheduling download rate

schedule = throttle_1,01:00:00,24:00:00,download_rate=0
schedule = throttle_2,05:00:00,24:00:00,download_rate=25

Every day "throttle_1" gets triggered at 01:00 and sets the download rate to unlimited, while "throttle_2" sets it to 25kb at 05:00. Using this the client may be made to perform a somewhat crude form of bandwidth scheduling.

Offline

#3 2010-02-12 19:07:01

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: [solved]Control rtorrent with scripts?

rTorrent also has an XML-RPC interface, so you might want to look into that.

Offline

#4 2010-02-12 20:00:52

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: [solved]Control rtorrent with scripts?

@AlexS; perfect. Thanks a lot.
@Barrucadu; Too complicated =p

Offline

#5 2010-02-12 20:36:30

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: [solved]Control rtorrent with scripts?

Personally I find a set of PHP scripts + cron a *lot* more understandable than the cryptic `schedule` syntax tongue

Offline

#6 2010-02-12 21:51:59

Gusar
Member
Registered: 2009-08-25
Posts: 3,606

Re: [solved]Control rtorrent with scripts?

Barrucadu wrote:

Personally I find a set of PHP scripts + cron a *lot* more understandable than the cryptic `schedule` syntax tongue

LOL

But it's not cryptic at all actually, it's very simple:
The first parameter is an identifier. It can be anything you want, it just needs to be unique.
The second parameter is when to start the command. It can be a relative time (like five 5 seconds after launching rtorrent), or an absolute time, like in the given example.
The third parameter is the interval at which to run the command. In the given example, every 24 hours.
The fourth parameter is the command itself. In the given example, setting the download rate.

Offline

Board footer

Powered by FluxBB