HP-UX Event ManagerAdministrator's Guide
Using Event Manager
Monitoring Events
Chapter 2 39
• Feeds events back to the evmget command which writes them to its
stdout stream
After all the channel get functions run and all the events are returned,
both get-server daemon and the evmget command terminate.
NOTE Though events may be stored in log files as lines of text, or in a special
binary format, the evmget command returns all events in the form of
binary events, which can be passed to evmshow for display. If you send
the output of evmget directly to your terminal, the command displays an
error message because the binary output cannot be displayed properly
and can affect the settings of your terminal. If you pipe the output into
another command, such as more or pg, the evmget command fails to
detect the error, and random characters are displayed.
Similar to the evmshow command, the evmget command supports a filter
option to enables you to limit the events it returns. For example, the
following command displays only high-priority events:
# evmget -f '[pri >= 600]' | evmshow | more
It is more efficient to specify a filter with the evmget command than with
the evmshow command. This is because the evmget command passes its
filter string to the event channel get function, which only returns events
that match the filter. Fewer events are passed back through the
get-server daemon to the evmget command, and the commands
operate faster because they transfer and process fewer events.
If you want to save retrieved events for later analysis, or to copy them to
another system, you can redirect the output of the evmget command into
a file. For example:
# evmget -f '[pri >= 600]' > my_events
At a later time, you can sort and filter the binary file and pass it to the
evmshow command to view it in any format you like.
Each get function feeds its events back to the evmget command in turn,
and the evmget command outputs them in the order in which it receives
them. You must pipe the events using the evmsort command to view the
events in a particular sort order. For more information about using the
evmsort command, see “Sorting Events Using evmsort” on page 40.