Variable Substitutions in Commands [ HP Performance Collection Software User's Manual (for MPE Systems) ] MPE/iX 5.0 Documentation
HP Performance Collection Software User's Manual (for MPE Systems)
Variable Substitutions in Commands
You can substitute any performance item or user variable into a THEN or
FINISH command before it is executed. To do so, enter an exclamation
point (!) followed by the name of the item or letter of the user
variable desired.
For example, if the global CPU value was 54.3, the command
:TELL MANAGER.SYS; The cpu is now !TOTAL CPU%
would execute as
:TELL MANAGER.SYS; The cpu is now 54.3%
You can make multiple substitutions on a single command line. Commands
found in a command file will also have variable substitutions performed
on them before they are executed.
CAUTION Executing an MPE/iX COMMAND file using the :filename
construction will not perform variable substitutions. To
substitute variables, you must enter the file name preceded by a
carat (^).
In addition to the performance metrics and user variables, you can use
one of the following special items as a substitution value. Please note
that these special items are not available for processing in user
variables or alarm conditions, just in commands.
Substitution Value Substituted
Code
!DATE The current date in MM/DD/YY format.
!TIME The current time in HH:MM AM/PM format.
!SYSTEM The system ID string from the SCOPE
collector.
Examples
VAR A = SYSTEM DISC + SESSION DISC
VAR B = A + BATCH DISC (All user disc IO.)
ALARM="Session CPU is too High" TYPE=CPU SEVERITY=5
IF SESSION CPU > 70 FOR 20 MINUTES
THEN :TELLOP Session CPU = !SESSION CPU%
FINISH :TELLOP Session CPU now down to !SESSION CPU
ALARM="Disc Rate Bug" TYPE=DISC SEVERITY=10
IF PHYS DISC < VAR B FOR 60; (Compare physical disc vs user disc.)
THEN :STREAM DCPJOB.COLLECT.HPPROBE
REPEAT=1440 (But don't do it more than once a day.)
ALARM="Once an Hour"
IF 2 > 1 FOR 60 (This condition is ALWAYS true.)
THEN :TELLOP !DATE !TIME !SYSTEM Response = !RESPONSE
REPEAT=60 (Do this once an hour.)
ALARM="Bad Programmers" TYPE=punish SEVERITY=99
IF HPDESK :RESPONSE > 5 FOR 10 MINUTES
IF PROGRAM DEVELPMENT :CPU > 40 FOR 10 MINUTES
THEN :ALTACCT DEVELOP :CPU > 0 :CONNECT=0
MPE/iX 5.0 Documentation