HP-UX Event ManagerAdministrator's Guide

Using Event Manager
Listing a Registered Event
Chapter 2 49
Listing a Registered Event
You can register an event by adding a template file entry as described in
“Event Templates” on page 76, and entering the evmreload command
with the -d option to make the events known to the Event Manager
daemon, or restarting the system.
You can use the evmwatch -i command to retrieve a list of registered
events. Pipe the output from the evmwatch -i command to the evmshow
command to display the event templates in any desired format. For
example:
# evmwatch -i | evmshow -t "@name [@priority] @format" -x
Templates are returned as binary events which you can either redirect in
to a file or pipe to the evmshow command for display. In the previous
example, the show-template (t option) displays the name of the event,
the priority, and the message format. The x option causes each summary
line to be followed by an explanation of the event.
You must specify a command sequence that requests only the event's
message format, not an expanded message, because you are displaying
templates (not real system events). In the output, the summary lines
display the messages with names of variables rather than their values,
as shown in the following summary line and explanation:
sys.unix.procsm.category.create[200] ProcSM:A category
“$_catname” has been added.
This informational event is posted by ProcSM module to
indicate that a new category has been added to Process Set
Manager.
In this example, the $_catname variable is replaced by the category name
when you use the evmget command to retrieve a posted instance of the
event.
If you do not want to see all registered events, use a filter to limit the
output of the evmwatch command to the events in which you are
interested, as follows:
# evmwatch -i -f '[name *.evm]' | evmshow -t "@name \
[@priority] @format" -x