evmshow.1 (2010 09)

e
evmshow(1) evmshow(1)
NAME
evmshow - display an EVM event
SYNOPSIS
evmshow [-d | -D |
-x][-t show_template][
-T timespec ][-r | -b item_list ][
-c config_file]
[
-f filter_exprt ][
-F][-k skip_count ][-n show_count ][filename | -]
DESCRIPTION
The
evmshow command is EVM’s event formatter. It reads raw EVM events either produced by other
EVM commands or stored in a file and converts them to display format for viewing. Events are read from
stdin if no filename is specified or if filename is
-. Formatted output is written to
stdout. The
evmshow command can be also used as a filter, producing a selected set of raw events as its output.
If none of the
-d,-D
,-r,or-b options is specified, each event is formatted according to the following
rules and written to
stdout as a single line of text.
If the
-t option is included, the supplied show_template string is used to format the event. If the
-t
option is omitted but the variable EVM_SHOW_TEMPLATE
is present in the environment, the value of the
variable is used as the show_template.Ifnoshow_template is available, a default value of
@@ is used.
The
@@ is explained in more detail later in this section.
A show_template is a string that contains event data item specifiers of the form
@item_name[%width],
where item_name is the name of any standard event data item, such as
timestamp or priority
and
width. The width is the minimum number of character spaces the value should occupy. See
EvmEvent (5) for a complete list of standard event data items.
Variables defined in EVM events and templates can be included in the show_template by using variable
specifiers, which begin with
$.
If a show_template is available,
evmshow replaces each specifier or variable in the template with the
value of the corresponding data item or variable from the event. The produced output string contains
only the required items. Any character in show_template is not changed in the output if it is not part of
an item specifier or not part of a variable. This method provides a convenient way to insert literal
strings, punctuation, and spacing characters.
Tabs and newlines are inserted by using
\t and \n, respectively.
For example, a show_template of
"@timestamp [@priority] @name" causes each event read by
evmshow to be displayed as a single line of text. The line of text is comprised of the date and time, the
priority of the event enclosed in brackets, and then the event name.
The output appears as follows:
03-Feb-2000 02:00:00 [200] sys.unix.evm.chmgr.cleanup_done
The special show_template specifier
@@ is replaced with the event’s formatted text. The formatted text is
produced by taking the
evmtemplate format data item. Then, any embedded variable specifiers (begin-
ning with $) are replaced with the corresponding variable value, and any data item specifiers are
replaced with the corresponding data item.
For example, the show_template of
"@timestamp [@priority] @@" results in the following style
of display:
03-Feb-2000 02:00:00 [200] EVM channel mgr: Log cleanup completed
Items specified by @ in the show_template that are not present in the event are replaced by the hyphen
character -.
An
@ or $ character not associated with a valid item name or variable value, respectively, is unchanged in
the output. If it is necessary to have an @@ or $ sequence in the output, the @ and $ characters should be
escaped with backslashes (\).
If the
-T option is specified, each formatted line is prefixed with the event’s timestamp value in a format
specified by timespec . The timespec can be any string containing specifiers as defined in the Field
Descriptors section of the date (1) manpage. For example, the string "%Y/%m/%d %T" yields the date
and time in yyyy/mm/dd hh:mm:ss format with a trailing space character separating it from the rest
of the line. Use this option instead of specifying @timestamp in the show_template to produce a times-
tamp in any desired format.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)