It is critical to monitor the Ingres Transaction Log file because if it fills up it could cause your entire Ingres installation to freeze while it tries to rollback the transaction that caused it to fill up.
The following script should be scheduled to run via cron every 5 or 10 minutes.
You should alert before you hit your FORCE ABORT or LOGFULL levels that you have defined when you setup your Ingres installation.
It can be setup to either email or page at different levels (warning or critical). Just insert your paging or email commands at the relevant point in the script.
It uses the Ingres logstat command to extract the percentage full attribute and then acts depending on the current result.
#!/bin/sh
############################################################################
#
# PROGRAM NAME: monitor_logstat.ksh
# USAGE: monitor_logstat.ksh
# and pages
#
############################################################################
#
WARN_PCENT=$1
PAGE_PCENT=$2
II_SYSTEM=/ingres
LD_LIBRARY_PATH=/usr/lib:$II_SYSTEM/ingres/lib
PATH=$II_SYSTEM/ingres/bin:$II_SYSTEM/ingres/utility:$PATH
export II_SYSTEM LD_LIBRARY_PATH PATH
CURR_PCENT=`$II_SYSTEM/ingres/bin/logstat | fgrep “Percentage of log file in use” | awk ‘{ print $9 }’`
if [ $CURR_PCENT -ge $PAGE_PCENT ]
then
< insert your email or paging commands >
exit 0
elif [ $CURR_PCENT -ge $WARN_PCENT ]
then
< insert your email or paging commands >
exit 0
fi