Results 1 to 4 of 4
-
01-07-2009, 09:23 AM #1Member
- Join Date
- Jan 2007
- Posts
- 60
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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
-
01-08-2009, 09:29 AM #2Member
- Join Date
- Jan 2007
- Posts
- 60
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Sooo....
I guess this one is "un-fixable"....
j
(bump)
-
01-08-2009, 09:50 AM #3Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,297
- Thanks
- 2
- Thanked 137 Times in 135 Posts
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
-
01-08-2009, 02:49 PM #4Senior Member
- Join Date
- Nov 2005
- Location
- Montreal, CA
- Posts
- 636
- Thanks
- 0
- Thanked 4 Times in 4 Posts
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
-
How do I stop and start the dsmcad process on HP-UX
By Gwee_Andrew@gryphon.com.s in forum Web GUIReplies: 1Last Post: 10-17-2007, 08:14 AM -
start & stop
By click007 in forum OthersReplies: 2Last Post: 08-15-2007, 01:30 PM -
START / STOP Procedure
By ReneM in forum Backup / Archive DiscussionReplies: 6Last Post: 07-18-2006, 09:20 AM -
Is there a way to start/stop windows services from command prompt????????
By cruz_g in forum Backup / Archive DiscussionReplies: 2Last Post: 06-28-2004, 01:47 PM -
RedHat or Mandrake Linux Init Script to start TSM server, dsmserv, on boot
By rlambie in forum TSM ServerReplies: 1Last Post: 11-03-2003, 02:48 PM


Reply With Quote
