how do i enable a transfer cap?

Discussion of Transmission that doesn't fit in the other categories
Post Reply
JohnQPublic
Posts: 6
Joined: Mon May 31, 2010 2:54 am

how do i enable a transfer cap?

Post by JohnQPublic »

Hello,

I have been running transmission-daemon on Ubuntu 10.04 LTS, transmission's version is 1.92 (10363), for about 2 months now. It has mostly worked well, after the initial nightmare of getting it all set up. However there is one option i can not figure out how to set up. Before transmission, i was using utorrent on windows and it has a setting to limit total bandwidth usage over a specific period of time (ie 31 days). This is important to me because my isp has impossed a monthly limit of 250GB and almost all of my bandwidth usage comes from torrent activity.

Could some one please suggest how i can set transmission to not exceed a specified bandwidth usage per 30 days. Thanks!

JQP
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: how do i enable a transfer cap?

Post by Jordan »

Transmission doesn't have absolute transfer caps in the form you're asking for.

What you could do is set a speed limit to a value s.t. transferring at that speed for a month came out to the desired bandwidth cap... but that's an imperfect solution that assumes you'll be transferring at a consistent speed for an entire month.
JohnQPublic
Posts: 6
Joined: Mon May 31, 2010 2:54 am

Re: how do i enable a transfer cap?

Post by JohnQPublic »

Well that's too bad. It is a nice feature of utorrent.

Does anyone know of an alternate method of keeping track of bandwidth usage and blocking transmission-daemon once it reaches the max allowed? I see from the statistics page in transmission-remote.net that the daemon does keep a usage log. And i could envission the code to enable a transfer cap as something simple like:

settings.json:

Code: Select all

'transfer-cap': 200
'per-period-of': 30
extra code for the daemon:

Code: Select all


def transfer_cap(transfer-cap, per-period-of):
    global maxUp, maxDown
    periodBandwidth = usageFromLog(per-period-of)
    if periodBandwidth >= transfer-cap
        maxUp = 0.1
        maxDown = 0.1


Not quite sure how to get the usage out of the log over a set interval but someone who knows the source might. And from there it's just a simple matter of calling this new function say once an hour or so.

Anyone think this might work?
JohnQPublic
Posts: 6
Joined: Mon May 31, 2010 2:54 am

Re: how do i enable a transfer cap?

Post by JohnQPublic »

i have started a thread in the gtk+ feature req forum, please see viewtopic.php?f=7&t=10136
Post Reply