Bittorrent: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Michi (Diskussion | Beiträge) (New page: ==Verwendung== I wanted to run torrents from my Linux server, rather than running them on my Windows laptop. Further, I wanted a system that needed very little intervention. To start th...) |
Michi (Diskussion | Beiträge) K (BitTorrent moved to Bittorrent) |
(kein Unterschied)
|
Version vom 16. Januar 2009, 11:10 Uhr
Verwendung
I wanted to run torrents from my Linux server, rather than running them on my Windows laptop. Further, I wanted a system that needed very little intervention.
To start the torrent daemon, I run the following:
(/usr/bin/btlaunchmany.py /home/share/video/torrents/active/ --save_in /home/share/video/torrents/ --minport 6885 --max_upload_rate 10 \ > /home/share/video/torrents/torrent.log 2>&1 &) &
To parse the torrent log, I use a small perl script, which runs as a daemon:
#!/usr/bin/perl use Data::Dumper; use Term::Screen; use strict; my $scr = Term::Screen->new(); my $first; my $entry = {}; while (my $line = <STDIN>) { next unless ($line =~ m#^"(.*?)":\s+"(.*?)"\s+(\S+)\s(\S+)\s(.*?)"(.*?)"\n#); my %info; $info{file} = $1; $info{status} = $2; $info{percent} = $3; # unknown = $4; my $transfer_line = $5; # unknown = $6; if ($6) { print "** $6\n"; } my @transfer = split(/\s+/, $transfer_line); $info{rate} = $transfer[1]; $info{total} = $transfer[2]; if ($info{file} eq $first) { showEntries($entry, $scr); } $first ||= $info{file}; my $file = $info{file}; $entry->{$file} = \%info; #print $info{file}, "\n", join("\t", $info{status}, $info{percent}), "\n", # join("\t", $info{rate}, $info{total}), "\n\n"; } sub showEntries { my ($h, $s) = @_; $s->clrscr(); open(OUT, "> /tmp/torrent-status") || die "can't open torrent-status: $!"; while (my ($file, $e) = each %$h) { print OUT $e->{file}, "\n", join("\t", $e->{status}, $e->{percent}, $e->{rate}, $e->{total}), "\n\n"; } close OUT; }
To start or stop torrents, I simply place the torrent file in a directory, or remove the torrent from the directory. The torrent daemon picks them up automagically. The directory (in the above example) is "/home/share/video/torrents/active/".
Downloads
- http://www.bit-torrents.6x.to/
- http://torrent.youceff.com/
- Bootcity live music sharing
- bt.etree.org
- Dimeadozen
- Meganova (Meganova.org)
- The Trader's Den
Weblinks
- BitTorrent (Wikipedia.de)
- Brian's BitTorrent FAQ and Guide
- Brian's BitTorrent FAQ and Guide
- How to create and upload torrents (Dimeadozen.org)
- BitTorrent for Linux
- BitTorrent Documentation : Guide
- The MST3K Bittorrent guide
- btdownloadheadless
- Command line BitTorrent client
- Filesharing mit Ktorrent (Tauschrausch) (EasyLinux.de)
- Azureus