Tutorial DXSpider on Raspberry PI

Discussion in 'Projects' started by admin, Jan 19, 2015.

?

What do you think about this tutorial ?

  1. very good staff ;-)

    100.0%
  2. good only

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. Staff Member Site-Admin X-108 Member Moderator
    admin
    Offline

    admin Administrator

    Messages:
    109
    Media:
    20
    Likes Received:
    11
    Trophy Points:
    1,017
    Location:
    Stuttgart
    Home page:
    Verified User:
    YES
    Rufzeichen/Call:
    noCall
    Installation of DXSpider on a Raspberry Pi

    1. change to root
    Code:
    sudo su
    2. Setup system to install DXSpider
    Code:
    $ groupadd spider
    $ useradd -m sysop -G spider
    $ usermod -g spider sysop
    - follow the instructions to set the full name and password
    - if you are not prompted for a password enter the following and add a password:

    Code:
    $ passwd sysop
    $ adduser sysop sudo
    Code:
    $ hostname dx-pi
    - any hostname will do


    3. Begin downloading perl libraries.
    Code:
    $ apt-get install libtimedate-perl libnet-telnet-perl libcurses-perl libdigest-sha-perl libdata-dumper-simple-perl
    - Adds the necessary perl modules for DXSpider
    Register or to view Spoiler content!

     
    Last edited: Jan 26, 2015
  2. X-108 Member Member pro !
    X-Boarder
    Offline

    X-Boarder Crack-Boarder

    Messages:
    26
    Likes Received:
    5
    Trophy Points:
    3
    Verified User:
    YES
    at least you need a cron and a connect script to connect to the nodes automatically WtfClown
    for examble - your node parter is: dl1dl-3

    become root
    Code:
    sudo su
    cron
    Code:
    touch /spider/local_cmd/crontab
    nano /spider/local_cmd/crontab
    the cron like this:
    Code:
    # Check every 10 minutes to see if xxxx is connected and if not
    # start a connect job
    
    0,5,10,20,30,40,50 * * * * start_connect('dl1dl') unless connected('dl1dl-3')
    connect script
    Code:
    touch /spider/connect/dl1dl-3
    nano /spider/connect/dl1dl-3
    Code:
    timeout 60
    abort (Busy|Sorry|Fail)
    # don't forget to chmod 4775 netrom_call!
    connect telnet dl1dl.org 7300
    'login' 'do7psl-3'
    client dl1dl-3 telnet
    RememberWacky
    you should ask your node partner for his node-Call (with SSID) and your node partner must register your node-Call (with SSID) in his configuration. otherwise your DXSpider does not workFinger
     
    Lasted edited by : Jan 21, 2015
    • Agree Agree x 1
  3. X-108 Member Moderator
    X-108
    Offline

    X-108 Crack-Boarder

    Messages:
    21
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Stuttgart
    Home page:
    Verified User:
    YES
    Cluster application is writing a lot of data taking a large disk space.Rage

    In order to remove regularly old data in /spider/data/log, /spider/data/debug and /spider/data/spots a symbolic link has been created toward /NULL device and a script in /etc/cron.daily will clean up old cluster data automatically.

    Code:
    sudo su
    create the scripts:

    Code:
    touch /etc/cron.daily/spider
    nano /etc/cron.daily/spider
    with this content: (think on the actually year!) Watching

    Code:
    #!/bin/sh
    
    # We need to delete old files.
    
    spiderdir="/spider/data/spots/2015"
    
    if [ -n "$spiderdir" ] && [ -d "$spiderdir" ]; then
        # only keep three days' depth of these
        find "$spiderdir" -type f -mtime +3 -exec rm {} \;
    fi
    spiderdir="/spider/data/debug/2015"
    
    if [ -n "$spiderdir" ] && [ -d "$spiderdir" ]; then
        # only keep a couple of day's depth of these
        find "$spiderdir" -type f -mtime +2 -exec rm {} \;
    fi
    spiderdir="/spider/data/log/2015"
    
    if [ -n "$spiderdir" ] && [ -d "$spiderdir" ]; then
        # only keep a week's depth of these
        find "$spiderdir" -type f -mtime +7 -exec rm {} \;
    
    fi
    Code:
    touch /etc/cron.weekly/clear_log.sh
    nano /etc/cron.weekly/clear_log.sh
    Code:
    #!/bin/sh
    
    # We need to delete old files.
    
    logdir="/var/log"
    
        rm $logdir/*.gz
    
    clear_log.sh must be executable (chmod a+x clear_log.sh) in order to clean up old log data and recover free space on SD disk.

    Code:
    chmod a+x /etc/cron.weekly/clear_log.sh
     
    Lasted edited by : Jan 21, 2015
    • Agree Agree x 1
  4. Staff Member Site-Admin X-108 Member Moderator
    admin
    Offline

    admin Administrator

    Messages:
    109
    Media:
    20
    Likes Received:
    11
    Trophy Points:
    1,017
    Location:
    Stuttgart
    Home page:
    Verified User:
    YES
    Rufzeichen/Call:
    noCall
    if anyone would like - i will do a image from my RPI DXSpider (8 GB microSD-Image) :rolleyes:Blackalien
     
    Last edited: Jan 19, 2015
  5. X-108 Member Member pro !
    X-Boarder
    Offline

    X-Boarder Crack-Boarder

    Messages:
    26
    Likes Received:
    5
    Trophy Points:
    3
    Verified User:
    YES
    donĀ“t forget to backup your partition Wideyed:mad:

    check your hard drives and removal drives
    Code:
    lshw
    In this example sda is your USB driveGreyalien i choose/root folder for store the file

    For instance, to make an exact clone of the complete partition to a backup file, you could use:
    Code:
    dd if=/dev/sda of=/root/partition.img
    The file can be compressed after the copy, or during by piping the input to gzip or bzip2:
    Code:
    dd if=/dev/sda | bzip2 -9f >/root/partition.img.bz2
    -f --force
    Force overwrite of output files. Normally, bzip2 will not overwrite existing output files. Also forces bzip2 to break hard links to files, which it otherwise wouldn't do.

    bzip2 normally declines to decompress files which don't have the correct magic header bytes. If forced (-f), however, it will pass such files through unmodified. This is how GNU gzip behaves.

    bzip2 compresses large files in blocks. The block size affects both the compression ratio achieved, and the amount of memory needed for ompression and decompression. The flags -1 through -9 specify the block size to be 100,000 bytes through 900,000 bytes (the default) respec-
    tively. At decompression time, the block size used for compression is read from the header of the compressed file, and bunzip2 then allocates itself just enough memory to decompress the file. Since block sizes are stored in compressed files, it follows that the flags -1 to -9 are irrelevant to and so ignored during decompression.


    Likewise, partitions can be restored from these backup copies:
    Code:
    dd if=/root/partition.img of=/dev/sda
    or
    Code:
    bunzip2 -dc /root/partition.img.bz2 | dd of=/dev/sda
     
    Lasted edited by : Jan 20, 2015
    • Agree Agree x 1
  6. Staff Member X-108 Member Moderator
    DO7PSL
    Offline

    DO7PSL Crack-Boarder

    Messages:
    94
    Likes Received:
    3
    Trophy Points:
    1,008
    Location:
    Stuttgart
    Home page:
    Verified User:
    YES
    Rufzeichen/Call:
    DO7PSL
    to add a DX spider node it must be declared as a spider type.
    This is done in file scripts/startup

    In this example you want let the node dl1dl-3 connected to your DXSpider (do7psl-3)


    Code:
    nano /spider/scripts/startup
    Code:
    #
    # startup script example
    #
    # set maximum no of spots allowed to 100
    set/var $Spot::maxspots = 100
    set/spider dl1dl-3
    The other step is to connect your spider to another node

    1) you want to check regularly that a node is connected by adding a dedicated command line in file:
    Code:
    nano /spider/local_cmd/crontab
    For example if want above node do7psl-3 exchange Dx spots with dl1dl-3
    Code:
    # check every 10 minutes to see if f1oyp-8 is connected and if not
    # start a connect job going
    0,10,20,30,40,50 * * * * start_connect('dl1dl-3') unless connected('dl1dl-3')
    2) you need a connect script
    Code:
    touch /spider/connect/dl1dl-3
    nano /spider/connect/dl1dl-3
    connect script for each call present in crontab
    Code:
    timeout 30
    abort (Busy|Sorry|Fail)
    connect telnet dl1dl.dyndns.org 7300
    'login' 'do7psl-3'
    client dl1dl-3 telnet
     
    Lasted edited by : Jan 21, 2015
    • Agree Agree x 1
  7. X-108 Member Member pro !
    X-Boarder
    Offline

    X-Boarder Crack-Boarder

    Messages:
    26
    Likes Received:
    5
    Trophy Points:
    3
    Verified User:
    YES
    I recommend the raspberry pi 1x to reboot the day. It is strange - but does not go beyond a simple cronjob that. I have a script written that I will then run a cronjob

    Code:
    sudo su
    touch /home/pi/rboot.sh
    nano /home/pi/rboot.sh
    rboot.sh
    Code:
    #!/bin/bash
    #reboot the raspberry pi
    sudo reboot
    make it executable
    Code:
    chmod a+x /home/pi/rboot.sh
    edit the crontab
    Code:
    crontab -e
    Code:
    0 0 * * *  sh /home/pi/rboot.sh
    0 0 * * * means daily reboot
     
    Lasted edited by : Jan 30, 2015
    • Agree Agree x 1
  8. X-108 Member Moderator
    X-108
    Offline

    X-108 Crack-Boarder

    Messages:
    21
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Stuttgart
    Home page:
    Verified User:
    YES
    [​IMG]
     

Share This Page