HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)

n
netfmt(1M) netfmt(1M)
NAME
netfmt - format tracing and logging binary files
SYNOPSIS
/usr/sbin/netfmt -s
[-t records][[-f
] file_name]
/usr/sbin/netfmt -p
[-c config_file]
/usr/sbin/netfmt
[-c config_file][
-F][-t records][-v][-l][
-n]
[
-N [-1 [
-L][-T]]] [[-f] file_name]
DESCRIPTION
netfmt is used to format binary trace and log data gathered from the network tracing and logging facility
(see nettl(1M)). The binary trace and log information can be read from a file or from standard input (if
standard input is a tty device, an informative message is given and
netfmt quits). Formatted data is
written to standard output.
Formatting options are specified in an optional filter configuration file. Message inclusion and format can
be controlled by the filter configuration file. If no configuration commands are specified, all messages are
fully formatted.
Global filtering is done by
netfmt for NetTL’s trace/log packets. A description of the filter configuration
file follows the option descriptions.
Options
netfmt recognizes the following command-line options and arguments:
-s Display a summary of the input file. The summary includes the total number of mes-
sages, the starting and ending timestamps, the types of messages, and information
about the system that the data was collected on. The contents of the input file are not
formatted; only a summary is reported.
-t records Specifies the number of records from the tail end of the input file to format. This
allows the user to bypass extraneous information at the beginning of the file, and get
to the most recent information quickly. The maximum number of records that can be
specified is 1000. If omitted, all records are formatted. The -t option is not allowed
when the input file is a FIFO (pipe).
-f file_name Specifies the input file containing the binary log or trace data. file_name may not be
the name of a tty device. Other options may impose additional restrictions on the
type of the input file allowed. If omitted, data is read from standard input.
-p Parse input: this switch allows the user to perform a syntax check on the config_file
specified by the
-c parameter. All other parameters are ignored. If the syntax is
correct, netfmt terminates with no output or warnings.
-c config_file Specifies the file containing formatter filter configuration commands. Syntax for the
commands is given below. When -c is omitted the file $HOME/.netfmtrc
is read
for both logging and tracing filter configuration commands if it exists.
-F Follow the input file. Instead of closing the input file when end of file is encountered,
netfmt keeps it open and continues to read from it as new data arrives. This is
especially useful for watching events occur in real time while troubleshooting a prob-
lem. Another use would be for recording events to a console or hard-copy device for
auditing. (Note that console logging is controlled by the configuration files
/etc/nettlgen.conf and /var/adm/conslog.opts
; see nettlgen.conf(4).)
The
-F option is not allowed when the input file is redirected.
The following options are not supported by all subsystems. If a subsystem does not support an option, that
option is ignored during formatting of data from that subsystem. Consult the product documentation of the
subsystem for information regarding the support of these options.
-v Enables output of verbose information. This includes additional cause and action text
with formatted output. This information describes the possible cause of the message
and any actions that may be required by the subsystem.
After the contents of the input file have been formatted a summary of the file is
displayed. When this option is used with the -t option, only a summary of the last
records is reported. No summary is produced when this option is used in conjunction
40 Hewlett-Packard Company 1 HP-UX 11i Version 3: February 2007