Main

Background seeding (Advanced)

One great way of contributing to the geophysical society is to seed the data from the OpendTect OSR. When seeding with your normal client, it is depending on your computer being turned on and the user being logged in. This page describes how one easily can setup a deamon (background) seeding on a Unix-like (Linux, Solaris, Mac, FreeBSD) system. These scripts are only tested on Linux, but should work on other platforms as well, perhaps with some tuning.

Requirements

  • The “Transmision torrent client for your patform, http://www.transmissionbt.com torrent client for your platform
  • A login under which the seeding-daemaon will run (not necessarily root)
  • Root access at setup.
  • Some knowledge in handling unix systems (like using a terminal).

Instructions

  • If not installed, download and install Transmission. This step requires root access on your machine. Verify that /usr/bin/transmission-daemon and /usr/bin/transmission-remote is installed. These executables may be located in a different location on your system. If so, you will have to edit the scripts accordingly.
  • Switch to the user that will run the seeding. This can be root, but it is not necessary. Download our scripts to your home directory.
  • Uncompress the scripts:
    tar xfz seedingcontrol.tar.gz
This will extract the following files in the bin directory:
  • add_seed - Adds a torrent file to the seeding.
  • list_seeds - List the current seeds and their status.
  • slow_seed - Lowers the bandwidth.
  • fast_seed - Increases the bandwidth.
  • start_seeding - Starts the deamon and applies settings to it.
  • Start the daemon:
    bin/start_seeding
  • Create a torrent directory:
    /bin/mkdir torrents
  • Copy the torrent files you wish that directory
  • For each torrent, run the command:
    bin/add_seed torrents/<torrent-file>
  • As root, add <path_to>/start_seeding to the system startup scripts, for instance on a Centos Linux, add:
    if [ -x /home/user/bin/start_seeding ]; then
/home/user/start_seeding
fi
to /etc/rc.local

Fine tuning

  • To set the maximum upload speed, edit the start_seeding file accordingly
  • If different upload speeds are wanted at different times, use crontab to set different speeds at different times:
    #Slow down Monday-Friday morning at 7 AM
0 7 * * 0,1,2,3,4 /home/user/bin/slow_seed >> /dev/null #Speed up Monday-Friday evening at 6pm 0 18 * * 0,1,2,3,4 /home/user/bin/fast_seed >> /dev/null

Terminating the seeding

There is no ‘nice’ way to terminate the seeding. The best way is to run:

    ps x | grep transmission-daemon

This will give a listing that looks something like this:

     8075 ?        Ssl    0:41 /usr/bin/transmission-daemon -T -B -p 9091
     8462 pts/2    S+     0:00 grep transmission-daemon

Find the process ID (the first column) of the /usr/bin/transmission-daemon line, and kill that process ID (in this case):

     kill 8075