ADSM-L

Re: ADSM Scripts

1999-01-13 11:55:48
Subject: Re: ADSM Scripts
From: Dwight Cook <decook AT AMOCO DOT COM>
Date: Wed, 13 Jan 1999 10:55:48 -0600
     two real nice unix shell scripts are :

     (oh, and on all my adsm servers I have the adsm id of operator that
     has absolutely zero authority... but is good for all queries.  This
     allows any client machine user to connect with an administrative
     session to look at what's going on)

     #!/bin/ksh
     #(script: global)
     for SERV in $(cat $HOME/bin/adsm.servers)
     do
     dsmadmc -serv=$SERV -id=operator -pass=operator $* </dev/null
     done
     exit

     #!/bin/ksh
     #(script: cmd)
     dsmadmc -id=operator -pass=operator $* </dev/null
     exit

     and the adsm.servers file in the top script is just a text file with
     all the adsm server names in it
     ex:
     adsmsrv1
     adsmsrv2
     adsmsrv3
     adsmsrv4

     I get a lot of
        "My server's backups aren't working... my box is client01"
     I have to ask the silly question of
        "Do you know what adsm server it backs up to?"
        (when will I ever learn)
     BUT a
        global q node client01 | more
     gets me what I need before the user can even say "huh?"

     I'm just the King of minimal key strokes I guess... If I have to type
     it more than twice a day, more than 2 days a week, I tend to do
     something to reduce the keystrokes down to 10% or less ;-)

     also makes other scripts a little more readable...
     (ok, I'm AR... but I hate it when single actions/commands start
     stretching out to multiple lines/more than 80 chars)

     #!/bin/ksh
     for VOLUME in $(cat tapes.left)
        do
        while [ $(cmd -serv=xxx q pr | grep 'VIRTTAPE,' | wc -l) -ge 1 ]
          do
          sleep 300
          done
        dsmadmc -serv=xxx -id=yyy -pass=zzz move data $VOLUME stg=virttape
        done
     exit

     and yes, had to break down and use the long dsmadmc above 'cause the
     id used with "cmd" doesn't have the authority to perform a move data

     anyway,
             later,
                    Dwight





______________________________ Reply Separator _________________________________
Subject: Re: ADSM Scripts
Author:  arshadmunir (arshadmunir AT HOTMAIL DOT COM) at unix,mime
Date:    1/13/99 9:33 AM


Hi Mark/Bill,

 Why don't you try something like

  dsmadmc id=admin password=admin q proc |grep MIG


check  after approx. time, i.e if you think the MIGRATION
takes 1 hour run this comand after 1 hour which in loop
keeps checking the termination of migration lets say
every five minutes after an the hour & updates
the storage pool when the backup is finished.
I have this script works fine for me.
It is easy you can write script in five lines.

Regards

Arshad Munir



>From owner-adsm-l AT vm.marist DOT edu Wed Jan 13 07:05:00 1999
>Received: from VM.MARIST.EDU by VM.MARIST.EDU (IBM VM SMTP V2R3)
>   with BSMTP id 4921; Wed, 13 Jan 99 10:00:53 EST
>Received: from VM.MARIST.EDU (NJE origin LISTSERV@MARIST) by
VM.MARIST.EDU (LMail V1.2b/1.8b) with BSMTP id 8628; Wed, 13 Jan 1999
09:58:12 -0500
>Received: from VM.MARIST.EDU by VM.MARIST.EDU (LISTSERV release 1.8c)
with NJE
>          id 8882 for ADSM-L AT VM.MARIST DOT EDU; Wed, 13 Jan 1999 09:58:09
<Prev in Thread] Current Thread [Next in Thread>