1. Starting the TSM Scheduler

The basic command for running the TSM Scheduler is to run , as the root user, dsmc schedule as a background process with redirection of output, as below.

  dsmc schedule > /dev/null 2>&1 &            # for Bourne-like shells
  dsmc schedule >& /dev/null &                # for C-like shells

More convenient, however, is to start the Scheduler at system boot time. If your flavour of Unix employs the /etc/inittab file to launch processes at system start then add a line similar to below to this file:

  ds:2:respawn:/usr/bin/dsmc schedule > /dev/null 2>&1

For systems that start programs from init level command files, it is simplest to add a command file that starts and stops the TSM Scheduler at the appropriate run levels ( probably 2 and 3 ). To this end, OUCS includes a file called dsmschedthat can be directly copied to the appropriate run-level directories. This file looks similar to this:

   #! /sbin/sh
   #
   # Start stop script for TSM
   #
   
   killproc() {
       pid=`/usr/bin/ps -ef |
            /usr/bin/grep "$*" |
            /usr/bin/awk '{printf $2}'`
       [ "$pid" != "" ] && kill -TERM $pid
   }
   
   case "$1" in
       'start')
            killproc "[d]smc schedule"
            if [ -x /usr/bin/dsmc ]; then
                /usr/bin/dsmc schedule > /dev/null 2>&1 &
            fi
            ;;
   
       'stop')
            killproc "[d]smc schedule"
            ;;
   
       *)
            echo "Usage: $0 {start|stop}"
            ;;
   esac

This program can then be linked as a Start script to start it at run levels 2 and 3 - on Solaris in this example - by the following:

  cd /etc/rc2.d
  ln -s /etc/init.d/dsmsched  ./S95dsmsched

... and can be linked as a kill script to shut down the TSM Scheduler at run levels 0 and 1 and 6 - again on Solaris in this example - as follows:

  cd /etc/rc0.d
  ln -s /etc/init.d/dsmsched  ./K95dsmsched
  cd /etc/rc1.d
  ln -s /etc/init.d/dsmsched  ./K95dsmsched
  cd /etc/rc6.d
  ln -s /etc/init.d/dsmsched  ./K95dsmsched

Up: Contents Next: 2. Checking the Scheduled Backups

Sections in this document: