wallevent Command

Purpose

Broadcasts an event or a rearm event to all users who are logged in.

Syntax

wallevent [-c] [-h]

Description

The wallevent script broadcasts a message on an event or a rearm event to all users who are currently logged in to the host when the event or the rearm event occurs. Event or rearm event information is captured and posted by the event response resource manager in environment variables that are generated by the event response resource manager when an event or a rearm event occurs. This script can be used as an action that is run by an event response resource. It can also be used as a template to create other user-defined actions. The language in which the messages of the wallevent script are returned depend on the locale settings.

Messages are displayed in this format at the consoles of all users who are logged in when an event or a rearm event occurs for which this script is a response action :
Broadcast message from user@host (tty) at hh:mm:ss...

severity event_type occurred for Condition condition_name
on the resource resource_name of resource_class_name at hh:mm:ss mm/dd/yy
The resource was monitored on node_name and resided on {node_names}.

Event information is returned about the ERRM environment variables, and also includes the following:

Local Time
Time when the event or rearm event is observed. The actual environment variable supplied by ERRM is ERRM_TIME. This value is localized and converted to readable form before being displayed.

This script captures the environment variable values and uses the wall command to write a message to the currently logged-in user consoles.

Flags

-c
Instructs wallevent to broadcast the ERRM_VALUE of an ERRM event. When the -c flag is specified, wallevent broadcasts the SNMP trap message.
-h
Writes the script's usage statement to standard output.

Parameters

log_file
Specifies the name of the file where event information is logged. An absolute path for the log_file parameter should be specified.

The log_file is treated as a circular log and has a fixed size of 64KB. When log_file is full, new entries are written over the oldest existing entries.

If log_file already exists, event information is appended to it. If log_file does not exist, it is created so that event information can be written to it.

Exit Status

0
Script has run successfully.
1
Error occurred when the script was run.

Restrictions

  1. This script must be run on the node where the ERRM is running.
  2. The wall command is used to write a message to currently logged-in user consoles. Refer to the wall man page for more information on the wall command.

Standard Output

When the -h flag is specified, the script's usage statement is written to standard output.

Examples

  1. Suppose the wallevent script is a predefined 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 wallevent is run. The following message is displayed on the consoles of all users who are logged in:
    Broadcast message from joe@neverland.com (pts/6) at 18:42:03...
     
    Critical event occurred for Condition /var space used 
    on the resource /var of filesys of IBM.FileSystem at 18:41:50 03/28/02
    The resource was monitored on c174n05 and resided on {c174n05}.
  2. When a rearm event occurs for the /var space used condition on the resource /var, the following message is displayed on the consoles of all users who are logged in:
    Broadcast message from joe@neverland.com (pts/6) at 18:42:03...
     
    Critical rearm event occurred for Condition /var space used 
    on the resource /var of filesys of IBM.FileSystem at 18:41:50 03/28/02
    The resource was monitored on c174n05 and resided on {c174n05}.

Location

/usr/sbin/rsct/bin/wallevent