ServerNet Cluster Manual
TACL Macro for Configuring MSGMON, SANMAN,
and SNETMON
ServerNet Cluster Manual—520575-003
E-2
Example Macro
Example Macro
?tacl macro
== This is a sample TACL macro which configures the $ZPM entries for
== Msgmon, Sanman, and Snetmon. HP recommends different
== configurations depending upon whether the system has 2 processors,
== 4 processors, or more than 4 processors. This macro starts by
== determining the number of processors currently loaded. If it is
== 5 or more, the macro configures the $ZPM entries as such. If it is
== less than 5 processors, it prompts the user for the number of
== processors to configure for.
#frame
#push listProcessors numProcessors parseTest ptrChar scf^output
#push #inlineprefix
#set #inlineprefix +
== This routines parses the user responses
[#def parseResponse routine
|BODY|
#result [#argument number /minimum 2, maximum 16/
token /token yes/
token /token no/
token /token quit/
otherwise]
]
== This is the main procssing routine. It gets executed once at the
== bottom of the TACL macro.
[#def mainBody routine
|BODY|
#output Determining the total of number of processors...
#output
#set listProcessors [#processorstatus]
#set ptrChar [#charfindrv listProcessors [#charcount listProcessors] "-1"]
#set numProcessors -1 == Initialize to -1 because we always overshoot by 1
[#loop
|WHILE| [ptrChar]
|DO|
#set ptrChar [#charfindrv listProcessors [#compute [ptrChar]-1] " "]
#set numProcessors [#compute numProcessors + 1]
]
[#if numProcessors <= 4
|THEN|
#output In order to properly configure this system for Servernet
#output Clusters we need to know how many processors it has.
#output