Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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


  2. #2
    Member
    Join Date
    May 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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]`;

    }


  3. #3
    Member
    Join Date
    Sep 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    is there no other alternative?



    I prefer to do it with TSM self.



    regards

    Bauke Plugge

  4. #4
    Member
    Join Date
    May 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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>

  5. #5
    Member
    Join Date
    Dec 2002
    Location
    Memphis, TN
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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




  6. #6
    Member
    Join Date
    Sep 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  7. #7
    Member
    Join Date
    May 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default





    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>

  8. #8
    Member
    Join Date
    May 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  9. #9

    Default

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

    Thanks,

    Marty

  10. #10
    Member
    Join Date
    May 2004
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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>

  11. #11
    Member
    Join Date
    Sep 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  1. help,TSM backup!???(From china)
    By nichv in forum Backup / Archive Discussion
    Replies: 5
    Last Post: 02-19-2010, 10:22 AM
  2. HELP! Migration processes hanging...
    By mricha08 in forum Backup / Archive Discussion
    Replies: 5
    Last Post: 03-26-2008, 12:27 AM
  3. Tape reclaim with one drive
    By blackminder in forum Backup / Archive Discussion
    Replies: 12
    Last Post: 01-22-2007, 10:30 PM
  4. Reclaim Issue
    By reesema in forum Tape / Media Library
    Replies: 2
    Last Post: 02-21-2006, 08:38 AM
  5. Hung TSM sessions won't cancel
    By pegasus in forum Others
    Replies: 2
    Last Post: 04-01-2004, 03:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •