Torrents automatically pause, enable logging?

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
m1dnight
Posts: 7
Joined: Wed Nov 20, 2013 12:40 am

Torrents automatically pause, enable logging?

Post by m1dnight »

Hi,

I have been using Transmission for quite a while now and it seems to pause one particular torrent automatically.

I want to see the log files but I can't manage to do this.

I know I can run 'transmission-daemon -f' but I don't want this, as this doesn't use my alread downloaded torrents in the service. This one has downloaded a few torrents, and when I run 'transmission-daemon -f' it doesnt list my torrents. Also, it uses the config file located in ~/.config/transmission-daemon, instead of the one in '/etc/transmission-daemon'.

Therefore I would like to enable logging on the service version.

I got as far as trying to add the --log option to the execution script in /etc/init.d/ but I don't really know how.

Could anybody help me out with this?

Thanks.


More information:

The transmission is running inside a virtualbox (Ubuntu 13.04 headless) with it's own IP. This VM connects to a windows-share on the host file system. It's formatted NTFS.

It is mounted in /etc/fstab like this:

//192.168.1.130/seagate/Transmission /mnt/Transmission cifs user=administrator,password=pass,uid=106,gid=113,dir_mode=0770 0 0

This drive has no apparant issues whatsoever. The torrents that are in there already do keep going. I have another torrentfile that is quite large (6 GB) that doesn't seem to pause. So I'm kind of stuck on what it could be..


Allright, I've done some changes. I've read that it could me the filesystem that is corrupted so I changed my directory to a local one on the virtual machine and made that a samba share. The problem though, still persists..
m1dnight
Posts: 7
Joined: Wed Nov 20, 2013 12:40 am

Re: Torrents automatically pause, enable logging?

Post by m1dnight »

Yes, I know but it doesn't really work.

I have tried:

Code: Select all

--exec $DAEMON -- $OPTIONS

while setting the options variable to:

Code: Select all

OPTIONS=" --logfile /smb/torrents/transmission.log"
OPTIONS=" -e/smb/torrents/transmission.log"
OPTIONS=" logfile /smb/torrents/transmission.log"
OPTIONS=" e/smb/torrents/transmission.log"
I also tried:

Code: Select all

--exec $DAEMON --logfile /path/ -- $OPTIONS
But none of these work?



This is my script:

Code: Select all

#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          transmission-daemon
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start or stop the transmission-daemon.
### END INIT INFO

NAME=transmission-daemon
DAEMON=/usr/bin/$NAME
USER=debian-transmission
STOP_TIMEOUT=30
OPTIONS=" --logfile /smb/torrents/transmission.log"

export PATH="${PATH:+$PATH:}/sbin"

[ -x $DAEMON ] || exit 0

[ -e /etc/default/$NAME ] && . /etc/default/$NAME

. /lib/lsb/init-functions

start_daemon () {
    if [ $ENABLE_DAEMON != 1 ]; then
        log_progress_msg "(disabled, see /etc/default/${NAME})"
    else    
        start-stop-daemon --start \
        --chuid $USER \
        $START_STOP_OPTIONS \
        --exec $DAEMON -- $OPTIONS
    fi
}

case "$1" in
    start)
        log_daemon_msg "Starting bittorrent daemon" "$NAME"
        start_daemon
        log_end_msg 0
        ;;
    stop)
        log_daemon_msg "Stopping bittorrent daemon" "$NAME"
        start-stop-daemon --stop --quiet \
            --exec $DAEMON --retry $STOP_TIMEOUT \
            --oknodo
        log_end_msg 0
        ;;
    reload)
        log_daemon_msg "Reloading bittorrent daemon" "$NAME"
        start-stop-daemon --stop --quiet \
            --exec $DAEMON \
            --oknodo --signal 1
        log_end_msg 0
        ;;
    restart|force-reload)
        log_daemon_msg "Restarting bittorrent daemon" "$NAME"
        start-stop-daemon --stop --quiet \
            --exec $DAEMON --retry $STOP_TIMEOUT \
            --oknodo
        start_daemon
        log_end_msg 0
        ;;
    status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
    *)
        echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}"
        exit 2
        ;;
esac

exit 0
m1dnight
Posts: 7
Joined: Wed Nov 20, 2013 12:40 am

Re: Torrents automatically pause, enable logging?

Post by m1dnight »

I fixed it in the meanwhile. There is a file in /etc/default/ named transmission-daemon as well (see below). This file has an instantiation for the OPTIONS parameter. I just added --logfile /path/to/logfile and it worked fine!

Code: Select all

# defaults for transmission-daemon
# sourced by /etc/init.d/transmission-daemon

# Change to 0 to disable daemon
ENABLE_DAEMON=1

# This directory stores some runtime information, like torrent files
# and links to the config file, which itself can be found in
# /etc/transmission-daemon/settings.json
CONFIG_DIR="/var/lib/transmission-daemon/info"

# Default options for daemon, see transmission-daemon(1) for more options
OPTIONS="--config-dir $CONFIG_DIR --logfile /path/transmission.log"

# (optional) extra options to start-stop-daemon
#START_STOP_OPTIONS="--iosched idle --nicelevel 10"
Post Reply