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)
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.LOG00 (the default log file):
netfmt -t 50 -f /var/adm/nettl.LOG00
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.LOG00 -F > /dev/console
3. Monitor all log messages in a
hpterm window:
hpterm -e /usr/sbin/netfmt -F -f /var/adm/nettl.LOG00
4. Read file /var/adm/trace.TRC1
for binary data and use conf.file as the filter
configuration file:
netfmt -c conf.file -f /var/adm/trace.TRC1
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.
filter connection node2:ftp 192.6.1.3:1198
6. Format all packets except those that use interface lan0:
filter interface ! lan0
7. Format all logged events for subsystem ip. No other events are formatted. (By default, all
events are formatted):
Section 1M546 9 HP-UX Release 11i: December 2000
___
___