HP-UX Event ManagerAdministrator's Guide

Using Event Manager
Listing a Registered Event
Chapter 250
Using the -A Option to Simplify the Command String
The Event Manager commands are designed to be building blocks, with
each command performing a specific operation. This provides you with
flexibility in developing shell scripts to manipulate event information.
When you enter commands from the command line, you may prefer to
simplify the command.
The most common command sequence for event retrieval is the evmget
command, piped in to the evmsort command, piped in to the evmshow
command. You can then pipe the text output in to the more command to
display the output. Consider the following example:
# evmget -f '[pri >= 600]' | evmsort -s "priority-:timestamp+"
| evmshow | more
You can simplify the previous command by using the evmget
-A command option, which automatically pipes the command output to
other Event Manager commands. For example, you can use the -A option
to simplify this command as follows:
# evmget -A -f '[pri >= 600]' -s "priority-:timestamp+" | more
When the evmget -A command starts, it automatically runs the evmsort
-A command, and pipes its output in to that command. When the
evmsort command starts, the A option causes it to start the evmshow
command, piping events into it for display. You can supply a sort
specification with the s option and a show-template with the t option.
These options are sent to the evmsort command and evmget commands,
respectively.
The evmwatch command supports the -A described in “Monitoring
Events” on page 35.