Re: need script to stop all PROCESS's
2002-05-13 12:01:51
make sure and upd all your tape storage pools to "recl=100" so no
reclamation will run
also remember that migration & reclamation, etc... will wait until it has
finished processing its current file.
#!/bin/ksh
# purge all processes and look for still used tape mounts
dsmadmc -id=blah -pass=blah q pro 1>/dev/null 2>&1
while [ $? -eq 0 ]
do
for TSMPROCESS in $(dsmadmc -id=blah -pass=blah q pro | grep ^.......[0-9] |
cut -c1-8 | sed /,/s/// )
do
dsmadmc -id=blah -pass=blah can pro $TSMPROCESS
done
sleep 60
dsmadmc -id=blah -pass=blah q pro 1>/dev/null 2>&1
done
dsmadmc -id=blah -pass=blah q mount | grep 'IN USE' 1>/dev/null 2>&1
if [ $? -eq 0 ]
then
echo not all drives idle
exit 1
fi
exit 0
This should cancel the processes and exit within a minute of their
completion,
and notify you if something other than a process is using a tape drive,
like another backup or a restore...
Dwight E. Cook
Software Application Engineer III
Science Applications International Corporation
509 S. Boston Ave. Suit 220
Tulsa, Oklahoma 74103-4606
Office (918) 732-7109
|
|
|