HP-UX Reference (11i v2 03/08) - 1M System Administration Commands N-Z (vol 4)
n
netfmt(1M) netfmt(1M)
Multiple lines are ‘‘OR’’ed together.
STREAMS Filtering
The STREAMS subsystem filter allows filtering on some fields of the messages logged by STREAMS
modules and drivers. See strlog (7) for more information.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported in data. Single-byte character codesets are sup-
ported in filenames.
DEPENDENCIES
netfmt only recognizes subsystems and filters from products which have been installed and configured.
WARNINGS
The syntax that was used for the obsolete
LAN trace and log options has been mixed with the syntax for
the
netfmt command such that any old options files can be used without any changes. The combination
of syntax introduces some redundancy and possible confusion. The global filtering options have the string
formatter filter as the first two fields, while the
LAN filtering options merely have the string
filter as the first field. It is expected that the older
LAN filtering options may change to become more
congruent with the global filtering syntax in future releases.
The
nettl and netfmt commands read the /etc/nettlgen.conf
file each time they are exe-
cuted. These commands will not operate if the file becomes corrupted (see nettl (1M) and netfmt (1M)).
DIAGNOSTICS
Messages describe illegal use of
netfmt command and unexpected EOF encountered.
EXAMPLES
The first group of examples show how to use command line options.
1. Format the last 50 records in file /var/adm/nettl.LOG000
(the default log file):
netfmt -t 50 -f /var/adm/nettl.LOG000
2. Use the follow option to send all log messages to the console (normally, only
DISASTER-class
log messages are sent to the console in console form):
netfmt -f /var/adm/nettl.LOG000 -F > /dev/console
3. Monitor all log messages in a hpterm window:
hpterm -e /usr/sbin/netfmt -F -f /var/adm/nettl.LOG000
4. Read file /var/adm/trace.TRC000
for binary data and use conf.file as the filter
configuration file:
netfmt -c conf.file -f /var/adm/trace.TRC000
The remaining examples show how to specify entries in the filter configuration file used with the -c
option.
1. Tell
netfmt to format only INFORMATIVE-class log messages coming from the NS_LS_IP
subsystem between 10:31:53 and 10:41:00 on 23 November 1993.
formatter filter time_from 10:31:53 11/23/93
formatter filter time_through 10:41:00 11/23/93
formatter filter class !*
formatter filter class INFORMATIVE
formatter filter subsystem !*
formatter filter subsystem NS_LS_IP
2. Map hardware address to name(LAN):
name node1 08-00-09-00-0e-ca
name node3 02-60-8c-01-33-58
3. Format only packets from either of the above hardware addresses:
filter source 08-00-09-00-0e-ca
filter source 02-60-8c-01-33-58
Section 1M−−512 Hewlett-Packard Company − 9 − HP-UX 11i Version 2: August 2003