NSLU2-Linux
view · edit · print · history

HowTo.ConfigureRtorrentWithUnslung History

Hide minor edits - Show changes to markup

December 04, 2008, at 01:10 AM by kaputnikgo -- rtorstat info changed
Changed lines 33-34 from:

If all is well, then we now go to the python script that was mentioned above, rtorstat. This script will help you run the rtorrent client by providing you with the information lacking from the client at the command line. Go here for the instructions -

to:

If all is well, then we now go to the python script that was mentioned above, rtorstat. This script will help you run rtorrent by providing you with the information lacking from the command line client by displaying it on a webpage. Go here for the instructions -

Changed lines 37-38 from:

There are some NSLU specific intructions here http://www.nslu2-linux.org/wiki/HowTo/RtorrentLikeAPro that you should use for the bit about the bencode.py stuff. Other than that just follow the g-loaded webpage, noting that for my unslung NSLU the cronjob line gets added to the file at /etc/crontab and that I changed the location of the html file to be /home/httpd/html/rtorstat.html

to:
  • Note **

The default location for webpages on the NSLU is /home/httpd/html/ It isn't necessary to worry about the bencode.py instructions as the necessary code is now included in the latest version of rtorstat 0.4.1 and the author also makes the recommendation that rtorstat is run as a CGI script which is run only when you load the stats webpage, instead of the constant use of a cronjob that uses system resources unnecessarily. So its a simple matter of changing this line in the rtorstat.cgi file - session_dir = "/path/to/rtorrent/session/dir/" to reflect the appropriate location on your NSLU.

  • end note **
Added line 65:

Update - this fix does appear to work, though it should be noted that with my connection I never have any more than 6-7 files seeding at once.

November 01, 2008, at 12:58 PM by kaputnikgo -- upgrade libcurl to fix tracker error
Added lines 52-58:

NOTE - if you are using the latest version of rtorrent 0.8.3 with libtorrent 0.12.3 on unslung you might be noticing a Tracker: connection error that basically stalls all torrents from connecting to the tracker properly. This has been noted on the rtorrent website and the suggested fix is to upgrade libcurl to version 7.19.0-2 upwards. Kaputnikgo

September 19, 2008, at 11:35 AM by kazam --
Changed lines 46-51 from:

Setting up on 6-10beta following the instructions above yielded a non-functioning watch directory. I place torrent files there but they don't get automatically loaded. Manual load works fine. The .rtorrent.rc is being read as the correct session directory is filled with relevant data.

to:

Setting up on 6-10beta following the instructions above yielded a non-functioning watch directory. I place torrent files there but they don't get automatically loaded. Manual load works fine. The .rtorrent.rc is being read as the correct session directory is filled with relevant data. /kazam


Edit: OK, so difining the watch directory to be in the home directory of the rtorrent executing user fixes the problem even though I had r/w privilieges before. Aggregated ul/dl data still shows all zeros though but I guess that's known bug.

September 17, 2008, at 11:19 AM by kazam --
Added lines 43-46:

Setting up on 6-10beta following the instructions above yielded a non-functioning watch directory. I place torrent files there but they don't get automatically loaded. Manual load works fine. The .rtorrent.rc is being read as the correct session directory is filled with relevant data.

May 05, 2008, at 07:05 PM by Kud -- Removing wrong information
Deleted lines 42-77:

Kud note: Problem with autostart rtorrent on Unslung is lack of tr command. If you have a look into log in opt/var/log/rtorrentInit.log you can see: "cannot find rtorrent binary in PATH /opt/bin:....". How to solve problem? I did it quite easy - I edited opt/etc/init.d/S99rtorrent to stop procedure which checking rtorrent binary. Before that you have to be sure you can run rtorrent from command line - just after login type rtorrent and check if you can run it. If yes you going to: opt/etc/init.d/S99rtorrent and you need to find:

