ADSM-L

Re: Scheduling Administrative Commands on the Server

1997-11-18 22:46:42
Subject: Re: Scheduling Administrative Commands on the Server
From: Somchai Tachapornroong <somchait AT TH.IBM DOT COM>
Date: Tue, 18 Nov 1997 22:46:42 -0500
Hi again Scott,

 I also found the problem like you. If I want to run ADSM admin commands in
ADSM Central Schedule,
I have to do it command by command. I can not run macro in it at once. In your
case you might be able to write
a script and use ADSM Backup/Archive schedule (Select command) to call it as
follows:

 dsmadmc -id=admin -pass=adminpass command1
 dsmadmc -id=admin -pass=adminpass command2
 ....
 ...
 dsmadmc id=admin -pass=adminpass commandN

 upd stg diskpool hi=0 lo=0
 upd stg sgipool hi=0 lo=0
 commit (this ensures that the two updates finish before the next command
 gets executed)
 upd stg diskpool hi=95 lo=65
 upd stg sgipool hi=95 lo=65
 backup db dev=8mmdev type=full vol=monday

 However, in some case that you want to let some jobs (that take a long time)
finish first (commit), I think above way can not do or guarantee that.  I don't
know how to.

Best Regards,
Somchai Tachapornroong
IBM Thailand, IGS, Strategic Outsourcing Services
E-mail somchait AT th.ibm DOT com, Tie line 166 (273-4859), Fax 273-0557





ADSM-L AT VM.MARIST DOT EDU on 11/19/97 09:26:19 AM
Please respond to ADSM-L AT VM.MARIST DOT EDU @ internet
To: ADSM-L AT VM.MARIST DOT EDU @ internet
cc:
Subject: Re: Scheduling Administrative Commands on the Server


>Sounds like you are mixing up two different things:
>1. You can define an "Administrative Command Schedule" that specifies an
> actual ADSM command.  Or
>2. You can define a "Client Schedule" with an ACTION=Command where
>you can use the "OBJECTS=" parameter with the name of a UNIX script.
>If you want to use option 1 you can write and invoke an ADSM macro to
>run more than one ADSM command.
>If you want to write a UNIX script, go with option 2 and treat the server
>as a client. This seems like overkill if all you want to do is server
>administrative commands. Otherwise, why not use cron?
>The real neat thing about option 2 is that you can run ANY command
>as the root user on any of your clients. You just need to schedule it ;-)

Maybe I need to clarify my question so that I'm not confusing the issue.  I
hope this clarification doesn't confuse the issue even more though.

The server administrative commands that I want to run are ADSM commands,
not AIX server admin commands.  I don't think I can run ADSM administrative
commands from cron (I'd like to know how if I can)

I set up an administrative schedule that points to a script called test.sh.
The path to the script within the administrative command in the "command
field" is /usr/lpp/adsm/bin/scripts/test.sh

Inside of this script I want to run these commands:  (This script basically
clears my disk pools and then backs up the database )

upd stg diskpool hi=0 lo=0
upd stg sgipool hi=0 lo=0
commit (this ensures that the two updates finish before the next command
gets executed)
upd stg diskpool hi=95 lo=65
upd stg sgipool hi=95 lo=65
backup db dev=8mmdev type=full vol=monday

The problem that I'm having is when I define the administrative schedule
which in the "Command" field says /usr/lpp/adsmserv/bin/scripts/test.sh I
get a message saying that the command is invalid.

From what I understand, I can't run a macro as a scheduled command so I'm
not sure how I can run the above listed operations without manually running
them.

If this is not possible then how are other people implementing automatic
updates and backups of the database (without using DB backup triggers).  It
seems that it would be very cumbersome to create an administrative command
schedule for each of the above lines.

Thanks Again
Scott Temonia
stemonia AT laitram DOT com