Install/Configure SIM - Monitor Linux System Load & Service Status

November 17, 2011 | By
| Reply More

System Integrity Monitor (SIM).

SIM is a system and service monitor for ‘SysVinit’ systems. It does this by consistently verifying the services are online, load averages are in check and log files are at reasonable sizes. The other features include ‘Auto restart ability for downed services’, ‘Ability to auto restart system with definable critical load level’ and ‘Priority change configurable for services, at warning or critical load level’. In this article, we will go through the installation, configuration and usage of SIM.

Installation.

1. Download the source file.

cd /usr/src
wget http://www.rfxn.com/downloads/sim-current.tar.gz

2. Extract the file.

tar -xvzf sim-current.tar.gz

3. Run the installer file.

cd sim-*
./setup -i

This will also execute the auto-config script (/usr/local/sim/autoconf) which will ask for the configuration items. SIM executable file is at ‘/usr/local/sim/sim’.

Configuration.

SIM can be configured in two ways.

1. Running ‘autoconf’ script.

# /usr/local/sim/autoconf
or
# /usr/local/sbin/sim-autoconf

This will ask for the following details.

a. sim.log file location: Default is /usr/local/sim/sim.log
b. Max size of sim.log before rotated: Default is 128KB.
c. Where should alerts be emailed to?: Default is root.
d. Auto-restart services found to be offline?: Default is ‘true’.

Then, it will list the services and we can choose the services that we want to monitor by SIM and we need to specify the ports of requested services.
e. Enable NETWORK monitoring?: Default is ‘false’.
f. Enable LOAD monitor?: Default is ‘false’.
g. Re-nice services at status condition 'warning' or 'critical'? (3 values - warn, crit, false - false=disabled): Default is ‘false’.
h. Reboot system on status condition 'warning' or 'critical'? (3 values - warn, crit, false - false=disabled): Default is ‘false’.

2. Configure it using the file ‘/usr/local/sim/conf.sim’.

Configuration file comes with detailed comments of each directives which makes it easy to configure.

Running SIM.

SIM can be executed in either of the following forms:

'/usr/local/sim/sim'
or
'/usr/local/sbin/sim'

Running 'sim' with no arguments, will display all available arguments:

-q: Quiet mode.
-v :Verbose mode.
-c: Clear data & log files.
-l: Display log file.
-s: Display status information.
-u: Check for SIM updates.
-j: Install/Remove SIM cronjob.

Configure CronJob for SIM.

You can run the main SIM script with the '-j' argument to toggle the cronjob.

# /usr/local/sbin/sim -j

This feature 'toggles' the cronjob for sim - so if it is already setup in crontab it will remove it and vise-versa. A copy of crontab is backed up to /etc/crontab.bk.

Filed Under : LINUX HOWTO, MONITORING

Tagged With :

Free Linux Ebook to Download

Leave a Reply

All comments are subject to moderation.