mimtek / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

feature request, or modification help: Disk quota #195

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to have support for "quota" added to my rutorrent, i'm not
exactly sure which section to look, so i thought i'd post this.

Basically, i'd like to replace the current "free space" reading on the
general page with part of the output of the "quota" command 

if i were to run "quota" as a user, it would show something like this:

[rpuser10@ks352818 /home/rpuser10]% quota
Disk quotas for user rpuser10 (uid 1003): 
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
          /home      32       0 78643200              16       0       0  

that probably didn't come out perfectly on this form, but basically, it the
quota for this user is 75G and almost all it is free.

so my question is, where does rutorrent pull "disk space" from? does it use
df?  is this pulled from rtorrent itself?  (i've also asked rtorrent to
support quota, so perhaps they will add it in, i'm not holding my breath)

even if it's a hackish method i'd like to SOMEHOW add this support in
because i currently have 4 users and i use disk quotas to split up the space.

Original issue reported on code.google.com by Wonslung@gmail.com on 5 Dec 2009 at 10:00

GoogleCodeExporter commented 9 years ago

Original comment by Wonslung@gmail.com on 5 Dec 2009 at 10:01

GoogleCodeExporter commented 9 years ago
This information can't be obtained directly from rtorrent. Web-server, in common
case, can't access to this information.

Original comment by novik65 on 6 Dec 2009 at 6:20

GoogleCodeExporter commented 9 years ago
ok.  I guess i'll write my own script to handle it then.

Original comment by Wonslung@gmail.com on 6 Dec 2009 at 9:32

GoogleCodeExporter commented 9 years ago
i know the web server can't do this, but just curious, if i created a crontab 
script
to write this data to a log file every couple minutes, what part of your code 
do i
need to look for in order to inject the new number?  

I've figured out how to get this info on a per user basis using a command like 
this:

quota | tail -1 | awk '{print $4 - $2}'

which shows the amount of FREE space in bytes

and i can also use this to get the percentage of used diskspace

quota | tail -1 | awk '{print ($2*100)/$4}'

first of all, i'm going to write a script which will kill rtorrent with -s INT 
if the
quota is almost full, and i also have a script i call "chkrtorrent" which 
checks if
rtorrent is running, if not, it checks the space, if it's not full, it starts
rtorrent, if it is, it doesn't.

I figure with these scripts i can manage starting/stopping rtorrent using quota 
but
i'd really like to change the "free space" to show the free quota space.

I figure with my logging script i can make it readable by the webuser and i 
should be
able to inject it...i just don't know how

Original comment by Wonslung@gmail.com on 6 Dec 2009 at 11:49

GoogleCodeExporter commented 9 years ago
I am also interested in a proper quota plugin that can show each rutorrent user 
the correct amount of free space.

Original comment by dent...@gmail.com on 12 Aug 2013 at 3:18

GoogleCodeExporter commented 9 years ago
http://forums.rutorrent.org/index.php?topic=1647.0
point 6.
$30 to the donation link
Your login at the redmine.rutorrent.org th the my mail (novik65[at]gmail.com)

Original comment by novik65 on 13 Aug 2013 at 7:50

GoogleCodeExporter commented 9 years ago
Thank you for your reply novik.
Will I be able to use the plugin on multiple installs if I donate? I have 
several servers.

Original comment by dent...@gmail.com on 13 Aug 2013 at 7:52

GoogleCodeExporter commented 9 years ago
Yes, you will be able to use it on several servers (*your* servers, of course).

Original comment by novik65 on 13 Aug 2013 at 12:44

GoogleCodeExporter commented 9 years ago
Thank you for the information!

Original comment by dent...@gmail.com on 13 Aug 2013 at 2:52