Results 1 to 11 of 11
Thread: cancel all reclaim processes
-
09-10-2004, 06:19 AM #1Member
- Join Date
- Sep 2004
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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
-
09-10-2004, 03:59 PM #2Member
- Join Date
- May 2004
- Posts
- 91
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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]`;
}
-
09-12-2004, 02:22 PM #3Member
- Join Date
- Sep 2004
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
is there no other alternative?
I prefer to do it with TSM self.
regards
Bauke Plugge
-
09-13-2004, 10:03 AM #4Member
- Join Date
- May 2004
- Posts
- 91
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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>
-
09-13-2004, 10:40 PM #5Member
- Join Date
- Dec 2002
- Location
- Memphis, TN
- Posts
- 19
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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
-
09-14-2004, 03:31 AM #6Member
- Join Date
- Sep 2004
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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
-
09-14-2004, 09:49 AM #7Member
- Join Date
- May 2004
- Posts
- 91
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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>
-
09-14-2004, 09:54 AM #8Member
- Join Date
- May 2004
- Posts
- 91
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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
-
09-14-2004, 01:24 PM #9Member
- Join Date
- Mar 2003
- Posts
- 8
- Thanks
- 0
- Thanked 0 Times in 0 Posts
This is a great script but how do you modify it to loop?
Thanks,
Marty
-
09-15-2004, 03:00 PM #10Member
- Join Date
- May 2004
- Posts
- 91
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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>
-
09-16-2004, 04:27 AM #11Member
- Join Date
- Sep 2004
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
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
Similar Threads
-
help,TSM backup!???(From china)
By nichv in forum Backup / Archive DiscussionReplies: 5Last Post: 02-19-2010, 10:22 AM -
HELP! Migration processes hanging...
By mricha08 in forum Backup / Archive DiscussionReplies: 5Last Post: 03-26-2008, 12:27 AM -
Tape reclaim with one drive
By blackminder in forum Backup / Archive DiscussionReplies: 12Last Post: 01-22-2007, 10:30 PM -
Reclaim Issue
By reesema in forum Tape / Media LibraryReplies: 2Last Post: 02-21-2006, 08:38 AM -
Hung TSM sessions won't cancel
By pegasus in forum OthersReplies: 2Last Post: 04-01-2004, 03:44 AM


Reply With Quote