HP-UX Event ManagerAdministrator's Guide

Using Event Manager
Monitoring Events
Chapter 2 41
which are the data items on which you want to sort the events. The
specification is a list of data item names, separated by colons (:). For
example:
priority:timestamp
The preceding specification sorts events by timestamp within priority, so
the first group of events that are returned are those with the lowest
priority, sorted in their order of occurrence. You may use this
specification as follows:
# evmget -f '[pri >= 600]' | evmsort -s "priority:timestamp" |
evmshow | more
The default sort order is ascending, but you can change it to descending
for an individual item specifier by appending a minus sign (-). You can
explicitly request ascending order by specifying a plus sign (+). For
example, the following command displays the highest priority events
first (descending order), but within each priority range, the events are
sorted oldest first (ascending order):
# evmget -f '[pri >= 600]' | evmsort -s "priority-:timestamp+"
| evmshow | more
For consistency with the show-template syntax, the evmsort command
enables you to precede each item specifier with an at (@) character, as
described in Displaying Events Using evmshow. There is no requirement
to do this, and it does not affect the operation.
When you establish your sorting preferences, you can create a new
default sort sequence by setting the environment variable
EVM_SORT_SPEC. The following Korn shell (ksh) commands are
equivalent to the previous example:
# export EVM_SORT_SPEC="priority-:timestamp+"
# evmget -f '[pri >= 600]' | evmsort | evmshow | more
You can override the value of the EVM_SORT_SPEC variable at any time by
supplying a different sort specification with the s option.
Monitoring Events Using evmwatch
You can use the evmwatch command to monitor event activity through a
terminal window. This command is an Event Manager subscribing client.
It makes a connection to the daemon, sends it a subscription request, and