Difference between revisions of "Enhanced CTorrent and CTCS"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
 
Line 4: Line 4:
 
Enhanced CTorrent has an average CPU load of 4.2% at a download rate of 100KB/s and an upload rate of 100KB/s on an ARM equiped Linkstation Pro.
 
Enhanced CTorrent has an average CPU load of 4.2% at a download rate of 100KB/s and an upload rate of 100KB/s on an ARM equiped Linkstation Pro.
  
==LSPro (arm9) - OpenLink==
+
=LSPro (arm9) - OpenLink=
===Building from scratch===
+
==Building from scratch==
 
Requirements:
 
Requirements:
 
*[[LS-GL Custom Firmware Development#Native_Toolchain]] or
 
*[[LS-GL Custom Firmware Development#Native_Toolchain]] or
Line 18: Line 18:
 
  $ make
 
  $ make
  
===Pre-built binary===
+
==Pre-built binary==
 
A pre built ARM binary <code>ctorrent</code> is available from [http://downloads.linkstationwiki.net/uploads/LS_Pro_temporary/Binaries LSPro Temporary Upload Folder]
 
A pre built ARM binary <code>ctorrent</code> is available from [http://downloads.linkstationwiki.net/uploads/LS_Pro_temporary/Binaries LSPro Temporary Upload Folder]
  
==CTCS==
+
=CTCS=
 
To control and manage your torrents from an external computer you can make use of the Web interface provided by the [http://www.rahul.net/dholmes/ctorrent/ctcs.html CTorrent Control Server] (CTCS). This is a Perl script which needs no further configuration.
 
To control and manage your torrents from an external computer you can make use of the Web interface provided by the [http://www.rahul.net/dholmes/ctorrent/ctcs.html CTorrent Control Server] (CTCS). This is a Perl script which needs no further configuration.
  
==Typical Setup==
+
=Typical Setup=
 
*Make sure the binary ctorrent is available via your <code>PATH</code> environment varaiable.
 
*Make sure the binary ctorrent is available via your <code>PATH</code> environment varaiable.
 
*Start the [http://www.rahul.net/dholmes/ctorrent/ctcs.html CTorrent Control Server] and publish the server at port 2780:
 
*Start the [http://www.rahul.net/dholmes/ctorrent/ctcs.html CTorrent Control Server] and publish the server at port 2780:
Line 33: Line 33:
 
For further information on how to start, stop and manage ctorrent please read the [http://www.rahul.net/dholmes/ctorrent/userguide.html CTorrent user's guide].
 
For further information on how to start, stop and manage ctorrent please read the [http://www.rahul.net/dholmes/ctorrent/userguide.html CTorrent user's guide].
  
==Automatic downloading of torrents==
+
=Automatic downloading of torrents=
 
It is very desireable to start a torrent more userfriendly at a remote machine than to manually:
 
It is very desireable to start a torrent more userfriendly at a remote machine than to manually:
 
#Download the torrent on the remote machine to a Linkstation share.
 
#Download the torrent on the remote machine to a Linkstation share.

Revision as of 20:39, 22 January 2007

Enhanced CTorrent is a BitTorrent client implemented in C++ to be lightweight and quick and is the continuation of its parent CTorrent.

Enhanced CTorrent has an average CPU load of 4.2% at a download rate of 100KB/s and an upload rate of 100KB/s on an ARM equiped Linkstation Pro.

Contents

LSPro (arm9) - OpenLink

Building from scratch

Requirements:

$ gunzip ctorrent-1.3.4-dnh2.2.tar.gz
$ tar xvf ctorrent-1.3.4-dnh2.2.tar.gz</pre>
  • If you are compiling in Scratchbox make sure to have libstdc++.so installed in for example /usr/lib. Either copy it from your Linkstation directly to the Scratchbox environment by using scp or install it from anywhere else.
  • Enhanced CTorrent has very little dependencies therefore you should be able to do a simple:
$ ./configure
$ make

Pre-built binary

A pre built ARM binary ctorrent is available from LSPro Temporary Upload Folder

CTCS

To control and manage your torrents from an external computer you can make use of the Web interface provided by the CTorrent Control Server (CTCS). This is a Perl script which needs no further configuration.

Typical Setup

  • Make sure the binary ctorrent is available via your PATH environment varaiable.
  • Start the CTorrent Control Server and publish the server at port 2780:
$ ctcs -p 2780
  • Start ctorrent as a backgorund process subscribing at the locally running CTCS server at address 2780 and ignoring any console output since we will be controlling it via a web-interface:
$ ctorrent -S localhost:2780 > /dev/null &

For further information on how to start, stop and manage ctorrent please read the CTorrent user's guide.

Automatic downloading of torrents

It is very desireable to start a torrent more userfriendly at a remote machine than to manually:

  1. Download the torrent on the remote machine to a Linkstation share.
  2. Do a remote login to the Linkstation.
  3. Start ctorrent with the correct command line parameters.

The idea is to create a daemon or cron'd script running on the Linkstation which checks a certain share directory for any added .torrent files. When it does find a newly added .torrent file it will invoke ctorrent with a predefined set of parameters and start downloading the torrent. This way you can start downloading a torrent simply by copying a .torrent file to a certain directory on your Linkstation.

The problems that remain to be solved for this sollution are:

  • The script may only invoke ctorrent when it is sure the .torrent file is completely copied over from a remote machine (we could check for a corrupted file by invoking ctorrent on the .torren file).

Related articles