| United States-English |
|
|
|
![]() |
NFS Services Administrator's Guide: HP-UX 11i version 2 > Chapter 8 Troubleshooting
NFS ServicesLogging and Tracing of NFS Services |
|
This section tells you how to start the following tools: You can configure logging for the following NFS daemons:
Each message logged by these daemons can be identified by the date, time, host name, process ID, and name of the daemon that generated the message. You can direct logging messages from all these NFS daemons to the same file. Log files grow without bound, using up disk space. You might want to create a cron job to truncate your log files regularly. Following is an example crontab entry that empties the log file at 1:00 AM every Monday, Wednesday, and Friday:
For more information, type man 1M cron or man 1 crontab at the HP-UX prompt.
If you do not specify the -l or-t option, rpc.mountd logs only errors to /var/adm/mountd.log. If this file does not exist, rpc.mountd creates it. rpc.mountd can share the same log file with the other NFS daemons. For more information, type man 1M mountd at the HP-UX prompt. To start detailed logging of rpc.statd and rpc.lockd while they are running, issue the following commands (PID is a process ID returned by the ps command):
The SIGUSR2 signal sets the logging to level 3 (the most detailed level). The logging for rpc.statd is appended to the file /var/adm/rpc.statd.log. The logging for rpc.lockd is appended to the file /var/adm/rpc.lockd.log. To stop detailed logging of rpc.statd and rpc.lockd, issue the same commands listed above to send the SIGUSR2 signal to the processes. The SIGUSR2 signal is a toggle that turns logging on or off, depending on its current state. For more information, type man 1M statd or man 1M lockd at the HP-UX prompt. To start basic logging of rpc.statd and rpc.lockd (just errors, warnings, startup, and shutdown), issue the following commands (PID is a process ID returned by the ps command):
To stop basic logging of rpc.statd and rpc.lockd, kill them and restart them without the -l logfile option. The rpc.statd and rpc.lockd daemons can share the same log file with the other NFS daemons. Please see the following man pages for more information: lockd (1M) or statd (1M). AutoFS logs messages through /usr/sbin/syslogd. By default, syslogd writes messages to the file /var/adm/syslog/syslog.log. See the syslogd (1M) man page for more information. .
Two levels of AutoFS tracing are available:
Level 3 tracing is appended to the file /var/adm/automount.log.
To stop level 3 tracing, issue the same commands listed above to send the SIGUSR2 signal to automountd. The SIGUSR2 signal is a toggle that turns tracing on or off depending on its current state. If you have basic (level 1) tracing turned on when you send the SIGUSR2 signal to automountd, the SIGUSR2 signal turns tracing off.
To stop AutoFS tracomg, kill AutoFS and restart it (as described in the previous section), only with removing -T from AUTOMOUNTD_OPTIONS. The most interesting events to the users are the tracing output when mounting and unmounting of file systems occur. The general format of a mount event trace is:MOUNT REQUEST: <time stamp> <mount information> <other tracing> ... <other tracing> MOUNT REPLY: <status>=mount statusThe <mount information> trace has the following format (all on oneline): name=<key>[<subdirectory>] <map>= map name <opts>=mount options <path>=mount path <other tracing> where: <key> = the key value from the map <subdirectory> = subdirectory (may be blank) <map> = name of map <opts> = mount options <path> = mount path <other tracing> = other trace information The mount status in the mount reply contains 0 if the mount is successful, it has non-zero value when the mount is not successful. The following is an example of a typical mount trace:May 13 18:45:09 t5 MOUNT REQUEST: Tue May 13 18:45:09 2003May 13 18:45:09 t5 name=nfs127[/tmp] map=auto.indirect opts=path=/n2ktmp_8264/nfs127/tmp direct=1May 13 18:45:09 t5 PUSH /etc/auto.indirectMay 13 18:45:09 t5 POP /etc/auto.indirectMay 13 18:45:09 t5 mapline: hpnfs127:/ /tmp hpnfs127:/tmpMay 13 18:45:09 t5 do_mount1:May 13 18:45:09 t5 (nfs,nfs) /n2ktmp_8264/nfs127/tmp hpnfs127:/tmp penalty=0May 13 18:45:09 t5 nfsmount: input: hpnfs127[other]May 13 18:45:09 t5 nfsmount: standard mount on/n2ktmp_8264/nfs127/tmp :May 13 18:45:09 t5 hpnfs127:/tmpMay 13 18:45:09 t5 nfsmount: v3=1[0],v2=0[0] => v3.May 13 18:45:09 t5 nfsmount: Get mount version: request vers=3min=3May 13 18:45:09 t5 nfsmount: mount version=3May 13 18:45:09 t5 Port numbers are 937, 937May 13 18:45:09 t5 Port matchMay 13 18:45:09 t5 mount hpnfs127:/tmp /n2ktmp_8264/nfs127/tmp()May 13 18:45:09 t5 nfs_args: hpnfs127, , 0x2004060, 0, 0, 0, 0,0, 0, 0, 0,May 13 18:45:09 t5 args_temp: hpnfs127, , 0x3004060, 0, 0, 0, 0,0, 0, 0, 0, hpnfs127:/tmpMay 13 18:45:09 t5 mount hpnfs127:/tmp dev=44000004 rdev=0 OKMay 13 18:45:09 t5 MOUNT REPLY: status=0, AUTOFS_DONE The general format of an unmount event trace is: UNMOUNT REQUEST: <time stamp> <other tracing> ... <other tracing> UNMOUNT REPLY: <status>=unmount status The unmount status in the unmount reply contains 0 if the unmount is successful, it has a non-zero value when the unmount is not successful. The following is an example of a typical unmount trace event:
You can configure logging for the following NFS services:
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. Log files grow without bound, using up disk space. You might want to create a cron job to truncate your log files regularly. Following is an example crontab entry that empties the log file at 1:00 AM every Monday, Wednesday, and Friday:
For more information, type man 1M cron or man 1 crontab at the HP-UX prompt.
If you do not specify a log file for the other NFS services (with the -l option), they do not log any messages. The NFS services can all share the same log file. See the man page, rexd(1M), for descriptions of the messages logged by the rpc.rexd daemon. For more information, see the following man pages: rexd(1M), rstatd(1M), rusersd(1M), rwalld(1M), and sprayd(1M). You can configure logging for the following NIS processes:
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 NIS daemons to the same file. Log files grow without bound, using up disk space. You might want to create a cron job to truncate your log files regularly. Following is an example crontab entry that empties the log file at 1:00 AM every Monday, Wednesday, and Friday:
For more information, please see the man page, cron(1M) or crontab, at the HP-UX prompt. If ypxfr is run interactively from the command line, it logs messages to standard output. If ypxfr is run by cron or by yppush, it logs messages to the file /var/yp/ypxfr.log, if the file exists. To start logging of ypxfr, issue the following command to make sure the /var/yp/ypxfr.log file exists:
To stop logging of ypxfr, remove the ypxfr.log file:
You cannot redirect the logging output of ypxfr. For more information, see the following man pages: ypxfr(1M), cron(1M), and yppush(1M). By default, the ypserv daemon logs messages to the file /var/yp/ypserv.log, if it exists. To start logging of ypserv, issue the following command to make sure the /var/yp/ypserv.log file exists:
To stop logging of ypserv, remove the ypserv.log file:
If you want to direct ypserv logging to a different file, follow these steps:
If you specify a log file with the -l option, ypserv can share the same log file with the other NIS daemons. For more information, type man 1M ypserv at the HP-UX prompt.
If you do not specify a log file for ypbind (with the -l option), it logs messages to the system console, /dev/console. The ypbind daemon can share the same log file with the other NIS daemons. For more information, type man 1M ypbind at the HP-UX prompt.
For more information, type man 1M yppasswdd at the HP-UX prompt. You can log the activities of the NIS+ rpc.nisd daemon with the -A and -v options.
The -v option causes rpc.nisd to send a running narration of what it is doing to syslogd. Messages are logged at LOG_INFO priority. The -A option logs NIS+ authentication activities to syslogd with LOG_INFO priority. You might have to modify your /etc/syslog.conf file to allow messages of LOG_INFO priority to be logged. For more information, type man 1M syslogd or man 1M nisd at the HP-UX prompt.
NIS+ logging is not supported by nettl. For more information, type man 1M nettl or man 1M netfmt.
NIS+ tracing is not supported by nettl. For more information, type man 1M nettl or man 1M netfmt. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||