NFS Services Administrator's Guide (762805-001, March 2014)
/usr/sbin/nettl -start
2. Enter the following command to start logging:
/usr/sbin/nettl -l i w e d -e all
The logging classes are specified following the -l option. They are i (informational), w
(warning), e (error), and d (disaster). Disaster logging is always on. You cannot turn it off.
Information logging (i) fills up your logfile faster than the other classes, so you might want to
leave it off.
3. Recreate the event you want to log.
4. Enter the following command to turn logging off:
/usr/sbin/nettl -l d -e all
This command changes the logging class back to disaster only for all subsystems.
5. Enter the following command to format the binary logfile:
/usr/sbin/netfmt -lN -f /var/adm/nettl.LOG00 > formatted_file
where formatted_file is the name of the file where you want the formatted output from
netfmt. The default logfile, /var/adm/nettl.LOGnn, is specified in the nettl
configuration file, /etc/nettlgen.conf. If the file /var/adm/nettl.LOG00 does not
exist on your system, the default logfile may have been changed in /etc/nettlgen.conf.
For more information, see nettl(1M) and netfmt(1M).
Tracing with nettl and netfmt
1. Enter the following command to make sure nettl is running:
/usr/bin/ps -ef | grep nettl
If nettl is not running, enter the following command to start it:
/usr/sbin/nettl -start
2. Enter the following command to start tracing:
/usr/sbin/nettl -tn pduin pduout loopback -e all -s 1024 \
-f tracefile
3. Recreate the event you want to trace.
4. Enter the following command to turn tracing off:
/usr/sbin/nettl -tf -e all
5. Create the following filter file for netfmt:
filter ip_saddr remote_host_IP_address
filter ip_daddr remote_host_IP_address
filter rpcprogram nfs
filter rpcprogram nlockmgr
filter rpcprogram llockmgr
filter rpcprogram status
filter rpcprogram mount
filter rpcprogram rpcbind
remote_host_IP_address is the IP address of the host with which your host was
communicating when the event you want to trace occurred.
6. Enter the following command to format the binary trace file:
/usr/sbin/netfmt -c filter_file -lN -f tracefile.TRC0 > formatted_file
where tracefile is the name of the file you specified when you started tracing, and
formatted_file is the name of the file where you want the formatted output from netfmt.
For more information, type man 1M nettl or man 1M netfmt.
Logging and tracing of NFS services 105