Re: infxalrm?
Posted in 1998
> This is not an errno. Return code 137 is the result of a script
> running some program that fails. I see this most often when someone
> uses the default logs_full.sh and has not set up a storage manager for
> onbar it returns codes in the 130's range.
OK. My logs are going to /dev/null for now. Legato is in my future.
Onbar is not set up but that is on the horizon. If this were the problem,
however, I would expect every logical log completion to result in these
processes laying around. This is not the case.
> Could you post that script again in plain text. Netscape is not
> translating it for me....
> [MORE SNIPPING]
Included at the end.
> Don't let tech support intimidate you. I've been using my own
> ALARMPROGRAMs since 7.13. They told me it HAD to be a ksh script and
> could not be an executable, but my eventalarm.c has been running now in
They are saying the same thing to me. I've been using the simple script
below for 3 years now on versions 7.12 - 7.3. It's not elegant, but it
works. I find it hard to believe that it has been broken all along, but
I'm willing to accept the fact if someone can explain to me how.
> 5 different 8.xx versions for three years! BTW if you want to test out
> working event handler code get my submission, utils3_ak, from the IIUG
> Software Repository. It contains a version of logs_full.sh that uses
> ontape instead of onbar and my eventalarm.c executable ALARMPROGRAM
> which does the same and MUCH MUCH more.
I've done so. I was able to compile successfully and I ran it against a
test system for a while. I used it as a reference for a new script I've
created that is tailored to our environment.
Larry Kemmerling
Here's the script as requested:
#! /bin/sh
#*******************************************************************************
#
PROG='Informix_Error_Detect'
DATE=`date +%y%m%d%H%M%S`
TMPFILE=${TMPDIR:-/tmp}/$PROG.$DATE
USER_LIST=larryk,scottm
SERVER=`echo $INFORMIXSERVER`
EXIT_STATUS=0
EVENT_SEVERITY=$1
EVENT_CLASS=$2
EVENT_MSG="$3"
EVENT_ADD_TEXT="$4"
EVENT_FILE="$5"
rm -f $TMPFILE
touch $TMPFILE
if [ $1 -gt 3 ]; then
echo " " >> $TMPFILE
echo "($SERVER) is having problems with the Informix database" >> $TMPFILE
echo " " >> $TMPFILE
echo " Event_Severity ($EVENT_SEVERITY)" >> $TMPFILE
echo " Event_Class ($EVENT_CLASS)" >> $TMPFILE
echo " Event_Msg ($EVENT_MSG)" >> $TMPFILE
echo " EVENT_ADD_TEXT ($EVENT_ADD_TEXT)" >> $TMPFILE
echo " EVENT_FILE ($EVENT_FILE)" >> $TMPFILE
echo " " >> $TMPFILE
/usr/ucb/Mail -s "$PROG Program Reporting Problems . . . . " $USER_LIST < $TMPFILE
fi
rm -f $TMPFILE
exit $EXIT_STATUS