Hi everyone, ¿Is there any way to get rtorrent to exit automatically when all the torrents are finished or had been deleted?
Printable View
Hi everyone, ¿Is there any way to get rtorrent to exit automatically when all the torrents are finished or had been deleted?
Hi guys,
I got rtorrent running, and I like it alot. The possibilities automatization are great. However, I still got an error when downloading for some time. I got the message: file chunk read error: cannot allocate memory. I tried to figure out what was going on, and noticed an option called max_memory_usage (see http://libtorrent.rakshasa.no/wiki/R...formanceTuning). I have tried using several values (at the moment 105306368), but still the error message pops up all the time. How did you solve this issue?
Thanks for thinking with me,
Ecori
Hello, could anybody post an upgraded/updated howto of installing the rtorrent?
I've tried countless times to make this work but I could not see the process in the ps axf.
I tried manually running rtorrent and I get that .rc file could not be found.
Here's my ipkg list_installed
and my ps axf for referenceCode:adduser - 1.10.3-1 - a multi-call binary for login and user account administration
coreutils - 6.12-2 - Bunch of heavyweight *nix core utilities
cron - 4.1-7 - Standard vixie cron, with cron.d addition
diffutils - 2.8.1-6 - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files
dtach - 0.8-1 - A program that emulates the detach feature of screen.
e2fslibs - 1.41.1-1 - Ext2 Filesystem Libraries
e2fsprogs - 1.41.1-1 - Ext2 Filesystem Utilities
expat - 2.0.1-1 - XML Parser library
findutils - 4.2.32-1 - File finding utilities
fontconfig - 2.5.0-0 - Font configuration library
freetype - 2.3.6-1 - Free truetype library
gconv-modules - 2.2.5-7 - Provides gconv modules missing from the firmware. These are used by glibc iconv() implementation.
glib - 2.12.13-1 - The GLib library of C routines.
groff - 1.19.2-2 - front-end for the groff document formatting system
hdparm - 8.9-1 - Linux hard drive parameter utility
ipkg-opt - 0.99.163-10 - The Itsy Package Manager
less - 418-1 - Less file browser
libcurl - 7.19.0-2 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
libgd - 2.0.35-2 - An ANSI C library for the dynamic creation of images
libjpeg - 6b-2 - collection of jpeg tools
libpng - 1.2.32-1 - Portable Network Graphics Libraries
libsigc++ - 2.0.18-1 - libsigc++ implements a typesafe callback system for standard C++.
libtorrent - 0.12.3-1 - libtorrent is a BitTorrent library with a focus on high performance and good code.
libuclibc++ - 0.2.2-8 - C++ standard library designed for use in embedded systems
libxml2 - 2.7.1-1 - Libxml2 is the XML C parser and toolkit developed for the Gnome project.
man - 1.6f-1 - unix manual page reader
man-pages - 2.76-1 - unix manual pages
mc - 4.6.1-3 - Midnight Commander File Manager
nano - 2.1.5-1 - A pico like editor
ncurses - 5.6-3 - NCurses libraries
ncursesw - 5.6-2 - NCurses libraries with wide char support.
openssl - 0.9.7m-4 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
pcre - 7.8-1 - Perl-compatible regular expression library
popt - 1.14-1 - A C library for parsing command line parameters.
procps - 3.2.7-6 - PROCPS System Utilities
readline - 5.2-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
rtorrent - 0.8.3-1 - rtorrent is a BitTorrent client for ncurses, using the libtorrent library.
screen - 4.0.3-2 - A screen manager that supports multiple logins on single terminal
slang - 2.1.4-1 - S-Lang is a multi-platform library designed to allow a developer to create robust multi-platform software.
termcap - 1.3.1-2 - Terminal emulation library
uclibc-opt - 0.9.28-13 - micro C library for embedded Linux systems
unzip - 5.52-3 - A (de)compression library for the ZIP format
xmlrpc-c - 1.11.00-3 - A library providing modular implementation of XML-RPC for C and C++.
zlib - 1.2.3-3 - zlib is a library implementing the 'deflate' compression system.
As you can see, there is no sign of rtorrent.Code:PID TTY STAT TIME COMMAND
1 ? S 0:01 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
57 ? S 0:00 telnetd
506 pts/0 Ss 0:00 \_ -sh
522 pts/0 R+ 0:00 \_ ps axf
62 ? S 0:00 httpd vlan1
68 ? S 0:00 klogd
73 ? S 0:00 [dnsmasq]
75 ? S 0:00 [khubd]
85 ? Ss 0:00 lpd
87 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
90 ? Ss 0:00 waveservermain
92 ? Ss 0:00 rcamdmain
96 ? S 0:00 [usb-storage-0]
97 ? S 0:00 [scsi_eh_0]
113 ? S 0:00 udhcpc -i vlan1 -p /var/run/udhcpc0.pid -s /tmp/udhcp
114 ? Ss 0:00 pppd file /tmp/ppp/options.wan0
116 ? Ss 0:00 infosvr br0
117 ? Ss 0:00 watchdog
120 ? Ss 0:00 \_ ntp
127 ? S 0:00 dropbear
146 ? S 0:00 [kjournald]
147 ? S 0:00 [kjournald]
174 ? S 0:00 /sbin/syslogd -m 0 -O /opt/var/log/syslog.log -S -l 7
179 ? Ss 0:00 /opt/sbin/cron
213 ? S 0:00 upnp -D -L br0 -W ppp0
495 ? Ss 0:00 [screen]
499 pts/1 Ss+ 0:00 \_ /bin/sh
I'm using oleg's 1.9.2.7-10 firmware
Any help is much appreciated.
Hi,
rtorrent runs great on my asus. I had some memory problems initially, but with the latest release that seems to be fixed. I installed rtorrent as described at the beginning of this thread, however I did not use lighttpd. After installation of rtorrent (be sure also libTorrent is installed, but that is present on your list), I edited the startup script at only 2 positions:
then at the beginning make a change:Code:nano -w /opt/etc/init.d/S99rtorrent
(if you don't, you will get an error message)Code:dirlayout=RTORRENT_Custom
A littlebit further in the file you will find user=
(or other name, that you use to login onto your router)Code:user="admin"
Be sure it is executable:
These settings should take care for rtorrent to find its config file (located in /opt/etc/rtorrent.conf)Code:chmod +x /opt/etc/init.d/S99rtorrent
Next I edited rtorrent.conf using:
Code:nano -w /opt/etc/rtorrent.conf
And you should open up some ports in your firewall:Code:# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
scgi_port = 127.0.0.1:5000
# Minumum amount of peers to connect per torrent, if available.
min_peers = 20
# Minumum amount of peers to connect per torrent.
max_peers = 40
# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
#max_peers_seed = 20
# Maximum number of simultanious uploads per torrent.
max_uploads = 5
#max_uploads_global = 20
#max_downloads_global = 30
#max_open_http = 10
#max_open_sockets = 128
#max_open_files = 256
# Global download rate in KiB. "0" for unlimited.
download_rate = 800
# Global upload rate in KiB. "0" for unlimited.
upload_rate = 800
# Default directory to save downloaded files. Note it doesn't support
# space yet.
#directory = /opt/share/torrent/work/
directory = /tmp/mnt/disc0_3/torrent/work
# Watch a directory for new torrents, and stop those that have been deleted.
#schedule = watch_directory,5,5,load_start=/opt/share/torrent/dl/*.torrent
#schedule = untied_directory,5,5,stop_untied
schedule = watch_directory,5,5,load_start=/tmp/mnt/disc0_3/torrent/source/*.torrent
schedule = untied_directory,5,5,stop_untied=
schedule = untied_directory,5,5,close_untied=
schedule = untied_directory,5,5,remove_untied=
# Close torrents when diskspace is low.
on_finished = move_complete,"execute=mv,$d.get_base_path=,/tmp/mnt/disc0_3/torrent/target;d.set_directory=/tmp/mnt/disc0_3/torrent/target"
schedule = watch_directory,10,10,"load_start=/tmp/mnt/disc0_3/torrent/source/*.torrent,d.set_custom2=1"
on_finished = set_done_var,d.set_custom2=
on_erase = rm_files,"branch=d.get_custom2=,\"execute={rm,-rf,--,$d.get_base_path=}\""
schedule = low_diskspace,5,60,close_low_diskspace=10000M
# Default session directory. Make sure you don't run multiple instance of rtorrent using the same session directory. Perhaps
#using a relative path? session = /opt/share/torrent/session
session = /tmp/mnt/disc0_3/torrent/session
# The ip address reported to the tracker.
#ip = rakshasa
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = rakshasa
# Port range to use for listening.
port_range = 51777-51780
# Start opening ports at a random position within the port range.
#port_random = no
# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = no
# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes
# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa
#
# Do not modify the following parameters unless you know what you're doing.
#
# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
hash_read_ahead = 5
# Interval between attempts to check the hash, in milliseconds.
hash_interval = 10
# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
hash_max_tries = 3
safe_sync=yes
# Max number of files to keep open simultaniously.
#max_open_files = 128
# Number of sockets to simultaneously keep open.
#max_open_sockets = <no default>
# Example of scheduling commands: Switch between two ip's every 5
# seconds.
#schedule = "ip_tick1,5,10,ip=torretta"
#schedule = "ip_tick2,10,10,ip=lampedusa"
# Remove a scheduled event.
#schedule_remove = "ip_tick1"
# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,"stop_on_ratio=200,200M,2000"
#schedule = ratio,30,60,stop_on_ratio=200
schedule = ratio,60,60,"stop_on_ratio=110,50M,300"
# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
encryption = allow_incoming,enable_retry,prefer_plaintext
# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht = auto
# UDP port to use for DHT.
#
dht_port = 52000
# Enable peer exchange (for torrents not marked private)
#
peer_exchange = yes
#
# Do not modify the following parameters unless you know what you're doing.
#
add lines:Code:nano -w /usr/local/sbin/post-firewall
Now download ntorrent fromCode:# Allow access rtorrent
iptables -I INPUT 1 -p tcp -i "$1" --syn --dport 51777:51780 -j ACCEPT
iptables -I INPUT 1 -p udp -i "$1" --dport 52000 -j ACCEPT
http://code.google.com/p/ntorrent/
install somewhere on your pc,
connect to your rtorrentsession choosing SSH, give the host adress (ip of your router) and login data. The great thing about ntorrent is that you don't need to put additional crap on your router. I tried it with lighttpd and a website user interface (like webtorrent or so), but I think ntorrent is more reliable.
In my setup I have the impression it runs better than transmission, after a couple of days it still downloads at full speed:D, and in contrast of transmission, it remains responsive. Also, it starts automatically torrents found in the source directory, after finishing the torrents it starts seeding until a certain ratio is achieved (in my case set to 1.1). There are even more options which you can find here:
I hope this is helpful for you,
good luck,
Ecori
ecori...
You are my savior!!! Your howto worked!! I'm downloading at full speed now!
Thank you very much!!
You're welcome, nice to hear that it works for you too. I tried rtorrent while also transmission was installed. It appeared to me, that rtorrent was running better. So, also for others who would like to try, just give it a shot!
Tried transmission. The fastest speed I got was 2 kbps. LOL.
This procedure by ecori would also load rtorrent on startup. no need to type the console command every time you restart :D
Hello.
I installed rtorrent and did all configuration, but i still can't download. Every time I start torrent downloading I get "Closed torrents due to low disk space" error, but my disk is empty?
Any suggestion?
Thanks.
Hi Spigot,
I don't recognize your error, however I can imagine that this would happen if rtorrent thinks that there would not be enough free space on your harddrive. Perhaps you could try to change inactivate the rule:
schedule = low_diskspace,5,60,close_low_diskspace=10000M
by adding a # in front of the line, ie.
Code:# schedule = low_diskspace,5,60,close_low_diskspace=10000M
Hi ecori,
thank you for your help.
That was first thing I did, but without any change. Torrent starts and then stops with this message.
Fat32 format of the harddisk?
Try small torrents....
No, ext3. I'll try and let you know.
Hi.
I figured out strange thing. When I start download, rtorrent says "Closed torrents due to low disk space error" as before. But after a while it finishes download, but the message stays (I know it because the downloaded file transfers from "work" directory to "target" directory and the file works).
But rtorrent shows only the message without downloading progress????
Edit: I tried nTorrent an it works :)) I'm very happy. But I still don't understand the rtorrent's behaviour?
Hi.
Another problem. I'm unable to get full download speed. I have about 20Kb/s per torrent and see max 15 seeders (trackers show 10223 seeders and more). I did all firewall configuration but without any success.
And DHT shows nothing: 0 Seeders 0 Leechers, Last time: null.
My rtorrent.conf:
Any help?Code:#This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
scgi_port = 127.0.0.1:5000
# Minumum amount of peers to connect per torrent, if available.
min_peers = 20
# Minumum amount of peers to connect per torrent.
max_peers = 40
# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
#max_peers_seed = 20
# Maximum number of simultanious uploads per torrent.
max_uploads = 5
#max_uploads_global = 10
#max_downloads_global = 30
#max_open_http = 10
#max_open_sockets = 128
#max_open_files = 256
# Global download rate in KiB. "0" for unlimited.
download_rate = 0
# Global upload rate in KiB. "0" for unlimited.
upload_rate = 12
# Default directory to save downloaded files. Note it doesn't support
# space yet.
#directory = /opt/share/torrent/work/
directory = /tmp/mnt/disc0_3/torrent/work
# Watch a directory for new torrents, and stop those that have been deleted.
#schedule = watch_directory,5,5,load_start=/opt/share/torrent/dl/*.torrent
#schedule = untied_directory,5,5,stop_untied
schedule = watch_directory,5,5,load_start=/tmp/mnt/disc0_3/torrent/source/*.torrent
schedule = untied_directory,5,5,stop_untied=
schedule = untied_directory,5,5,close_untied=
schedule = untied_directory,5,5,remove_untied=
# Close torrents when diskspace is low.
on_finished = move_complete,"execute=mv,$d.get_base_path=,/tmp/mnt/disc0_3/torrent/target;d.set_directory=/tmp/mnt/disc0_3/torrent/target"
schedule = watch_directory,10,10,"load_start=/tmp/mnt/disc0_3/torrent/source/*.torrent,d.set_custom2=1"
on_finished = set_done_var,d.set_custom2=
on_erase = rm_files,"branch=d.get_custom2=,\"execute={rm,-rf,--,$d.get_base_path=}\""
#schedule = low_diskspace,5,60,close_low_diskspace=1M
# Default session directory. Make sure you don't run multiple instance of rtorrent using the same session directory. Perhaps
#using a relative path? session = /opt/share/torrent/session
session = /tmp/mnt/disc0_3/torrent/session
# The ip address reported to the tracker.
#ip = rakshasa
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = rakshasa
# Port range to use for listening.
port_range = 51777-51780
# Start opening ports at a random position within the port range.
#port_random = no
# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = no
# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes
# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa
#
# Do not modify the following parameters unless you know what you're doing.
#
# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
hash_read_ahead = 5
# Interval between attempts to check the hash, in milliseconds.
hash_interval = 10
# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
hash_max_tries = 3
safe_sync=yes
# Max number of files to keep open simultaniously.
#max_open_files = 128
# Number of sockets to simultaneously keep open.
#max_open_sockets = <no default>
# Example of scheduling commands: Switch between two ip's every 5
# seconds.
#schedule = "ip_tick1,5,10,ip=torretta"
#schedule = "ip_tick2,10,10,ip=lampedusa"
# Remove a scheduled event.
#schedule_remove = "ip_tick1"
# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,"stop_on_ratio=200,200M,2000"
#schedule = ratio,30,60,stop_on_ratio=200
schedule = ratio,60,60,"stop_on_ratio=110,50M,300"
# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
encryption = allow_incoming,enable_retry,prefer_plaintext
# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht = on
# UDP port to use for DHT.
#
dht_port = 6881
# Enable peer exchange (for torrents not marked private)
#
peer_exchange = yes
#
# Do not modify the following parameters unless you know what you're doing.
#
It's working but often i have this problem
http://wl500g.info/showthread.php?p=116096#post116096
please help!!
i found something in russian but i don't understand anything could somebody translate it ??
http://wl500g.info/showthread.php?t=14256
Finally got rtorrent working! It seems lighter than transmission.
Still, I'm having two problems - dunno if are related or not.
First I cant get more than 404 error with /RPC2 webserver (http://192.168.0.2:8082/RPC2, I have headstartII 'installed' for simplicity)
But the most annoying it that I can't get rtorrent runing on the background.
I have to manually start rtorrent and if I quit or close the SSH session (putty) it stops torrenting (seeding/downloadin). shouldn't it start auto on system reboot/restart?
I haven't figure it out why... please, help!
Edit: forgot to mention that ntorrent doesn't connect unless rtorrent is started manually and (ssh) open.
hello
rtorrent & ntorrent are now working fine, but have one question:
is there an easy way to quickly change my global download and upload rate?
i've limited the rate in my rtorrent.conf file. suppose I go somewhere for an hour or so and want to set my rate at full speed at meantime. what would be the easyest way to do it without manually editing rtorrent.conf file?
You can do it on the terminal when you are connected via ssh.
Just use the commands listet here under "Throtteling".
Hope that helps.
he he, I know, how to connect via ssh, but how do i enter then rtorrent?
screen -r rtorrent does it for me
if i put
in my /opt/etc/rtorrent.conf file, the rtorrent doens't start. what's wrong?Code:schedule = Test,12:05:00,24:00:00,download_rate = 25
I just followed the instructions according to http://libtorrent.rakshasa.no/wiki/R...ngdownloadrate,
so the command should look something like
Notice that seeding rules have changed in the latest version of rtorrent. I now use:Code:schedule = throttle_1,12:05:00,24:00:00,download_rate=25
schedule = throttle_2,24:00:00,12:05:00,download_rate=0
Regards,Code:# Enable the default ratio group.
ratio.enable=
# Change the limits, the defaults should be sufficient.
ratio.min.set=100
ratio.max.set=110
ratio.upload.set=20M
Ecori