HP-UX Event ManagerProgrammer's Guide
extending the name with the hardware ID that is assigned to each device that it registers. If the
hardware ID is 2, you can search for related events with the following command:
evmget -A -f "[name sys.unix.hw.*.2]"
This example, the asterisk (*) wildcard character ensures that you find all events posted by the
hardware subsystem that include the identifier 2, regardless of what they are reporting. However,
this filter may not select all of the events for the device that interests you, because subsystems
other than the hardware subsystem can also report information about the processor, and you
may want to include those events in the search. You can increase the scope of the search by
specifying [name *.2]. However, other events in the log with the number 2 in their names,
and not relevant to the hardware IDs are included in the results.
The convention of reserved component names enables you to select related events, regardless
of which subsystem or application posts them. By convention, a reserved component name begins
with an underscore character (_) and always identifies a particular type of entity. The posting
subsystem or application appends the reserved component name to the base event name before
posting the event. Depending on the entity being identified, the following component may then
identify the specific instance.
Although the reserved component names are generally defined on behalf of a particular subsystem
or application, after a name is defined, its use is not restricted — anything that has information
to report about the entity can include the reserved name and entity identifier in the events that
it posts. For example, the reserved component name _hwid specifies a hardware device identifier,
as defined by the hardware management subsystem, and must be followed by the device-ID.
Continuing with the above example, the name of the event that reports the registration of the
processor is sys.unix.hw.registered.cpu._hwid.2. You can find all events that relate to
all hardware devices with the following command:
evmget -A -f "[name *._hwid]"
You can then narrow the search to the processor that most interests you with the following
command:
evmget -A -f "[name *._hwid.2]"
The use of the wildcard in the filter for all components except the hardware ID components
ensures that the search yields all related events, regardless of which subsystem or application
posted them, provided that the posters followed the convention.
The reserved component name convention requires that when a reserved component name is
used, the posted event must contain a variable with the same name (including the leading
underscore) and value. This convention enables a subscribing client to retrieve the value from
the event through EVM's normal API functions, rather than parsing the event name to find the
value. The EvmEventPost( ) automatically finds any variables in an event whose name begins
with an underscore, because the convention may require the same information to be added to
the event twice. For more information about automatic name extension, see EvmEventPost(3).
An event can include any number of trailing reserved component names, in any order and in
any component position following the event's base name. Each reserved component must be
followed immediately by its associated value component.
You need not include a reserved component in an event's template name when registering the
event, because the EVM name matching scheme finds the best match for a posted event. In the
previous example, the template (and the base name of the event) is sys.unix.hw.registered.
Reserved components are appended to the name to provide a further level of detail when the
event is posted.
The convention of defining reserved component names that begin with a single underscore is
reserved for system use. For local sites and third-party product vendors, establish your own
conventions using a double underscore to start reserved component names, for example, _
_prod_code.
18 Event Manager Events