rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.08k stars 408 forks source link

[ question ] Is there a command such as close_low_diskspace= #727

Open refriedfood opened 6 years ago

refriedfood commented 6 years ago

That doesn't close the client but rather will stop starting newly added torrents? I find that closing the client causes a ratio issue and was wondering if there was a command to simply pause all new torrent until more space is allocated for better file management.

Thank you.

kannibalox commented 6 years ago

http://pyrocore.readthedocs.io/en/latest/custom.html#only-start-items-that-you-have-disk-space-for

chros73 commented 6 years ago

That doesn't close the client but rather will stop starting newly added torrents?

That's correct and probably not just the new ones. But there's a bug in 0.9.6/0.13.6 that affects this behaviour. Which version do you use? You need proper queue management (e.g. with pyrocore) or do what @kannibalox suggested.

refriedfood commented 6 years ago

@ chros73 What's correct?

I'm using 0.9.6/0.13.6 on ubuntu 17.10

chros73 commented 6 years ago

I meant that your statement is correct, meaning you're right :) : it doesn't close the client but rather will stop downloads.

refriedfood commented 6 years ago

@chros73 The command: schedule = low_diskspace,5,60,close_low_diskspace=10240M Will stop all downloads or just new downloads and keep the others active?

I really just want to be able to have any new downloads in the watch folder paused once I'm almost out of drive space (10GB) but not have any of the others stop, or the client close. I'm afraid I didn't quite understand the pyrocore link.

chros73 commented 6 years ago

Will stop all downloads or just new downloads and keep the others active?

I don't remember, but the problem is that this functionality is kind of broken in 0.9.6 due to this bug. The result is that rtorrent could be crashed, since your command (the check itself) is only triggered in every 1 minute (60 secs).

DRIVASS commented 6 years ago

schedule = low_diskspace,5,1,close_low_diskspace=60G

Works for me. Triggers every 1 second.

pyroscope commented 6 years ago

Use this…

https://github.com/pyroscope/pyrocore/blob/bf148e241c9d7fe13e971a792a40bac588122161/src/pyrocore/data/config/rtorrent.d/00-default.rc#L19-L23

and add an additional disk space check in d.watch.start.

Or try what happens if you do a conditional d.stop in an inserted_new handler, for any item (not just watchdir ones).

pyroscope commented 6 years ago

I'm afraid I didn't quite understand the pyrocore link.

It starts items only if space is there, or if space is "suddenly" free. Difference is your requirement needs manual intervention (start the stopped items after you made space), my solution works with cronned disk space cleaning (space will ‘suddenly appear’).