displayevent

Purpose

Sends a message about an event or a rearm event to a specified X-window display.

Syntax

displayevent [-h] x-display

Description

The displayevent script sends a message about an event or a rearm event to a specified X-window display. 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 displayevent 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.

This script returns event information about the following ERRM environment variables, which are described in 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 appears on the specified X-window display when an event or a rearm event occurs for which displayevent 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.

This script captures the values of the environment variables and uses the gless command to writewrites a message to the specified X-window display.

Parameters

x-display
Specifies the X-window display to which the event or rearm event is written.

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
The script has run successfully.
1
An error occurred when the 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/displayevent

Examples

  1. Suppose the command /opt/rsct/bin/displayevent adminhost:0 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 that is defined for this condition is met, and an event occurs. The critical-notification response takes place, and displayevent is run. The following message appears on the X-window display of the node adminhost:
    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:  12:21:25 02/27/04