(Click to open topic with navigation)
Several internal variables are available for use in trigger scripts. These can be accessed using $<varName>.
Internal Variables | |
---|---|
ETYPE | The type of event that signals that the trigger can fire. ETYPE values include cancel, checkpoint, create, end, fail, hold, migrate, preempt, standing, start, and threshold. |
OID | The name of the object to which the trigger was attached |
OTYPE | The type of object to which the trigger is attached; can be rsv, job, node, vm, or sched |
OWNERMAIL | A variable that is populated only if the trigger's parent object has a user associated with it and that user has an email address associated with it |
TIME |
The time of the trigger launch in the following format: Wed Mar 10 12:35:12 2012 |
USER | The user (when applicable) |
Object-specific internal variables
Job Variables | |
---|---|
MASTERHOST | The primary node for the job |
HOSTLIST | The entire host list of the job |
Reservation Variables | |
---|---|
HOSTLIST | The entire host list for the reservation |
OBJECTXML | The XML representation of an object output is the same that is generated by mdiag -r --xml |
OS | The operating system on the first node of the reservation |
OWNER | The owner of the reservation |
Example 17-2: Internal variable example
AType=exec,Action="/tmp/trigger.sh $OID $HOSTLIST",EType=start
The object ID ($OID) and host list ($HOSTLIST) will be passed to /tmp/trigger.sh as command line arguments when the trigger executes the script. The script can then process this information as needed.