Difference between revisions of "Btpd"

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

Revision as of 00:17, 24 October 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

btpd is a BitTorrent client daemon.

Installing

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

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

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:

#
# Arguments to be passed to the BitTorrent Protocol Daemon
#

btpdUSER="s"    # See the note, for this option to work.
DIR="/home/s/down/torrents"
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"

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

Interacting with btpd through btcli

  • 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 format
 $ 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