Subscribe

Documentation

  1. 2005-01-20 09:54:32 PST
    I was hoping to see a more complete list of current features as well as some documentation of the MySQL-schema.

    I would like to use the tracker for a project, but the lack of documentationis somewhat of a hurdle. I don't need anything fancy.

    A simple list of features (among other things, I saw mention of a xbt_files.txt in server.cpp, but I haven't looked closer at what it's actually needed/used for), a short description of all the config options and some information about how the various other tables are used by the application.
  2. 2009-06-11 11:03:05 PDT
    Has this information been published anywhere as of yet?
  3. 2009-06-11 11:10:36 PDT
    I'm afraid not.
  4. 2009-10-09 14:25:00 PDT
    There is now a place where you can see the XBT table documentation - http://www.visigod.com/xbt-tracker/xbt-table-documentation
  5. 2009-10-09 16:06:13 PDT
    I noticed the mtime and ctime in xbt_files is set to unknown. Based on info from http://xbtt.sourceforge.net/tracker/ I would say xbt_files mtime - Modification time (unix timestamp). Is updated when seeders/leechers/completed status is updated. ctime - Creation time (unix timestamp). Timestamp from when the hash/torrent was added. Please correct me if I am wrong.
  6. 2009-10-12 13:20:09 PDT
    I think it's better if Olaf answers that. In my tracker they are always with a 0 value (zero, not null). Olaf, can you please reply?
  7. 2009-10-12 13:23:04 PDT
    He's right. ctime should be set by the frontend, mtime is updated by the tracker.
  8. 2009-10-12 16:13:39 PDT
    Thank you both (rmlr and Olaf). I've updated the page.
  9. 2009-10-13 10:45:01 PDT
    I just re-read the mtime again. Maybe it sounds better if written as mtime - Modification time (unix timestamp). Time of last seeders/leechers/completed status update (Updated by Tracker). It also explain it better.
  10. 2009-10-13 12:24:52 PDT
    Updated :) More comments/addons/tips are appreciated :)
  11. 2010-08-31 03:59:13 PDT
    The page http://www.visigod.com/xbt-tracker/xbt-table-documentation seems to be down, but it is still in google cache. I'm adding the content of the page here, so this does not get lost. @olaf: Could you please add this information to the homepage? Thanks. XBT Table Documentation Thursday, 08 October 2009 22:43 Table documentation This document will try to describe the SQL tables that XBT uses. You can jump directly to the table you're interested by clicking in it's name on the list below: xbt_announce_log xbt_config xbt_deny_from_hosts xbt_files xbt_files_users xbt_scrape_log xbt_users xbt_announce_log create table if not exists xbt_announce_log ( id int not null auto_increment, ipa int unsigned not null, port int not null, event int not null, info_hash binary(20) not null, peer_id binary(20) not null, downloaded bigint unsigned not null, left0 bigint unsigned not null, uploaded bigint unsigned not null, uid int not null, mtime int not null, primary key (id) ) engine = myisam; This table is used by the clients when they announce to the tracker. The fields are: id - The record id. Each announce will generate an incremental record. ipa - The client IP address. port - The client source port. Usually defined in the client torrent program. This field can be used to check if the client is connectable or firewalled. event - The torrent event. Can be Start, Stop or Completed (need clarification on the values [0,1,2]) info_hash - The torrent hash identifier. peer_id - The client identifier. In this we can see which program the client is using. See the peer id specifications in theory.org downloaded - How much has the client has downloaded. left0 - How much the client needs to complete the torrent (how much is left to download). uploaded - How much has the client uploaded uid - The user id (related to the xbt_users table) mtime - The time (Unix timestamp) of the announce xbt_config create table if not exists xbt_config ( name varchar(255) not null, value varchar(255) not null ); The xbt_config is where XBT keeps his configuration values. Please see the XBT Configuration page for more details about the available options. The fields are: name - The name of the option. value - The value of the option. xbt_deny_from_hosts create table if not exists xbt_deny_from_hosts ( begin int unsigned not null, end int unsigned not null ); The xbt_deny_from_hosts is where XBT checks for banned IP's and/or networks. The fields are: begin - The first IP address to be banned if specifying a network. The IP to be banned if specifying a host. end - The last IP address to be banned if specifying a network. The same IP as in the begin field to be banned if specifying a host. xbt_files create table if not exists xbt_files ( fid int not null auto_increment, info_hash binary(20) not null, leechers int not null default 0, seeders int not null default 0, completed int not null default 0, flags int not null default 0, mtime int not null, ctime int not null, primary key (fid), unique key (info_hash) ); The xbt_files is where it's stored the information about the torrent files. The fields are: fid - The torrent id (file id). info_hash - The torrent identifier (torrent hash). leechers - The current number of leechers for this torrent. seeders - The current number of seeders for this torrent. completed - The number of times the torrent was fully downloaded (completed download). flags - This field is used to communicate with the tracker. 0 - No changes. 1 - Torrent should be deleted. 2 - Torrent was updated. mtime - Modification time (unix timestamp). Time of last seeders/leechers/completed status update (Updated by Tracker). - Thanks to rmlr for this tip ctime - Creation time (unix timestamp). Timestamp from when the hash/torrent was added (Created by the frontend).- Thanks to rmlr for this tip xbt_files_users create table if not exists xbt_files_users ( fid int not null, uid int not null, active tinyint not null, announced int not null, completed int not null, downloaded bigint unsigned not null, `left` bigint unsigned not null, uploaded bigint unsigned not null, mtime int not null, unique key (fid, uid), key (uid) ); The xbt_files_users table is the "connection" between the torrent and the user. Each torrent that is downloaded or uploaded by a user will create a record here. The fields are: fid - The torrent identifier (torrent id). uid - The user identifier (user id). active - 0 if the user is not active on this torrent. 1 if it's active. announced - The number of times the user announced this torrent. completed - 0 if the user hasn't completed the torrent. 1 if the user has completed (has downloaded the torrent completely) downloaded - How many bytes has the user downloaded from this torrent. left - How many bytes are left to download. uploaded - How many bytes has the user uploaded for this torrent. mtime - The last time (Unix timestamp) the record was updated (usually when the user announces the torrent) xbt_scrape_log create table if not exists xbt_scrape_log ( id int not null auto_increment, ipa int unsigned not null, info_hash binary(20), uid int not null, mtime int not null, primary key (id) ) engine = myisam; The xbt_scrape_log is used when the user scrapes the torrent. It's basically the same as the xbt_announce_log but for scrape. The fields are: id - The record id. It's an auto incremental value for every record that is added to the table. ipa - The user IP address. info_hash - The torrent hash (torrent identifier). uid - The user ID (user identifier). mtime - The last time (Unix timestamp) the torrent was scraped. Usually updated when the user scrapes. xbt_users create table if not exists xbt_users ( uid int not null auto_increment, -- can_leech tinyint not null default 1, -- wait_time int not null default 0, -- peers_limit int not null default 0, -- torrents_limit int not null default 0, -- torrent_pass char(32) not null, torrent_pass_version int not null default 0, downloaded bigint unsigned not null default 0, uploaded bigint unsigned not null default 0, primary key (uid) ); The xbt_users is the user table. It keeps updated records for the users. The fields are: uid - The user id (user identifier). can_leech - 0 if the user can't leech (download the files inside the torrent). 1 if the user can. Optional field. wait_time - The time the user must wait between the date of the torrent and the download. Value in seconds. The default is 0 (no wait time). Optional field. peers_limit - The number of different computers the user is allowed to use simultaneously. The default is 0 (unlimited). Optional field. torrents_limit - The number of simultaneous torrents the user is allowed to leech at the same time. The default is 0 (unlimited). Optional field. torrent_pass - A unique identifier for the user. Each torrent that the user downloads will have the torrent_pass in the announce URL. The user will have the same torrent_pass in every torrent he/she downloads. This is deprecated and replaced by the torrent_pass_version. Optional field. torrent_pass_version - The new unique identifier for the user. Each time a user downloads a torrent a new key is generated and added to the tracker announce URL (in the torrent). This value is also increased. This way each torrent will have it's own torrent_pass and can't be reused on other torrents. downloaded - The value of downloaded bytes by the user. A sum of all the "download" values the user has in the xbt_files_users. uploaded - The value of uploaded bytes by the user. A sum of all the "upload" values the user has in the xbt_files_users.
  12. 2010-09-02 01:22:23 PDT
    Then why not add a short notice to the webpage? Currently, a lot of crucial information is only available in the forum. My point was moving some of it to the webpage, because it can be found more easily there. This would be enough: Index: xbtt/trunk/xbt/htdocs/tracker/index.php =================================================================== --- xbtt/trunk/xbt/htdocs/tracker/index.php (revision 2072) +++ xbtt/trunk/xbt/htdocs/tracker/index.php (working copy) @@ -228,6 +228,10 @@ <p> The torrent_pass field in xbt_users contains the 32 char torrent_pass. The announce URL contains the same torrent_pass: /&lt;torrent_pass>/announce + +<p> +Additional documentation can be found at <a href="http://www.visigod.com/xbt-tracker/table-documentation">table documentation</a>. + <?php include('../bottom.php'); -?> \ No newline at end of file +?>
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.