[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3


logevent Command

Purpose

Logs event information generated by the Event Response resource manager to a specified log file.

Syntax

logevent [ -h ] LogFile

Description

The logevent command captures event information that is posted by the Event Response resource manager in environment variables that are generated by the Event Response resource manager when an event occurs. The logevent command can be used as an action that is executed by an Event Response resource. It can also be used as a template to create other user-defined actions.

The event information includes:

Condition Name
Name of the Condition resource associated with this event.

Severity
Significance of the Condition resource that caused the event or rearm event. The value can be one of the following: Critical, Warning, or Informational

Resource Name
Name of the resource whose attribute changed to cause this event or rearm event.

Resource Class Name
Name of the resource class to which the resource that caused this event or rearm event belongs.

Event Time
Time when the event or rearm event was observed.

Event Type
Type of event that occurred. The values can be event or rearm event.

Expression
Statement that evaluated to true and thereby caused this event or rearm event.

Data Type
Resource attribute type that caused this event or rearm event.

Data Value
Resource attribute value that caused this event or rearm event.

The logevent command uses the alog command to write event information to the specified LogFile. The LogFile is treated as a circular log and has a fixed size of 64KB. When LogFile already exists, event information is appended to it. When LogFile is full, new entries are written over the oldest existing entries. If LogFile does not exist, it is created so that event information can be written to it.

Note: The following restrictions apply:
  1. This command must be executed on the node where the Event Response resource manager is running.
  2. The user who runs this command must have write permission for the LogFile where the event information is logged.
  3. The alog command is used to read the file.

Parameters


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

Flags


-h Writes help information about this script to standard out. No further processing is performed.

Exit Status


0 Script has run successfully.
1 A required logfile is not specified.
2 The logfile path is invalid.

Examples

  1. To log information, specify /tmp/event.log, in the Web-based System Manager interface. The following command runs by the Event Response resource manager:

    /usr/sbin/rsct/bin/logevent /tmp/event.log
    

    Note: The /tmp/event.log file need not exist when the command is run.
  2. To see the contents of the /tmp/event.log file, type:

    alog -f /tmp/event.log -o
    

    The following example shows how a warning event for the /var file system (a file system resource):

    ===========================================================================================
    Event reported at Mon Mar 27 16:38:03 2000
     
    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
    

Files


/usr/bin/rsct/bin/logevent Location of logevent command

Related Information

The alog command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]