checkcnfg() {

        exists=0
        for i in `echo "$PATH" | tr ':' '\n'` ; do
                if [ -f $i/$NAME ] ; then
                        exists=1
                        break
                fi
        done
        if [ $exists -eq 0 ] ; then
                echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$log$
                exit 3
        fi

and I changed first exists=0 to exists=1 like here:

checkcnfg() {

        exists=1
        for i in `echo "$PATH" | tr ':' '\n'` ; do
                if [ -f $i/$NAME ] ; then
                        exists=1
                        break
                fi
        done
        if [ $exists -eq 0 ] ; then
                echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$log$
                exit 3
        fi

Now procedure is skipped and rtorrent should start without problem.

May 04, 2008, at 09:41 PM by Kud -- How to make rtorrent run on Unslung
Changed lines 42-78 from:

Janilxx note for 0.8.0-1: FYI: opt/etc/init.d/S99rtorrent does not start with just installed Unslung

to:

Janilxx note for 0.8.0-1: FYI: opt/etc/init.d/S99rtorrent does not start with just installed Unslung


Kud note: Problem with autostart rtorrent on Unslung is lack of tr command. If you have a look into log in opt/var/log/rtorrentInit.log you can see: "cannot find rtorrent binary in PATH /opt/bin:....". How to solve problem? I did it quite easy - I edited opt/etc/init.d/S99rtorrent to stop procedure which checking rtorrent binary. Before that you have to be sure you can run rtorrent from command line - just after login type rtorrent and check if you can run it. If yes you going to: opt/etc/init.d/S99rtorrent and you need to find:

checkcnfg() {

        exists=0
        for i in `echo "$PATH" | tr ':' '\n'` ; do
                if [ -f $i/$NAME ] ; then
                        exists=1
                        break
                fi
        done
        if [ $exists -eq 0 ] ; then
                echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$log$
                exit 3
        fi

and I changed first exists=0 to exists=1 like here:

checkcnfg() {

        exists=1
        for i in `echo "$PATH" | tr ':' '\n'` ; do
                if [ -f $i/$NAME ] ; then
                        exists=1
                        break
                fi
        done
        if [ $exists -eq 0 ] ; then
                echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$log$
                exit 3
        fi

Now procedure is skipped and rtorrent should start without problem.

March 25, 2008, at 06:55 PM by Janilxx -- version added to note
Changed line 42 from:

Janilxx: FYI: opt/etc/init.d/S99rtorrent does not start with just installed Unslung

to:

Janilxx note for 0.8.0-1: FYI: opt/etc/init.d/S99rtorrent does not start with just installed Unslung

March 18, 2008, at 07:37 PM by Janilxx -- opt/etc/init.d/S99rtorrent does not start
Changed lines 38-42 from:

Now with everything running correctly your client can be controlled via a terminal session and observed via a webpage, individual torrents can be prioritised with the + or - keys, global upload and download rates can be controlled via the (shift)a,s,d,z,x,c key combinations - check the manual. For private trackers the client gets reported as libtorrent.

to:

Now with everything running correctly your client can be controlled via a terminal session and observed via a webpage, individual torrents can be prioritised with the + or - keys, global upload and download rates can be controlled via the (shift)a,s,d,z,x,c key combinations - check the manual. For private trackers the client gets reported as libtorrent.


Janilxx: FYI: opt/etc/init.d/S99rtorrent does not start with just installed Unslung

March 17, 2008, at 02:37 PM by kaputnikgo -- update add 6.8 unslung version after testing
Changed lines 1-2 from:

These notes are for the installation and use of the rtorrent client on a standalone NSLU2 Unslung 6-10-beta within a windows network environment accessed via shell. The reasons being that rtorrent is a stable light-weight client that is still maintained regularly, offers good torrent control, suitable automated features and is not banned from (any/some?) private trackers - perfect for a low power device kept running for long periods of time.

to:

These notes are for the installation and use of the rtorrent client on a standalone NSLU2 Unslung 6-10-beta within a windows network environment accessed via shell. The reasons being that rtorrent is a stable light-weight client that is still maintained regularly, offers good torrent control, suitable automated features and is not banned from (any/some?) private trackers - perfect for a low power device kept running for long periods of time. (also applicable to the 6.8-beta unslung)

March 11, 2008, at 01:17 PM by kaputnikgo --
Changed lines 7-11 from:

rtorrent 0.8 libtorrent 0.12 screen python nano

to:

rtorrent 0.8 , libtorrent 0.12 , screen , python , nano ,

March 11, 2008, at 01:16 PM by kaputnikgo --
Deleted line 7:
Deleted line 8:
Deleted line 9:
Deleted line 10:
Deleted line 11:
March 11, 2008, at 01:16 PM by kaputnikgo --
Added line 8:
Added line 10:
Added line 12:
Added line 14:
Added line 16:
Added line 19:
March 11, 2008, at 01:15 PM by kaputnikgo --
Added lines 1-37:

These notes are for the installation and use of the rtorrent client on a standalone NSLU2 Unslung 6-10-beta within a windows network environment accessed via shell. The reasons being that rtorrent is a stable light-weight client that is still maintained regularly, offers good torrent control, suitable automated features and is not banned from (any/some?) private trackers - perfect for a low power device kept running for long periods of time.

N.B. At this stage of development, the following configuration of rtorrent will not function on an unslung NSLU2 exactly as the software was designed to, therefore some allowances need to be taken into consideration. The problems are mainly to do with the torrent file size, transfer size and ratio that all get reported as zero at the command line. The work around for this is to use a python script that parses this information held in a regularly updated torrent session file into a webpage.

Assuming a fresh install on an unslung NSLU2 the following extra optware packages are to be installed -

rtorrent 0.8 libtorrent 0.12 screen python nano openssh

The rtorrent/libtorrent versions are (and need to be) the latest ones, at time of writing, available in the optware lists and at the maintainers page. Rtorrent (the client) uses libtorrent (the library), the versions are co-dependant, and for the sake of clarity I will just refer to rtorrent throughout.

Screen is used to be able to start a terminal session, run rtorrent, log out and then log back in at a later time - use google to get a better description of it.

Python is used to enable a statistics script (rtorstat) to run that is used to provide information via a webpage about the state of the client that isn't available at the command line (as mentioned above).

Nano is just a text editor that I like, others will use different/better apps, the main thing is to be sure you have a text editor to change some of the config files.

OpenSSH? is used as for connecting to the NSLU from your main computer, as no one wants to use telnet apparently - search the wiki for this and other queries regarding the packages listed above.

Assuming everything installs correctly you can then move onto the configuration of the rtorrent client, details can be found here - http://libtorrent.rakshasa.no/

The default install of the client places a config file at ~/rtorrent.rc which can be modified to enable certain features that automate the process of using the NSLU, the most important being the use of a watch directory where torrent files placed within are automatically enqueued. This directory should be made visible to the local network. More detailed information can be found here - http://kmandla.wordpress.com/2007/05/02/howto-use-rtorrent-like-a-pro/ Ensure that you have the sessions directory set.

For those like me that sometimes stumble into things Linux, you have to rename the rtorrent.rc file as .rtorrent.rc so that it has that extra full stop at the beginning of the filename. This makes it run. This also makes it invisible. You can still edit it. Google.

This is a good time to test that the config settings made are suitable to your network and access to internet. If all is well, then we now go to the python script that was mentioned above, rtorstat. This script will help you run the rtorrent client by providing you with the information lacking from the client at the command line. Go here for the instructions - http://www.g-loaded.eu/2007/06/23/rtorstat-a-simple-rtorrent-status-web-page-generator/

There are some NSLU specific intructions here http://www.nslu2-linux.org/wiki/HowTo/RtorrentLikeAPro that you should use for the bit about the bencode.py stuff. Other than that just follow the g-loaded webpage, noting that for my unslung NSLU the cronjob line gets added to the file at /etc/crontab and that I changed the location of the html file to be /home/httpd/html/rtorstat.html

Now with everything running correctly your client can be controlled via a terminal session and observed via a webpage, individual torrents can be prioritised with the + or - keys, global upload and download rates can be controlled via the (shift)a,s,d,z,x,c key combinations - check the manual. For private trackers the client gets reported as libtorrent.

view · edit · print · history · Last edited by kaputnikgo.
Based on work by kaputnikgo, kazam, Kud, and Janilxx.
Originally by kaputnikgo.
Page last modified on December 04, 2008, at 01:10 AM