ADSM-L

Re: AIX startup of TSM scheduler

2004-01-09 03:50:59
Subject: Re: AIX startup of TSM scheduler
From: "Lambelet,Rene,VEVEY,GL-CSC" <Rene.Lambelet AT NESTLE DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 9 Jan 2004 09:49:37 +0100
Hi, we also use only dsmcad as starter for the tsm scheduler. Here a script
that could help you for stopping, starting and restarting:

#!/usr/bin/sh
# rc.dsmcad , version 1.1
#
# description:  start or restart client acceptor daemon
# constraints:  must be run as root
#               it will start dsmcad client acceptor daemon
#
# author :      sh
#               jesús muiño conde
#
# modifications:
#       23/06/2003   initial creation
#       23/06/2003   v1.1 Routed the log to /dev/null (PAN) 
# *******************************************************************

# some vars
# -------------------------------------------------------------------
YO=$(basename $0)
DSMCAD=dsmcad
DSM_DIR=/usr/tivoli/tsm/client/ba/bin
PS=/usr/bin/ps
KILL=/usr/bin/kill
#DSMCADLOG=/usr/tivoli/tsm/client/ba/bin/dsmwebcl.log
DSMCADLOG=/dev/null
NOHUP=/usr/bin/nohup
SLEEP=/usr/bin/sleep

# some funcs
# -------------------------------------------------------------------
stop_dsmcad()
{
    while check_if_running
          [[ -n $DSMCADPROC ]]
    do
        echo "${YO}: Killing TSM client acceptor daemon with signal KILL."
        /usr/bin/kill -9 "$DSMCADPROC"
    done
}
start_dsmcad()
{
    echo "${YO}: Starting TSM client acceptor daemon ..."
    $NOHUP ${DSM_DIR}/$DSMCAD > $DSMCADLOG 2>&1 &
    $SLEEP 5
    check_if_running
    echo "${YO}: ... scheduling will start in 1 minute."
}
check_if_running()
{
    DSMCADPROC=$(ps -efo pid,command | awk '/'"$DSMCAD"'/ {print$1}' |
xargs)
    if [[ -n $DSMCADPROC ]] then
        echo "${YO}: TSM client acceptor daemon is running: PIDs
${DSMCADPROC}"
    fi
}
cmd_usage()
{
    print "\n\t$YO must be used as follows:"
    print "\t$YO -[ s | q | r ]"
    print "\t-s     Starts the TSM client acceptor daemon."
    print "\t       Should only be used through inittab"
    print "\t       Use in inittab: \"dsmcad:2:once:/usr/local/bin/rc.dsmcad
-start >/dev/console 2>&1\""
    print "\t-q     Stops the TSM client acceptor daemon"
    print "\t-r     Stops and starts the TSM client acceptor daemon.\n"
}

# main starts here
# -------------------------------------------------------------------

if [[ $# != 1 || $1 != '-'[sqr] ]] then
    cmd_usage
    exit 2
fi
while getopts "sqr" i
do
    case $i in
        s )
            # just starts the TSM client acceptor daemon should only be used
when the system boots
            # or in /etc/inittab
            start_dsmcad
            ;;
        q )
            # just stops the TSM client acceptor daemon
            stop_dsmcad
            ;;
        r )
            # the TSM client acceptor daemon is stopped and
            # then re-started
            stop_dsmcad
            start_dsmcad
            ;;
        ? )
            # short description how to use the command
            cmd_usage
            exit 2
            ;;
    esac
done

exit 0

***************************************************************

-----Original Message-----
From: Thomas Rupp, Vorarlberger Illwerke AG
[mailto:Thomas.Rupp AT ILLWERKE DOT AT]
Sent: Thursday,8. January 2004 09:14
To: ADSM-L AT VM.MARIST DOT EDU
Subject: AW: AIX startup of TSM scheduler


All problems went away as soon as we began to let DSMCAD
start the scheduler.

Regards
Thomas Rupp

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