HP-UX Event ManagerAdministrator's Guide

Using Event Manager
Introduction to Event Filters
Chapter 2 55
The wildcard asterisk matches the components
sys.unix.procsm.category. To avoid any possibility that the shell
expand the wildcard character with filenames, enclose the filter string in
single quotes instead of the double quotes. This is always a wise
precaution if special characters are used in shell commands.
When you filter by name, Event Manager assumes that there is a
wildcard .* at the end of the name string, even if it is not included in the
command. Therefore, you may receive events with more name
components than you specify. The following two commands are
equivalent to each other, but the final wildcard (.*) in the first command
is unnecessary:
# cat my_events | evmshow -f '[name *.category*]'
# cat my_events | evmshow -f '[name *.category]'
You can find the names of events by specifying @name as one of the items
in your show-template when you run the evmshow command.
Use the filter syntax to combine multiple conditions into a single filter
with the AND, OR,and NOT keywords, and you can use parentheses to
group conditions. In the following example, the evmshow command
selects all events whose names include the component category, and
that have a priority of 200 or higher:
# cat my_events | evmshow -f '[name *.category] and [priority
>= 200]'
In the following example, the keyword priority is abbreviated to pri,
and name is abbreviated to na. Most filter keywords can be abbreviated
as described in EvmFilter (5).
# cat my_events | evmshow -f '([na *.category] and [pri >=
200])'
The examples in this section illustrate the most commonly used filter
keywords. When you are familiar with applying filters to the evmshow
command and the Event Manager commands described in the following
sections, you can use the more advanced filter features to create and save
useful filters, and to increase your ability to select the events that are
most interesting. For more information, see ā€œAdvanced Selection and
Filtering Techniquesā€ on page 56, and the full syntax is given in
EvmFilter (5).