 |
» |
|
|
 |
Two levels of AutoFS tracing are available: - Detailed (level 3)
Includes traces of all AutoFS requests and replies, mount
attempts, timeouts, and unmount attempts. You can start level 3
tracing while AutoFS is running. - Basic (level 1)
Includes traces of all AutoFS requests and replies.
You must restart AutoFS to start level 1 tracing.
Stopping
AutoFS Detailed Tracing |  |
To stop detailed tracing, issue the same commands (that start
level 3 tracing) 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. Starting
AutoFS Basic Tracing |  |
To start basic (level 1) tracing, perform the following steps: Log on as root to the NFS client. Add -T to the AUTOMOUNTD_OPTIONS variable in the /etc/rc.config.d/nfsconf file, as in the following example: This change puts AutoFS basic tracing messages into the /var/adm/automount.log file. To get a list of all the automounted directories
on the client, issue the following command: for FS in $(grep autofs /etc/mnttab | awk ‘{print $2}’) do grep ‘nfs’ /etc/mnttab | awk ‘{print $2}’ | grep ^${FS} done |
For every automounted directory listed by the grep command, issue the following command to determine
whether the directory is currently in use: /usr/sbin/fuser -cu local_mount_point |
This command lists the process IDs and user names of all the
users using the mounted directory. Warn the users to cd out of the directory, and kill the processes that are
using the directory, or wait until the processes terminate. You can
issue the following command to kill all the processes using the mounted
directory: /usr/sbin/fuser -ck local_mount_point |
To kill AutoFS, issue the following command: /sbin/init.d/nfs.client stop |
 |  |  |  |  | WARNING! Do not kill the automountd daemon with the kill command because
it does not die gracefully. Moreover, it does not unmount AutoFS
mount points before it dies. Use the nfs.client
stop script to make sure automountd dies
cleanly. |  |  |  |  |
To start AutoFS with tracing enabled, issue the
following command: /abin/init.d/nfs.client start |
Stopping
AutoFS Basic Tracing |  |
To stop basic tracing, kill AutoFS and restart it (as described
in the preceding section) by removing -T from the AUTOMOUNTD_OPTIONS variable. AutoFS
Tracing Output |  |
The most interesting events to users are the tracing output
when mounting and unmounting of file systems occur. Mount
Event Tracing OutputThe general format of a mount event trace is as follows:MOUNT
REQUEST: <time stamp> <mount
information> <other tracing> ... <other tracing> MOUNT REPLY: <status>=mount status The <mount information> trace has the following format: 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 the 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 a 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 2003 May 13 18:45:09 t5 name=nfs127[/tmp] map=auto.indirect opts= path=/n2ktmp_8264/nfs127/tmp direct=1 May 13 18:45:09 t5 PUSH /etc/auto.indirect May 13 18:45:09 t5 POP /etc/auto.indirect May 13 18:45:09 t5 mapline: hpnfs127:/ /tmp hpnfs127:/tmp May 13 18:45:09 t5 do_mount1: May 13 18:45:09 t5 (nfs,nfs) /n2ktmp_8264/nfs127/tmp hpnfs127:/tmp penalty=0 May 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:/tmp May 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=3 min=3 May 13 18:45:09 t5 nfsmount: mount version=3 May 13 18:45:09 t5 Port numbers are 937, 937 May 13 18:45:09 t5 Port match May 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:/tmp May 13 18:45:09 t5 mount hpnfs127:/tmp dev=44000004 rdev=0 OK May 13 18:45:09 t5 MOUNT REPLY: status=0, AUTOFS_DONE |
 |
Unmount
Event Tracing OutputThe general format of an unmount event trace is as follows: 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: May 13 18:46:27 t1 UNMOUNT REQUEST: Tue May 13 18:46:27 2003 May 13 18:46:27 t1 dev=44000004 rdev=0 direct May 13 18:46:27 t1 ping: hpnfs127 request vers=3 min=2 May 13 18:46:27 t1 pingnfs OK: nfs version=3 May 13 18:46:27 t1 nfsunmount: umount /n2ktmp_8264/nfs127/tmp May 13 18:46:27 t1 Port numbers are 937, 937 May 13 18:46:27 t1 Port match May 13 18:46:27 t1 nfsunmount: umount /n2ktmp_8264/nfs127/tmp OK May 13 18:46:27 t1 unmount /n2ktmp_8264/nfs127/tmp OK May 13 18:46:27 t1 UNMOUNT REPLY: status=0
|
|