== == @@@ START COPYRIGHT @@@ == == HP Confidential == Copyright (C) 1999, 2001-2004 Hewlett-Packard Company == Protected as an unpublished work. == All Rights Reserved. == == The computer program listings, specifications, and documentation == herein are the property of Hewlett-Packard Company and shall == not be reproduced, copied, disclosed, or used in whole or in part == for any reason without the prior express written permission of == Hewlett-Packard Company. == == @@@ END COPYRIGHT @@@ == == ASAP - T0402V02.05 - (01OCT2004) == == Note: Please update the WizardVersion and WizardIPM settings == when new version-dependent parameters are added to this == routine. See set_defaults. == ?tacl routine [#case [#exception] == exception handler |_call| |_break| #reset results frames #return |_error| #push errortxt #errortext/capture errortxt/ [#if not [#emptyv/blank/errortxt] |then| #output #outputv errortxt ] #pop errortxt #reset results frames #return ] #frame #push WizardVersion == ASAP version of this wizard (e.g. 02) #push WizardIPM == ASAP IPM level of this version (e.g. 05) #push prmpt == prompt #push prmpt2 == imbedded prompt #push val == returned value #push work == misc. work #push dflt == Y or N default #push val2 == sub-return value #push val3 == misc value #push dbvol == disk volume names #push _confsubvol == ASAPCONF subvol #push asapname == ASAPMON filename #push asapvers == ASAPMON version #push asapipm == ASAPMON ipm level #push asapcnt == ASAPMON count #push systemvers == ASAPMON version on $SYSTEM.SYSTEM #push systemipm == $SYSTEM.SYSTEM.ASAPMON ipm level #push patch1 == Patch out unwanted message #push AbsMaxDays == Absolute max days for DBMAXDAYS #push _ACTION == ASAP config values, by name #push _APP #push _BACKUPCPU #push _COLLECT #push _DB #push _DBMAXDAYS #push _DBMAXDAYS_COMM #push _DBMAXDAYS_CPU #push _DBMAXDAYS_DISK #push _DBMAXDAYS_EXPAND #push _DBMAXDAYS_FILE #push _DBMAXDAYS_NODE #push _DBMAXDAYS_PROCESS #push _DBMAXDAYS_PROCESSBUSY #push _DBMAXDAYS_RDF #push _DBMAXDAYS_SPOOLER #push _DBMAXDAYS_SYSTEM #push _DBMAXDAYS_TAPE #push _DBMAXDAYS_TMF #push _DISK #push _EXPAND #push _FILE #push _ID #push _NODE #push _OBJECTIVESAUDIT #push _OBJECTIVESDB #push _OBJECTIVESEVENT #push _OBJECTIVESEVENTUP #push _OBJECTIVESEVENTCONSOLE #push _OBJECTIVESEVENTCONSOLEUP #push _OBJECTIVESEVENTSTATE #push _OBJECTIVESEVENTMAX #push _OBJECTIVESRANK #push _PRIMARY #push _PROCESS #push _RATE #push _RETAIN #push _RDF #push _SPOOLER #push _SYNC #push _TAPE #push _TMF [#def set_defaults routine |body| == == Sets all default values == #set WizardVersion 2 == highest version supported (1 digit only) #set WizardIPM 05 == highest IPM level supported (as 2 digits) #set _confsubvol $SYSTEM.SYSTEM #set AbsMaxDays 3650 #set _ACTION ON #set _APP OFF #set _BACKUPCPU 0 #set _COLLECT [#mysystem] #set _DB $SYSTEM.ZASAP #set _DBMAXDAYS 7 #set _DISK ON #set _EXPAND ON #set _FILE ON #set _ID $ZOO #set _NODE OFF #set _OBJECTIVESAUDIT OFF #set _OBJECTIVESDB $SYSTEM.ZASAP.DBOBJ #set _OBJECTIVESEVENT OFF #set _OBJECTIVESEVENTUP ON #set _OBJECTIVESEVENTCONSOLE ON #set _OBJECTIVESEVENTCONSOLEUP ON #set _OBJECTIVESEVENTSTATE LOW #set _OBJECTIVESEVENTMAX 3 #set _OBJECTIVESRANK STANDARD #set _PRIMARY 1 #set _PROCESS ON #set _RATE 5 #set _RETAIN NONE #set _RDF OFF #set _SPOOLER ON #set _SYNC 0,0 #set _TAPE ON #set _TMF ON ] [#def verify^subvol routine |body| == == Validates that its param is a legal subvolume == #frame #push v1 [#if [#match [#argument/value v1/subvol otherwise] 1] |then| #result [v1] |else| #result 0 ] #unframe ] [#def verify^cpu routine |body| == == Validates that its param is a legal cpu number == #frame #push v1 [#if [#match [#argument/value v1/number/minimum 0,maximum 15/ otherwise] 1] |then| #result [v1] |else| #result 20 ] #unframe ] [#def verify^vsn routine |body| == == Validates that its param is a legal version number == #frame #push v1 x no [#if [#argument/text v1/text]] #set x [#charfind v1 1 .] [#if [x] = 0 |then| #set no no |else| #set asapvers [#charget v1 1 for [#compute [x]-1]] #set asapipm [#charget v1 [#compute [x]+1] for [#compute [#charcount v1]-[x]]] [#if [#charcount asapipm] = 1 |then| #set asapipm 0[asapipm]] [#if not ([asapvers] > 0 and [asapvers] < 99) |then| #set no no] [#if not ([asapipm] > 0 and [asapipm] < 99) |then| #set no no] ] #result 0 [#if [#match [no] no] |then| #result 20] #unframe ] [#def verify^file routine |body| == == Validates that its param is a legal filename == #push fn [#if [#compute not ([#argument/value fn/filename otherwise] -1)] |then| #result [fn] |else| #result ] #unframe ] [#def get^volume routine |body| == == Returns the volume name from a subvolume name == #frame #push v1 v2 [#if [#argument/value v1/subvol]] #set v2 1 [#if [#charfind v1 1 \] |then| #set v2 [#charfind v1 1 $]] #result [#charget v1 1 to ([#charfind v1 [v2] .]-1)] #unframe ] [#def get^yesno routine |body| == == Uses the preset prmpt to ask the user a yes or no question == == The default value (Y or N) is passed as a param == [#if [#argument/text dflt/text]] [#loop |DO| #output #inputv val2 prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val2] " "] |then| #set val2 [dflt]] [#if not ([#match [#shiftstring/UP/[val2]] Y] or [#match [#shiftstring/UP/[val2]] N]) |then| #output #output *** Please specify Y or N ] |UNTIL| [#match [#shiftstring/UP/[val2]] Y] or [#match [#shiftstring/UP/[val2]] N] ] #result [val2] ] [#def verify^days routine |body| == == Validates that its param is a valid number of days for DBMAXDAYS == #frame #push v1 [#if [#match [#argument/value v1/number/minimum 0,maximum [AbsMaxDays]/ otherwise] 1] |then| #result [v1] |else| #result 20 ] #unframe ] [#def get^days routine |body| == == Uses the preset prmpt to ask the user a yes or no question == == The default value (Y or N) is passed as a param == [#if [#argument/value dflt/number]] [#loop |DO| #output #inputv val2 prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val2] " "] |then| #set val2 [dflt]] #set val2 [verify^days [val2]] [#if [#match [val2] 20] |then| #output #output *** Please specify a range of days from 0 to [AbsMaxDays] ] |UNTIL| not [#match [val2] 20] ] #result [val2] ] [#def decode^fnames routine |body| == == Decodes filenames returned from #FILENAMES finding the most recent ASAP == version. == [#case [#exception] == exception handler |_call| |_break| #reset results frames #return |_error| #push errortxt #errortext/capture errortxt/ [#if not [#emptyv/blank/errortxt] |then| #output #outputv errortxt ] #pop errortxt #reset results frames #return ] #frame #filter _break _error #push vp == vproc output #push v == string value list of names, space separated #push ocp == starting char position #push cp == starting char position #push x == worker #push x2 == worker #push cnt == name count [#if [#argument/text v/text]] #set cp 1 #set ocp [cp] #set cnt 0 #set cp [#charfind v [cp] $] [#loop |do| [#if [cp] > 0 |then| #push nfname == new fname for compare, if any #push nfnamevsn == version #push nfnameipm == ipm level #set x2 [#charfind v [#compute [cp] + 1] $] #set x [x2] [#if [x2] = 0 |then| #set x2 [#compute [#charcount v] - [cp] + 1] #set nfname [#charget v [cp] for x2] |else| #set nfname [#charget v [cp] to [#compute x2 - 1]] ] #set cp [x] #set vp vproc/outv vp/[nfname] [#if [#emptyv/blank/vp] or [#linefind vp 1 Version] = 0 |then| #set nfnamevsn ? #set nfnameipm ?? |else| #set x [#linefind vp 1 Version] #set x [#lineget vp [x]] #set x2 [#charfind x 1 T0402V] [#if [x2] > 0 |then| #set nfnamevsn [#charget x [#compute [x2] + 7] for 1] #set x2 [#charfind x [#compute x2+1] ^] #set x2 [#charfind x [#compute x2+1] ^] #set x2 [#charfind x [#compute x2+1] ^] #set x2 [#charget x [#compute x2 + 1] for 3] [#case [x2] |AAA| #set nfnameipm 01 |AAB| #set nfnameipm 02 |AAC| #set nfnameipm 03 |AAD| #set nfnameipm 04 |AAE| #set nfnameipm 05 |AAF| #set nfnameipm 06 |AAG| #set nfnameipm 07 |AAH| #set nfnameipm 08 |AAI| #set nfnameipm 09 |AAJ| #set nfnameipm 10 |AAK| #set nfnameipm 11 |AAL| #set nfnameipm 12 |AAM| #set nfnameipm 13 |AAN| #set nfnameipm 14 |AAO| #set nfnameipm 15 |AAP| #set nfnameipm 16 |AAQ| #set nfnameipm 17 |AAR| #set nfnameipm 18 |AAS| #set nfnameipm 19 |AAT| #set nfnameipm 20 |AAU| #set nfnameipm 21 |AAV| #set nfnameipm 22 |AAW| #set nfnameipm 23 |AAX| #set nfnameipm 24 |AAY| #set nfnameipm 25 |AAZ| #set nfnameipm 26 |OTHERWISE| #set nfnameipm 00 ] [#if [#emptyv/blank/asapvers] |then| #set asapname [nfname] #set asapvers [nfnamevsn] #set asapipm [nfnameipm] ] [#if [asapvers] < [nfnamevsn] or ([asapvers] = [nfnamevsn] and [asapipm] < [nfnameipm]) or ([asapvers] = [nfnamevsn] and [asapipm] = [nfnameipm] and [#match [nfname] $SYSTEM.SYSTEM.ASAPMON]) |then| #set asapname [nfname] #set asapvers [nfnamevsn] #set asapipm [nfnameipm] ] ] ] ] |UNTIL| [cp] = 0 ] #set cnt [#variableinfo/depth/nfname] #set x [cnt] [#if [x] > 0 |then| [#if [#emptyv patch1] |then| #output #output ASAP is at least partially installed in the following locations: ] #output ] [#loop |do| [#if [x] > 0 |then| #set x2 [#charfindr nfname [#charcount nfname] .] #set nfname [#charget nfname 1 to [#compute [x2] - 1]] #output ASAP [nfnamevsn].[nfnameipm] is installed in [nfname] #pop nfnamevsn nfnameipm nfname #set x [#compute [x]-1] ] |UNTIL| [x] = 0 ] #result [cnt] #unframe ] #filter _break _error == main routine entry point == output routine banner #output ASAP Configuration Wizard - T0403V02.05 - (01OCT2004) - System [#mysystem] #output Copyright (C) 1999, 2001-2004 Hewlett-Packard Company #output #output This wizard will assist you in creating an ASAP configuration file #output (ASAPCONF). It should be run after installing ASAP. == set default ASAP configuration values set_defaults == prompt the user for any changes to the default values == COLLECT #set prmpt Is this node, [#mysystem], the central ASAP collection node(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #output #output *** Please configure ASAP on the central collection node. #unframe #return ] == Check ASAP Version on $SYSTEM.SYSTEM [#if [#fileinfo/existence/$SYSTEM.SYSTEM.ASAPMON] |then| #set patch1 NO #set asapcnt [decode^fnames $SYSTEM.SYSTEM.ASAPMON] #set patch1 [#if [#emptyv asapcnt] |then| #set asapcnt 0] == exception case [#if [asapcnt] = 0 or [#emptyv asapvers] or [#match [asapvers] ?] |then| #output #output The wizard was not able to determine the version(s) of ASAP #output installed on $SYSTEM.SYSTEM. |else| #set systemvers [asapvers] #set systemipm [asapipm] #set prmpt Do you want to build the ASAP configuration for that ASAP version(Y)? [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set asapvers #set asapipm ] ] ] #set prmpt [#if [#emptyv asapvers] or [#match [asapvers] ?] |then| #output #output The Wizard can search your system for pre-installed copies of ASAP #output or you can specify the version of ASAP that you want to configure. #set prmpt Would you like the Wizard to search for pre-installed copies of ASAP(Y)? [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set asapvers [WizardVersion] #set asapipm [WizardIPM] #set prmpt Please enter the version you want to build a configuration for([asapvers].[asapipm]): |else| #output #output Checking for installed ASAP components, one moment please... #set work [#filenames $*.*.asapmon] [#if [#emptyv/blank/work] |then| #output #output The wizard cannot locate ASAP on this system. #set asapvers [WizardVersion] #set asapipm [WizardIPM] #set prmpt Please enter the version you want to build a configuration for([asapvers].[asapipm]): |else| #set asapcnt [decode^fnames [work]] [#if [#emptyv asapvers] |then| #set asapvers [WizardVersion] #set asapipm [WizardIPM] ] [#if [#emptyv asapcnt] |then| #set asapcnt 0] == exception case [#if [asapcnt] = 0 |then| #output #output The wizard was not able to determine the version(s) of ASAP #output installed on this node. #set prmpt Please enter the version you want to build a configuration for([asapvers].[asapipm]): ] [#if [asapcnt] = 1 and [#match [asapname] $SYSTEM.SYSTEM.ASAPMON] |then| #output #output The wizard has located 1 copy of ASAP on $SYSTEM.SYSTEM. #set prmpt Is this the version you would like to build a configuration for(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set prmpt Please enter the version you want to build a configuration for(): ] ] [#if [asapcnt] = 1 and not [#match [asapname] $SYSTEM.SYSTEM.ASAPMON] |then| #output #output The wizard has located 1 copy of ASAP, but it is not installed #output on $SYSTEM.SYSTEM. #set prmpt Is this the version you would like to build a configuration for(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set prmpt Please enter the version you want to build a configuration for([asapvers].[asapipm]): ] ] [#if [asapcnt] > 1 and [#match [asapname] $SYSTEM.SYSTEM.ASAPMON] |then| #output #output The wizard has located [asapcnt] copies of ASAP on this system, #output with the most recent version installed on $SYSTEM.SYSTEM. #set prmpt Is this the version you would like to build a configuration for(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] Y] |then| #set prmpt |else| #set prmpt Please enter the version you want to build a configuration for([asapvers].[asapipm]): ] ] [#if [asapcnt] > 1 and not [#match [asapname] $SYSTEM.SYSTEM.ASAPMON] |then| #output #output The wizard has located [asapcnt] copies of ASAP on this system, #output but the most recent version is not installed on $SYSTEM.SYSTEM. #set prmpt Please enter the version you want to build a configuration for([asapvers].[asapipm]): ] ] ] ] [#if not [#emptyv/blank/prmpt] |then| [#loop |DO| #output #inputv val prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val] " "] |then| #set val [asapvers].[asapipm]] #set val [verify^vsn [#shiftstring/UP/[val]]] [#if [#match [val] 20] |then| #output #output *** Please enter a version number v.vv, for example 2.04 ] |UNTIL| not [#match [val] 20] ] ] [#if [WizardVersion] < [asapvers] or ([WizardVersion] = [asapvers] and [WizardIPM] < [asapipm]) |then| #output #output The ASAP version you want to configure ([asapvers].[asapipm]) is more recent than #output this Wizard ([WizardVersion].[WizardIpm]). While the configuration created by the Wizard #output will probably work with the newer version of ASAP, it will not know #output about any new configuration options that might be available in the #output new version. #set prmpt Do you want continue anyway(N)? [#if [#match [#shiftstring/UP/[get^yesno N]] N] |then| #unframe #return ] ] == DB VOLUME #set prmpt Please enter a subvolume for the ASAP database([_DB]): [#loop |DO| #output #inputv val prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val] " "] |then| #set val [_DB]] #set val [verify^subvol [#shiftstring/UP/[val]]] [#if [#match [val] 0] |then| #output #output *** Please specify a valid subvolume name ] [#if not [#match [val] 0] |then| #set dbvol [get^volume [val]] [#if [#deviceinfo/devicetype/[dbvol]] <> 3 |then| #output #output *** Please specify an existing disk volume #set val 0 |else| #set work [#filenames [val].*] [#if not [#emptyv work] |then| #output #output *** There are files in the subvolume you specified fileinfo [val].* #set prmpt2 Are you sure you want to use this subvolume(N): [#loop |DO| #output #inputv work prmpt2 [#if [#inputeof] |then| #raise _break] [#if [#match [work] " "] |then| #set work N] |UNTIL| [#match [#shiftstring/UP/[work]] Y] or [#match [#shiftstring/UP/[work]] N] ] [#if [#match [#shiftstring/UP/[work]] N] |then| #set val 0] ] ] ] |UNTIL| not [#match [val] 0] ] #set _DB [val] == PRIMARY CPU #set prmpt Please enter the primary CPU for the ASAP Monitor([_PRIMARY]): [#loop |DO| #output #inputv val prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val] " "] |then| #set val [_PRIMARY]] #set val [verify^cpu [#shiftstring/UP/[val]]] [#if [#match [val] 20] |then| #output #output *** Please enter a cpu number from 0 to 15 ] |UNTIL| not [#match [val] 20] ] #set _PRIMARY [val] == BACKUP CPU #set prmpt Please enter the backup CPU for the ASAP Monitor([_BACKUPCPU]): [#loop |DO| #output #inputv val prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val] " "] |then| #set val [_BACKUPCPU]] #set val [verify^cpu [val]] [#if [#match [val] 20] |then| #output #output *** Please enter a cpu number from 0 to 15 ] [#if [#match [val] [_PRIMARY] ] |then| #output #output *** The backup cpu must be different from the primary cpu #set val 20 ] |UNTIL| not [#match [val] 20] ] #set _BACKUPCPU [val] == OBJECTIVESEVENT [#if [asapvers] > 1 |then| #set prmpt Would you like ASAP to generate alerts as EMS events(N): [#if [#match [#shiftstring/UP/[get^yesno N]] Y] |then| #set _OBJECTIVESEVENT ON] ] == RATE #set prmpt What should the ASAP rate be, in minutes([_rate]): [#loop |DO| #output #inputv val prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val] " "] |then| #set val [_rate]] [#if [val] < 0 |then| #output #output *** Rate must be from 1 to 120 minutes ] [#if [val] > 120 |then| #output #output *** Rate must be from 1 to 120 minutes ] |UNTIL| [val] > 0 and [val] < 121 ] #set _RATE [val] == RETAIN #output #output ASAP maintains a historical database that it can purge every night #output or it can rename the files each night thereby preserving data. #set prmpt Would you like ASAP to retain the data(N): [#if [#match [#shiftstring/UP/[get^yesno N]] Y] |then| #set _RETAIN ROLLOVER] [#if ([asapvers] > 2 or ([asapvers] = 2 and [asapipm] > 4)) and [#match [_RETAIN] ROLLOVER] |then| #output #output Starting with release 2.05 and later ASAP can automatically maintain #output the number of days of history it will retain. You can determine how #output much space this will require by using the ASAP Database Calculator #output at http://NonstopAsap.com/Contributions.htm. You can also monitor #output database usage with the ASAP command interpreter DB command. If #output you do not allow ASAP to automatically retain data for a certain #output number of days, it is up to the user to manage the accumulated data #output so it doesn't fill up the disk drive. #set prmpt Do you want ASAP to automatically retain data for a number of days(Y)? [#if [#match [#shiftstring/UP/[get^yesno Y]] Y] |then| #set prmpt What is the default number of days you would like to retain([_DBMAXDAYS])? #set _DBMAXDAYS [get^days [_DBMAXDAYS]] #set prmpt Would you like to specify the number of days to save per entity(Y)? [#if [#match [#shiftstring/UP/[get^yesno Y]] Y] |then| #set prmpt How many days for the COMM entity([_DBMAXDAYS])? #set _DBMAXDAYS_COMM [get^days [_DBMAXDAYS]] #set prmpt How many days for the CPU entity([_DBMAXDAYS])? #set _DBMAXDAYS_CPU [get^days [_DBMAXDAYS]] #set prmpt How many days for the DISK entity([_DBMAXDAYS])? #set _DBMAXDAYS_DISK [get^days [_DBMAXDAYS]] #set prmpt How many days for the EXPAND entity([_DBMAXDAYS])? #set _DBMAXDAYS_EXPAND [get^days [_DBMAXDAYS]] #set prmpt How many days for the FILE entity([_DBMAXDAYS])? #set _DBMAXDAYS_FILE [get^days [_DBMAXDAYS]] #set prmpt How many days for the NODE entity([_DBMAXDAYS])? #set _DBMAXDAYS_NODE [get^days [_DBMAXDAYS]] #set prmpt How many days for the PROCESS entity([_DBMAXDAYS])? #set _DBMAXDAYS_PROCESS [get^days [_DBMAXDAYS]] #set prmpt How many days for the PROCESSBUSY entity([_DBMAXDAYS])? #set _DBMAXDAYS_PROCESSBUSY [get^days [_DBMAXDAYS]] #set prmpt How many days for the RDF entity([_DBMAXDAYS])? #set _DBMAXDAYS_RDF [get^days [_DBMAXDAYS]] #set prmpt How many days for the SPOOLER entity([_DBMAXDAYS])? #set _DBMAXDAYS_SPOOLER [get^days [_DBMAXDAYS]] #set prmpt How many days for the SYSTEM entity([_DBMAXDAYS])? #set _DBMAXDAYS_SYSTEM [get^days [_DBMAXDAYS]] #set prmpt How many days for the TAPE entity([_DBMAXDAYS])? #set _DBMAXDAYS_TAPE [get^days [_DBMAXDAYS]] #set prmpt How many days for the TMF entity([_DBMAXDAYS])? #set _DBMAXDAYS_TMF [get^days [_DBMAXDAYS]] ] |else| #set _DBMAXDAYS ] |else| #set _DBMAXDAYS ] == SYNC #output #output If this instance of ASAP will be used to monitor multiple nodes, #output then it is important to synchronize time across all nodes in the #output collection. #set prmpt Would you like ASAP to syncronize time on the nodes(N): [#if [#match [#shiftstring/UP/[get^yesno N]] Y] |then| #set _SYNC 60,1] == ACTION [#if [asapvers] > 2 or ([asapvers] = 2 and [asapipm] > 04) |then| #output #output ASAP can automatically enter actions against objects to recover #output from failure conditions. #set prmpt Would you like ASAP to enter actions to recover failed objects(Y)? [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _ACTION OFF] ] == ASAPX #output #output The ASAP Extension is required for ASAP to monitor applications. #set prmpt Would you like ASAP to monitor APPLICATIONS(N): [#if [#match [#shiftstring/UP/[get^yesno N]] Y] |then| #set _APP ON] == DISK #set prmpt Would you like ASAP to monitor DISK devices(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _DISK OFF] == EXPAND #set prmpt Would you like ASAP to monitor EXPAND lines(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _EXPAND OFF] == FILE [#if [asapvers] > 1 |then| #set prmpt Would you like ASAP to monitor FILES(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _FILE OFF] ] == NODE #set prmpt Would you like ASAP to monitor EXPAND nodes(N): [#if [#match [#shiftstring/UP/[get^yesno N]] Y] |then| #set _NODE ON] [#if [asapvers] > 1 |then| == PROCESS #set prmpt Would you like ASAP to monitor PROCESSES(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _PROCESS OFF] == RDF #set prmpt Would you like ASAP to monitor RDF(N): [#if [#match [#shiftstring/UP/[get^yesno N]] Y] |then| #set _RDF ON] == SPOOLER #set prmpt Would you like ASAP to monitor SPOOLER subsystems(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _SPOOLER OFF] == TAPE #set prmpt Would you like ASAP to monitor TAPE devices(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _TAPE OFF] == TMF #set prmpt Would you like ASAP to monitor TMF(Y): [#if [#match [#shiftstring/UP/[get^yesno Y]] N] |then| #set _TMF OFF] ] == ASAPCONF location #set prmpt Please enter a subvolume for the new ASAPCONF file([_confsubvol]): [#loop |DO| #output #inputv val prmpt [#if [#inputeof] |then| #raise _break] [#if [#match [val] " "] |then| #set val [_confsubvol]] #set val [verify^subvol [#shiftstring/UP/[val]]] [#if [#match [val] 0] |then| #output #output *** Please specify a valid subvolume name ] [#if not [#match [val] 0] |then| #set dbvol [get^volume [val]] [#if [#deviceinfo/devicetype/[dbvol]] <> 3 |then| #output #output *** Please specify an existing disk volume #set val 0 |else| [#if [#fileinfo/existence/[val].ASAPCONF] |then| #set prmpt2 [val].ASAPCONF already exists, would you like to purge it(N): [#loop |DO| #output #inputv work prmpt2 [#if [#inputeof] |then| #raise _break] [#if [#match [work] " "] |then| #set work N] |UNTIL| [#match [#shiftstring/UP/[work]] Y] or [#match [#shiftstring/UP/[work]] N] ] [#if [#match [#shiftstring/UP/[work]] Y] |then| #set work [#purge [val].ASAPCONF] [#if not [#match [work] 0] |then| #output #output *** Cannot purge [val].ASAPCONF, File error: [work] #set val 0 |else| #output #output [val].ASAPCONF purged ] |else| #set val 0 ] ] ] ] |UNTIL| not [#match [val] 0] ] #set _confsubvol [val] == All values are set, build ASAPCONF #output #output Creating [_confsubvol].ASAPCONF #push y m d h mi s ms #setmany y m d h mi s ms, [#contime [#timestamp]] #push #out #set #out [_confsubvol].ASAPCONF #output ! T0402 ASAP Configuration File #output ! Created: [y]/[m]/[d] [h]:[mi]:[s] #output ! ASAP Version: [asapvers].[asapipm] #output ! [#if [asapvers] > 2 or ([asapvers] = 2 and [asapipm] > 04) |then| #output SET ACTION [_ACTION] ] #output SET APP [_APP] #output SET BACKUPCPU [_BACKUPCPU] #output SET COLLECT [_COLLECT] #output SET DB [_DB].DB [#if not [#emptyv _DBMAXDAYS] |then| #output SET DBMAXDAYS [_DBMAXDAYS] ] [#if not [#emptyv _DBMAXDAYS_COMM] |then| #output SET DBMAXDAYS COMM [_DBMAXDAYS_COMM] ] [#if not [#emptyv _DBMAXDAYS_CPU] |then| #output SET DBMAXDAYS CPU [_DBMAXDAYS_CPU] ] [#if not [#emptyv _DBMAXDAYS_DISK] |then| #output SET DBMAXDAYS DISK [_DBMAXDAYS_DISK] ] [#if not [#emptyv _DBMAXDAYS_EXPAND] |then| #output SET DBMAXDAYS EXPAND [_DBMAXDAYS_EXPAND] ] [#if not [#emptyv _DBMAXDAYS_FILE] |then| #output SET DBMAXDAYS FILE [_DBMAXDAYS_FILE] ] [#if not [#emptyv _DBMAXDAYS_NODE] |then| #output SET DBMAXDAYS NODE [_DBMAXDAYS_NODE] ] [#if not [#emptyv _DBMAXDAYS_PROCESS] |then| #output SET DBMAXDAYS PROCESS [_DBMAXDAYS_PROCESS] ] [#if not [#emptyv _DBMAXDAYS_PROCESSBUSY] |then| #output SET DBMAXDAYS PROCESSBUSY [_DBMAXDAYS_PROCESSBUSY] ] [#if not [#emptyv _DBMAXDAYS_RDF] |then| #output SET DBMAXDAYS RDF [_DBMAXDAYS_RDF] ] [#if not [#emptyv _DBMAXDAYS_SPOOLER] |then| #output SET DBMAXDAYS SPOOLER [_DBMAXDAYS_SPOOLER] ] [#if not [#emptyv _DBMAXDAYS_SYSTEM] |then| #output SET DBMAXDAYS SYSTEM [_DBMAXDAYS_SYSTEM] ] [#if not [#emptyv _DBMAXDAYS_TAPE] |then| #output SET DBMAXDAYS TAPE [_DBMAXDAYS_TAPE] ] [#if not [#emptyv _DBMAXDAYS_TMF] |then| #output SET DBMAXDAYS TMF [_DBMAXDAYS_TMF] ] #output SET DISK [_DISK] #output SET EXPAND [_EXPAND] [#if [asapvers] > 1 |then| #output SET FILE [_FILE] ] #output SET ID [_ID] #output SET NODE [_NODE] [#if [asapvers] > 1 |then| #output SET OBJECTIVESAUDIT [_OBJECTIVESAUDIT] #output SET OBJECTIVESDB [_OBJECTIVESDB] #output SET OBJECTIVESEVENT [_OBJECTIVESEVENT] #output SET OBJECTIVESEVENTUP [_OBJECTIVESEVENTUP] #output SET OBJECTIVESEVENTCONSOLE [_OBJECTIVESEVENTCONSOLE] #output SET OBJECTIVESEVENTCONSOLEUP [_OBJECTIVESEVENTCONSOLEUP] #output SET OBJECTIVESEVENTSTATE [_OBJECTIVESEVENTSTATE] #output SET OBJECTIVESEVENTMAX [_OBJECTIVESEVENTMAX] #output SET OBJECTIVESRANK [_OBJECTIVESRANK] ] #output SET PRIMARY [_PRIMARY] [#if [asapvers] > 1 |then| #output SET PROCESS [_PROCESS] ] #output SET RATE [_RATE] #output SET RETAIN [_RETAIN] [#if [asapvers] > 1 |then| #output SET RDF [_RDF] #output SET SPOOLER [_SPOOLER] ] #output SET SYNC [_SYNC] [#if [asapvers] > 1 |then| #output SET TAPE [_TAPE] #output SET TMF [_TMF] ] #pop #out == ask to start ASAP, but only if the right version is installed in $SYSTEM.SYSTEM [#if not [#emptyv systemvers] |then| [#if [systemvers] = [asapvers] and [systemipm] = [asapipm] |then| #set val3 [#processinfo/cpu/[_ID]M] [#if [#emptyv val3] |then| #set prmpt Would you like the Wizard to start ASAP for you(Y)? |else| #set prmpt Would you like the Wizard to restart ASAP using the new configuration(Y)? ] [#if [#match [#shiftstring/UP/[get^yesno Y]] Y] |then| [#if not [#emptyv val3] |then| #set work SET ID [_ID] #append work SHUTDOWN COLLECT #append work SHUTDOWN MONITOR #append work EXIT $system.system.asap/inv work,outv val2/ #output #outputv val2 #output #output Waiting 15 seconds to give ASAP time to completely shutdown... #delay 1500 ] #set work START COLLECT #append work START MONITOR #append work EXIT #set val2 #push #defaults #set #defaults [_confsubvol] $system.system.asap/inv work,outv val2/ #output #outputv val2 #pop #defaults ] ] ] == Lastly, output trailer [#if [asapvers] > 1 |then| [#if ([#match [_FILE] ON] and [#match [_PROCESS] ON]) |then| #output #output You may now run ASAP CI and enter MONITOR FILE and MONITOR #output PROCESS commands to configure the files and processes that #output ASAP will monitor. |else| [#if [#match [_FILE] ON] |then| #output #output You may now run ASAP CI and enter MONITOR FILE commands to #output configure the files that ASAP will monitor. ] [#if [#match [_PROCESS] ON] |then| #output #output You may now run ASAP CI and enter MONITOR PROCESS commands to #output configure the processes that ASAP will monitor. ] ] ] #output #output The ASAP Wizard has successfully completed. #unframe #return