We do it similar but add extra steps.  We do the following:

1) in the stop script we do a "nohup halt_script &". This does the same as
you did below except we added the -noc switch on the dsmadmc line.  I have
seen times when the dsmadmc line hangs and thus the script hangs. And then
shutdown can hang.

2) We sleep for a short time and then do a "ps" to see if TSM is still
running.  If so we do a "kill on it"

3) If it is still not dead we do a "kill -9" on it.

This way even if it is hung, we get rid of it.  If you have to kill it, you
can then remove the lock file.



--
Phillip Ford
Senior Software Specialist
Corporate Computer Center
Schering-Plough Corp.
(901) 320-4462
(901) 320-4856 FAX
[EMAIL PROTECTED]







-----Original Message-----
From: Robin Sharpe [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 8:36 AM
To: [EMAIL PROTECTED]
Subject: Re: TSM 5.1 HP-UX 11.11 Startup/Shutdown Scripts


Brian,

Here's my script, but we run TSM 4.1 (still).  Is 5.1 different?  You may
not want to have user ID and password in a script, which this method
requires... I can't think of any other clean way of stopping the server. We
had the "rm adsmserv.lock" in the startup, but removed it because it enables
a second startup to run when the server is still up.... which could be
REALLY bad.

What's your overall impression of running TSM on HP? We've been doing it for
almost a year now (on an L2000), and have some issues with intermittent (but
too often) hanging/freezing of TSM... can still get into HP-UX, but dsmadmc
is dysfunctional.

Robin

#!/sbin/sh
##
##  File:         /sbin/init.d/tsm
##  Description:  Startup/shutdown script for Tivoli Storage Manager server
## if [ -f /etc/rc.config.d/tsm ];then
    . /etc/rc.config.d/tsm
fi
rval=2
case $1 in
    start_msg)  echo "Starting Tivoli Storage Manager Server" ;;
    stop_msg)   echo "Shutting down Tivoli Storage Manager Server" ;;
    start)      if [ $RUN_TSM = 1 ];then
                    cd /opt/tivoli/tsm/server/bin
                    #rm ./adsmserv.lock > /dev/null 2>&1
                    #/opt/tivoli/tsm/server/bin/dsmserv -quiet &
                    ./dsmserv > ./dsmserv.log &
                    rval=$?
                fi ;;
    stop)       dsmadmc -id=admin -pa=admin halt > /dev/null 2>&1
                rval=$? ;;
    *)          echo "usage: $0 {start|stop|start_msg|stop_msg}"
                rval=1 ;;
esac
exit $rval



                    "Scott,
                    Brian"
                    <[EMAIL PROTECTED] To:    [EMAIL PROTECTED]
                    OM>           cc:
                    Sent by:      Subject:
                    "ADSM: Dist          Re: TSM 5.1 HP-UX 11.11
Startup/Shutdown Scripts
                    Stor Manager"
                    <[EMAIL PROTECTED]
                    RIST.EDU>


                    08/14/02
                    05:02 PM
                    Please
                    respond to
                    "ADSM: Dist
                    Stor Manager"





Bob,

FYI...

Found out this is a bug in the system. APAR is IC34371 and should be fixed
in 5.1.5.0. Root cause is still unknown.

Regards,

Brian Scott
EDS - BUR Engineering
Enterprise Distributed Capabilities
MS 3278
Troy, MI 48098

* phone: 248-265-4596 (8-365)
* mailto:[EMAIL PROTECTED]



-----Original Message-----
From: Bob Booth - UIUC [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 13, 2002 3:36 PM
To: [EMAIL PROTECTED]
Subject: Re: TSM 5.1 HP-UX 11.11 Startup/Shutdown Scripts


What signal is killproc() sending to the server main thread?  The server
will shutdown gracefully if it gets a SIG 15.  See if you send a SIG 15 and
the lock file goes away.

Just a try.

bob

On Tue, Aug 13, 2002 at 03:31:26PM -0400, Scott, Brian wrote:
> Hey gang,
>
> Does anyone have a sample startup/shutdown script for the TSM server
> on
HP?
> On the shutdown the bourne shell will run a killproc on dsmserv
> process
but
> the adsmserv.lock file under /opt/tivoli/tsm/server/bin doesn't get
deleted.
> HP doesn't reuse the lock file when you try to restart TSM so I have
> to delete it every time.
>
> Anyone come across this on TSM 5.1?
>
> Thanks,
> Brian
>
> Brian Scott
> EDS - BUR Engineering
> Enterprise Distributed Capabilities
> MS 3278
> Troy, MI 48098
>
> * phone: 248-265-4596 (8-365)
> * mailto:[EMAIL PROTECTED]

***************************************************************
 This message and any attachments is solely for the intended recipient. If
you are not the intended recipient, disclosure, copying, use, or
distribution of the information included in this message is prohibited --
please immediately and permanently delete this message.

Reply via email to