[Dxspider-support] connects/links

Dirk Koopman djk at tobit.co.uk
Mon Oct 22 14:17:46 BST 2001


On Mon, 2001-10-22 at 13:29, Cees Tool wrote:
> Hi Dirk,
> 
> Is there a way to connect another cluster in case my main link fails ?
> 
> Normally I have a link with pi8tue-8 and can also link with pa4ab-14, but
> have noticed some loop messages starting sometimes between our 3 stations at
> random times when I connect both of them. This caused lots of data
> transferred between us. So I have stopped one of the links.

If you are connected to spider nodes in both directions then, in theory,
it should be reasonably safe, but isn't recommended in a such a close
coupled system as you are using.

NP will fix this.


> 
> And actually I do not need to connect to both stations at the same time, I
> just want to have a backup link in case one of them is down.
> 
> I think, it is not possible to do this in a connect scipt ??
> 
> What I need is :
> 1 - if not connected to pi8tue-8 or pa4ab-14 start the connect script.
> 2 - try to connect pi8tue-8
> 3 - if connect [2] fails then try to connect pa4ab-14
> 
> Is this possible now ?
> Or could you make this kind of script work in a next version ?

You can do this now, in your crontab:-

0,10,20,30,40,50 * * * * start_connect('pi8tue-8') unless connected('pi8tue-8') || connected('pa4ab-14')

5,15,25,35,45,55 * * * * unless (connected('pi8tue-8') || connected('pa4ab-14')) { disconnect('pi8tue-8'); start_connect('pa4ab-14') }

you can put any old bit of perl in a crontab line. You can make this
more bombproof and cause the link to Arnold to be disconnected if
pi8tue-8 reappears in the node list by adding:-

9,19,29,39,49,59 * * * * disconnect('pa4ab-14') if present('pi8tue-8') && !connected('pi8tue-8')

Hope this helps

Dirk





More information about the Dxspider-support mailing list