HP-UX Reference (11i v1 00/12) - 1M System Administration Commands N-Z (vol 4)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/naaagt.1m
________________________________________________________________
___ ___
n
netfmt(1M) netfmt(1M)
NAME
netfmt - format tracing and logging binary files
SYNOPSIS
/usr/sbin/netfmt [-k ] -s [-t records ][[-f ] file_name]
/usr/sbin/netfmt [-k] -p [-c config_file]
/usr/sbin/netfmt [-c config_file][-F ][-t records ][-v ][-l ][-n ]
[-N [-1 [-L ][-T ]]] [[-f ] file_name ]
/usr/sbin/netfmt -k [-c config_file][-F ][-t records ][-v ][[-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)) and the kernel logging facility (see kl(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.
There are two types of global formatting done by netfmt. The first one is global filtering for NetTLs
trace/log packets and the other is for KL’s log packets. A description of the filter configuration file follows
the option descriptions.
Options
netfmt recognizes the following command-line options and arguments:
-k This option tells netfmt that the input file is a KL log file. This option should be
specified if the user needs to log messages got from KL subsystems. This option can-
not be specified anywhere except as the first option in the command line.
-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.
Section 1M538 1 HP-UX Release 11i: December 2000
___
___