Re: Script
2004-09-16 10:10:00
Hmm... how about this simple little ditty I just altered off of
another script I use to kill processes? It is a ksh script, not a TSM
internal script, but it might be adjusted to do so:
*****************
# This is a simple script used to kill any
# "Reclamation" processes that may be running/
# And start a DB backup.
DQ=`cat /some/dumb/file`
for i in $($DQ "select PROCESS_NUM from processes where PROCESS like
'Reclamation'" |grep '[0-9]' |grep -v '[A-z]')
do
$DQ can proc $i
done
sleep 120
$DQ BACKUP DB DEV=3590DEV TYPE=FULL SCRATCH=YES
****************
Note the DQ variable is a root-only read-only file that has a
TSM administrative user and password in it. Pseudo security. It looks
like this:
/usr/tivoli/tsm/client/ba/bin/dsmadmc -id=killer -pass=process
The difficult thing you will encounter will be that the
reclamations will again spawn after a short period...
Ben
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Jonathan Siegle
Sent: Thursday, September 16, 2004 5:41 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Script
Loon, E.J. van - SPLXM wrote:
> Hi *SM-ers!
> I'm trying to create a script which does the following:
> 1) query the server for any running reclamation
> 2) retrieves the process id for this reclamation
> 3) cancels the reclamation
> 4) starts a backup storage pool
> Can this be done in one script? If so, how do I put the process id in
> a variable which I can parse to the cancel command? Thank you very
> much for any reply in advance!! Kindest regards,
> Eric van Loon
> KLM Royal Dutch Airlines
>
>
> **********************************************************************
> For information, services and offers, please visit our web site:
> http://www.klm.com. This e-mail and any attachment may contain
confidential and privileged material intended for the addressee only. If
you are not the addressee, you are notified that no part of the e-mail
or any attachment may be disclosed, copied or distributed, and that any
other action related to this e-mail or attachment is strictly
prohibited, and may be unlawful. If you have received this e-mail by
error, please notify the sender immediately by return e-mail, and delete
this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its
subsidiaries and/or its employees shall not be liable for the incorrect
or incomplete transmission of this e-mail or any attachments, nor
responsible for any delay in receipt.
> **********************************************************************
dsmadmc -id=blah -pass=moreblah q pr | grep "Space Reclaimation" | awk '
{ print $1 } ' | xargs -t -I {} dsmadmc -id=blah -pass=moreblah cancel
pr {} ; dsmaadmc -id=blah -pass=moreblah backup stgpool importantstuff
importantstuffcopy maxpr=10
-Jonathan
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Script, Loon, E.J. van - SPLXM
- Re: Script, Coats, Jack
- Re: Script, Loon, E.J. van - SPLXM
- Re: Script, Alexander Verkooijen
- Re: Script,
Ben Bullock <=
- Re: Script, Bill Dourado
- Re: Script, Taw.Raymond
- Re: Script, Coats, Jack
|
|
|