HP-UX Event ManagerAdministrator's Guide

Using Event Manager
Monitoring Events
Chapter 2 35
Monitoring Events
The following sections discuss the commands you can use to monitor and
review event activity.
Displaying Events Using evmshow
An Event Manager event is a binary data package, because it must be
converted to text before you can display it on a terminal. The evmshow
command reads binary events from its stdin stream or from a named
file, and outputs the same events in text form to stdout. To display the
contents of a file containing Event Manager events, enter the following
command at the HP-UX prompt:
# cat my_events | evmshow | more
This command displays the events from the log file in the default format.
It takes the format data item from each event, expands it with the values
of any variables it references, and displays it. References to variables are
identified by a dollar sign ($). Therefore, if the my_events file contains
an event with a format data item of ProcSM:A category "$_catname"
has been added , and the event also contains a variable named _catname
with a value of esmd, the corresponding line of the output is as follows:
ProcSM : A category "esmd" has been added
This information indicates what happened. However, not when it
happened, or the importance of the event. You can modify the output of
the evmshow command to include any data items in the event, including
its timestamp and priority, by using the -t option to specify a
show-template. A show-template is a text string that indicates which
data items you want to be displayed for an event, and how you want
them to be displayed.
The following example illustrates the use of a show-template to display
an event with a timestamp, a priority, and the formatted event message.
In the show-template, the names of the items to be displayed are each
preceded by an at sign (@) . Two at signs (@@) indicate that the event's
format item must be expanded and displayed. The second line shows the
output for the domain full event. In the output, the event priority is
enclosed within brackets, and there are two spaces before the message
text, exactly as specified in the following show-template: