General NAS-Central Forums

Welcome to the NAS community
It is currently Thu May 25, 2017 4:19 pm

All times are UTC




Post new topic Reply to topic  [ 177 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next
Author Message
PostPosted: Tue Aug 14, 2012 6:58 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
This tutorial contains step by step instructions how to setup Transmission on NSA-310 (firmware 4.50) with FFP 0.7-arm (version 2012.05.28).
All steps below I did logged as root in ssh session.

Before start, update /ffp/funpkg/cache/sites file to have access via slacker tool to five repositories of packages for FFP 0.7/arm-Kylek, Memiks, Fonz, Mijzelf and Uli:
Code:
wget http://wolf-u.li/u/441 -O /ffp/bin/uwsiteloader.sh
Code:
chmod a+x /ffp/bin/uwsiteloader.sh
Code:
uwsiteloader.sh
In menu select all five repositories and update them.
Note 1:you can use "slacker -Ua", then installing from repositories.This will update the list of packages available on these five repositories.
Code:
slacker -Ua
Note 2:sometimes then one of repositories is down, it can cause "slacker -Ua" to fail, so use again "uwsiteloader.sh" and unselect not working repository from the list of available.

Let's start.
1.Install compile and dependencies (some of them comes already pre-installed with ffp):
• autoconf
• automake
• bash (default installed with ffp)
• binutils
• bison
• coreutils (default installed with ffp)
• flex
• gcc
• gettext (default installed with ffp)
• grep (default installed with ffp)
• linux-headers
• libtool
• make
• m4
• mpfr
• patch
• pkg-config
• uClibc
Code:
slacker -UaA s:automake s:autoconf s:binutils  s:bison s:flex  s:gcc s:linux-headers s:libtool s:make  s:mpfr s:m4 s:patch s:pkg-config s:uClibc

2. Install additional packages needed for Transmission:
• openssl (default installed with ffp)
• curl
• libevent
• intltool
Code:
slacker -aA  s:curl mz:libevent s:intltool

3. Create temporary directory structure for compiling and making FFP package:
Code:
mkdir -p /mnt/HD_a2/build/tmp
and go to build directory:
Code:
cd /mnt/HD_a2/build

4. Get Transmission source files:
Code:
wget http://download.transmissionbt.com/files/transmission-2.61.tar.xz
and untar them
Code:
tar Jxvf  transmission-2.61.tar.xz

5. Enter Transmission source files directory:
Code:
cd transmission-2.61

6. Configure source files for FFP:
Code:
./configure --prefix=/ffp --enable-lightweight

7. Compile Transmission:
Code:
make

8. Install to temporary directory:
Code:
make install DESTDIR=/mnt/HD_a2/build/tmp

9. Create additional "start" directory in /mnt/HD_a2/build/tmp/ffp for transmission startup-shutdown script file:
Code:
mkdir -p /mnt/HD_a2/build/tmp/ffp/start
and create startup-shutdown script file:
Code:
touch /mnt/HD_a2/build/tmp/ffp/start/transmission.sh

10. Activate file for startup:
Code:
chmod a+x /mnt/HD_a2/build/tmp/ffp/start/transmission.sh

11. Go to:
Code:
cd /mnt/HD_a2/build/tmp/ffp/start

and edit transmission.sh (paste the following text to file):
Code:
#!/ffp/bin/sh

# PROVIDE: Transmission

. /ffp/etc/ffp.subr

TRANSMISSION_HOME=/mnt/HD_a2/transmission

name="transmission-daemon"
command="/ffp/bin/$name"
start_cmd="transmission_start"
stop_cmd="transmission_stop"
status_cmd="transmission_status"
user=root
su_cmd="/ffp/bin/su"

transmission_start()
{
   if [ ! -d ${TRANSMISSION_HOME} ]; then
      $su_cmd $user -c "mkdir ${TRANSMISSION_HOME}"
   fi
   echo "Starting $name"
      $su_cmd $user -c "$command -g ${TRANSMISSION_HOME} -e ${TRANSMISSION_HOME}/$name.log"
}

transmission_stop()
{
   echo "Stopping $name"
      /ffp/bin/killall -SIGINT $name
}

transmission_status()
{
   _pids=$(pidof $name)
   if test -n "$_pids"; then
      echo "$name is running, pid:"
      pidof $name
   else
      echo "$name not running"
   fi
}

run_rc_command "$1"

12. Enter tmp directory:
Code:
cd /mnt/HD_a2/build/tmp

13. Make FFP package:
Code:
makepkg transmission 2.61 0
This will create redistributable FFP 0.7 arm package transmission-2.61-arm-0.txz in /tmp directory (not in /mnt/HD_a2/build/tmp!)

14. Go to
Code:
cd /tmp
and delete temporary "build" directory:
Code:
rm -rf /mnt/HD_a2/build
(you can leave it or move it to another location if you will need later. It is not necessary step)

15. Create new directory in /ffp/funpkg/ :
Code:
mkdir -p /ffp/funpkg/additional

16. Move new package transmission-2.61-arm-0.txz to /ffp/funpkg/additional
Code:
mv /tmp/transmission-2.61-arm-0.txz /ffp/funpkg/additional

17. Install Transmission package:
Code:
funpkg -i /ffp/funpkg/additional/transmission-2.61-arm-0.txz

18. Run start up file to create Transmission home directory (/mnt/HD_a2/transmission) and settings file settings.json in it:
Code:
/ffp/start/transmission.sh start

And stop transmission:
Code:
/ffp/start/transmission.sh stop

19. Go to Transmission home directory:
Code:
cd /mnt/HD_a2/transmission
and edit transmission settings file-settings.json with text editor:
"download-dir": "/mnt/HD_a2/video", -points to HDD root directory video (built-in sharing directory on Zyxel NSA 310)
"incomplete-dir": "/mnt/HD_a2/video", -just in case, but I suggest do not enable it
"lpd-enabled": true, -local peers discovery
"rpc-whitelist": "127.0.0.1,192.168.0.*", -add local-LAN (not wan ip in any case) ip address of your computer from which you are connecting to NSA or specify local subnet as I did.
"trash-original-torrent-files": true, -why to collect garbages?
"umask": 0, -will give you access to downloaded files via LAN
"watch-dir": "/mnt/HD_a2/video", -directory to put *.torent files for download
"watch-dir-enabled": true

20.Start transmission daemon again:
Code:
/ffp/start/transmission.sh start

That is all. The end. At last :mrgreen:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Other useful info:

View status of Transmission daemon:
Code:
/ffp/start/transmission.sh status

Stop the daemon:
Code:
/ffp/start/transmission.sh stop
or
Code:
killall transmission-daemon

Deactivate startup on NAS boot:
Code:
chmod a-x /ffp/start/transmission.sh

Configure transmission, upload torrent files (*.torrent) and view status of downloads via browser:
Code:
http://nsa310:9091
or
Code:
http://YourNasIP:9091
You can mount as network disk the following path \\nsa310\video (\\YourNasIP\video) and download *.torrent files to it. Transmission will monitor this folder for *.torrent files and will begin to download almost immediately. There is a possibility to use for downloads third party transmission remote clients like transmission-remote-dotnet or transmission-remote-GUI also.
------------------------------------------------------------------------------------------------------------------------------

How to uninstall Transmission
1. Stop daemon:
Code:
/ffp/start/transmission.sh stop

2. Uninstall the package:
Code:
funpkg -r transmission-2.61-arm-0.txz
or you can remove via slacker:
Code:
slacker -rA transmission

3. Remove unnecessary left startup file:
Code:
rm /ffp/start/transmission.sh


Last edited by barmalej2 on Thu Jan 10, 2013 9:37 am, edited 34 times in total.

Top
 Profile  
 
PostPosted: Tue Aug 14, 2012 7:32 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Transmission 2.61 version has known bugs in Web GUI.
https://forum.transmissionbt.com/viewtopic.php?f=8&t=13662
https://forum.transmissionbt.com/viewtopic.php?f=8&t=13652
https://forum.transmissionbt.com/viewtopic.php?f=8&t=13664
2.60 version didn't have them. So, if you have a computer with windows xp and IE8, I suggest to compile and install version 2.60 or to use another browser (Chrome, firefox, IE9) for connecting with 2.61 web GUI. 2.70 is planned to resolve these bugs.


Top
 Profile  
 
PostPosted: Thu Sep 27, 2012 11:05 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
New version of transmission is available-2.71 for FFP 0.7-arm

If you updating previous version compiled using this tutorial:
Code:
/ffp/start/transmission.sh stop; slacker -UaA mz:transmission-2.71-arm-0.txz; /ffp/start/transmission.sh start


If you installing first time:
Code:
slacker -UaA mz:transmission-2.71-arm-0.txz; /ffp/start/transmission.sh start; /ffp/start/transmission.sh stop

Then follow instructions from the step 19 in first post.


Top
 Profile  
 
PostPosted: Mon Oct 08, 2012 7:07 pm 
Offline

Joined: Wed Sep 26, 2012 4:07 pm
Posts: 8
Hi, I'm having a high cpu usage when using transmission in my NSA-310. Usally CPU is about 100%.
Do you have the same behaviour?

Thanks.


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 4:44 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
asch75 wrote:
Hi, I'm having a high cpu usage when using transmission in my NSA-310. Usally CPU is about 100%.
Do you have the same behaviour?
Thanks.

Yes, indeed. Mine download speed can reach up to 12 MB/s (fibre optic internet connection) and transmission eats CPU almost at 100 %, when downloading. If you have high internet speed, transmission can cause such behaviour. Returns to normal when downloads are finished. On lower speed internet connection, CPU usage is around 15-20%, when downloading (tested myself on different internet connection-DSL). If you are downloading a lot or having CPU overheat problems, try to limit your download speed in transmission settings and see what happens.


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 11:08 am 
Offline

Joined: Wed Sep 26, 2012 4:07 pm
Posts: 8
Do you have a NSA310? What firmware version do you have installed?

My CPU is jumping up and down, and also my download speed, from 13 to 337 kbps, every few seconds.

Can you post your settings.json?

Thanks.


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 11:25 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
asch75 wrote:
Do you have a NSA310? What firmware version do you have installed?

My CPU is jumping up and down, and also my download speed, from 13 to 337 kbps, every few seconds.

Can you post your settings.json?

Thanks.

With such speed, CPU 100% usage is abnormal. On DSL connection up to 300 kbps, my CPU usage never climbs over 20 % with transmission. And yes I have NSA310 firmware 4.50. Are you sure, that transmission causes such high CPU usage? I can post settings.json in evening, but I am not sure, will that help you.


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 4:11 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Here are my transmission settings:
Code:
{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 8,
    "dht-enabled": true,
    "download-dir": "/mnt/HD_a2/video",
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 0,
    "idle-seeding-limit": 15,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/mnt/HD_a2/video",
    "incomplete-dir-enabled": false,
    "lpd-enabled": true,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-limit-global": 300,
    "peer-limit-per-torrent": 60,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 0,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{98951170b2c4932036abc14829a6fd5dc8ac2e151N4TsJ8T",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "",
    "rpc-whitelist": "127.0.0.1,192.168.0.*",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": true,
    "umask": 0,
    "upload-slots-per-torrent": 100,
    "utp-enabled": true,
    "watch-dir": "/mnt/HD_a2/video",
    "watch-dir-enabled": true
}


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 4:19 pm 
Offline

Joined: Wed Sep 26, 2012 4:07 pm
Posts: 8
Hi. Thanks. Seems that one of my torrents is causing this problem. When I enable it the CPU usage hits 100% and down to 10% in a infinite loop. It's a big torrent, about 64GB (3x20GB files aprox).
After enabling somo other torrents and disabling the BIG ONE torrent I found that the hard drive sounds a lot quieter, and the CPU usage is ok.

Maybe it's a problem with big files?


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 6:30 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Maybe. There is no program without vice. Transmission is a not an exception.


Top
 Profile  
 
PostPosted: Tue Oct 09, 2012 6:53 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
64GB!

Torrent cuts the files in many small pieces, normally 64~128kB, but for a 64GB file I suppose it will be bigger, and these pieces are distributed. Randomly, not in some particular sequence. In your case this means that the OS can hardly get any benefit from the disk cache, because the range of the file is *much* bigger than any cache, so the disk will be constantly searching for the right position for pieces.
I suppose that when you look at the CPU load using top, you'll see it's most of the time in 'wa' state, which means is't waiting for io completion. It could do some other task in this time, assuming that this task doesn't need disk access.


Top
 Profile  
 
PostPosted: Wed Nov 28, 2012 4:12 pm 
Offline

Joined: Wed Nov 28, 2012 4:10 pm
Posts: 2
How edit setting.json? When i try to open/edit In file zilla i got this 550 Can't open settings.json: Permission denied


Top
 Profile  
 
PostPosted: Thu Nov 29, 2012 3:22 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Via FTP-don't know. Via ssh with FFP you can use nano, vim or Midnight Commander's editor. I prefer Midnight Commander's editor. It's only possible if you have FFP on your NAS.

Connect via ssh to NAS as root.
Midnight Commander is available on Mijzelf repository-(mz):
Code:
slacker -aA mz:glib2 mz:mc

Shortly to edit file:
type mc in command line
move cursor on file you want to edit
press F4
edit
press F10 -exit from editor and press YES to save changes.
press F10 again-exit from Midnight Commander and return to command line.


Top
 Profile  
 
PostPosted: Sat Dec 01, 2012 11:31 am 
Offline

Joined: Wed Nov 28, 2012 4:10 pm
Posts: 2
barmalej2 Thnak you. Transmission working now.


Top
 Profile  
 
PostPosted: Tue Dec 11, 2012 12:16 pm 
Offline

Joined: Tue Dec 04, 2012 6:20 am
Posts: 3
This is a great tutorial. I am sure it will help a lot of users of this forum who are new to all this and have pretty much less knowledge regarding the topic. I personally found it to be very easy to understand. Thanks.



_________
David Fischer
fixedassetturnovers.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 177 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group