More detailed statistics

Feature requests not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
deadeyes
Posts: 20
Joined: Wed Jun 16, 2010 7:02 am

More detailed statistics

Post by deadeyes »

Hi all,

I am working on a project were Transmission is used as a backend and the frontend makes it possible to have different users.
The project uses rpc to interact with Transmission.

However it would be nice if I could count what each torrent has done today and the day before.
From that basic information it would be possible to put this data into a database and make graphs/stats of what each user has been up/downloading the last month/30 days/today/yesterday/... (whatever you can think of)

Of course if more stats than today and the day before would be available that would be even better :)

Any idea if this might be in a future release?

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

Re: More detailed statistics

Post by Jordan »

Hi deadeyes,

For the branded releases it probably doesn't make sense to add a database dependency to Transmission over something small like statistics. For example, Transmission is shipped on a lot of Linux live CDs so increasing our on-disk footprint is a risky game.

My first thought is that you might want to add the database hooks into your RPC client, have it periodically get statistics for each torrent and for the session, and write them to the database.

If that doesn't work, maybe you could get a copy of the source code, either from svn for from wereHamser's github repository, and add the hooks you need.
deadeyes
Posts: 20
Joined: Wed Jun 16, 2010 7:02 am

Re: More detailed statistics

Post by deadeyes »

Jordan wrote:Hi deadeyes,

For the branded releases it probably doesn't make sense to add a database dependency to Transmission over something small like statistics. For example, Transmission is shipped on a lot of Linux live CDs so increasing our on-disk footprint is a risky game.

My first thought is that you might want to add the database hooks into your RPC client, have it periodically get statistics for each torrent and for the session, and write them to the database.

If that doesn't work, maybe you could get a copy of the source code, either from svn for from wereHamser's github repository, and add the hooks you need.
I might have written this wrong.
I am not asking for pulling in a database dependency :)
I am just wondering if I could get more stats to make it more easy to populate my database and query data from the webinterface :) Like a stat that says what the down/up was for the previous day and what was up/downloaded today. The session stats have no specific time frames(like 1 day), and if between polling the transmission-daemon gets restarted that would make me loose the old data and the figures incorrect.
With the stat by day I would be able to show that user what his traffic for today is, and with the traffic from last day I would been able to populate my database with correct data (even if transmission-daemon gets restarted). From my database I then could generate statistics for last month ,...

Also I would like to fix this without a cron job.

And I also want to mention it is also our goal to be a lightweight project. That is why I am focusing on Transmission-daemon as a back-end.

OT: you guys did some great work creating Transmission! Keep up the good work!
deadeyes
Posts: 20
Joined: Wed Jun 16, 2010 7:02 am

Re: More detailed statistics

Post by deadeyes »

No response anymore on this? :s :(
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: More detailed statistics

Post by blacke4dawn »

Regardless of how You store the data Transmission would have to add a database dependency of some sort to be able to serve those figures, since being able to serve those figures it needs to store them somewhere.
deadeyes
Posts: 20
Joined: Wed Jun 16, 2010 7:02 am

Re: More detailed statistics

Post by deadeyes »

blacke4dawn wrote:Regardless of how You store the data Transmission would have to add a database dependency of some sort to be able to serve those figures, since being able to serve those figures it needs to store them somewhere.
So we have a database now to serve the figures like uploaded,..?
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: More detailed statistics

Post by blacke4dawn »

The difference is that right now it's very simplistic and can be stored in simple txt files (like torrent info) and it effectively only has two data points, total all-time and last session. Heck, session doesn't even need to be stored on disc, it's enough if it's stored only in memory which means the all-time total can be stored in the config file or something equal. Same thing with individual torrent data, it's one single data point. Point is that that doesn't need any form of database connection.

For it to be able to serve last hour, last day, last week and so on even if they are on different sessions then it needs to store a data point for every minimum time frame it can serve (probably much smaller if you want <time frame> from now and not only on data point boundaries). That is if the minimum time frame is 5 mins then it needs to store a data point every 5 mins, so already after one hour we have 12 data points, after one day we have 288 data points and so on and so on. To get any form structure and easy readability on this data you need to store it as some form of database, even if it's just a "simple" round robin database (rrdtool).

I hope this got my point across.
gnjepar
Posts: 3
Joined: Sat Nov 24, 2012 12:09 pm

Re: More detailed statistics

Post by gnjepar »

I'm no expert but can't you query the deamon every 5 minutes (or any other amount of time) using RPC and make your own statistics. Use the time between "data calls" and some of commands from the link below to calculate whatever you need.
https://trac.transmissionbt.com/browser ... c-spec.txt

There are project that might lighten your load.
https://github.com/tomster/py-transmiss ... aster/test
http://code.google.com/p/php-transmission-class/

EDIT: Sorry about posting in such an old thread but it was very interesting topic and I havent noticed the post times. :oops:
m1dnight
Posts: 7
Joined: Wed Nov 20, 2013 12:40 am

Re: More detailed statistics

Post by m1dnight »

I know it's an old thread, but it's the highest hit in Google.

I was wanting some features like this as well, so I implemented the basics using Java. It's far from finished and it appears that Transmission is not really handling all the requests very well. I haven't had time to continue development due to school but I might continue in the future.

https://bitbucket.org/m1dnight/transmission-statistics
Post Reply