Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Linux SUSE - start/stop script problem (using PIDs)

    Hello all!

    I'm having some difficulty getting this script (from the Novell website) to kill ONLY the DSMCAD that I'm targeting.

    I have 2 scripts, one is for the GLOBAL file system (actually a shared file system) and one for the LOCAL node.

    Script 1: S99Tivoli_Local
    Script 2: S99Tivoli_Global

    I have 2 CADs running:

    DSMCAD_BIN=/opt/tivoli/tsm/client/ba/bin/dsmcad (the LOCAL script targets this one)
    DSMCAD_BIN=/usr/bin/dsmcad (the GLOBAL script targets this one)

    The start up scripts work and both have individual PIDs.

    I've altered both scripts to point to individual PID files... So that there is no conflict. (not sure if this is correct)

    DSMCAD_PIDFILE=/var/run/dsmcad.pid
    DSMCAD2_PIDFILE=/var/run/dsmcad2.pid

    When I have a problem with one of the CADs, I would like to target that CAD for a stop and start. When I run this script, it does not make use of the "PID" ... but kills ALL the DSMCADs.

    If you have any suggestions, or need more info, please post.

    Thanks,
    j





    Node_xyz:/etc/init.d # cat S99Tivoli_Local
    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides: dsm
    # Required-Start: $network $syslog $remote_fs
    # Required-Stop: $network $syslog $remote_fs
    # Default-Start: 3 5
    # Default-Stop: 0 1 2 6
    # Description: Tivoli Storage Manager client acceptor daemon
    ### END INIT INFO

    # Check for existence of Binaries
    DSMCAD_BIN=/opt/tivoli/tsm/client/ba/bin/dsmcad

    test -x $DSMCAD_BIN || { echo "$DSMCAD_BIN not installed";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 5; fi; }

    prog1="dsmcad"

    export DSM_DIR=/opt/tivoli/tsm/client/ba/bin
    export DSM_CONFIG=/opt/tivoli/tsm/client/ba/bin/dsm.opt

    DSMCAD2_PIDFILE=/var/run/dsmcad2.pid

    . /etc/rc.status

    # First reset status of this service
    rc_reset

    case "$1" in
    start)
    echo -n $"Starting $prog1: "
    startproc -v -f -p $DSMCAD2_PIDFILE $DSMCAD_BIN -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.opt >/dev/null 2>/dev/null
    rc_status -v
    ;;
    stop)
    echo -n $"Stopping $prog1: "
    killproc -v -p $DSMCAD2_PIDFILE -TERM $DSMCAD_BIN
    rc_status -v
    ;;
    restart)
    $0 stop
    $0 start
    rc_status
    ;;
    status)
    echo -n "Checking for DSMCAD"
    checkproc $DSMCAD_BIN
    rc_status -v
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
    esac
    rc_exit

  2. #2
    Member
    Join Date
    Jan 2007
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sooo....

    I guess this one is "un-fixable"....

    j

    (bump)

  3. #3
    Moderator moon-buddy's Avatar
    Join Date
    Aug 2005
    Location
    Somewhere in the US
    Posts
    5,931
    Thanks
    4
    Thanked 233 Times in 228 Posts

    Default

    The problem as I see it is identifying which dsmcad instance to shutdown unless you have some unique pointers as to which is local or global.

    One way around this, and maybe a more positive way of doing it, is to use the dsmc service rather than the dsmcad service to start either the local or global TSM instance.
    Ed

  4. #4
    Senior Member rore's Avatar
    Join Date
    Nov 2005
    Location
    Montreal, CA
    Posts
    637
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Hi,
    killproc seems to be ignoring the PID (-p).

    Try this to confirm: start your two dsmcad, then on the terminal run: "killproc -v -p pid_of_first_dsmcad /opt/tivoli/tsm/client/ba/bin/dsmcad"

    If it kills both, you migth need a package patch for killproc. Or you can use kill instead of killproc.

    Rudy

Similar Threads

  1. How do I stop and start the dsmcad process on HP-UX
    By Gwee_Andrew@gryphon.com.s in forum Web GUI
    Replies: 1
    Last Post: 10-17-2007, 08:14 AM
  2. start & stop
    By click007 in forum Others
    Replies: 2
    Last Post: 08-15-2007, 01:30 PM
  3. START / STOP Procedure
    By ReneM in forum Backup / Archive Discussion
    Replies: 6
    Last Post: 07-18-2006, 09:20 AM
  4. Is there a way to start/stop windows services from command prompt????????
    By cruz_g in forum Backup / Archive Discussion
    Replies: 2
    Last Post: 06-28-2004, 01:47 PM
  5. Replies: 1
    Last Post: 11-03-2003, 02:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •