NFS Services Administrator's Guide (762805-001, March 2014)

Logging and tracing of NFS services
This section tells you how to start the following tools:
AutoFS logging” (page 76)
AutoFS tracing” (page 77)
“Logging for the other NFS services” (page 104)
“Logging with nettl and netfmt” (page 104)
“Tracing with nettl and netfmt” (page 105)
Logging for the other NFS services
You can configure logging for the following NFS services:
rpc.rexd
rpc.rstatd
rpc.rusersd
rpc.rwalld
rpc.sprayd
Logging is not available for the rpc.quotad daemon.
Each message logged by these daemons can be identified by the date, time, host name, process
ID, and name of the function that generated the message. You can direct logging messages from
all these NFS services to the same file.
To Control the Size of LogFiles
Logfiles grow without bound, using up disk space. You might want to create a cron job to truncate
your logfiles regularly. Following is an example crontab entry that empties the logfile at 1:00
AM every Monday, Wednesday, and Friday:
0 1 * * 1,3,5 cat /dev/null > log_file
For more information, type man 1M cron or man 1 crontab at the HP-UX prompt.
To Configure Logging for the Other NFS Services
1. Add the -l logfile option to the lines in /etc/inetd.conf for the services you want
to log. In the following example, logging is turned on for rpc.rexd and rpc.rstatd:
rpc xit tcp nowait root /usr/sbin/rpc.rexd 100017 1 \
rpc.rexd -l /var/adm/rpc.log
rpc dgram udp wait root /usr/lib/netsvc/rstat/rpc.rstatd \
100001 1-3 rpc.rstatd -l /var/adm/rpc.log
2. Enter the following command to restart inetd:
/usr/sbin/inetd -c
If you do not specify a logfile for the other NFS services (with the -l option), they do not log any
messages. The NFS services can all share the same logfile.
For more information, see rexd(1M), rstatd(1M), rusersd(1M), rwalld(1M) , and sprayd(1M).
Logging 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:
104 Troubleshooting NFS services