ADSM-L

Re: script to see if TSM Server is down

2002-03-20 00:07:42
Subject: Re: script to see if TSM Server is down
From: Michael Benjamin <MBenjamin AT BUNNINGS.COM DOT AU>
Date: Wed, 20 Mar 2002 13:01:32 +0800
No it's not bad. Here's a variation, just gets rid of the output, and makes
use of an environment file.

Try to use  " -ne 0 " as your test value, it's just more correct than:

 [ "$temp" = "0" ]

Because you're dealing with a numeric, not a string.

#!/bin/ksh
#
# Check that TSM is accessible from a client.
#

. /usr/local/adsm/bin/adsm.env

PROGNAME="/usr/bin/dsmadmc"

${PROGNAME} -id=${ID} -pass=${PASS} 'quit' > /dev/null 2>&1

if [ $? -ne 0 ]
then
    echo "TSM is currently inactive! INVESTIGATE!"
    # email/page etc.
else
    echo "TSM is active and responding."
fi

exit 0


> -----Original Message-----
> From: Andy Carlson [SMTP:andyc AT ANDYC.CARENET DOT ORG]
> Sent: Saturday, March 16, 2002 12:52 AM
> To:   ADSM-L AT VM.MARIST DOT EDU
> Subject:      Re: script to see if TSM Server is down
>
> Here is what I do (crude, but it works).  I do this from a box that TSM
> is not running on, in case not only TSM crashes, but the whole box
> crashes:
>
> #!/usr/bin/ksh
>
> ADMIN=userid
> ADMINPASS=passwrd
> ADSMPATH=/usr/bin
>
> $ADSMPATH/dsmadmc -id=$ADMIN -password=$ADMINPASS q proc > /tmp/proc.out
> temp=`grep -c AIX /tmp/proc.out`
>
> if  [ "$temp" = "0" ]; then
>         /usr/bin/mailx user@email < /usr/local/adsmdown
> fi
>
>
> Andy Carlson                             |\      _,,,---,,_
> andyc AT andyc.carenet DOT org            ZZZzz /,`.-'`'    -.  ;-;;,_
> BJC Health System                       |,4-  ) )-,_. ,\ (  `'-'
> St. Louis, Missouri                    '---''(_/--'  `-'\_)
> Cat Pics: http://andyc.dyndns.org/animal.html
>
> On Fri, 15 Mar 2002, Marc Levitan wrote:
>
> > Hi All -
> >
> > Does anyone have a script that will send out an email alert if the TSM
> > server goes down.
> >
> > I am running AIX 4.3.0
> > TSM 3.7.4
> >
> > Thanks!
> > Marc Levitan
> > Storage Manager
> > PFPC Global Fund Services
> >

**************************************************************************
Bunnings Legal Disclaimer:

1)      This document is confidential and may contain legally privileged
        information. If you are not the intended recipient you must not
        read, copy, distribute or act in reliance on it.
        If you have received this document in error, please telephone
        us immediately on (08) 9365-1555.

2)      All e-mails sent to and sent from Bunnings Building Supplies are
        scanned for content. Any material deemed to contain inappropriate
        subject matter will be reported to the e-mail administrator of
        all parties concerned.

**************************************************************************
<Prev in Thread] Current Thread [Next in Thread>