netfmt.1m (2010 09)
n
netfmt(1M) netfmt(1M)
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 executed.
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
4. Format all packets transmitted from the local node, local, to the remote node, 192.6.1.3,
which reference local TCP service ports login or shell, or remote UDP port 777:
filter ip_saddr local
filter ip_daddr 192.6.1.3
filter tcp_sport login
filter tcp_sport shell
filter udp_dport 777
5. Format a TCP connection from local node node2 to 192.6.1.3 which uses node2 service
port ftp and remote port 1198.
8 Hewlett-Packard Company − 8 − HP-UX 11i Version 3: September 2010