ADSM-L

Re: [ADSM-L] rc-scripts to start and stop multiple tsm client scheduler for linux red hat

2011-06-14 11:35:55
Subject: Re: [ADSM-L] rc-scripts to start and stop multiple tsm client scheduler for linux red hat
From: Howard Coles <Howard.Coles AT ARDENTHEALTH DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 14 Jun 2011 09:51:49 -0500
Here's the one I use:
START:
#!/bin/bash
# Start Script for TSM Client on Linux and AIX
#
# Checkconfig lines below for Linux machines:
#
# chkconfig: 345 96 07
# description: tsmdsm

export DSM_DIR=/opt/tivoli/tsm/client/ba/bin
export DSM_LOG=/var/log/tsm
export DSM_CONFIG=/opt/tivoli/tsm/client/ba/bin/dsm.opt
case "$1" in
  'start')
    ps -ef | grep dsmc | grep -v grep | awk -F" " '{print $2}' |while
read I
    do
      kill -9 $I
    done
    /opt/tivoli/tsm/client/ba/bin/dsmcad > /dev/null 2>&1 &
    /opt/tivoli/tsm/client/ba/bin/dsmc sched > /dev/null 2>&1 &
    ;;
  'stop')
    ps -ef | grep dsmc | grep -v grep | awk -F" " '{print $2}' |while
read I
    do
      kill -9 $I
    done
    ;;
  'restart')
    ps -ef | grep dsmc | grep -v grep | awk -F" " '{print $2}' |while
read I
    do
      kill -9 $I
    done
    /opt/tivoli/tsm/client/ba/bin/dsmcad > /dev/null 2>&1 &
    /opt/tivoli/tsm/client/ba/bin/dsmc sched > /dev/null 2>&1 &
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
esac
END:

Just add as many "/opt/tivoli . . . " lines as you need adding
-optfile=/location/of/dsm/opt for each node that doesn't use the
DSM_CONFIG variable at the top.  You would obviously have different
stanzas in your dsm.sys for each dsm.opt file, along with different port
definitions to avoid conflicts.

This works on AIX and Linux across our enterprise with no need to write
out a pid file.

See Ya'
Howard Coles Jr., RHCE, CNE, CDE
John 3:16!


-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
TSM
Sent: Tuesday, June 14, 2011 8:55 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] rc-scripts to start and stop multiple tsm client
scheduler for linux red hat

Hello,

can anyone share rc-scripts to start and stop multiple tsm client
scheduler for linux red hat.
The idea is, to use different rc-scripts for separat tsm
client-option-files with different tsm nodename.
We would like to start and stop the tsm client-schedules separantly
using
the pid.

Thanks in advance
Andreas.