ADSM-L

Re: Stoping the server through a script

2015-10-04 17:31:35
Subject: Re: Stoping the server through a script
From: Cook, Dwight E [SMTP:cookde AT BP DOT COM]
To: ADSM-L AT VM.MARIST DOT EDU
#!/bin/ksh
for PROCNUM in $(dsmadmc -id=someid -pass=somepass q pro | cut -c1-8 | grep
^' ' | grep [0-9] )
do
   echo $PROCNUM | grep , 1>/dev/null 2>&1
   if [ $? -eq 0 ] ; then
      FIRST=$(echo $PROCNUM | cut -d',' -f1)
      SECOND=$(echo $PROCNUM | cut -d',' -f2)
      PROCNUM=$FIRST$SECOND
      fi
#echo   dsmadmc -id=someid -pass=somepass cancel process $PROCNUM
dsmadmc -id=someid -pass=somepass cancel process $PROCNUM
done
exit

you need all that building of the process number 'cause you'll run into
things like
   3,071
   3,073
   3,074
   3,075
   3,076

but you might want to first update your  tapepools to have recl=100 and your
diskpools to have high=90 low=70
to stop any other processes from starting up...

Dwight

> ----------
> From:         Scott Fluegge[SMTP:sfluegge AT VENATORGROUP DOT COM]
> Reply To:     ADSM: Dist Stor Manager
> Sent:         Monday, April 17, 2000 7:16 AM
> To:   ADSM-L AT VM.MARIST DOT EDU
> Subject:      Stoping the server through a script
>
> Question...
>
> I am trying to write a script that can be put in rc.shutdown that will
> gracefully bring down the adsm server.  That means I need to insure that
> there
> are no tapes mounted.  I can write a script that will chack for mounts and
> even
> un-mount tapes.  The problem I am having is checking for processes running
> and
> then stoping them.  If I just unmount the tapes, and if something like
> reclemation is running, another tape will just be mounted.
>
> Does anyone know of a way to get the process numbers into a script?  There
> is no
> unique entry on the process line (when "q pr" is used) that I can grep for
> as I
> can with requests or mounts!
>
> Any help would be greatly appreciated!
>
> Thanks,
>
> Scott
>
<Prev in Thread] Current Thread [Next in Thread>