About keepFCalive
Introduction
KeepFCalive was created to check that both (or either one of) FirstClass Server and Internet Services are running and to start them if they aren't.
Basically the script will do the same as a human would do to monitor the server software;
First it runs "fcsctl status" in the terminal to see if FCS is running. If the result is:
/usr/sbin/fcsctl status: FirstClass Core Server (fcsd) is not running.
the script will start the server by running "fcsctl start".
Then it does the same for fcisctl.
Logging
KeepFCalive will write a simple logfile that is easy to understand, so you know when the server crashed and that it was started again. Here is an example of the log:
------------------------------------------------------------------
2005-02-08 10:30:00 FCIS is down, trying to restart it
2005-02-08 10:30:06 FCIS was started
------------------------------------------------------------------
2005-02-09 14:45:00 FCIS is down, trying to restart it
2005-02-09 14:45:06 FCIS was started
------------------------------------------------------------------
2005-02-10 10:55:00 FCIS is down, trying to restart it
2005-02-10 10:55:05 FCIS was started
------------------------------------------------------------------
Running keepFCalive
KeepFCalive is "just" a simple shellscript. When you run it it checks the status of both server software and takes appropriate actions. Then it will quit.
How is this script going to monitor your server 24/7/365+?
The answer is simple, somebody needs to run the script once in a while. Fortunately Mac OS X (and most Linuxes) includes a daemon called "cron" that can be set up to perform tasks at any given time. You will have to set up cron to run keepFCalive as often as you would like keepFcalive to check the status of your server. Every 5-10 minutes seems like a reasonable interval. Setting up cron will be explained in the installation section.
|