Difference between revisions of "Btpd"

From ArchWiki
Jump to: navigation, search
m (Installing)
Line 12: Line 12:
 
== Configuring ==
 
== Configuring ==
  
The configuration lies in /etc/conf.d/btpd. Actually in the file there's just a definition for $BTPD_ARGS, which is included in /etc/rc.d/btpd. The configuration file could look something like this:
+
There is no configuration file, only options to limit it/
 
+
<pre>
+
#
+
# Arguments to be passed to the BitTorrent Protocol Daemon
+
#
+
 
+
btpdUSER="zie"  # See the note, for this option to work.
+
DIR="/home/zie/down/.torrents" # It'll create a directory 'torrents' in there, and sock, pid, log. No content here.
+
PORT="6881"
+
 
+
OUTLIMIT="0"    # Measured in kB/s, 0 means unlimited.
+
INLIMIT="0"    # Measured in kB/s, 0 means unlimited.
+
# See other options in `man btpd`
+
 
+
BTPD_ARGS="-d $DIR -p $PORT --bw-out $OUTLIMIT --bw-in $INLIMIT"
+
</pre>
+
 
+
'''NOTE''': It's meant to be used from userland, although you could run it from your user, but that requires a tweak in the default deamon. Change line 11 to: "su $btpdUSER -c "/usr/bin/btpd $BTPD_ARGS" &> /dev/null".
+
  
 
== Interaction ==
 
== Interaction ==
  
Through '''btcli''': (don't forget to configure working directory with -d)
+
Through '''btcli''': (don't forget to configure working directory with -d, if not default)
  
 
* Add foo.torrent, with content dir /home/user/foo.torrent.d/, and start it: $ btcli add -d /home/user/foo.torrent.d foo.torrent
 
* Add foo.torrent, with content dir /home/user/foo.torrent.d/, and start it: $ btcli add -d /home/user/foo.torrent.d foo.torrent
Line 50: Line 32:
 
* Same as above, but also display individual stats for each active torrent: $ btcli stat -w 5 -i
 
* Same as above, but also display individual stats for each active torrent: $ btcli stat -w 5 -i
 
* Shut down btpd: $ btcli kill
 
* Shut down btpd: $ btcli kill
 
Through '''btpd-webui''':
 
 
[to be written]
 
  
 
Resources:
 
Resources:

Revision as of 16:16, 16 May 2011


btpd is a BitTorrent client daemon.

Installing

It's in AUR, get/installit it with your AUR helper or manually.

$ cower -d btpd && makepkg && su -c "pacman -U *.pkg"

Configuring

There is no configuration file, only options to limit it/

Interaction

Through btcli: (don't forget to configure working directory with -d, if not default)

  • Add foo.torrent, with content dir /home/user/foo.torrent.d/, and start it: $ btcli add -d /home/user/foo.torrent.d foo.torrent
  • Same as above without starting it: $ btcli add -N -d /home/user/foo.torrent.d foo.torrent
  • Display a list btpd’s torrents and their number, size, status, etc: $ btcli list
  • Same as above, but only for torrent 12 and my.little.torrent: $ btcli list 12 my.little.torrent
  • Same as above but only for active torrents: $ btcli list -a
  • Use a custom list forma: $btcli list -f "btcli list -f "%n\t%#\t%p%s\t%r\n"
  • Start bar.torrent and torrent number 7: $ btcli start bar.torrent 7
  • Stop torrent number 7: $ btcli stop 7
  • Stop all active torrents: $ btcli stop -a
  • Remove bar.torrent and it’s associated information from btpd: $ btcli del bar.torrent
  • Display a summary of up/download stats for the active torrents: $ btcli stat
  • Display the summary once every five seconds: $ btcli stat -w 5
  • Same as above, but also display individual stats for each active torrent: $ btcli stat -w 5 -i
  • Shut down btpd: $ btcli kill

Resources:

--zie: This is my first wiki page, I hope it's not too horrible.