evmevent.5 (2010 09)

e
EvmEvent(5) EvmEvent(5)
0
Priority 0 should be used for events that are
specifically intended to be subscribed to by pro-
grams, and are not expected to be interesting to
administrators.
None Application
Catalog Name and Message Set Identication
If you plan to internationalize your events, you need to supply an I18N catalog file containing the format
strings for all of the events, and include the name of the file in the event. You also can break the file into
multiple message sets, and give the message set identification in the event. However, note that all mes-
sages pertaining to a particular event must belong to the same set. If all events described in a single tem-
plate file use messages from the same catalog or message set or both, you probably want to supply these
items as global values, so that you need only to specify them once.
Formatting an Event for Display
Although an event is an opaque binary structure, it can be formatted into a human-readable string by
using the
evmshow command or by calling the
EvmEventFormat() function. Formatting is essential
for human-oriented output, but may not be necessary for an application program that simply extracts any
variable data the event contains, and takes the necessary action.
The starting point for formatting an event is the format data item. A format is a text string that may con-
tain a simple piece of text, the names of standard data items, or the names of variables whose values are
to be substituted into the text, or any combination of these.
You include variable names for substitution by preceding them with a dollar (
$
) character, for example
$temp. You include standard data items by preceding their names with @, for example
@timestamp.
The
EvmEventFormat()
routine automatically converts data items or variables into displayable form,
regardless of their types.
You can escape the special meaning of a
$ or @ character in the format text by preceding it with a
backslash (\). To include a literal backslash in the text, use a double backslash.
If an event does not include a format data item, formatting it results in a default text string that includes
the event name and any variables the event may contain.
If the event includes a repeat count, then the repeat count is prepended to the output in the form
[repeat_count times].
Variable Data Items
You can use variable data items in your events to provide data that may be different each time the event
is posted.
You can give the variable any name you like. The name is a string that is carried with the event, and can
be used by a subscriber to extract the data in its original form. A variable name can be made up of any
combination of upper or lower case alphanumeric characters and the underscore character. By conven-
tion, names beginning with an underscore are reserved for system use.
EVM’s variable data items have these properties:
A name
A type
A value
A size (implicit for most types)
An I18N message id (for string variables only)
The following table shows the variable types that EVM supports:
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010