[Dxspider-support] The 'perfect' cron list

Danilo Brelih danilo.brelih at siol.net
Thu Mar 2 21:47:37 GMT 2023


Laurent-F4BWT via Dxspider-support je 2.3.2023 ob 22:39 napisal:

See RBN.mojo file in the /spider root directory.

73 Dan



So how do you go about using this:

First you need to create one or two RBN user(s). Now you can use any call you
like and it won't be visible outside of the node. I call mine SK0MMR
and SK1MMR. One of these connects to the "standard" RBN port that
outputs CW, BEACON, DXF, PSK and RTTY spots, and the other connects to
the RBN port that just outputs FT4 and FT8 spots.

set/rbn sk0mmr sk1mmr

Now create connect scripts in /spider/connect/sk0mmr (and similarly
sk1mmr). They look like this:

/spider/connect/sk0mmr:

connect telnet telnet.reversebeacon.net 7000
'call:' '<node callsign here'

/spider/connect/sk1mmr:

connect telnet telnet.reversebeacon.net 7001
'call:' '<node callsign here'

Now put them in your local crontab in /spider/local_cmd/crontab:

* * * * * start_connect('sk0mmr') unless connected('sk0mmr')
* * * * * start_connect('sk1mmr') unless connected('sk1mmr')

This will check once every minute to see if each RBN connection is
active, you can check what is connected with the 'links' command:

                                                  Ave  Obs  Ping Next      Filters
   Callsign Type Started                 Uptime    RTT Count Int. Ping Iso? In  
Out PC92? Address
     GB7DJK DXSP  5-Jul-2020 1722Z     7h 6m 8s   0.02   2 300    
89               Y    163.172.11.79
     SK0MMR RBN   5-Jul-2020 1722Z     7h 6m 8s 0     0                    
198.137.202.75
     SK1MMR RBN   5-Jul-2020 1722Z     7h 6m 8s 0     0                    
198.137.202.75

The RBN connections are sometimes dropped or become stuck. I have a
mechanism to detect this and it will disconnect that RBN connection
and, by this means,it will be automatically reconnected by the
crontab, just like any other (normal) node.

I use the crontab, rather than restarting immediately after
disconnection, to prevent race conditions (or just slow them down to
one disconnection a minute).

The first time a connection is made, after node startup, there is a 5 (configurable)
minute pause before RBN spots come out for users. This is done to fill
up (or "train") the cache. Otherwise the users will be overwhelmed by
spots - it slows down reasonably quickly - but experiment shows that 5
minutes is a reasonable compromise. The delay is configurable,
globally, for all RBN connections, but in future is likely to be
configurable per connection. Basically, because the FTx RBN data is
much more bursty and there is more of it (except on CW contests), it
could do with a somewhat longer training period than the CW etc RBN
connection.

If a connection drops and reconnects. There is no delay or extra
training time. If the node is stopped and restarted within a few
minutes, then no training time will occur.

For users. At the moment. There is a single command that sets or
unsets ALL RBN spot sorts:

Users can select which type(s) of RBN/Skimmer spot they require using
the 'set/skimmer' command. Users can enter the 'help set/skimmer'
command for more information on this. They can also enter then 'help
rbn' command for more information about how to interpret what DXSpider
produces and some other useful background information.

This still very much "work in progress" and will be subject to
change. But I am grateful to the feedback I have received, so far,
from:

Kin EA3CV
Andy G4PIQ
Mike G8TIC
Lee VE7CC

But if you have comments, suggestions or even brickbats, please email
me or the support list.

Dirk G1TLH


