Re: alarmprogram.sh
Posted in 2003
Sadi G'rsoy wrote:
> Hi all,
> Our platform is:
> IDS 9.40 FC1
> AIX 5.2
>
> We want to modify alarmprogram.sh. We want the program to work like
> ontape -c. That is, when one logical log becomes full, we want it to be> archived, not wait until all logs are full.
The default alarm program ($INFORMIXDIR/etc/log_full.sh), which I
presume is still supplied with version 9.40, does this already, albeit
using onbar.
This is very difficult using ontape and is probably more easily achieved
using ontape -c without being triggered by alarm events. Remember that
ontape -c will continue writing to the end of a tape, whereas ontape -awill OVERWRITE the tape, unless you do some clever shuffling of tapes or
disk files.
If you do use an alarm program, one thing to be careful of is that
ontape -a will backup ALL completed logs. However, the alarm programwill be triggered for each individual log that fills, so you need to be
careful that the alarm program first checks to see that ontape is not
already running.
If you are concerned about your logs filling up, then one trick that
used to be supplied in a sample alarm program in $INFORMIXDIR/etc was to
check the percentage of logs that are full after each log fills, then
perform a backup after that threshold is exceeded. But again, you would
need to ensure that the previous backup device is safe.
> For this purpose, we investigated the commands:
> ALRM_NOTWORTHY=1
> ALRM_INFO=2
> ALRM_ATTENTION=3
> ALRM_EMERGENCY=4
> ALRM_FATAL=5
These are the alarm severity values. Only values 2-5 trigger your alarm
program.
> EVENT_SEVERITY=$1
> EVENT_CLASS=$2
> EVENT_MSG="$3"
> EVENT_ADD_TEXT="$4"
> EVENT_FILE="$5"
These are the 5 parameters that can be passed to your alarm program, the
last 2 being optional.
> but we could not find any descriptions about them.
> Do you have any suggestions?
See the chapter on "Event Alarms" in the "Informix Administrator's
Reference for IDS" manual.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+