There are obviously a number of ways to do this, and you could certainly
put them all in the same script and add it to the unix crontab to
execute periodically.  I have done this in the past in several
installations.  If a check of (space, db2sysc, connection success)
doesn't respond you can probably assume it's worth checking (i.e.
network, hardware, os, load,  or db2 problem of some kind) into and send
an email as appropriate (at least that's what I would do if I asked db2
and didn't get a satisfactory reply!)

1.  Script to monitor the tablespace utilization - if a node doesn't
respond - send the email.  This also monitors space if that's an issue
for your particular situation. 2.  Check for db2sysc process - if you
don't have one - send the email. 3.  Make a database "db2 connect
to...", and if you can't, there's *some* kind of problem - send the
email

Performing a simple connect and terminate might be more of a better "all
is well" sort of a check.

You can subsequently try to give it the "db2start ...", which may or may
not, because of the problem at hand, be successful.  If you need an
example script for all or some of the above, let me know.

Dale

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of McLeod, Scott
> Sent: Wednesday, November 14, 2001 8:26 AM
> To: [EMAIL PROTECTED]
> Subject: RE: DB2EUG: Best way to determine if DB2 is "up"?
>
>
> There is a script I wrote on the grous home page to do this.
> I run it every 15 minutes.  It runs the DB2start command.  If
> DB2 is down it restarts it. If not you just get a message
> saying DB2 is already up.
>
>
>
> [EMAIL PROTECTED] wrote:
>
> > Our system administrator wants me to give him a UNIX shell
> script that
> will
> > report to him on whether DB2 is up or down.  It's easy to
> determine if
> it's
> > down:  If there are no processes running for the instance owner, my
> shell
> > script just prints "DB2 is down" on his screen.  But it seems more
> > problematic to determine if everything that should be running is in
> fact
> > running.  He doesn't want me to simply display all of the
> DB2 instance
> > processes, since he can't be expected to be expert in
> knowing all the
> > processes of every application on every system that he administers.
> My
> > question, then, is:  What is the best/most desirable indicator that
> the DB2
> > instance is "up" in every respect?  Would a successful attempt to
> connect
> > to the database do it?  Is there another, better approach?
> >
> > By the way, we are running DB2 UDB EEE 7.2 on AIX 4.3.3.0.
> >
> > Thanks.
> >
> > Steve Westfall
> > Equifax, Inc.



=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to