> Hi all,
>
> I see on many mesage this :
>
> # Check the skimmer connection every minute and reconnect if needed.
> * * * * * start_connect('sk0mmr') unless connected('sk0mmr')
> * * * * * start_connect('sk1mmr') unless connected('sk1mmr')
>
>
> Is it integrated into the software or do you have to request a connection to an OM or server?
> Because I can't find an answer to my question on the various DX-Spider sites.
> If you could help me understand what this means.
>
> Thanks for your answer and 73 51 QRO
> Laurent F4BWT
> Sysop of F4BWT-3 & F4BWT-7
>
> ----- Mail original -----
> De: "Keith Maton via Dxspider-support"<dxspider-support at tobit.co.uk>
> À: "The DXSpider Support list"<dxspider-support at tobit.co.uk>
> Cc: "Keith Maton"<g6nhu at me.com>
> Envoyé: Jeudi 2 Mars 2023 21:04:33
> Objet: Re: [Dxspider-support] The 'perfect' cron list
>
>
> Probably not ‘perfect’ but this works for me.
>
>
>
>
> # Set so that all crontab entries are performed in LOCAL time, not UTC
>
> LOCALE = LOCAL
>
> #
>
> # Remote node links
>
> xxx removed because we all have different ones
>
>
>
>
> # Check the skimmer connection every minute and reconnect if needed.
>
> * * * * * start_connect('sk0mmr') unless connected('sk0mmr')
>
> * * * * * start_connect('sk1mmr') unless connected('sk1mmr')
>
>
>
>
> # Update mrtg every five minutes
>
> 00,05,10,15,20,25,30,35,40,45,50,55 * * * * run_cmd('mrtg all')
>
>
>
>
> # Update the badip tables every hour
>
> 38 * * * * spawn('cd /spider/local_data; wget -qNhttp://www.dxspider.net/download/badip.torexit')
>
> 38 * * * * spawn('cd /spider/local_data; wget -qNhttp://www.dxspider.net/download/badip.torrelay')
>
> 38 * * * * spawn('cd /spider/local_data; wget -qNhttp://www.dxspider.net/download/badip.global')
>
> 39 * * * * run_cmd('load/badip')
>
>
>
>
> # Daily at 04:00 - Automatically tidy up old log files.
>
> # debug log management is controlled via spider and via a line in startup.
>
> 02 4 * * * spawn(q[find /spider/local_data/spots -type f -mmin +44640 -exec rm -f {} \;])
>
> 01 4 * * * spawn(q[find /spider/local_data/log -type f -mmin +10080 -exec rm -f {} \;])
>
> 03 4 * * * spawn(q[find /spider/local_data/wcy -type f -mmin +1440 -exec rm -f {} \;])
>
> 04 4 * * * spawn(q[find /spider/local_data/wwv -type f -mmin +1440 -exec rm -f {} \;])
>
>
>
>
> # Daily at 05:00 - Get latest cty.dat
>
> 00 05 * * * spawn("cd /spider/local_data ; rm cty.old ; mv cty.dat cty.old ; wget -qNhttp://www.country-files.com/cty/cty.dat")
>
> 02 05 * * * spawn("cd /spider/local_data ; rm wpxloc.old ; mv wpxloc.raw wpxloc.old ; wget -qNhttp://www.country-files.com/cty/wpxloc.raw")
>
> 04 05 * * * spawn("cd /spider/local_data ; /spider/perl/create_prefix.pl")
>
> 10 05 * * * run_cmd("load/prefixes")
>
>
>
>
> # Daily at 08:00 - Get latest Keps (I doubt anyone uses these but it's good to be up to date)
>
> 02 08 * * * spawn("cd /tmp ; wget -qNhttp://www.amsat.org/amsat/ftp/keps/current/nasabare.txt  ; /spider/perl/convkeps.pl -p nasabare.txt")
>
> 04 08 * * * run_cmd("load/keps")
>
> 06 08 * * * spawn("rm /tmp/nasabare.txt")
>
>
>
>
> # Check for updates on weekdays at 23:42. Do not update at weekends. Update the updater first
>
> 40 23 * * 1,2,3,4,5 spawn('cd /spider/local_cmd; wget -qNhttps://raw.githubusercontent.com/EA3CV/dxspider_info/main/check_build.pl')
>
> 41 23 * * 1,2,3,4,5 run_cmd('load/cmd')
>
> 42 23 * * 1,2,3,4,5 run_cmd("check_build Y")
>
>
>
>
> # Monday 23:10 - Get latest FCC data
>
> 10 23 * * 1 spawn("cd /tmp ; wget -qNftp://ftp.w1nr.net/usdbraw.gz  ; /spider/perl/create_usdb.pl usdbraw.gz")
>
> 15 23 * * 1 run_cmd("load/usdb")
>
> 20 23 * * 1 spawn("rm /tmp/usdbraw.gz")
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 2 Mar 2023, at 19:04, Mikel EA2CW via Dxspider-support<dxspider-support at tobit.co.uk>  wrote:
>
>
> After Dirk's corrections, this is my /spider/local_cmd/crontab file. Hope it can help. Be careful with some undesired LF/CR
>
> 73, Mikel
>
> SOF ===================================================================================
> # Check connections every 5 minutes to see if servers are connected
> # if not, starts connect jobs
> 02,07,12,17,22,27,32,37,42,47,52,57 * * * * start_connect('ea3cv-2') unless connected('ea3cv-2')
> # one line for each node you want to stay connected to
> #
> # Check connections with reversebeacon servers every minute
> * * * * * start_connect('sk0mmr') unless connected('sk0mmr')
> * * * * * start_connect('sk1mmr') unless connected('sk1mmr')
> #
> # Search for updates week days at 04:25 UTC
> #
> 25 4 * * 1,2,3,4,5 run_cmd("check_build N")
> #
> #
> # Check IP dynamic changes every 10 min
> 02,12,22,32,42,52 * * * * run_cmd("update_ip")
> #
> # Users export on tue & thu at 03:20
> 20 3 * * 2,4 run_cmd("export_users")
> #
> # Monday 3:00 local - Get latest FCC data (W1NR updates Sundays)
> 0 3 * * 1 spawn("cd /tmp && wget -Nqftp://ftp.w1nr.net/usdbraw.gz  && /spider/perl/create_usdb.pl usdbraw.gz")
> 2 3 * * 1 run_cmd("load/usdb")
> 4 3 * * 1 spawn("rm /tmp/usdbraw.gz")
> #
> # Friday 5:00 UTC - Get latest Keps to be ready for any contest
> 0 5 * * 5 spawn("cd /tmp && wget -Nqhttps://www.amsat.org/amsat/ftp/keps/current/nasabare.txt  && /spider/perl/convkeps.pl -p nasabare.txt")
> 2 5 * * 5 run_cmd("load/keps")
> 4 5 * * 5 spawn("rm /tmp/nasabare.txt")
> #
> # Friday 4am UTC - Get latest cty.dat to be ready for any contest
> 6 4 * * 5 spawn("cd /spider/local_data && wget -Nqhttps://www.country-files.com/cty/cty.dat")
> 8 4 * * 5 spawn("cd /spider/local_data && wget -Nqhttps://www.country-files.com/cty/wpxloc.raw")
> 10 4 * * 5 spawn("cd /spider/local_data && /spider/perl/create_prefix.pl")
> 12 4 * * 5 run_cmd("load/prefixes")
> #
> # Announce to logged users every hour at minute 08
> 08 * * * * run_cmd('ann Remember to register if you want to send spots. Use SP EA2CW to do it')
> #
> # BADIP's, TOR & Others
> 17 * * * * spawn('cd /spider/local_data; wget -qNhttp://www.dxspider.net/download/badip.torexit')
> 17 * * * * spawn('cd /spider/local_data; wget -qNhttp://www.dxspider.net/download/badip.torrelay')
> 17 * * * * spawn('cd /spider/local_data; wget -qNhttp://www.dxspider.net/download/badip.global')
> 18 * * * * run_cmd('load/badip')
> EOF =========================================================================
>
>
>
> El 02/03/2023 a las 19:26, Michael Walker via Dxspider-support escribió:
>
>
> Hi All
>
> For years, my cluster runs flawlessly on its own. :) And, I trust that to
> continue.
>
> Can those in the know share what their CRON entries are so us mear mortals
> can update our own clusters? :)
>
> This is what I have now (and, am now noticing the funny characters that
> require fixing)
>
>
> # Automaticlly check for update at 02:20 on Tuesday morning and then apply
> at 02:30
> # Note, this restarts the node so will disconnect all sessions
> 20 02 * * 2 spawn("cd /spider; git reset --hard; git pull")
> 30 02 * * 2 run_cmd('shutdown▒^`^y)
>
> # Check for updates on weekdays at 23:42. Do not update at weekends.
> Update the updater first
> 40 23 * * 1,2,3,4,5 spawn('cd /spider/local_cmd; wget -qN
> https://raw.githubusercontent.com/EA3CV/dxspider_info/main/check_build.pl')
> 41 23 * * 1,2,3,4,5 run_cmd(▒^`^xload/cmd')
> 42 23 * * 1,2,3,4,5 run_cmd("check_build Y▒^`^})
>
>
>
>
> Mike va3mw
>
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk  
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support  
>

-- 
Gorje, Cerkno h=604m <https://s50e.si/gorje.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20230302/466f4135/attachment-0001.htm>


More information about the Dxspider-support mailing list