Installing keepFCalive
1. Download the software
You can download the latest version of keepFCalive in the download-area.
2. Install the software
Make sure you are logged in as "fcadmin" on the server.
On Mac OS X
On Mac OS X mount the disk-image you downloaded by double-clicking the image-file. Copy the keepFCalive folder to fcadmin's home (~fcadmin), or if you already have a keepFCalive folder just copy the files from within the new keepFCalive folder to the keepFCalive folder in fcadmin's home.
On LINUX (or Mac OS X if you are skilled)
Download the "keepFCalive_X.X.tgz" file and place it in ~fcadmin/
Use this command to extract the file (make sure you are in "~fcadmin" first):
tar xzvf keepFCalive_?.?.tgz
Both platforms
You should now have theese files in ~fcadmin/keepFCalive/:
• keepFCalive.sh
• disableFCalive.sh
• shutdownFC.sh
• enableFCalive.sh
If you are installing on Linux, please make sure the scripts are executable. You can use "chmod 700 ~fcadmin/keepFCalive/*.sh" to correct the permissions on the files.
3. Set up the script for FCS or FCIS only
If you run both FCS and FCIS on the same server (and like keepFCalive to monitor both), just continue to the next step.
If you are either running only FCS or FCIS on the server, you need to disable the monitoring for the one you are not using.
To do that, simply create a file or folder named disableFCS (to disable monitoring of FCS) or disableFCIS (to disable monitoring of FCIS) inside "~fcadmin/keepFCalive/"
4. Set up cron or launchd
This section is divided into 4 different ways to achieve the same thing. All versions (4a, 4b, 4c, 4d) of the instructions work on Mac OS X. 4c is the recommended installation instruction for Linux users.
4a. is the easy install for Mac OS X.
4b. is a guide to how to install crontab using CronniX on Mac OS X (also easy to use).
4c. is a guide explaining how to install the crontab using Terminal (suitable for those who know how to handle the terminal).
4d. is how to use launchd on Mac OS X 10.5 instead of cron and how to set it up using Lingon.
4a. Set up cron the easy way on Mac OS X
The easiest way to install the crontab (so cron will launch keepFCalive every 5 minutes to perform its tasks) is to use the insertcrontab.command found in the Install Crontab folder inside the keepFCalive -folder. Just make sure you are logged in as fcadmin and double-click the insertcrontab.command icon.
A brief explanation about the insertcrontab.command for those interested to know more about what it does:
It takes your current crontab (if you have one), removes all old lines containing "keepFCalive.sh", leaves all other lines. It then adds the information required to run keepFCalive every 5 minutes (it includes the file "keepFCalive_cron.txt "). Then it installs the new crontab.
4b. Set up cron using CronniX on Mac OS X
If you like to use a graphical interface to install crontab for keepFCalive, I recommend that you download CronniX from http://www.abstracture.de/projects-en/cronnix (please note that CronniX is not provided by the author of this site, and that the author of CronniX might like you to make donations to support CronniX).
This guide was made using CronniX 3.0:
1. Launch CronniX.
2. Check that you are modifying the correct crontab: 
3. Click on the New-button:
4. Fill in as in this screenshot:
The command is "sh ~fcadmin/keepFCalive/keepFCalive.sh", so just copy-paste it.
5. Click the "New" button.
6. Save and Quit.
4c. Set up cron from the Terminal
Now you need to set up cron to run keepFCalive.sh as often as you like.
Open the "Terminal" (found in /Applications/Utilities on Mac OS X). The instructions will tell you what you are doing and the blue part is what you should type into the termnal.
1. tcsh #Change the shell to tcsh
2. setenv EDITOR pico #Makes pico the default editor (for this session only). Some Linux users may use "nano" instead of "pico".
3. crontab -e #Create/modify the crontab file of fcadmin
4. Insert the following line (make sure it isn't breaked onto multiple lines if you copy-paste, and note that you should have a single tab in each space and not multiple space-characters):
*/5 * * * * sh ~fcadmin/keepFCalive/keepFCalive.sh
B.T.W. the first */5 in the line above means every five minutes. */10 would mean every ten minutes and so on. If you like to run it every minute you should not write */1, rather just *
5. Press control+o (the letter o, not zero) to save the file. It will suggest something like this:
Just hit enter, do not change the name!
6. Press control+x to exit pico or nano.
7. In the terminal you will see something like this, the last one verifies that the crontab was set up properly.
crontab: no crontab for fcadmin - using an empty one
crontab: installing new crontab
8. You may now write exit and exit in the teminal (this is optional) and close the terminal.
9. Now crontab should run your script as often as you decided in step 4.
4d. Set up launcd instead of cron using Lingon on Mac OS X 10.5
The easiest way to set up launchd to start keepFCalive every 5 minutes is using Lingon, which us a graphical user interface for creating and editing launchd configuration files on Mac OS X 10.5.
2. Open Lingon, press the New-button in the toolbar.
3. Select the "My Agents" and press Create
4. Fill in like this:
5. Now switch to the "Expert mode" using the button in the bottom right corner (see screenshot above).
6. In the top right corner, you will find . From that select the option .
7. Check that this was inserted into the text:
Please note that if the AbandonProcessGroup is missing launchd will start the server, but as a part of the sanity checking it will kill the server when keepFCalive has completed (after a few seconds).
8. Save the configurationfile and restart your server to load the configuration file.
This section about launchd is new and if you experience any kind of problems using this step by step guide, please e-mail me at joakim.nordling tietotori.fi
5. Verify Installation
When keepFCalive is run for the first time (or if no logfile exists) it will create a logfile; "~fcadmin/keepFCalive.log".
It will look similiar to this, if the servers are running:
2005-02-06 20:40:01 FCS is running
------------------------------------------------------------------
2005-02-06 20:40:01 FCIS is running
------------------------------------------------------------------
You would propably like to see that cron is actually running keepFCalive as often as you like. You can make keepFCalive create input to the logile (similiar to the above lines) each time it is run, by creating a file or folder named "alwayslogFCalive" inside "~fcadmin/keepFCalive/".
When you've seen a couple of those lines in the logfile you know cron is set up correctly and the script should be running fine. Remove the "alwayslogFCalive" file or folder to avoid keepFCalive from filling the logfile with running lines every 5 minutes!
Now keepFCalive should be monitoring the server and let you sleep well instead of worrying if your IS is still running or if your entire FCS has crashed.
6. About the logfile
KeepFCalive writes a logfile into the file"~fcadmin/keepFCalive.log". It is just a textfile, that you can open with almost any application. If it is getting too big you can just throw it away and keepFCalive will create a new one. You can also remove lines from it using any plaintext editor.
7. Read the maintenance section
All servers sometimes needs to be upgraded and therefore shut down sometimes. If you stop the server please note that keepFCalive will start it next time it is run if you do not stop keepFCalive some way. For more information about this, read the maintenance section!
Uninstalling
If you would like to uninstall keepFCalive you will need to remove keepFCalive from your crontab. If you aren't running other scripts using cron you may open a terminal and write crontab -r to remove all your schedules in cron. Otherwise just follow the installation steps and remove the line you inserted in step 4. If you used CronniX to install the crontab, you can either use crontab -r , or use the
delete-button inside CronniX. Removing just the CronniX application won't help, since the crontab is not not inside CronniX, it is just a graphical front end to edit crontab. If you used the insertcrontab.command to install the crontab you can use the removecrontab.command to remove the crontab (this will delete all lines containing "keepFCalive.sh" from your crontab).
You may also remove the "~fcadmin/keepFCalive/" folder (and the contents of it), and the logfile "~fcadmin/keepFCalive.log".
Now you've got rid of keepFCalive!
|