[IRCServices] Services

Chris Knipe cgknipe at mweb.co.za
Sun Jan 9 05:38:11 PST 2000


On Thu, 6 Jan 2000, Angel of Death wrote:

Hi ... 

I won't stay long on this, it might not even be a good solution, but here
goes... 

Crontab, *CAN* do what is needed... 

>>I don't think everyone is understanding the situation presented here. Say 
>>you have Services running on server A. Services links to server B, not an 
>>ircd on the same box (A). Server B crashes. Now Services are no where 
>>because the .conf file only has one server (B) to link to. This is 
>>correctable if a person with access to server A is around to edit the .conf 
>>file, but the situation is that, that person is not around. So the asked 
>>for solution is to have multiple S:lines in the .conf file that Services 
>>would attempt to link to in the event the primary is down. Setting up a 
>>crontab to restart the ircd on server B is moot because server B is dead. 
>>This is what I gathered from Angel's emails. Correct me if I'm wrong.

>From the Services Documentation:

     Normally, Services can be run simply by invoking the "services"
executable.  Services will then use the defaults specified in the
services.conf file, and connect to the specified uplink server.
Alternatively, any of the following command-line options can be specified
to change the default values:

        -remote server[:port]   Connect to the specified server
        -local host  -or-       Connect from the specified address (e.g.
               [host]:[port]        for multihomed servers)
        -name servername        Our server name (e.g. services.some.net)
        -desc string            Description of us (e.g. SomeNet Services)
        -user username          Username for Services' nicks (e.g. services)
        -host hostname          Hostname for Services' nicks (e.g. esper.net)
        -dir directory          Directory containing Services' data files
                                    (e.g. /usr/local/lib/services)
        -log filename           Services log filename (e.g. services.log)
        -update secs            How often to update databases (in seconds)
        -expire secs            How often to check for nick/channel
                                    expiration (in seconds)

---

Now with an rather interesting sh / bash script, you will be able to ping
or traceroute the server to where your services are supposed to link to
(most shell providers allow the use of ping).  From the output, you can
easily grep the ping statistics... 

>From standard Linux (output returned by ping might vary from OS to OS),
issuing something like the command below, will give you an good idea of the 
current network performance to any remote server where services could or 
shoud be linking to... 

   ping -c 50 <host name> | grep received | cut -c 43-70
   0% packet loss

>From the ammount of packet loss returned, you can then reliably decide
where to link to, or what other actions to take. (Hence if you have the
access, you can even change routing tables - would it be neccessary).

Should 100% packet loss be returned, that would obviously mean the server
is dead, now you can re-invoke services with the -remote parameter, linking
your services to the server specified.

The matter of C/N lines in this case, would depend on the remote server
where services is linking to.

Mind you, this type of configuration can even be used to "re-route"
services should lag become an problem.

Regards
Chris Knipe
Cel: (083) 430 8151
Freelance Internet Developer, Consultant, Administrator & Speaker


---------------------------------------------------------------
To unsubscribe, send email to majordomo at ender.shadowfire.org
with "unsubscribe ircservices" in the body, without the quotes.