ADSM-L

AW: Automatic script start at server startup?

2003-11-10 02:30:41
Subject: AW: Automatic script start at server startup?
From: Peter Schulze <Peter.Schulze AT DENGLER-GMBH DOT DE>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 10 Nov 2003 08:28:45 +0100
Make a little userexit program with following code inserted:

strScript = getenv( "TSM-EVENTS-Script" );
if (strScript != NULL)
{
    cmdstr[MAX_MSGTEXT_LENGTH] = '\0';
        sprintf( cmdstr, "%s %d \"%s\"", strScript, eventData->eventNum,
eventData->event );
        if ((errval = system( cmdstr )) < 0)
        {
                fprintf( stderr, "call system returns an error\n" );
        }
}

declare it in the server options file:

USEREXit Y "D:\Programme\tivoli\tsm\server\TSM-Events.dll" TSMDoCmd

make an environment variable:

set TSM-Events-Script=d:\programme\tivoli\tsm\server\scripts\tsm-events.cmd

create a script in the directory above with name tsm-events.cmd like:

if "%1" == "916" start
D:\Programme\tivoli\tsm\server\Scripts\daily_tasks.vbs
if "%1" == "8326" net send operator "%2"
.
.
.

Message 916 says: The server has completed startup processing and is now
ready for use
Message 8326 are mount requests.

Peter Schulze

Dengler Engineering GmbH
Wullener Feld 52
58454 Witten

-----Ursprungliche Nachricht-----
Von: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]Im Auftrag von
Joe Howell
Gesendet: Montag, 10. November 2003 03:05
An: ADSM-L AT VM.MARIST DOT EDU
Betreff: Automatic script start at server startup?


Is it possible to have a TSM script kick off automatically when the server
starts?  I've got a situation where I'm running a 'copy stgpool' operation
when my system gets IPL'ed (that's "reboot" to you Windows types...:)  and I
want the operation to be started up again without having to resort to
telling the operators to key the command in.  I know I can use external
automation to do it but was wondering if there is a way to do it within TSM?


Joe Howell
Shelter Insurance Companies
Columbia, MO

---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

<Prev in Thread] Current Thread [Next in Thread>