Re: Performance Monitoring
Posted in 1995
I have a script ixwarn which does this -- it can be run periodically via
cron. The script needs to be adapted to suit your own thresholds. It uses
a script ixmail to send mail, but only if there is some interesting data to
report.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
>From: ctaberman@cix.compulink.co.uk ("Colin Taberman")
>Date: Thu, 13 Apr 1995 19:06:14 GMT
>X-Informix-List-Id: <news.13016>
>
>Does anyone know of any monitoring tools / packages which are available
>for Informix OnLine v6. I am looking specifically for any utilities which
>may be available to report for information available from the Informix
>ONSTAT monitor and to be able to collate, report and alert when specific
>threshholds may have been reached / breached.
: "@(#)shar.sh 1.9"
#! /bin/sh
#
# This is a shell archive.
# Remove everything above this line and run sh on the resulting file.
# If this archive is complete, you will see this message at the end:
# "All files extracted"
#
# Created: Fri Apr 14 09:27:37 PDT 1995 by johnl at Informix Software Ltd.
# Files archived in this archive:
# ixwarn
#
#--------------------
if [ -f ixwarn -a "$1" != "-c" ]
then echo shar: ixwarn already exists
else
echo 'x - ixwarn (2173 characters)'
sed -e 's/^X//' >ixwarn <<'SHAR-EOF'
X: "@(#)ixwarn.sh 1.2 95/03/31"
X#
X# Warn about critical Informix resource problems
X
Xixb=${INFORMIXDIR:-/usr/informix}/bin
Xtbstat=$ixb/onstat
Xif [ ! -f $tbstat ]
Xthen tbstat=$ixb/tbstat
Xfi
Xif [ ! -f $tbstat ]
Xthen
X echo "`basename $0 .sh`: cannot locate onstat or tbstat" >&2
X exit 1
Xfi
X
X$tbstat -Fp |
Xawk '#
X/Fg Writes/ { fg = 1; next; }
X/dskreads/ { pc = 1; next; }
X/ovtbls/ { ov = 1; next; }
X {
X if (fg == 1) {
X # Non-zero foreground writes are a problem!
X if ($1 != 0)
X print "Foreground Writes = ", $1;
X }
X if (pc == 1) {
X # Read cache less than 90% is a problem
X if ($4 < 90)
X print "Read cache effciency = ", $4;
X # Write cache less than 70% is a problem if the number
X # of writes is a significant proportion of the reads.
X # Significant is deemed to be 5% (1/20).
X if ($8 < 70 && $3 < 20 * $7)
X print "Write cache efficiency = ", $8;
X }
X if (ov == 1) {
X if ($1 > 0)
X print "Over tables = ", $1;
X if ($2 > 0)
X print "Over locks = ", $2;
X if ($3 > 0)
X print "Over users = ", $3;
X if ($4 > 0)
X print "Over buffers = ", $4;
X }
X pc = ov = fg = 0;
X }
X#' |
Xixmail -s "Informix Resource Problems"
Xexit 0
X
X### Sample duff data (mangled to be duff)
X
Xcat <<!
XRSAM Version 5.00.UC2 -- On-Line -- Up 08:37:01 -- 2048 Kbytes
X
XFg Writes LRU Writes Idle Writes Chunk Writes
X5 29 0 484
X
Xaddress flusher snooze state data
X80401ab0 0 60 I 0 = 0
X states: Exit Idle Chunk Lru
X
XProfile
Xdskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
X9780 8161 96511 89.00 3766 4239 7675 50.00
X
Xisamtot open start read write rewrite delete commit rollbk
X78339 12318 12430 30047 1870 1181 118 3044 0
X
Xovtbls ovlock ovuser ovbuff usercpu syscpu numckpts flushes
X1 2 3 4 33.36 30.44 3 201
X
Xbufwaits lokwaits lockreqs deadlks dltouts lchwaits ckpwaits compress
X0 0 103309 0 0 2 1 276
X
X!
SHAR-EOF
chmod 775 ixwarn
if [ `wc -c <ixwarn` -ne 2173 ]
then echo shar: ixwarn unpacked with wrong size
fi
# end of overwriting check
fi
echo All files extracted
exit 0