view · edit · print · history

CTorrent is a relatively easy to use BitTorrent client. It also seems to be hard drive friendly as it has caching (which I hope means disk caching) and it also allocates the necessary space needed before you start downloading (this is good because the file won't be fragmented as much).

Install CTorrent

Install CTorrent by using ipkg:

ipkg install ctorrent

Using CTorrent

While in directory where thefileiwant.torrent is:

ctorrent -p 6881 thefileiwant.torrent

nohup will allow a process and have it continue to run regardless whether you log out and close the connection to a server.

Even better than nohup is to use screen, which will allow you to return to the formatted screen and prevent huge logfiles forming for large downloads.

Using a CTorrent which works

The ctorrent in the ipkg feeds is apparently not working fully and people have had disappointing results from it. The reason for this is that the ctorrent on sourceforge (http://ctorrent.sourceforge.net) has a lot of patches in the queue waiting to be incorporated, yet the admins for the project seem to have gone awol. There have been no updates for over a year.

Thanks to some committed members of the nslu2 community on the mailing list quite a bit of work has gone into providing a ctorrent binary which works and has some extended funtionality. This version has not been incorprated into an ipkg feed, probably due to the number of patches required to the source code and the extensions along with the ambiguous nature of the sourceforge project status.

However the extended version can be found on the yahoo groups files area:


The best thing to do is install the ipkg as described above and then replace /opt/bin/ctorrent with the version from the yahoo files area.

Please note that the extended version will also require the package ldconfig to be installed prior to running ctorrent.

lets hope the developers who have been doing this great work make this available in the standard ipkg feed and remove the need for this manual workaround

Extended ctorrent User Guide

The following was extracted from the mailing list:

- <1>/<2>/<3> [<4>/<5>/<6>] <7>MB,<8>MB | <9>,<10> | <11>,<12> E:<13>,<14>

<1> = number of seeders connected
<2> = number of leachers connected
<3> = total number of peers reported by the tracker
<4> = number of pieces already downloaded
<5> = total number of pieces in the torrent
<6> = total number of pieces available in the swarm
<7> = number of MB downloaded
<8> = number of MB uploaded
<9> = download rate
<10> = upload rate
<11> = bytes downloaded since last status update
<12> = bytes uploaded since last status update
<13> = number of tracker errors
<14> = number of successful tracker updates

If you want to try a more colorful version of ctorrent, I have just updated my latest custom version of ctorrent to the Files area. Use the -d option to enable detailed status report and then switch between the two available modes (peers and pieces) by pressing the 'd' key. Note that this requires a VT100? compatible terminal with 80 columns and 24 lines (I'm using Putty). So far the detailed information is limited to a maximum of 1600 pieces and 40 peers, due to the terminal screen size. I may be looking into curses (TERM variable) to fix this. For now, the main reason I did this was to debug ctorrent and try to make it more efficient.

In the peers page, each row has the following meaning: <Peer IP> <local flags> <remote flags> <download rate> <upload rate>

The flags are:

N=Need data
Q=Queue not empy

Rate with blue background means you may send data to that peer (local unchoked). Rate with green background means you may receive data from that peer (remote unchoked). Rate highlighted means that some data was sent/received in the last couple seconds.

In the pieces page, each character corresponds to a piece and has the following meaning:

. = piece download not started yet
X = piece already downloaded
0-9 = percentage (0-99%) of the piece already downloaded

Blue background means that the piece download was interrupted and is now waiting in the pending requests queue. Green background means that the piece download is in progress. Highlighed numbers indicate that the download rate for that piece is not zero.

I have also tried to make the upload a bit more fair and include an option '-k' that allows the maximum number of simultaneous uploads to be changed from 2 to 4.

Another change is that pressing ESC will terminate the client and pressing 't' will force a tracker update/retry.

The known issues with this version are that Ctrl-C is not working anymore and the tracker is not notified on exit when ESC is pressed. I will try to fix that.

My ctorrent was getting killed because it was hogging all the memory. Solution: add swap. http://www.nslu2-linux.org/wiki/HowTo/AddAdditionalSwapSpace

view · edit · print · history · Last edited by Stein.
Based on work by hilikus, Conrad, MattMcNeill, tman, kdawg2k, and kdawg.
Originally by rwhitby.
Page last modified on January 14, 2006, at 04:46 AM