HP-UX Event ManagerProgrammer's Guide

In response to an error made by a user in a session that is under your control, and where
you have direct communication with the user. For example, a configuration program must
not post an event because a user responded incorrectly to a prompt.
If you are dealing with an “error that meets the following criteria: the error is expected and
is normal behavior, you know why the error is displayed, and the error does not cause a
system administrator to take any action.
If the condition that you have just detected was reported very recently, and reporting it
again serves no useful purpose.
You must avoid posting the same event repeatedly over a short period of time. For example, if
there is a condition oscillating between true and false, do not repeat the event posting for this
condition. In some cases, it may be helpful to post an occasional summary event, stating that the
same incident occurred multiple times within a specified length of time.
High levels of event activity can cause the loss of events because an application may not be able
to handle the message load. For information on how to handle missed events, see “Dealing with
Missed Events” (page 51).
Writing Event Explanation Text
You must supply explanation text for every EVM event. Explanation text is not included within
an event when it is posted, but can be included in a catalog file and referenced by the contents
of the event's reference and name data items. For more information about data items, see
“Reference Data Item” (page 21). The explanation text for sys.unix events is physically held
in a catalog file named evmexp.cat. To display the explanation text for an event, use the -x or
-d option of evmshow.
Your explanation must include the name of the event and a description of what it means. If an
event conveys different aspects depending on the context (for example, the number of occurrences
within a given time period, or the presence of certain other events), then state that fact and
provide a couple of sample situations. Whenever an action is required, state the action to be
taken. If the action varies with the context, then state that fact and provide examples. If the event
does not require an action from the user, state explicitly that the action is not required.
Example 2-1 shows sample explanation text for a system event.
Example 2-1 Sample Event Explanation Text
EVENT sys.unix.evm.daemon.event_activity
Explanation:
This high-priority event is posted by the EVM daemon when it
detects a high number of events occurring over several minutes.
Action: Use the evmget(1) command to review the event log for the source of the activity. If the log does not
show high activity around the time at which this event was posted, it is likely that the events were low priority,
and hence were not logged. You can monitor low-priority events by running the evmwatch(1) command with an
appropriate filter, or by temporarily reconfiguring the EVM logger to log low-priority events.
Note: You can change the parameters that control the posting
of this event by modifying the daemon configuration file,
/etc/evmdaemon.conf.
Designing Event Templates
Each posted event must have a template, and each template can support one or more events. A
template defines the event name and any constant data item within the event.
An event template is used for the following purposes:
To register the event with EVM. Any event that is not registered with the template cannot
be posted.
To allow data items that are common to most or all instances of an event (for example,
message catalog information) to be held in the template for that event. Including constant
data items in a template makes it easy to update the information, and relieves event posters
24 Event Manager Events