elogevent Command

Purpose

Logs event information generated by the event response resource manager (ERRM) to a specified log file.

Syntax

elogevent [-h] log_file

Description

The elogevent captures event information that is posted by the event response resource manager (ERRM) in environment variables the ERRM generates when an 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. This script always return messages in English.

Event information that is returned about the ERRM environment variables 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 uses the alog command to write event information to and read event information from the specified log_file.

Flags

-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
The script has run successfully.
1
A required log_file is not specified.
2
The log_file path is not valid.

Restrictions

Standard Output

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

Examples

  1. To log information, specify /tmp/event.log in the Web-based System Manager interface. ERRM runs this command:
    /usr/sbin/rsct/bin/elogevent/tmp/event.log
    The /tmp/event.log file does not need to exist when the command is run.
  2. To see the contents of the /tmp/event.log file, run this command:
    alog -f /tmp/event.log -o   
    The following sample output shows a warning event for the /var file system (a file system resource):
    =============================================================================
    Event reported at Mon Mar 27 16:38:03 2007
    
    Condition Name:                         /var space used
    Severity:                               Warning
    Event Type:                             Event
    Expression:                             PercentTotUsed>90
    
    Resource Name:                          /var
    Resource Class Name:                    IBM.FileSystem
    Data Type:                              CT_UINT32
    Data Value:                             91

Location

/usr/sbin/rsct/bin/elogevent