cancel all reclaim processes

BaukePlugge

ADSM.ORG Member
Joined
Sep 10, 2004
Messages
4
Reaction score
0
Points
0
Hi there,



I'm looking for an admin script or server command script to cancel all active reclaim processes.



I've find some threads in the old site but their all Unix related. I've a windows based TSM 5.1 server.



does somebody have a script for this ?



regards

Bauke Plugge
 
If you can install Perl, you might try something like this. I don't see why this wouldn't work

on a Windows server with Perl installed.



#!/usr/bin/perl

#Get the password from another file so we don't have to have it hard coded in all these

#scripts.

open(IN,"/home/curtst/.TSM");

chomp($pw=<IN>);



#Look for reclaim process and kill them.

@reclaims=grep/Reclam/,`dsmadmc -id=id -pass=$pw q pro`;

foreach $line(@reclaims){

$line=~s/,//g;

@split=split(/ +/,$line);

print "killing reclaim proccess $split[1]\n";

sleep 2;

`dsmadmc -id=id -pass=$pw can pro $split[1]`;

}
 
is there no other alternative?



I prefer to do it with TSM self.



regards

Bauke Plugge
 
Not that I've figured out. That's why I just use Perl.



Curtis





<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Quote:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><BLOCKQUOTE>is there no other alternative?



I prefer to do it with TSM self.



regards

Bauke Plugge</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>
 
Just for fun:

for a in `dsmadmc -pass=xxxx -id=xxxx "select process_num from processes where process='Migration' " |sed 1,12d | sed -e :a -e '$d;N;2,4ba' -e 'P;D' `

do

dsmadmc -pass=xxxx -id=xxxx "cancel pr $a"

done
 
Sorry but where can i put in this script ?



If I do it in admin scripts then I get an error when I save it.



thanks for the responses for so far.



regards

Bauke Plugge
 
Now why didn't I think of that? Much easier than parsing the process numbers out of a query process command. Good thought.



Curtis



<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Quote:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><BLOCKQUOTE>Just for fun:

for a in `dsmadmc -pass=xxxx -id=xxxx "select process_num from processes where process='Migration' " |sed 1,12d | sed -e :a -e '$d;N;2,4ba' -e 'P;D' `

do

dsmadmc -pass=xxxx -id=xxxx "cancel pr $a"

done



</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>
 
I'd run it out of cron, or just manually whenever you need it. Not sure if there's a way to run OS scripts from within a TSM Administrative Schedule. Of course, neither of these will work for you without installing either Perl (http://www.activeperl.com/) for my script or either BASH or KSH (not sure which) for the last recommendation. Perhaps this (www.cygwin.com) can help you on that end.



Curtis
 
This is a great script but how do you modify it to loop?

Thanks,

Marty
 
Not sure what you mean. Both the scripts already loop through any processes that match the requirement and kill them all. If you're concerned that reclaimation will start up again, just update the storage pools so the reclaim % is 100 as part of the script.



Curtis



<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Quote:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><BLOCKQUOTE>This is a great script but how do you modify it to loop?

Thanks,

Marty</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>
 
How can I put this script in a Admin script ?



for a in `dsmadmc -pass=xxxx -id=xxxx "select process_num from processes where process='Migration' " |sed 1,12d | sed -e :a -e '$d;N;2,4ba' -e 'P;D' `

do

dsmadmc -pass=xxxx -id=xxxx "cancel pr $a"

done





regards

Bauke
 
Back
Top