msgevent
Purpose
Sends an event or a rearm event to a specified user's console.
Syntax
msgevent [-h] user [tty]
Description
The msgevent script displays a message about an event or a rearm event on the console of a specified user. If tty is specified, the message is sent to that tty; otherwise, msgevent chooses a tty that belongs to user. When an event or a rearm event occurs, the event-response resource manager (ERRM) captures and posts information about the event or the rearm event in environment variables that it (the ERRM) generates.
The msgevent script can be used as an action that an event-response resource runs. You can also use this script as a template to create other user-defined actions. To find out how an event-response resource runs an action command, see RSCT: Administration Guide.
ERRM_COND_SEVERITY ERRM_TYPE occurred:
Condition: ERRM_COND_NAME
Node: ERRM_NODE_NAME
Resource: ERRM_RSRC_NAME
Resource Class: ERRM_RSRC_CLASS_NAME
Resource Attribute: ERRM_ATTR_NAME
Attribute Type: ERRM_DATA_TYPE
Attribute Value: ERRM_VALUE
Time: local time This example
is a template of the message that is displayed on the specified console
or tty when an event or a rearm event occurs
for which msgevent is a response action.
For the Time: field, this script returns
the local time when the event or the rearm event is observed. ERRM_TIME is
the environment variable that the ERRM supplies. The value of ERRM_TIME is
localized and converted to readable form (hh:mm:ss mm/dd/yy)
before it is displayed.The msgevent script captures the values of these ERRM environment variables and displays a message on the specified user's console.
Flags
- -h
- Writes this script's usage statement to standard output.
Standard output
When the -h flagoption is specified, this script's usage statement is written to standard output.
Exit status
- 0
- Script has run successfully.
- 1
- Error occurred when script was run.
Restrictions
This script must be run on the host where the ERRM is running.
Implementation specifics
This script is part of the Reliable Scalable Cluster Technology (RSCT) fileset for AIX®package for Linux®.
Location
- /opt/rsct/bin/msgevent
Examples
- Suppose the command /opt/rsct/bin/msgevent root is
an action in the critical-notification response, which is associated
with the /var space used condition on the
resource /var. The threshold of the event
expression defined for this condition is met, and an event occurs.
The critical-notification response takes place, and msgevent is
run. This message is displayed on a tty belonging to root:
Critical event occurred: Condition: /var space used Node: localnode Resource: /var Resource Class: IBM.FileSystem Resource Attribute: PercentTotUsed Attribute Type: Int32 Attribute Value: 91 Time: 18:43:03 03/28/02