LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

Distributing Content with BitTorrent
Pages: 1, 2, 3

Using Other People's Trackers

Yes, that's right, you can jump onto other people's trackers instead of relying on one of your own! You can share your documents without having either a web server or a tracker. Suppose I want to use the postgresql.org tracker: all I need to do is download one of their latest postgresql torrents and read the first couple of lines to identify the tracker URL:



$ wget http://bt.postgresql.org/postgresql-8.0.1.zip.torrent
$ cat bt.postgresql.org:6969 | less

In this case, the URL turns out to be http//bt.postgresql.org:6969/announce. I can reannounce the tracker of my existing torrent by using the torrent utility btreannounce (btreannounce.py).

Here's the general format:

btreannounce url torrent [ torrent ... ]

I can choose this tracker for my torrent with:

$ btreannounce http://bt.postgresql.org:6969/announce \
	pg_live.1.3.3-SRAA.iso.torrent

The postgresql.org tracker will now manage all subsequent connections to the pg_live ISO. You can review the tracker's statistics by using your browser and going to http://bt.postrgresql.org:6969. (Some sites list only the md5 checksum without naming the file, but you can compare it with the checksum generated by your own tracker).

It's good etiquette to request permission for using other people's trackers. You can prevent other people from using your tracker--as postgresql.org does, by the way--by telling bttrack to track only those torrents of which it has copies in a user-defined directory. For example, if I place a copy of the pg_live torrent file in a directory where bttrack can see it, it will limit the tracker to file sharing for just pg_live. That's the purpose of the --show_names and --allowed_dir switches:

$ bttrack --port 8099 --show_names 1 --allowed_dir ~/mytorrents \
	--dfile downloadinfo.txt

Another advantage of using this particular invocation is the detailed report that the tracker supplies.

  • tracker version: 3.4.2
  • server time: 2005-03-29 14:36 UTC
info hash torrent name size complete down-
loading
down-
loaded
trans-
ferred
4e98ea442573f5b88685
37e970fd3ce6321e9e81
pg_live.1.3.3-SRAA.iso 382MiB 2 0 0 0B
  1 files 382MiB 1/2 0/0 0/0 0B
  • Info hash: SHA1 hash of the "info" section of the meta info (*.torrent)
  • Complete: number of connected clients with the complete file (total: unique IPs/total connections)
  • Downloading: number of connected clients still downloading (total: unique IPs/total connections)
  • Downloaded: reported complete downloads (total: current/all)
  • Transferred: torrent size * total downloaded (does not include partial transfers)

Conclusion

I always seem to be ending articles when I say this, but ... I've only just scratched the surface of what you can do. I guess you'll just have to play with it to learn more. I recommend reading the man pages for apt-get, wget, cat, btmakemetafile, bttrack, bittorrent-downloader, and btreannounce.

Have fun.

Robert Bernier is the PostgreSQL business intelligence analyst for SRA America, a subsidiary of Software Research America (SRA).


Return to the Linux DevCenter.


Have a question, comment, or suggestion for making your life even easier? Let's talk about it here.
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • First BitTorrent book
    2005-10-13 14:42:47  nep [Reply | View]

    For those looking to learn more about BitTorrent in general, the first book ever about BitTorrent just came out -- it's not an O'Reilly book, I hope I don't get zapped for pointing that out. It’s BitTorrent for Dummies, ISBN 076459981X, (Amazon http://tinyurl.com/e4xp3 ).

    There’s a companion Web site that’s growing up into a substantial resource about BitTorrent: http://www.BitTorrentForDummies.com/ It’s a news hub, a how-to and a book update, all in one.

    Just thought I’d share.
  • Plus...
    2005-09-04 17:35:04  docsavagemob [Reply | View]

    The torrent, pg_live appears to be unavailable. I've repeatedly tried to retrieve it and keep getting a "connection refused" error from my client.
  • ibiblio Osprey
    2005-08-27 03:29:36  GerhardP [Reply | View]

    Very timely article but unfortunately it uses an outdated toolset :-)

    Please take the time to look into Osprey and judge for yourself. (http://osprey.ibiblio.org)

    I think this is a very nice tool and much better suited for distributing content with bittorrent. (you can even host on ibiblio if it fits their collection policy (http://www.ibiblio.org/collection.html), but that's another story entirely)


Tagged Articles

Post to del.icio.us

This article has been tagged:

linux

Articles that share the tag linux:

Managing Disk Space with LVM (74 tags)

Use Your Digital Camera with Linux (60 tags)

mdadm: A New Tool For Linux Software RAID Management (59 tags)

Asterisk: A Bare-Bones VoIP Example (43 tags)

View All

p2p

Articles that share the tag p2p:

Piracy is Progressive Taxation, and Other Thoughts on the Evolution of Online Distribution (23 tags)

Next-Generation File Sharing with Social Networks (18 tags)

Remixing Culture: An Interview with Lawrence Lessig (13 tags)

Swarm Intelligence: An Interview with Eric Bonabeau (12 tags)

Anonymous, Open Source P2P with MUTE (11 tags)

View All

bittorrent

Articles that share the tag bittorrent:

Distributing Content with BitTorrent (6 tags)

It Doesn't Pay to be Popular (4 tags)

BitTorrent Style (2 tags)

View All

sharing

Articles that share the tag sharing:

Inside Samba: Windows Sharing for the Mac (18 tags)

Anonymous, Open Source P2P with MUTE (3 tags)

Distributing Content with BitTorrent (3 tags)

Windows XP File Sharing Mysteries: Part 1 (3 tags)

Next-Generation File Sharing with Social Networks (2 tags)

View All

toread

Articles that share the tag toread:

What Is Web 2.0 (283 tags)

Ajax on Rails (36 tags)

Very Dynamic Web Interfaces (32 tags)

Rolling with Ruby on Rails (29 tags)

Calculating the True Price of Software (22 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com